@milaboratories/graph-maker 1.1.138 → 1.1.140
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/Chart.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/Chart.vue.js +1 -0
- package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
- package/dist/GraphMaker/components/LassoControls/index.vue.js +15 -13
- package/dist/GraphMaker/components/LassoControls/index.vue.js.map +1 -1
- package/dist/GraphMaker/dataBindAes.d.ts +5 -5
- package/dist/GraphMaker/dataBindAes.d.ts.map +1 -1
- package/dist/GraphMaker/dataBindAes.js +52 -49
- package/dist/GraphMaker/dataBindAes.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js +14 -14
- package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.d.ts.map +1 -1
- package/dist/GraphMaker/index.vue.js +125 -124
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/types.d.ts +1 -1
- package/dist/GraphMaker/types.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +6 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts +4 -8
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +15 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +12 -3
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +21 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +10 -6
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +31 -13
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +56 -62
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +29 -13
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +20 -19
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +57 -54
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js +5 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js.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 +8 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js.map +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 +38 -34
- 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/Error.js +4 -22
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.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 +199 -198
- 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 +81 -79
- 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 +140 -134
- 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 +17 -17
- 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 +32 -31
- 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 +62 -58
- 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 +28 -28
- 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 -25
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +13 -13
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +69 -76
- 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 +50 -38
- 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/utils/sortDotsByGrouping.js +18 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js.map +1 -0
- 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 +26 -26
- 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 +97 -118
- 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 +23 -17
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +25 -19
- 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/arraysAreDifferent.js +7 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js.map +1 -0
- 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 +1111 -1097
- 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 Fe, 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 pe 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", te = "pl7.app/isDiscreteFilter", Ge = "pl7.app/discreteValues", Me = "pl7.app/graph/axis/highCardinality", qe = "pl7.app/graph/isVirtual", ve = "pl7.app/isLinkerColumn", ne = "pl7.app/format", F = class ae {
|
|
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
|
}
|
|
@@ -10,13 +10,13 @@ var Le = "pl7.app/axisNature", xe = "pl7.app/label", Te = "pl7.app/columnAsAxis/
|
|
|
10
10
|
return z(this);
|
|
11
11
|
}
|
|
12
12
|
static fromAxisSpec(e) {
|
|
13
|
-
return new
|
|
13
|
+
return new ae({ name: e.name, type: e.type, domain: e.domain });
|
|
14
14
|
}
|
|
15
15
|
static fromAxesSpec(e) {
|
|
16
|
-
return e.map((o) =>
|
|
16
|
+
return e.map((o) => ae.fromAxisSpec(o));
|
|
17
17
|
}
|
|
18
18
|
copy() {
|
|
19
|
-
return new
|
|
19
|
+
return new ae({ type: this.type, name: this.name, domain: this.domain });
|
|
20
20
|
}
|
|
21
21
|
toPFrameId() {
|
|
22
22
|
return {
|
|
@@ -26,9 +26,9 @@ var Le = "pl7.app/axisNature", xe = "pl7.app/label", Te = "pl7.app/columnAsAxis/
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
static fromPojo(e) {
|
|
29
|
-
return new
|
|
29
|
+
return new ae(e);
|
|
30
30
|
}
|
|
31
|
-
}, W = class
|
|
31
|
+
}, W = class Ce {
|
|
32
32
|
constructor({ name: e, type: o }) {
|
|
33
33
|
this.kind = "column", this.name = e, this.type = o;
|
|
34
34
|
}
|
|
@@ -36,58 +36,58 @@ 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 Ce(e);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
function
|
|
42
|
+
function O(t) {
|
|
43
43
|
return t !== null && t.kind === "column";
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function re(t) {
|
|
46
46
|
return t !== null && t.kind === "axis";
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function b(t) {
|
|
49
49
|
const e = JSON.parse(t);
|
|
50
50
|
if (e.kind === "column")
|
|
51
51
|
return W.fromPojo(e);
|
|
52
52
|
if (e.kind === "axis")
|
|
53
|
-
return
|
|
53
|
+
return F.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; ) {
|
|
@@ -111,89 +111,89 @@ function ze(t) {
|
|
|
111
111
|
}
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function oe(t) {
|
|
115
115
|
if (!t.length)
|
|
116
116
|
return [];
|
|
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 = oe(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
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
if (!
|
|
143
|
+
async function He(t, e, o, n, l, s, c, r = !0, a) {
|
|
144
|
+
var u, p, m, S;
|
|
145
|
+
const h = b(e);
|
|
146
|
+
if (O(h)) {
|
|
147
|
+
const x = await t.pFrameProvider.getColumnSpecById(h);
|
|
148
|
+
if (!x)
|
|
149
149
|
return;
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const w = De(
|
|
151
|
+
x,
|
|
152
152
|
l,
|
|
153
153
|
s,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
).map((
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
c,
|
|
155
|
+
a
|
|
156
|
+
).map((d) => F.fromAxisSpec(d).toCanonicalString()), v = new Set(w), D = x.axesSpec.map((d) => F.fromAxisSpec(d).toCanonicalString()), B = {};
|
|
157
|
+
r && D.forEach((d, i) => {
|
|
158
|
+
v.has(d) && (B[d] = i);
|
|
159
159
|
});
|
|
160
160
|
const C = {
|
|
161
161
|
kind: "column",
|
|
162
|
-
name:
|
|
162
|
+
name: x.name,
|
|
163
163
|
label: o ?? await T(t, e, []),
|
|
164
|
-
type:
|
|
165
|
-
spec:
|
|
166
|
-
annotations:
|
|
167
|
-
isSubsetFilter: ((
|
|
168
|
-
isDiscreteFilter:
|
|
169
|
-
axesToBeFixed:
|
|
170
|
-
axesToBeFixedIndexes:
|
|
164
|
+
type: x.valueType,
|
|
165
|
+
spec: x,
|
|
166
|
+
annotations: x.annotations,
|
|
167
|
+
isSubsetFilter: ((u = x.annotations) == null ? void 0 : u[$]) === "true",
|
|
168
|
+
isDiscreteFilter: x.valueType === "String" || ((p = x.annotations) == null ? void 0 : p[te]) === "true",
|
|
169
|
+
axesToBeFixed: w,
|
|
170
|
+
axesToBeFixedIndexes: B
|
|
171
171
|
};
|
|
172
|
-
n.set(
|
|
173
|
-
for (const
|
|
174
|
-
const y =
|
|
172
|
+
n.set(h.toCanonicalString(), C);
|
|
173
|
+
for (const d of x.axesSpec) {
|
|
174
|
+
const y = F.fromAxisSpec(d).toCanonicalString();
|
|
175
175
|
if (n.has(y))
|
|
176
176
|
continue;
|
|
177
|
-
const f =
|
|
177
|
+
const f = Ie(d), g = {
|
|
178
178
|
kind: "axis",
|
|
179
|
-
name:
|
|
179
|
+
name: d.name,
|
|
180
180
|
label: await T(t, y, [e]),
|
|
181
|
-
type:
|
|
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" || ((S = d.annotations) == null ? void 0 : S[te]) === "true",
|
|
188
188
|
parentSources: [e]
|
|
189
189
|
};
|
|
190
|
-
n.set(y,
|
|
190
|
+
n.set(y, g);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
const e =
|
|
196
|
-
return
|
|
194
|
+
function ge(t) {
|
|
195
|
+
const e = b(t), { name: o, type: n } = e;
|
|
196
|
+
return O(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
|
|
229
|
-
const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s =
|
|
228
|
+
function Ye(t) {
|
|
229
|
+
const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s = b(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: re(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: re(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: re(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: re(s) ? { type: "axis", id: s.toPFrameId() } : {
|
|
264
264
|
type: "column",
|
|
265
265
|
id: s.name
|
|
266
266
|
},
|
|
@@ -274,117 +274,121 @@ 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
|
-
const s =
|
|
293
|
-
if (
|
|
294
|
-
const
|
|
295
|
-
(
|
|
292
|
+
const s = b(l);
|
|
293
|
+
if (O(s)) {
|
|
294
|
+
const c = await t.pFrameProvider.getColumnSpecById(s), r = ((n = c == null ? void 0 : c.axesSpec) != null ? n : []).find(
|
|
295
|
+
(a) => F.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
|
-
const n =
|
|
306
|
-
if (
|
|
305
|
+
const n = b(e);
|
|
306
|
+
if (O(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 J(t, e, o) {
|
|
316
|
+
const n = b(e), l = await k(t, e, o);
|
|
317
|
+
let s;
|
|
318
|
+
return O(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 J(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
|
-
return ((e = t.annotations) == null ? void 0 : e[$]) === "true" || ((o = t.annotations) == null ? void 0 : o[
|
|
335
|
+
return ((e = t.annotations) == null ? void 0 : e[$]) === "true" || ((o = t.annotations) == null ? void 0 : o[te]) === "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 = F.fromAxisSpec(c).toCanonicalString(), u = F.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;
|
|
348
352
|
}
|
|
349
|
-
async function
|
|
353
|
+
async function Q(t, e) {
|
|
350
354
|
const o = /* @__PURE__ */ new Set(), n = [];
|
|
351
355
|
for (const l of e) {
|
|
352
|
-
const s =
|
|
353
|
-
if (
|
|
354
|
-
const
|
|
355
|
-
if (!
|
|
356
|
+
const s = b(l);
|
|
357
|
+
if (O(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 = F.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((S) => t[S][n[S]].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,84 +402,84 @@ async function X(t) {
|
|
|
398
402
|
!1,
|
|
399
403
|
void 0,
|
|
400
404
|
void 0,
|
|
401
|
-
{ [
|
|
402
|
-
), o =
|
|
405
|
+
{ [ve]: "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 = b(l);
|
|
411
|
+
if (!O(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 v = F.fromAxisSpec(w).toCanonicalString();
|
|
419
|
+
return !(s != null && s.some((D) => D.axisSource === v));
|
|
416
420
|
}
|
|
417
|
-
),
|
|
418
|
-
const
|
|
419
|
-
return !
|
|
421
|
+
), u = new Set(n.map((w) => F.fromAxisSpec(w).toCanonicalString())), p = a.filter((w) => {
|
|
422
|
+
const v = F.fromAxisSpec(w).toCanonicalString();
|
|
423
|
+
return !u.has(v);
|
|
420
424
|
});
|
|
421
|
-
if (!
|
|
425
|
+
if (!p.length)
|
|
422
426
|
return [];
|
|
423
|
-
const m =
|
|
424
|
-
if (!m || !
|
|
425
|
-
throw Error(`Can't create axes tree for ${
|
|
426
|
-
const
|
|
427
|
-
return
|
|
428
|
-
var
|
|
429
|
-
const D = j(
|
|
427
|
+
const m = oe(n), S = oe(p);
|
|
428
|
+
if (!m || !S)
|
|
429
|
+
throw Error(`Can't create axes tree for ${r.name}`);
|
|
430
|
+
const h = new Set(m.map(j)), x = /* @__PURE__ */ new Set();
|
|
431
|
+
return S.forEach((w) => {
|
|
432
|
+
var v;
|
|
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
|
-
|
|
436
|
-
} else if (
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
435
|
+
const B = o.get(D), d = (B ? [...B.keys()] : []).find((y) => h.has(y));
|
|
436
|
+
if (!d)
|
|
437
|
+
throw Error(`Can't find composite linker column for ${r.name}, ${D}`);
|
|
438
|
+
const i = (v = o.get(D)) == null ? void 0 : v.get(d);
|
|
439
|
+
x.add(i.toCanonicalString());
|
|
440
|
+
} else if (w.length === 1) {
|
|
441
|
+
const B = F.fromAxisSpec(w[0]).toCanonicalString();
|
|
442
|
+
Qe(e, u, B).forEach((d) => {
|
|
443
|
+
x.add(d.toCanonicalString());
|
|
440
444
|
});
|
|
441
445
|
}
|
|
442
|
-
}), [...
|
|
446
|
+
}), [...x].map((w) => b(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(F.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 = oe(e);
|
|
455
|
+
let a = oe(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), S = l.get(m);
|
|
462
|
+
return !(S ? [...S.keys()] : []).some((x) => u.has(x));
|
|
459
463
|
}
|
|
460
|
-
),
|
|
464
|
+
), a.some((p) => p.length > 1) ? a.flatMap((p) => p) : (a = a.filter(([p]) => !n.has(F.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 (
|
|
469
|
-
let
|
|
470
|
-
|
|
470
|
+
for (let c = 0; c < t.length; c++) {
|
|
471
|
+
const { selectedSource: r, selectedFilterValue: a, selectedFilterRange: u, type: p } = t[c], m = b(r), S = (O(m) ? e.columnsData[r] : e.axesData[r])[l];
|
|
472
|
+
if (a !== void 0 && (s = s || S === a), u !== void 0 && (u.min !== void 0 || u.max !== void 0) && typeof S == "number") {
|
|
473
|
+
let h = !0;
|
|
474
|
+
u.min !== void 0 && (h = h && S >= u.min), u.max !== void 0 && (h = h && S <= u.max), s = s || h;
|
|
471
475
|
}
|
|
472
|
-
|
|
476
|
+
p === "subset" && (s = s || S != null);
|
|
473
477
|
}
|
|
474
478
|
s && (n[l] = 1);
|
|
475
479
|
}
|
|
476
480
|
return n;
|
|
477
481
|
}
|
|
478
|
-
var
|
|
482
|
+
var Z = class {
|
|
479
483
|
constructor(t, e) {
|
|
480
484
|
this.simpleComponentControllers = t, this.filterComponentControllers = e, this.ignoredOptionIdNames = [], this.dataInputs = [], this.dontAllowUnfilteredHighCardinality = !1;
|
|
481
485
|
}
|
|
@@ -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
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
const
|
|
555
|
-
|
|
553
|
+
for (const S of e.components[m].selectorStates) {
|
|
554
|
+
const h = b(S.selectedSource);
|
|
555
|
+
if (O(h)) {
|
|
556
|
+
const x = await t.pFrameProvider.getColumnSpecById(h);
|
|
557
|
+
x && x.axesSpec.forEach((w) => {
|
|
558
|
+
const v = F.fromAxisSpec(w).toCanonicalString();
|
|
559
|
+
r.has(v) || (r.add(v), 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
|
|
566
|
-
for (const
|
|
567
|
-
!
|
|
567
|
+
for (const S of p)
|
|
568
|
+
if (n[S]) {
|
|
569
|
+
const h = Object.keys(n[S]);
|
|
570
|
+
for (const x of h)
|
|
571
|
+
!u.has(x) && !r.has(x) && (m.push(x), u.add(x));
|
|
568
572
|
}
|
|
569
|
-
|
|
573
|
+
p = m;
|
|
570
574
|
}
|
|
571
|
-
for (const [m, { selectorStates:
|
|
572
|
-
const
|
|
573
|
-
for (const { selectedSource:
|
|
574
|
-
await
|
|
575
|
+
for (const [m, { selectorStates: S }] of Object.entries(e.components)) {
|
|
576
|
+
const x = ((s = this.simpleComponentControllers[m]) != null ? s : this.filterComponentControllers[m]).settings.columnsWithExtraAxesAllowed;
|
|
577
|
+
for (const { selectedSource: w } of S)
|
|
578
|
+
await He(
|
|
575
579
|
t,
|
|
576
|
-
|
|
577
|
-
o[
|
|
578
|
-
r,
|
|
579
|
-
i,
|
|
580
|
+
w,
|
|
581
|
+
o[w],
|
|
580
582
|
c,
|
|
581
|
-
|
|
582
|
-
|
|
583
|
+
a,
|
|
584
|
+
r,
|
|
585
|
+
u,
|
|
586
|
+
x,
|
|
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,63 +610,63 @@ 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) => b(r.selectedSource));
|
|
614
|
+
return n.concat(c);
|
|
611
615
|
}, []),
|
|
612
616
|
!1
|
|
613
617
|
);
|
|
614
|
-
return
|
|
618
|
+
return Fe(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 [y, f] of Object.entries(
|
|
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), S = await this.getLabelsMap(t, e), h = await this.getSelectedSourcesInfo(t, e, S, p, m), x = /* @__PURE__ */ new Map(), w = { ...this.simpleComponentControllers, ...this.filterComponentControllers }, v = /* @__PURE__ */ new Set();
|
|
626
|
+
for (const [y, f] of Object.entries(w)) {
|
|
627
|
+
const g = await f.getOptions(
|
|
624
628
|
t,
|
|
625
629
|
e,
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
630
|
+
S,
|
|
631
|
+
r,
|
|
632
|
+
p,
|
|
629
633
|
m,
|
|
630
634
|
n,
|
|
631
|
-
|
|
632
|
-
|
|
635
|
+
a,
|
|
636
|
+
u
|
|
633
637
|
);
|
|
634
|
-
this.dataInputs.includes(y) ||
|
|
635
|
-
|
|
638
|
+
this.dataInputs.includes(y) || g.options.forEach((A) => {
|
|
639
|
+
v.add(A.value);
|
|
636
640
|
});
|
|
637
|
-
for (const [
|
|
638
|
-
|
|
639
|
-
|
|
641
|
+
for (const [A, P] of g.optionsInfo)
|
|
642
|
+
x.set(A, P);
|
|
643
|
+
c[y] = g;
|
|
640
644
|
}
|
|
641
645
|
const D = (y) => {
|
|
642
|
-
const f =
|
|
646
|
+
const f = x.get(y);
|
|
643
647
|
f && f.kind === "axis" && (f.mustBeConsumed = !0);
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
},
|
|
647
|
-
for (const y of
|
|
648
|
+
const g = h.get(y);
|
|
649
|
+
g && g.kind === "axis" && (g.mustBeConsumed = !0);
|
|
650
|
+
}, B = await this.getMustBeConsumedAxes(t, e);
|
|
651
|
+
for (const y of B)
|
|
648
652
|
D(y);
|
|
649
653
|
if (this.dontAllowUnfilteredHighCardinality) {
|
|
650
|
-
const y = (
|
|
651
|
-
var
|
|
652
|
-
return ((
|
|
653
|
-
}, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((
|
|
654
|
-
const
|
|
655
|
-
return (
|
|
654
|
+
const y = (g) => {
|
|
655
|
+
var A;
|
|
656
|
+
return ((A = g == null ? void 0 : g.annotations) == null ? void 0 : A[Me]) === "true";
|
|
657
|
+
}, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((g, A) => {
|
|
658
|
+
const P = h.get(A.selectedSource);
|
|
659
|
+
return (P == null ? void 0 : P.kind) === "column" && P.spec.axesSpec.filter(y).forEach((L) => g.add(F.fromAxisSpec(L).toCanonicalString())), (P == null ? void 0 : P.kind) === "axis" && y(P.spec) && g.add(F.fromAxisSpec(P.spec).toCanonicalString()), g;
|
|
656
660
|
}, /* @__PURE__ */ new Set())) != null ? s : /* @__PURE__ */ new Set();
|
|
657
|
-
this.dataInputs.forEach((
|
|
658
|
-
for (const { selectedSource:
|
|
659
|
-
const
|
|
660
|
-
if ((
|
|
661
|
-
const
|
|
662
|
-
!
|
|
663
|
-
}), (
|
|
664
|
-
const
|
|
665
|
-
|
|
661
|
+
this.dataInputs.forEach((g) => {
|
|
662
|
+
for (const { selectedSource: A } of e.components[g].selectorStates) {
|
|
663
|
+
const P = h.get(A);
|
|
664
|
+
if ((P == null ? void 0 : P.kind) === "column" && P.spec.axesSpec.filter(y).forEach((L) => {
|
|
665
|
+
const N = F.fromAxisSpec(L).toCanonicalString();
|
|
666
|
+
!v.has(N) && !f.has(N) && v.add(N), f.has(N) || D(N);
|
|
667
|
+
}), (P == null ? void 0 : P.kind) === "axis" && y(P.spec)) {
|
|
668
|
+
const E = F.fromAxisSpec(P.spec).toCanonicalString();
|
|
669
|
+
v.has(E) || v.add(E), f.has(E) || D(E);
|
|
666
670
|
}
|
|
667
671
|
}
|
|
668
672
|
});
|
|
@@ -670,85 +674,85 @@ var Q = class {
|
|
|
670
674
|
const C = /* @__PURE__ */ new Set();
|
|
671
675
|
for (const { selectorStates: y } of Object.values(e.components))
|
|
672
676
|
for (const { selectedSource: f } of y) {
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
C.add(
|
|
677
|
+
const g = h.get(f);
|
|
678
|
+
g && g.kind === "column" && g.axesToBeFixed.forEach((A) => {
|
|
679
|
+
C.add(A);
|
|
676
680
|
});
|
|
677
681
|
}
|
|
678
|
-
const
|
|
679
|
-
var f,
|
|
680
|
-
const
|
|
681
|
-
return (
|
|
682
|
+
const d = await this.isConsistent(t, e, p, m), i = (y) => {
|
|
683
|
+
var f, g, A;
|
|
684
|
+
const P = (f = b(y).toCanonicalString()) != null ? f : y;
|
|
685
|
+
return (A = (g = x.get(P)) != null ? g : h.get(P)) != null ? A : ge(y);
|
|
682
686
|
};
|
|
683
687
|
return {
|
|
684
|
-
components:
|
|
685
|
-
getSourceInfo:
|
|
686
|
-
freeOptionsSet:
|
|
688
|
+
components: c,
|
|
689
|
+
getSourceInfo: i,
|
|
690
|
+
freeOptionsSet: v,
|
|
687
691
|
axesToBeFixedSet: C,
|
|
688
692
|
readyData: this.readyDataInputs(e),
|
|
689
|
-
ready: this.readyForPlotBuilding(t, e,
|
|
690
|
-
consistent:
|
|
693
|
+
ready: this.readyForPlotBuilding(t, e, d, v, 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, S) => m.label.localeCompare(S.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((S) => ({ value: S, label: S }));
|
|
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
|
|
707
|
-
let
|
|
708
|
-
if (
|
|
709
|
-
l && (
|
|
709
|
+
if (a.kind === "axis") {
|
|
710
|
+
const p = b(o), m = a.parentSources.map(b), S = await k(t, o, a.parentSources);
|
|
711
|
+
let h = [];
|
|
712
|
+
if (S) {
|
|
713
|
+
l && (h = [{
|
|
710
714
|
type: "bySingleColumnV2",
|
|
711
715
|
column: {
|
|
712
716
|
type: "column",
|
|
713
|
-
id:
|
|
717
|
+
id: S.name
|
|
714
718
|
},
|
|
715
719
|
predicate: {
|
|
716
720
|
operator: "StringIContains",
|
|
717
721
|
substring: l
|
|
718
722
|
}
|
|
719
|
-
}]), s && (
|
|
723
|
+
}]), s && (h = [{
|
|
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(S, h), C = B[p.toCanonicalString()], d = [];
|
|
735
|
+
for (let i = 0; i < Math.min(C.length, n ?? C.length); i++)
|
|
736
|
+
d.push({ value: String(C[i]), label: String(D[i]) });
|
|
737
|
+
return r(d), { values: d, overflow: !(n === void 0 || C.length < n) };
|
|
734
738
|
}
|
|
735
|
-
const
|
|
736
|
-
|
|
739
|
+
const x = l ?? s;
|
|
740
|
+
x && (h = [{
|
|
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
|
-
substring:
|
|
748
|
+
substring: x
|
|
745
749
|
}
|
|
746
750
|
}]);
|
|
747
|
-
const
|
|
748
|
-
return
|
|
751
|
+
const w = await t.pFrameProvider.getAxisUniqueValues(p, [m[0]], n, h), v = w.values.map((D) => ({ value: String(D), label: String(D) }));
|
|
752
|
+
return r(v), { values: v, overflow: w.overflow };
|
|
749
753
|
}
|
|
750
|
-
if (
|
|
751
|
-
const
|
|
754
|
+
if (a.kind === "column") {
|
|
755
|
+
const p = l ?? s, m = b(o), S = 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
|
-
}] : [],
|
|
762
|
-
return
|
|
765
|
+
}] : [], h = await t.pFrameProvider.getColumnUniqueValues(m, n, S), x = h.values.map((w) => ({ value: String(w), label: String(w) }));
|
|
766
|
+
return r(x), { values: x, overflow: h.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 S;
|
|
812
|
+
return ((S = (u ?? []).find((h) => h.axisSource === m)) == null ? void 0 : S.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[ve]) === "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,93 +850,93 @@ 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 =
|
|
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 = F.fromAxisSpec(p).toCanonicalString();
|
|
864
|
+
return c.has(m) || r.has(m);
|
|
861
865
|
}
|
|
862
|
-
const
|
|
863
|
-
s.selectorStates.map(async ({ selectedSource:
|
|
864
|
-
const m =
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
867
|
-
if (!
|
|
866
|
+
const u = await Promise.all(
|
|
867
|
+
s.selectorStates.map(async ({ selectedSource: p }) => {
|
|
868
|
+
const m = b(p);
|
|
869
|
+
if (O(m)) {
|
|
870
|
+
const S = await e.pFrameProvider.getColumnSpecById(m);
|
|
871
|
+
if (!S)
|
|
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 S.axesSpec.every((x) => a(x));
|
|
873
877
|
if (this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent) {
|
|
874
|
-
if (
|
|
878
|
+
if (S.axesSpec.some((w) => a(w)))
|
|
875
879
|
return !0;
|
|
876
|
-
const
|
|
877
|
-
return
|
|
880
|
+
const x = oe(S.axesSpec);
|
|
881
|
+
return x ? x.some((w) => l.has(j(w))) : !1;
|
|
878
882
|
} else
|
|
879
|
-
return
|
|
883
|
+
return c.size === 0 || S.axesSpec.some((x) => a(x));
|
|
880
884
|
}
|
|
881
|
-
return
|
|
885
|
+
return c.has(p);
|
|
882
886
|
})
|
|
883
887
|
);
|
|
884
888
|
return s.selectorStates.reduce(
|
|
885
|
-
(
|
|
889
|
+
(p, m, S) => (p[m.selectedSource] = u[S], 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) => b(a.selectedSource)).filter((a) => O(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(F.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) => b(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 (O(c)) {
|
|
916
|
+
const r = await e.pFrameProvider.getColumnSpecById(c);
|
|
917
|
+
(n = r == null ? void 0 : r.axesSpec) == null || n.forEach((a) => {
|
|
918
|
+
const u = F.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), S = /* @__PURE__ */ new Set(), h = [], x = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map();
|
|
923
927
|
for (const D of m)
|
|
924
|
-
if (
|
|
925
|
-
const
|
|
926
|
-
for (const C of (l =
|
|
927
|
-
const
|
|
928
|
-
if (
|
|
928
|
+
if (O(D)) {
|
|
929
|
+
const B = await e.pFrameProvider.getColumnSpecById(D);
|
|
930
|
+
for (const C of (l = B == null ? void 0 : B.axesSpec) != null ? l : []) {
|
|
931
|
+
const i = F.fromAxisSpec(C).toCanonicalString();
|
|
932
|
+
if (S.has(i))
|
|
929
933
|
continue;
|
|
930
|
-
|
|
931
|
-
const y =
|
|
932
|
-
|
|
934
|
+
S.add(i), h.push(C);
|
|
935
|
+
const y = Ie(C);
|
|
936
|
+
w.set(i, {
|
|
933
937
|
kind: "axis",
|
|
934
938
|
name: C.name,
|
|
935
|
-
label: await T(e,
|
|
939
|
+
label: await T(e, i, [
|
|
936
940
|
D.toCanonicalString()
|
|
937
941
|
]),
|
|
938
942
|
type: C.type,
|
|
@@ -941,110 +945,110 @@ var Q = class {
|
|
|
941
945
|
spec: C,
|
|
942
946
|
annotations: C.annotations,
|
|
943
947
|
isSubsetFilter: ((s = C.annotations) == null ? void 0 : s[$]) === "true",
|
|
944
|
-
isDiscreteFilter: C.type === "String" || ((
|
|
948
|
+
isDiscreteFilter: C.type === "String" || ((c = C.annotations) == null ? void 0 : c[te]) === "true",
|
|
945
949
|
parentSources: [D.toCanonicalString()]
|
|
946
950
|
});
|
|
947
951
|
}
|
|
948
952
|
}
|
|
949
|
-
let
|
|
950
|
-
for (;
|
|
953
|
+
let v = [...S];
|
|
954
|
+
for (; v.length; ) {
|
|
951
955
|
const D = [];
|
|
952
|
-
for (const
|
|
953
|
-
if (n[
|
|
954
|
-
const C = Object.keys(n[
|
|
955
|
-
for (const
|
|
956
|
-
if (!
|
|
957
|
-
D.push(
|
|
958
|
-
const { spec:
|
|
959
|
-
for (const f of
|
|
960
|
-
const
|
|
961
|
-
|
|
956
|
+
for (const B of v)
|
|
957
|
+
if (n[B]) {
|
|
958
|
+
const C = Object.keys(n[B]);
|
|
959
|
+
for (const d of C)
|
|
960
|
+
if (!x.has(d)) {
|
|
961
|
+
D.push(d), x.add(d);
|
|
962
|
+
const { spec: i, id: y } = n[B][d];
|
|
963
|
+
for (const f of i.axesSpec) {
|
|
964
|
+
const g = F.fromAxisSpec(f).toCanonicalString();
|
|
965
|
+
w.has(g) || w.set(g, {
|
|
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" || ((
|
|
974
|
+
isSubsetFilter: ((u = f.annotations) == null ? void 0 : u[$]) === "true",
|
|
975
|
+
isDiscreteFilter: f.type === "String" || ((p = f.annotations) == null ? void 0 : p[te]) === "true",
|
|
972
976
|
parentSources: [y.toCanonicalString()]
|
|
973
977
|
});
|
|
974
978
|
}
|
|
975
979
|
}
|
|
976
980
|
}
|
|
977
|
-
|
|
981
|
+
v = D;
|
|
978
982
|
}
|
|
979
|
-
return { parentAxes:
|
|
980
|
-
}
|
|
981
|
-
async getOptions(e, o, n, l, s,
|
|
982
|
-
var
|
|
983
|
-
const
|
|
984
|
-
if (this.dependsOn.length && this.dependsOn.some((
|
|
985
|
-
return { multipleSelectors:
|
|
986
|
-
if (this.strictlyDependsOnParents && !this.settings.isDataComponent && this.parentComponents.some((
|
|
987
|
-
return { multipleSelectors:
|
|
988
|
-
const
|
|
983
|
+
return { parentAxes: S, parentAxesList: h, linkerAxes: x, optionsInfo: w };
|
|
984
|
+
}
|
|
985
|
+
async getOptions(e, o, n, l, s, c, r, a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set()) {
|
|
986
|
+
var p, m, S, h, x;
|
|
987
|
+
const w = this.settings.multipleSelectors, v = this.settings.required, D = await this.checkStateConsistency(e, o, s, c);
|
|
988
|
+
if (this.dependsOn.length && this.dependsOn.some((P) => o.components[P].selectorStates.length === 0))
|
|
989
|
+
return { multipleSelectors: w, required: v, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
|
|
990
|
+
if (this.strictlyDependsOnParents && !this.settings.isDataComponent && this.parentComponents.some((P) => o.components[P].selectorStates.length === 0))
|
|
991
|
+
return { multipleSelectors: w, required: v, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
|
|
992
|
+
const B = this.getParentSelectedSources(e, o), C = (await e.pFrameProvider.getColumns([], !1, this.allowedTypes, void 0, this.annotations)).filter((P) => !l.has(P.toCanonicalString())), { parentAxes: d, linkerAxes: i, parentAxesList: y, optionsInfo: f } = await this.getAllowedAxes(e, o, s), g = o.components[this.componentName], A = [];
|
|
989
993
|
if (this.settings.axesAllowed)
|
|
990
|
-
for (const
|
|
991
|
-
const
|
|
992
|
-
([
|
|
994
|
+
for (const P of d) {
|
|
995
|
+
const E = b(P), L = f.get(E.toCanonicalString()), N = this.allowedTypes.includes(L.spec.type), _ = Object.entries(this.annotations).every(
|
|
996
|
+
([le, q]) => {
|
|
993
997
|
var U;
|
|
994
|
-
return ((U = L.spec.annotations) == null ? void 0 : U[
|
|
998
|
+
return ((U = L.spec.annotations) == null ? void 0 : U[le]) === q;
|
|
995
999
|
}
|
|
996
|
-
), G = this.checkSourceBySpec ? this.checkSourceBySpec(L.spec, o) : !0, M = !this.settings.homogeneous || !(L != null && L.mustBeConsumed), K = !l.has(
|
|
997
|
-
|
|
1000
|
+
), G = this.checkSourceBySpec ? this.checkSourceBySpec(L.spec, o) : !0, M = !this.settings.homogeneous || !(L != null && L.mustBeConsumed), K = !l.has(P), ee = a.has(E.name) || u.has(E.toCanonicalString()), se = g.selectorStates.some((le) => le.selectedSource === P);
|
|
1001
|
+
N && _ && G && M && K && !ee && !se && A.push({ value: P });
|
|
998
1002
|
}
|
|
999
1003
|
if (this.settings.columnsAllowed) {
|
|
1000
|
-
const
|
|
1001
|
-
for (const
|
|
1002
|
-
const L =
|
|
1003
|
-
if (!
|
|
1004
|
+
const P = !this.settings.columnsWithExtraAxesAllowed && this.strictlyDependsOnParents;
|
|
1005
|
+
for (const E of C) {
|
|
1006
|
+
const L = E.toCanonicalString(), N = b(L), _ = await e.pFrameProvider.getColumnSpecById(N);
|
|
1007
|
+
if (!_)
|
|
1004
1008
|
continue;
|
|
1005
|
-
const G =
|
|
1006
|
-
|
|
1009
|
+
const G = De(
|
|
1010
|
+
_,
|
|
1007
1011
|
y,
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
).map((q) =>
|
|
1012
|
+
d,
|
|
1013
|
+
i,
|
|
1014
|
+
c
|
|
1015
|
+
).map((q) => F.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
|
-
|
|
1015
|
-
const U =
|
|
1016
|
-
return
|
|
1018
|
+
Le(_) || Ze(_) || this.checkSourceBySpec && !this.checkSourceBySpec(_, o) || this.settings.isDataComponent && !r(_) || P && G.length > 0 || B.length && G.length > 0 && !_.axesSpec.some((q) => {
|
|
1019
|
+
const U = F.fromAxisSpec(q).toCanonicalString();
|
|
1020
|
+
return d.has(U) || i.has(U);
|
|
1017
1021
|
})
|
|
1018
1022
|
)
|
|
1019
1023
|
continue;
|
|
1020
|
-
const K = (m = (
|
|
1024
|
+
const K = (m = (p = _ == null ? void 0 : _.axesSpec) == null ? void 0 : p.map((q) => F.fromAxisSpec(q).toCanonicalString())) != null ? m : [], ee = {};
|
|
1021
1025
|
if (this.settings.columnsWithExtraAxesAllowed && K.forEach((q, U) => {
|
|
1022
|
-
M.has(q) && (
|
|
1023
|
-
}),
|
|
1024
|
-
const q = (
|
|
1026
|
+
M.has(q) && (ee[q] = U);
|
|
1027
|
+
}), _) {
|
|
1028
|
+
const q = (S = n[L]) != null ? S : await T(e, E.toCanonicalString(), []), U = {
|
|
1025
1029
|
kind: "column",
|
|
1026
|
-
name:
|
|
1030
|
+
name: _.name,
|
|
1027
1031
|
label: q,
|
|
1028
|
-
type:
|
|
1029
|
-
spec:
|
|
1030
|
-
annotations:
|
|
1031
|
-
isSubsetFilter: ((
|
|
1032
|
-
isDiscreteFilter:
|
|
1032
|
+
type: _.valueType,
|
|
1033
|
+
spec: _,
|
|
1034
|
+
annotations: _.annotations,
|
|
1035
|
+
isSubsetFilter: ((h = _.annotations) == null ? void 0 : h[$]) === "true",
|
|
1036
|
+
isDiscreteFilter: _.valueType === "String" || ((x = _.annotations) == null ? void 0 : x[te]) === "true",
|
|
1033
1037
|
axesToBeFixed: G,
|
|
1034
|
-
axesToBeFixedIndexes:
|
|
1038
|
+
axesToBeFixedIndexes: ee
|
|
1035
1039
|
};
|
|
1036
|
-
f.set(
|
|
1040
|
+
f.set(N.toCanonicalString(), U);
|
|
1037
1041
|
}
|
|
1038
|
-
const
|
|
1042
|
+
const se = a.has(N.name) || u.has(N.toCanonicalString()), le = o.components[this.componentName].selectorStates.some(
|
|
1039
1043
|
(q) => q.selectedSource === L
|
|
1040
1044
|
);
|
|
1041
|
-
!
|
|
1045
|
+
!se && !le && A.push({ value: L });
|
|
1042
1046
|
}
|
|
1043
1047
|
}
|
|
1044
|
-
return { multipleSelectors:
|
|
1048
|
+
return { multipleSelectors: w, required: v, stateConsistency: D, options: A, 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 ce(t, e) {
|
|
1072
1076
|
if (!e.length)
|
|
1073
1077
|
return [];
|
|
1074
|
-
const o = e.map((s) =>
|
|
1078
|
+
const o = e.map((s) => b(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 O(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 Z {
|
|
1085
1089
|
constructor() {
|
|
1086
1090
|
super({
|
|
1087
1091
|
valueSize: new I({
|
|
@@ -1186,141 +1190,142 @@ var Ze = class extends Q {
|
|
|
1186
1190
|
async getMustBeConsumedAxes(t, e) {
|
|
1187
1191
|
if (!e.components.valueColor.selectorStates.length)
|
|
1188
1192
|
return /* @__PURE__ */ new Set();
|
|
1189
|
-
const o = e.components.valueColor.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(
|
|
1190
|
-
return n ? new Set(n.axesSpec.map((l) =>
|
|
1193
|
+
const o = e.components.valueColor.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(b(o));
|
|
1194
|
+
return n ? new Set(n.axesSpec.map((l) => F.fromAxisSpec(l).toCanonicalString())) : /* @__PURE__ */ new Set();
|
|
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 = b(s), a = b(c);
|
|
1202
|
+
if (!r || !a || !O(r) && !O(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), S = [
|
|
1205
1209
|
...e.components.filters.selectorStates,
|
|
1206
1210
|
...e.components.tabBy.selectorStates
|
|
1207
|
-
],
|
|
1211
|
+
], h = Y(S), x = S.map((_) => b(_.selectedSource)).filter(O), w = [r, a].filter(O), v = w.map((_) => _.toCanonicalString()), D = await Q(t, v), B = [
|
|
1208
1212
|
e.components.facetBy,
|
|
1209
1213
|
e.components.x,
|
|
1210
1214
|
e.components.y,
|
|
1211
1215
|
e.components.tooltipContent
|
|
1212
|
-
], C = [],
|
|
1213
|
-
for (const { selectedSource:
|
|
1216
|
+
], C = [], d = w.map(() => []), i = [], y = [];
|
|
1217
|
+
for (const { selectedSource: _, fixedAxes: G } of S)
|
|
1214
1218
|
y.push(...await V(
|
|
1215
1219
|
t,
|
|
1216
|
-
|
|
1220
|
+
p,
|
|
1217
1221
|
m,
|
|
1218
1222
|
D,
|
|
1219
|
-
|
|
1223
|
+
_,
|
|
1220
1224
|
G
|
|
1221
|
-
)),
|
|
1225
|
+
)), d.push(
|
|
1222
1226
|
(G ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
|
|
1223
1227
|
);
|
|
1224
|
-
for (const
|
|
1225
|
-
for (const { selectedSource: G, fixedAxes: M } of
|
|
1226
|
-
C.push(
|
|
1227
|
-
(M ?? []).map(({ axisIdx:
|
|
1228
|
+
for (const _ of B)
|
|
1229
|
+
for (const { selectedSource: G, fixedAxes: M } of _.selectorStates) {
|
|
1230
|
+
C.push(b(G)), i.push(
|
|
1231
|
+
(M ?? []).map(({ axisIdx: ee, axisValue: se }) => ({ idx: ee, value: se }))
|
|
1228
1232
|
), y.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,
|
|
1240
|
+
const K = await k(t, G, v);
|
|
1237
1241
|
K && C.push(K);
|
|
1238
1242
|
}
|
|
1239
1243
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
1240
|
-
[...
|
|
1244
|
+
[...w, ...y, ...x],
|
|
1241
1245
|
C,
|
|
1242
|
-
|
|
1246
|
+
h,
|
|
1243
1247
|
!0,
|
|
1244
|
-
|
|
1245
|
-
|
|
1248
|
+
d,
|
|
1249
|
+
i
|
|
1246
1250
|
);
|
|
1247
|
-
C.forEach((
|
|
1248
|
-
const G =
|
|
1249
|
-
|
|
1250
|
-
}),
|
|
1251
|
-
const
|
|
1252
|
-
async (
|
|
1251
|
+
C.forEach((_) => {
|
|
1252
|
+
const G = _.toCanonicalString();
|
|
1253
|
+
u.values[G] = O(_) ? f.columnsData[G] : f.axesData[G];
|
|
1254
|
+
}), u.values[s] = O(r) ? f.columnsData[s] : f.axesData[s], u.values[c] = O(a) ? f.columnsData[c] : f.axesData[c];
|
|
1255
|
+
const g = e.components.x.selectorStates.map((_) => _.selectedSource), A = g.join(", "), P = await Promise.all(g.map(
|
|
1256
|
+
async (_) => {
|
|
1253
1257
|
var G, M;
|
|
1254
|
-
return (M = (G = await k(t,
|
|
1258
|
+
return (M = (G = await k(t, _, v)) == null ? void 0 : G.toCanonicalString()) != null ? M : _;
|
|
1255
1259
|
}
|
|
1256
1260
|
));
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1259
|
-
async (
|
|
1261
|
+
u.values[A] = ce(f, g), u.values.xLabels = ce(f, P);
|
|
1262
|
+
const E = e.components.y.selectorStates.map((_) => _.selectedSource), L = E.join(", "), N = await Promise.all(E.map(
|
|
1263
|
+
async (_) => {
|
|
1260
1264
|
var G, M;
|
|
1261
|
-
return (M = (G = await k(t,
|
|
1265
|
+
return (M = (G = await k(t, _, v)) == null ? void 0 : G.toCanonicalString()) != null ? M : _;
|
|
1262
1266
|
}
|
|
1263
1267
|
));
|
|
1264
|
-
return
|
|
1268
|
+
return u.values[L] = ce(f, E), u.values.yLabels = ce(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 = b(l), r = b(s);
|
|
1276
|
+
if (!O(c) && !O(r))
|
|
1273
1277
|
throw Error("Value column is not valid");
|
|
1274
|
-
const
|
|
1278
|
+
const a = [c, r].filter(O).map((C) => C.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
|
+
}, S = e.components.x.selectorStates.map(({ selectedSource: C }) => C).join(", "), x = e.components.y.selectorStates.map(({ selectedSource: C }) => C).join(", "), w = await Promise.all(e.components.facetBy.selectorStates.map(async (C) => {
|
|
1287
|
+
var d, i;
|
|
1284
1288
|
return {
|
|
1285
1289
|
type: "column",
|
|
1286
|
-
value: (
|
|
1290
|
+
value: (i = (d = await k(t, C.selectedSource, a)) == null ? void 0 : d.toCanonicalString()) != null ? i : C.selectedSource
|
|
1287
1291
|
};
|
|
1288
|
-
})),
|
|
1292
|
+
})), v = (await Promise.all(e.components.x.selectorStates.map((C) => T(t, C.selectedSource, a)))).join(", "), D = (await Promise.all(e.components.y.selectorStates.map((C) => T(t, C.selectedSource, a)))).join(", "), B = await Promise.all(
|
|
1289
1293
|
e.components.tooltipContent.selectorStates.map(async (C) => {
|
|
1290
|
-
var
|
|
1291
|
-
const
|
|
1294
|
+
var d, i, y, f;
|
|
1295
|
+
const g = C.selectedSource, A = await J(t, g, a);
|
|
1292
1296
|
return {
|
|
1293
1297
|
type: "column",
|
|
1294
|
-
label: await T(t,
|
|
1295
|
-
value:
|
|
1296
|
-
valueLabels: (
|
|
1298
|
+
label: await T(t, g, a) || g,
|
|
1299
|
+
value: g,
|
|
1300
|
+
valueLabels: (i = (d = await k(t, g, a)) == null ? void 0 : d.toCanonicalString()) != null ? i : g,
|
|
1301
|
+
format: (f = (y = A == null ? void 0 : A.annotations) == null ? void 0 : y[ne]) != null ? f : ".0%"
|
|
1297
1302
|
};
|
|
1298
1303
|
})
|
|
1299
1304
|
);
|
|
1300
1305
|
return {
|
|
1301
1306
|
type: "bubble",
|
|
1302
|
-
valueColor:
|
|
1303
|
-
valueSize:
|
|
1307
|
+
valueColor: u,
|
|
1308
|
+
valueSize: p,
|
|
1304
1309
|
xColumn: {
|
|
1305
1310
|
type: "column",
|
|
1306
|
-
value:
|
|
1307
|
-
label:
|
|
1311
|
+
value: S,
|
|
1312
|
+
label: v,
|
|
1308
1313
|
valueLabels: "xLabels"
|
|
1309
1314
|
},
|
|
1310
1315
|
yColumn: {
|
|
1311
1316
|
type: "column",
|
|
1312
|
-
value:
|
|
1317
|
+
value: x,
|
|
1313
1318
|
label: D,
|
|
1314
1319
|
valueLabels: "yLabels"
|
|
1315
1320
|
},
|
|
1316
|
-
facetBy:
|
|
1321
|
+
facetBy: w,
|
|
1317
1322
|
tooltips: {
|
|
1318
1323
|
show: !0,
|
|
1319
|
-
content:
|
|
1324
|
+
content: B
|
|
1320
1325
|
}
|
|
1321
1326
|
};
|
|
1322
1327
|
}
|
|
1323
|
-
},
|
|
1328
|
+
}, nt = {
|
|
1324
1329
|
type: "histogram",
|
|
1325
1330
|
components: {
|
|
1326
1331
|
value: { type: "simple", selectorStates: [] },
|
|
@@ -1330,7 +1335,7 @@ var Ze = class extends Q {
|
|
|
1330
1335
|
facetBy: { type: "simple", selectorStates: [] }
|
|
1331
1336
|
},
|
|
1332
1337
|
dividedAxes: {}
|
|
1333
|
-
},
|
|
1338
|
+
}, ot = class extends Z {
|
|
1334
1339
|
constructor() {
|
|
1335
1340
|
super(
|
|
1336
1341
|
{
|
|
@@ -1399,85 +1404,85 @@ var Ze = class extends Q {
|
|
|
1399
1404
|
const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1400
1405
|
if (!l)
|
|
1401
1406
|
throw Error("Value column is not valid");
|
|
1402
|
-
const s =
|
|
1403
|
-
if (!
|
|
1407
|
+
const s = b(l);
|
|
1408
|
+
if (!O(s))
|
|
1404
1409
|
throw Error("Value column is not valid");
|
|
1405
|
-
const
|
|
1410
|
+
const c = {
|
|
1406
1411
|
type: "columns",
|
|
1407
1412
|
id: (n = z(e.components)) != null ? n : "",
|
|
1408
1413
|
values: {}
|
|
1409
|
-
}, { linkerColumnsMap:
|
|
1414
|
+
}, { linkerColumnsMap: r, compositeLinkerMap: a } = await X(t), u = [
|
|
1410
1415
|
...e.components.filters.selectorStates,
|
|
1411
1416
|
...e.components.tabBy.selectorStates
|
|
1412
|
-
],
|
|
1413
|
-
for (const { selectedSource:
|
|
1414
|
-
|
|
1415
|
-
...await V(t,
|
|
1416
|
-
),
|
|
1417
|
-
(
|
|
1417
|
+
], p = Y(u), m = u.map((d) => b(d.selectedSource)).filter(O), S = [l], h = await Q(t, S), x = [e.components.facetBy, e.components.grouping], w = [], v = [[]], D = [], B = [];
|
|
1418
|
+
for (const { selectedSource: d, fixedAxes: i } of u)
|
|
1419
|
+
B.push(
|
|
1420
|
+
...await V(t, r, a, h, d, i)
|
|
1421
|
+
), v.push(
|
|
1422
|
+
(i ?? []).map(({ axisIdx: y, axisValue: f }) => ({ idx: y, value: f }))
|
|
1418
1423
|
);
|
|
1419
|
-
for (const
|
|
1420
|
-
for (const { selectedSource:
|
|
1421
|
-
|
|
1422
|
-
(y ?? []).map(({ axisIdx:
|
|
1423
|
-
),
|
|
1424
|
-
...await V(t,
|
|
1424
|
+
for (const d of x)
|
|
1425
|
+
for (const { selectedSource: i, fixedAxes: y } of d.selectorStates) {
|
|
1426
|
+
w.push(b(i)), D.push(
|
|
1427
|
+
(y ?? []).map(({ axisIdx: g, axisValue: A }) => ({ idx: g, value: A }))
|
|
1428
|
+
), B.push(
|
|
1429
|
+
...await V(t, r, a, h, i, y)
|
|
1425
1430
|
);
|
|
1426
|
-
const f = await k(t,
|
|
1427
|
-
f &&
|
|
1431
|
+
const f = await k(t, i, S);
|
|
1432
|
+
f && w.push(f);
|
|
1428
1433
|
}
|
|
1429
1434
|
const C = await t.pFrameProvider.getTableOuterJoin(
|
|
1430
|
-
[s, ...
|
|
1431
|
-
h,
|
|
1432
|
-
u,
|
|
1433
|
-
!0,
|
|
1435
|
+
[s, ...B, ...m],
|
|
1434
1436
|
w,
|
|
1437
|
+
p,
|
|
1438
|
+
!0,
|
|
1439
|
+
v,
|
|
1435
1440
|
D
|
|
1436
1441
|
);
|
|
1437
|
-
return
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1440
|
-
}),
|
|
1442
|
+
return w.forEach((d) => {
|
|
1443
|
+
const i = d.toCanonicalString();
|
|
1444
|
+
c.values[i] = O(d) ? C.columnsData[i] : C.axesData[i];
|
|
1445
|
+
}), c.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()], { byColumns: c };
|
|
1441
1446
|
}
|
|
1442
1447
|
async createChartSettings(t, e) {
|
|
1443
1448
|
var o, n;
|
|
1444
1449
|
const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1445
1450
|
if (!l)
|
|
1446
1451
|
throw Error("Value column is not valid");
|
|
1447
|
-
const s =
|
|
1448
|
-
if (!
|
|
1452
|
+
const s = b(l);
|
|
1453
|
+
if (!O(s))
|
|
1449
1454
|
throw Error("Value column is not valid");
|
|
1450
|
-
const
|
|
1455
|
+
const c = [l], r = {
|
|
1451
1456
|
type: "column",
|
|
1452
1457
|
value: l,
|
|
1453
1458
|
label: await T(t, l, [])
|
|
1454
|
-
},
|
|
1455
|
-
e.components.facetBy.selectorStates.map(async (
|
|
1456
|
-
var m,
|
|
1459
|
+
}, a = await Promise.all(
|
|
1460
|
+
e.components.facetBy.selectorStates.map(async (p) => {
|
|
1461
|
+
var m, S;
|
|
1457
1462
|
return {
|
|
1458
1463
|
type: "column",
|
|
1459
|
-
value: (
|
|
1464
|
+
value: (S = (m = await k(t, p.selectedSource, c)) == null ? void 0 : m.toCanonicalString()) != null ? S : p.selectedSource
|
|
1460
1465
|
};
|
|
1461
1466
|
})
|
|
1462
1467
|
);
|
|
1463
|
-
let
|
|
1468
|
+
let u;
|
|
1464
1469
|
if (e.components.grouping.selectorStates.length) {
|
|
1465
|
-
const { selectedSource:
|
|
1466
|
-
|
|
1470
|
+
const { selectedSource: p } = e.components.grouping.selectorStates[0];
|
|
1471
|
+
u = {
|
|
1467
1472
|
type: "column",
|
|
1468
|
-
value:
|
|
1469
|
-
label: await T(t,
|
|
1470
|
-
valueLabels: (n = await k(t,
|
|
1473
|
+
value: p,
|
|
1474
|
+
label: await T(t, p, c),
|
|
1475
|
+
valueLabels: (n = await k(t, p, c)) == null ? void 0 : n.toCanonicalString()
|
|
1471
1476
|
};
|
|
1472
1477
|
}
|
|
1473
1478
|
return {
|
|
1474
1479
|
type: "histogram",
|
|
1475
|
-
valueColumn:
|
|
1476
|
-
facetBy:
|
|
1477
|
-
grouping:
|
|
1480
|
+
valueColumn: r,
|
|
1481
|
+
facetBy: a,
|
|
1482
|
+
grouping: u
|
|
1478
1483
|
};
|
|
1479
1484
|
}
|
|
1480
|
-
},
|
|
1485
|
+
}, st = {
|
|
1481
1486
|
type: "discrete",
|
|
1482
1487
|
components: {
|
|
1483
1488
|
y: { type: "simple", selectorStates: [] },
|
|
@@ -1488,7 +1493,7 @@ var Ze = class extends Q {
|
|
|
1488
1493
|
secondaryGrouping: { type: "simple", selectorStates: [] }
|
|
1489
1494
|
},
|
|
1490
1495
|
dividedAxes: {}
|
|
1491
|
-
},
|
|
1496
|
+
}, lt = class extends Z {
|
|
1492
1497
|
constructor() {
|
|
1493
1498
|
super(
|
|
1494
1499
|
{
|
|
@@ -1562,115 +1567,115 @@ var Ze = class extends Q {
|
|
|
1562
1567
|
}
|
|
1563
1568
|
async createDataByColumns(t, e) {
|
|
1564
1569
|
var o;
|
|
1565
|
-
const n = e.components.y.selectorStates[0].selectedSource, l =
|
|
1566
|
-
if (!n || !
|
|
1570
|
+
const n = e.components.y.selectorStates[0].selectedSource, l = b(n);
|
|
1571
|
+
if (!n || !O(l))
|
|
1567
1572
|
throw Error("Y column is not valid");
|
|
1568
1573
|
const s = {
|
|
1569
1574
|
type: "columns",
|
|
1570
1575
|
id: (o = z(e.components)) != null ? o : "",
|
|
1571
1576
|
values: {}
|
|
1572
|
-
}, { linkerColumnsMap:
|
|
1577
|
+
}, { linkerColumnsMap: c, compositeLinkerMap: r } = await X(t), a = [
|
|
1573
1578
|
...e.components.filters.selectorStates,
|
|
1574
1579
|
...e.components.tabBy.selectorStates
|
|
1575
|
-
],
|
|
1576
|
-
for (const { selectedSource: C, fixedAxes:
|
|
1580
|
+
], u = Y(a), p = a.map((C) => b(C.selectedSource)).filter(O), m = [n], S = await Q(t, m), h = [e.components.primaryGrouping, e.components.secondaryGrouping, e.components.facetBy], x = [], w = [[]], v = [], D = [];
|
|
1581
|
+
for (const { selectedSource: C, fixedAxes: d } of a)
|
|
1577
1582
|
D.push(...await V(
|
|
1578
1583
|
t,
|
|
1579
|
-
r,
|
|
1580
1584
|
c,
|
|
1581
|
-
|
|
1585
|
+
r,
|
|
1586
|
+
S,
|
|
1582
1587
|
C,
|
|
1583
|
-
|
|
1584
|
-
)),
|
|
1585
|
-
(
|
|
1588
|
+
d
|
|
1589
|
+
)), w.push(
|
|
1590
|
+
(d ?? []).map(({ axisIdx: i, axisValue: y }) => ({ idx: i, value: y }))
|
|
1586
1591
|
);
|
|
1587
|
-
for (const C of
|
|
1588
|
-
for (const { selectedSource:
|
|
1589
|
-
|
|
1590
|
-
(
|
|
1592
|
+
for (const C of h)
|
|
1593
|
+
for (const { selectedSource: d, fixedAxes: i } of C.selectorStates) {
|
|
1594
|
+
x.push(b(d)), v.push(
|
|
1595
|
+
(i ?? []).map(({ axisIdx: f, axisValue: g }) => ({ idx: f, value: g }))
|
|
1591
1596
|
), D.push(...await V(
|
|
1592
1597
|
t,
|
|
1593
|
-
r,
|
|
1594
1598
|
c,
|
|
1599
|
+
r,
|
|
1600
|
+
S,
|
|
1595
1601
|
d,
|
|
1596
|
-
|
|
1597
|
-
S
|
|
1602
|
+
i
|
|
1598
1603
|
));
|
|
1599
|
-
const y = await k(t,
|
|
1600
|
-
y &&
|
|
1604
|
+
const y = await k(t, d, m);
|
|
1605
|
+
y && x.push(y);
|
|
1601
1606
|
}
|
|
1602
|
-
const
|
|
1603
|
-
[l, ...D, ...
|
|
1604
|
-
|
|
1605
|
-
|
|
1607
|
+
const B = await t.pFrameProvider.getTableOuterJoin(
|
|
1608
|
+
[l, ...D, ...p],
|
|
1609
|
+
x,
|
|
1610
|
+
u,
|
|
1606
1611
|
!0,
|
|
1607
|
-
|
|
1608
|
-
|
|
1612
|
+
w,
|
|
1613
|
+
v
|
|
1609
1614
|
);
|
|
1610
|
-
return
|
|
1611
|
-
const
|
|
1612
|
-
s.values[
|
|
1613
|
-
}), s.values[l.toCanonicalString()] =
|
|
1615
|
+
return x.forEach((C) => {
|
|
1616
|
+
const d = C.toCanonicalString();
|
|
1617
|
+
s.values[d] = O(C) ? B.columnsData[d] : B.axesData[d];
|
|
1618
|
+
}), s.values[l.toCanonicalString()] = B.columnsData[l.toCanonicalString()], { byColumns: s };
|
|
1614
1619
|
}
|
|
1615
1620
|
async createChartSettings(t, e) {
|
|
1616
1621
|
var o, n;
|
|
1617
|
-
const l = e.components.y.selectorStates[0].selectedSource, s =
|
|
1618
|
-
if (!l || !
|
|
1622
|
+
const l = e.components.y.selectorStates[0].selectedSource, s = b(l);
|
|
1623
|
+
if (!l || !O(s))
|
|
1619
1624
|
throw Error("Y column is not valid");
|
|
1620
|
-
const
|
|
1625
|
+
const c = {
|
|
1621
1626
|
type: "column",
|
|
1622
1627
|
value: l,
|
|
1623
1628
|
label: await T(t, l, [])
|
|
1624
|
-
},
|
|
1625
|
-
let
|
|
1629
|
+
}, r = [l];
|
|
1630
|
+
let a;
|
|
1626
1631
|
if (e.components.primaryGrouping.selectorStates.length) {
|
|
1627
1632
|
const { selectedSource: m } = e.components.primaryGrouping.selectorStates[0];
|
|
1628
|
-
|
|
1633
|
+
a = {
|
|
1629
1634
|
columnName: {
|
|
1630
1635
|
type: "column",
|
|
1631
1636
|
value: m,
|
|
1632
|
-
label: await T(t, m,
|
|
1637
|
+
label: await T(t, m, r),
|
|
1633
1638
|
valueLabels: (o = await k(
|
|
1634
1639
|
t,
|
|
1635
1640
|
m,
|
|
1636
|
-
|
|
1641
|
+
r
|
|
1637
1642
|
)) == null ? void 0 : o.toCanonicalString()
|
|
1638
1643
|
}
|
|
1639
1644
|
};
|
|
1640
1645
|
}
|
|
1641
|
-
let
|
|
1646
|
+
let u;
|
|
1642
1647
|
if (e.components.secondaryGrouping.selectorStates.length) {
|
|
1643
1648
|
const { selectedSource: m } = e.components.secondaryGrouping.selectorStates[0];
|
|
1644
|
-
|
|
1649
|
+
u = {
|
|
1645
1650
|
columnName: {
|
|
1646
1651
|
type: "column",
|
|
1647
1652
|
value: m,
|
|
1648
|
-
label: await T(t, m,
|
|
1653
|
+
label: await T(t, m, r),
|
|
1649
1654
|
valueLabels: (n = await k(
|
|
1650
1655
|
t,
|
|
1651
1656
|
m,
|
|
1652
|
-
|
|
1657
|
+
r
|
|
1653
1658
|
)) == null ? void 0 : n.toCanonicalString()
|
|
1654
1659
|
}
|
|
1655
1660
|
};
|
|
1656
1661
|
}
|
|
1657
|
-
const
|
|
1658
|
-
var
|
|
1662
|
+
const p = await Promise.all(e.components.facetBy.selectorStates.map(async (m) => {
|
|
1663
|
+
var S, h;
|
|
1659
1664
|
return {
|
|
1660
1665
|
type: "column",
|
|
1661
|
-
value: (
|
|
1662
|
-
label: await T(t, m.selectedSource,
|
|
1666
|
+
value: (h = (S = await k(t, m.selectedSource, r)) == null ? void 0 : S.toCanonicalString()) != null ? h : m.selectedSource,
|
|
1667
|
+
label: await T(t, m.selectedSource, r)
|
|
1663
1668
|
};
|
|
1664
1669
|
}));
|
|
1665
1670
|
return {
|
|
1666
1671
|
type: "discrete",
|
|
1667
|
-
y:
|
|
1668
|
-
primaryGrouping:
|
|
1669
|
-
secondaryGrouping:
|
|
1670
|
-
facetBy:
|
|
1672
|
+
y: c,
|
|
1673
|
+
primaryGrouping: a,
|
|
1674
|
+
secondaryGrouping: u,
|
|
1675
|
+
facetBy: p
|
|
1671
1676
|
};
|
|
1672
1677
|
}
|
|
1673
|
-
},
|
|
1678
|
+
}, at = {
|
|
1674
1679
|
type: "heatmap",
|
|
1675
1680
|
components: {
|
|
1676
1681
|
value: { type: "simple", selectorStates: [] },
|
|
@@ -1687,23 +1692,23 @@ var Ze = class extends Q {
|
|
|
1687
1692
|
},
|
|
1688
1693
|
dividedAxes: {}
|
|
1689
1694
|
};
|
|
1690
|
-
function
|
|
1695
|
+
function de(t) {
|
|
1691
1696
|
return t ? "kind" in t && t.kind === "PColumn" ? t.valueType === "String" : t.type === "String" : !0;
|
|
1692
1697
|
}
|
|
1693
|
-
function
|
|
1698
|
+
function ie(t, e) {
|
|
1694
1699
|
if (!e.length)
|
|
1695
1700
|
return [];
|
|
1696
|
-
const o = e.map((s) =>
|
|
1701
|
+
const o = e.map((s) => b(s)), n = Object.values(t.columnsData)[0].length, l = [];
|
|
1697
1702
|
for (let s = 0; s < n; s++) {
|
|
1698
|
-
const
|
|
1699
|
-
const
|
|
1700
|
-
return
|
|
1703
|
+
const c = o.map((r) => {
|
|
1704
|
+
const a = r.toCanonicalString();
|
|
1705
|
+
return O(r) ? t.columnsData[a][s] : t.axesData[a][s];
|
|
1701
1706
|
}).join(", ");
|
|
1702
|
-
l.push(
|
|
1707
|
+
l.push(c);
|
|
1703
1708
|
}
|
|
1704
1709
|
return l;
|
|
1705
1710
|
}
|
|
1706
|
-
var
|
|
1711
|
+
var rt = class extends Z {
|
|
1707
1712
|
constructor() {
|
|
1708
1713
|
super(
|
|
1709
1714
|
{
|
|
@@ -1747,7 +1752,7 @@ var lt = class extends Q {
|
|
|
1747
1752
|
...e.components.x.selectorStates.map((n) => n.selectedSource),
|
|
1748
1753
|
...e.components.xGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1749
1754
|
]);
|
|
1750
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1755
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1751
1756
|
(n) => o.has(n.toCanonicalString())
|
|
1752
1757
|
) : !0;
|
|
1753
1758
|
}
|
|
@@ -1774,7 +1779,7 @@ var lt = class extends Q {
|
|
|
1774
1779
|
dimensionConsumer: !0,
|
|
1775
1780
|
multipleSelectors: !0,
|
|
1776
1781
|
axesAllowed: !0,
|
|
1777
|
-
columnsAllowed: !
|
|
1782
|
+
columnsAllowed: !0
|
|
1778
1783
|
},
|
|
1779
1784
|
dependsOn: ["y"],
|
|
1780
1785
|
checkSourceBySpec: (t, e) => {
|
|
@@ -1782,7 +1787,7 @@ var lt = class extends Q {
|
|
|
1782
1787
|
...e.components.y.selectorStates.map((n) => n.selectedSource),
|
|
1783
1788
|
...e.components.yGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1784
1789
|
]);
|
|
1785
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1790
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1786
1791
|
(n) => o.has(n.toCanonicalString())
|
|
1787
1792
|
) : !0;
|
|
1788
1793
|
}
|
|
@@ -1825,9 +1830,9 @@ var lt = class extends Q {
|
|
|
1825
1830
|
...e.components.x.selectorStates.map((n) => n.selectedSource),
|
|
1826
1831
|
...e.components.xGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1827
1832
|
]);
|
|
1828
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1833
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1829
1834
|
(n) => o.has(n.toCanonicalString())
|
|
1830
|
-
) : o.has(
|
|
1835
|
+
) : o.has(F.fromAxisSpec(t).toCanonicalString());
|
|
1831
1836
|
}
|
|
1832
1837
|
}),
|
|
1833
1838
|
annotationsY: new I({
|
|
@@ -1844,9 +1849,9 @@ var lt = class extends Q {
|
|
|
1844
1849
|
...e.components.y.selectorStates.map((n) => n.selectedSource),
|
|
1845
1850
|
...e.components.yGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1846
1851
|
]);
|
|
1847
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1852
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1848
1853
|
(n) => o.has(n.toCanonicalString())
|
|
1849
|
-
) : o.has(
|
|
1854
|
+
) : o.has(F.fromAxisSpec(t).toCanonicalString());
|
|
1850
1855
|
}
|
|
1851
1856
|
})
|
|
1852
1857
|
},
|
|
@@ -1883,25 +1888,25 @@ var lt = class extends Q {
|
|
|
1883
1888
|
async getMustBeConsumedAxes(t, e) {
|
|
1884
1889
|
if (!e.components.value.selectorStates.length)
|
|
1885
1890
|
return /* @__PURE__ */ new Set();
|
|
1886
|
-
const o = e.components.value.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(
|
|
1887
|
-
return n ? new Set(n.axesSpec.map((l) =>
|
|
1891
|
+
const o = e.components.value.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(b(o));
|
|
1892
|
+
return n ? new Set(n.axesSpec.map((l) => F.fromAxisSpec(l).toCanonicalString())) : /* @__PURE__ */ new Set();
|
|
1888
1893
|
}
|
|
1889
1894
|
async createDataByColumns(t, e) {
|
|
1890
1895
|
var o, n;
|
|
1891
1896
|
const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1892
1897
|
if (!l)
|
|
1893
1898
|
throw Error("Value column is not valid");
|
|
1894
|
-
const s =
|
|
1895
|
-
if (!
|
|
1899
|
+
const s = b(l);
|
|
1900
|
+
if (!O(s))
|
|
1896
1901
|
throw Error("Value column is not valid");
|
|
1897
|
-
const
|
|
1902
|
+
const c = {
|
|
1898
1903
|
type: "columns",
|
|
1899
1904
|
id: (n = z(e.components)) != null ? n : "",
|
|
1900
1905
|
values: {}
|
|
1901
|
-
}, { linkerColumnsMap:
|
|
1906
|
+
}, { linkerColumnsMap: r, compositeLinkerMap: a } = await X(t), u = [
|
|
1902
1907
|
...e.components.filters.selectorStates,
|
|
1903
1908
|
...e.components.tabBy.selectorStates
|
|
1904
|
-
],
|
|
1909
|
+
], p = Y(u), m = u.map((L) => b(L.selectedSource)).filter(O), S = [l], h = await Q(t, S), x = [
|
|
1905
1910
|
e.components.facetBy,
|
|
1906
1911
|
e.components.annotationsX,
|
|
1907
1912
|
e.components.annotationsY,
|
|
@@ -1910,113 +1915,113 @@ var lt = class extends Q {
|
|
|
1910
1915
|
e.components.xGroupBy,
|
|
1911
1916
|
e.components.yGroupBy,
|
|
1912
1917
|
e.components.tooltipContent
|
|
1913
|
-
],
|
|
1914
|
-
for (const { selectedSource: L, fixedAxes:
|
|
1915
|
-
|
|
1918
|
+
], w = [], v = [[]], D = [], B = [];
|
|
1919
|
+
for (const { selectedSource: L, fixedAxes: N } of u)
|
|
1920
|
+
B.push(...await V(
|
|
1916
1921
|
t,
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1922
|
+
r,
|
|
1923
|
+
a,
|
|
1924
|
+
h,
|
|
1920
1925
|
L,
|
|
1921
|
-
|
|
1922
|
-
)),
|
|
1923
|
-
(
|
|
1926
|
+
N
|
|
1927
|
+
)), v.push(
|
|
1928
|
+
(N ?? []).map(({ axisIdx: _, axisValue: G }) => ({ idx: _, value: G }))
|
|
1924
1929
|
);
|
|
1925
|
-
for (const L of
|
|
1926
|
-
for (const { selectedSource:
|
|
1927
|
-
|
|
1928
|
-
(
|
|
1929
|
-
),
|
|
1930
|
+
for (const L of x)
|
|
1931
|
+
for (const { selectedSource: N, fixedAxes: _ } of L.selectorStates) {
|
|
1932
|
+
w.push(b(N)), D.push(
|
|
1933
|
+
(_ ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
|
|
1934
|
+
), B.push(...await V(
|
|
1930
1935
|
t,
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
+
r,
|
|
1937
|
+
a,
|
|
1938
|
+
h,
|
|
1939
|
+
N,
|
|
1940
|
+
_
|
|
1936
1941
|
));
|
|
1937
|
-
const G = await k(t,
|
|
1938
|
-
G &&
|
|
1942
|
+
const G = await k(t, N, S);
|
|
1943
|
+
G && w.push(G);
|
|
1939
1944
|
}
|
|
1940
1945
|
const C = await t.pFrameProvider.getTableOuterJoin(
|
|
1941
|
-
[s, ...
|
|
1942
|
-
h,
|
|
1943
|
-
u,
|
|
1944
|
-
!0,
|
|
1946
|
+
[s, ...B, ...m],
|
|
1945
1947
|
w,
|
|
1948
|
+
p,
|
|
1949
|
+
!0,
|
|
1950
|
+
v,
|
|
1946
1951
|
D
|
|
1947
1952
|
);
|
|
1948
|
-
|
|
1949
|
-
const
|
|
1950
|
-
|
|
1951
|
-
}),
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1953
|
+
w.forEach((L) => {
|
|
1954
|
+
const N = L.toCanonicalString();
|
|
1955
|
+
c.values[N] = O(L) ? C.columnsData[N] : C.axesData[N];
|
|
1956
|
+
}), c.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()];
|
|
1957
|
+
const d = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map((L) => L.selectedSource), i = d.join(", ");
|
|
1958
|
+
c.values[i] = ie(C, d);
|
|
1954
1959
|
const y = e.components.x.selectorStates.map((L) => L.selectedSource), f = await Promise.all(
|
|
1955
1960
|
y.map(
|
|
1956
1961
|
async (L) => {
|
|
1957
|
-
var
|
|
1958
|
-
return (
|
|
1962
|
+
var N, _;
|
|
1963
|
+
return (_ = (N = await k(t, L, S)) == null ? void 0 : N.toCanonicalString()) != null ? _ : L;
|
|
1959
1964
|
}
|
|
1960
1965
|
)
|
|
1961
1966
|
);
|
|
1962
|
-
|
|
1963
|
-
const
|
|
1964
|
-
|
|
1965
|
-
const
|
|
1966
|
-
|
|
1967
|
+
c.values.xLabelsKey = ie(C, f);
|
|
1968
|
+
const g = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map((L) => L.selectedSource), A = g.join(", ");
|
|
1969
|
+
c.values[A] = ie(C, g);
|
|
1970
|
+
const P = e.components.y.selectorStates.map((L) => L.selectedSource), E = await Promise.all(
|
|
1971
|
+
P.map(
|
|
1967
1972
|
async (L) => {
|
|
1968
|
-
var
|
|
1969
|
-
return (
|
|
1973
|
+
var N, _;
|
|
1974
|
+
return (_ = (N = await k(t, L, S)) == null ? void 0 : N.toCanonicalString()) != null ? _ : L;
|
|
1970
1975
|
}
|
|
1971
1976
|
)
|
|
1972
1977
|
);
|
|
1973
|
-
return
|
|
1978
|
+
return c.values.yLabelsKey = ie(C, E), { byColumns: c };
|
|
1974
1979
|
}
|
|
1975
1980
|
async createChartSettings(t, e) {
|
|
1976
1981
|
var o;
|
|
1977
1982
|
const n = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1978
1983
|
if (!n)
|
|
1979
1984
|
throw Error("Value column is not valid");
|
|
1980
|
-
const l =
|
|
1981
|
-
if (!
|
|
1985
|
+
const l = b(n);
|
|
1986
|
+
if (!O(l))
|
|
1982
1987
|
throw Error("Value column is not valid");
|
|
1983
|
-
const s = [n],
|
|
1988
|
+
const s = [n], c = {
|
|
1984
1989
|
type: "column",
|
|
1985
1990
|
value: n,
|
|
1986
1991
|
label: await T(t, n, [])
|
|
1987
|
-
},
|
|
1988
|
-
e.components.facetBy.selectorStates.map(async (
|
|
1989
|
-
var
|
|
1992
|
+
}, a = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map(({ selectedSource: d }) => b(d)).map((d) => d.toCanonicalString()).join(", "), p = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map(({ selectedSource: d }) => b(d)).map((d) => d.toCanonicalString()).join(", "), m = await Promise.all(
|
|
1993
|
+
e.components.facetBy.selectorStates.map(async (d) => {
|
|
1994
|
+
var i, y;
|
|
1990
1995
|
return {
|
|
1991
1996
|
type: "column",
|
|
1992
|
-
value: (y = (
|
|
1997
|
+
value: (y = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : d.selectedSource
|
|
1993
1998
|
};
|
|
1994
1999
|
})
|
|
1995
|
-
),
|
|
1996
|
-
e.components.xGroupBy.selectorStates.map(async (
|
|
1997
|
-
var
|
|
2000
|
+
), S = await Promise.all(
|
|
2001
|
+
e.components.xGroupBy.selectorStates.map(async (d) => {
|
|
2002
|
+
var i, y;
|
|
1998
2003
|
return {
|
|
1999
2004
|
type: "column",
|
|
2000
|
-
label: await T(t,
|
|
2001
|
-
value:
|
|
2002
|
-
valueLabels: (y = (
|
|
2005
|
+
label: await T(t, d.selectedSource, s),
|
|
2006
|
+
value: d.selectedSource,
|
|
2007
|
+
valueLabels: (y = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : d.selectedSource
|
|
2003
2008
|
};
|
|
2004
2009
|
})
|
|
2005
|
-
),
|
|
2006
|
-
e.components.yGroupBy.selectorStates.map(async (
|
|
2007
|
-
var
|
|
2010
|
+
), h = await Promise.all(
|
|
2011
|
+
e.components.yGroupBy.selectorStates.map(async (d) => {
|
|
2012
|
+
var i, y;
|
|
2008
2013
|
return {
|
|
2009
2014
|
type: "column",
|
|
2010
|
-
label: await T(t,
|
|
2011
|
-
value:
|
|
2012
|
-
valueLabels: (y = (
|
|
2015
|
+
label: await T(t, d.selectedSource, s),
|
|
2016
|
+
value: d.selectedSource,
|
|
2017
|
+
valueLabels: (y = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : d.selectedSource
|
|
2013
2018
|
};
|
|
2014
2019
|
})
|
|
2015
|
-
),
|
|
2016
|
-
e.components.annotationsX.selectorStates.map(async (
|
|
2017
|
-
var
|
|
2018
|
-
const f =
|
|
2019
|
-
(
|
|
2020
|
+
), x = await t.pFrameProvider.getColumnSpecById(l), w = await Promise.all(
|
|
2021
|
+
e.components.annotationsX.selectorStates.map(async (d) => {
|
|
2022
|
+
var i, y;
|
|
2023
|
+
const f = d.selectedSource, g = b(f), A = O(g) ? await t.pFrameProvider.getColumnSpecById(g) : (y = (i = x == null ? void 0 : x.axesSpec) == null ? void 0 : i.find(
|
|
2024
|
+
(P) => F.fromAxisSpec(P).toCanonicalString() === f
|
|
2020
2025
|
)) != null ? y : null;
|
|
2021
2026
|
return {
|
|
2022
2027
|
axis: "x",
|
|
@@ -2025,14 +2030,14 @@ var lt = class extends Q {
|
|
|
2025
2030
|
value: f,
|
|
2026
2031
|
label: await T(t, f, s)
|
|
2027
2032
|
},
|
|
2028
|
-
type:
|
|
2033
|
+
type: de(A) ? "discrete" : "continuous"
|
|
2029
2034
|
};
|
|
2030
2035
|
})
|
|
2031
|
-
),
|
|
2032
|
-
e.components.annotationsY.selectorStates.map(async (
|
|
2033
|
-
var
|
|
2034
|
-
const f =
|
|
2035
|
-
(
|
|
2036
|
+
), v = await Promise.all(
|
|
2037
|
+
e.components.annotationsY.selectorStates.map(async (d) => {
|
|
2038
|
+
var i, y;
|
|
2039
|
+
const f = d.selectedSource, g = b(f), A = O(g) ? await t.pFrameProvider.getColumnSpecById(g) : (y = (i = x == null ? void 0 : x.axesSpec) == null ? void 0 : i.find(
|
|
2040
|
+
(P) => F.fromAxisSpec(P).toCanonicalString() === f
|
|
2036
2041
|
)) != null ? y : null;
|
|
2037
2042
|
return {
|
|
2038
2043
|
axis: "y",
|
|
@@ -2041,56 +2046,57 @@ var lt = class extends Q {
|
|
|
2041
2046
|
value: f,
|
|
2042
2047
|
label: await T(t, f, s)
|
|
2043
2048
|
},
|
|
2044
|
-
type:
|
|
2049
|
+
type: de(A) ? "discrete" : "continuous"
|
|
2045
2050
|
};
|
|
2046
2051
|
})
|
|
2047
2052
|
), D = (await Promise.all(
|
|
2048
2053
|
e.components.x.selectorStates.map(
|
|
2049
|
-
(
|
|
2054
|
+
(d) => T(t, d.selectedSource, s)
|
|
2050
2055
|
)
|
|
2051
|
-
)).join(", "),
|
|
2056
|
+
)).join(", "), B = (await Promise.all(
|
|
2052
2057
|
e.components.y.selectorStates.map(
|
|
2053
|
-
(
|
|
2058
|
+
(d) => T(t, d.selectedSource, s)
|
|
2054
2059
|
)
|
|
2055
2060
|
)).join(", "), C = await Promise.all(
|
|
2056
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
2057
|
-
var
|
|
2058
|
-
const
|
|
2061
|
+
e.components.tooltipContent.selectorStates.map(async (d) => {
|
|
2062
|
+
var i, y, f, g;
|
|
2063
|
+
const A = d.selectedSource, P = await J(t, A, s);
|
|
2059
2064
|
return {
|
|
2060
2065
|
type: "column",
|
|
2061
|
-
label: await T(t,
|
|
2062
|
-
value:
|
|
2063
|
-
valueLabels: (y = (
|
|
2066
|
+
label: await T(t, A, s) || A,
|
|
2067
|
+
value: A,
|
|
2068
|
+
valueLabels: (y = (i = await k(t, A, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : A,
|
|
2069
|
+
format: (g = (f = P == null ? void 0 : P.annotations) == null ? void 0 : f[ne]) != null ? g : ".0%"
|
|
2064
2070
|
};
|
|
2065
2071
|
})
|
|
2066
2072
|
);
|
|
2067
2073
|
return {
|
|
2068
2074
|
type: "heatmap",
|
|
2069
|
-
valueColumn:
|
|
2070
|
-
valueType:
|
|
2075
|
+
valueColumn: c,
|
|
2076
|
+
valueType: de(x) ? "discrete" : "continuous",
|
|
2071
2077
|
xColumn: {
|
|
2072
2078
|
type: "column",
|
|
2073
|
-
value:
|
|
2079
|
+
value: a,
|
|
2074
2080
|
label: D,
|
|
2075
2081
|
valueLabels: "xLabelsKey"
|
|
2076
2082
|
},
|
|
2077
2083
|
yColumn: {
|
|
2078
2084
|
type: "column",
|
|
2079
|
-
value:
|
|
2080
|
-
label:
|
|
2085
|
+
value: p,
|
|
2086
|
+
label: B,
|
|
2081
2087
|
valueLabels: "yLabelsKey"
|
|
2082
2088
|
},
|
|
2083
2089
|
facetBy: m,
|
|
2084
|
-
xGroupBy:
|
|
2085
|
-
yGroupBy:
|
|
2086
|
-
annotations: [...
|
|
2090
|
+
xGroupBy: S,
|
|
2091
|
+
yGroupBy: h,
|
|
2092
|
+
annotations: [...w, ...v],
|
|
2087
2093
|
tooltips: {
|
|
2088
2094
|
show: !0,
|
|
2089
2095
|
content: C
|
|
2090
2096
|
}
|
|
2091
2097
|
};
|
|
2092
2098
|
}
|
|
2093
|
-
},
|
|
2099
|
+
}, ct = {
|
|
2094
2100
|
type: "scatterplot",
|
|
2095
2101
|
components: {
|
|
2096
2102
|
x: { type: "simple", selectorStates: [] },
|
|
@@ -2106,7 +2112,7 @@ var lt = class extends Q {
|
|
|
2106
2112
|
tooltipContent: { type: "simple", selectorStates: [] }
|
|
2107
2113
|
},
|
|
2108
2114
|
dividedAxes: {}
|
|
2109
|
-
},
|
|
2115
|
+
}, it = class extends Z {
|
|
2110
2116
|
constructor() {
|
|
2111
2117
|
super(
|
|
2112
2118
|
{
|
|
@@ -2247,38 +2253,38 @@ var lt = class extends Q {
|
|
|
2247
2253
|
async getMustBeConsumedAxes(t, e) {
|
|
2248
2254
|
if (!e.components.x.selectorStates.length || !e.components.y.selectorStates.length)
|
|
2249
2255
|
return /* @__PURE__ */ new Set();
|
|
2250
|
-
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(
|
|
2256
|
+
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(b(o)), s = await t.pFrameProvider.getColumnSpecById(b(n));
|
|
2251
2257
|
if (!l || !s)
|
|
2252
2258
|
return /* @__PURE__ */ new Set();
|
|
2253
|
-
const
|
|
2254
|
-
return /* @__PURE__ */ new Set([...
|
|
2259
|
+
const c = l.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), r = s.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), a = c.filter((p) => !r.some((m) => m === p)), u = r.filter((p) => !c.some((m) => m === p));
|
|
2260
|
+
return /* @__PURE__ */ new Set([...a, ...u]);
|
|
2255
2261
|
}
|
|
2256
2262
|
async createDataByColumns(t, e) {
|
|
2257
2263
|
var o, n, l;
|
|
2258
|
-
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2259
|
-
if (!s || !
|
|
2264
|
+
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;
|
|
2265
|
+
if (!s || !c)
|
|
2260
2266
|
throw Error("X or Y column is not valid");
|
|
2261
|
-
const
|
|
2267
|
+
const r = b(s), a = b(c), u = {
|
|
2262
2268
|
type: "columns",
|
|
2263
2269
|
id: (l = z(e.components)) != null ? l : "",
|
|
2264
2270
|
values: {}
|
|
2265
|
-
}, { linkerColumnsMap:
|
|
2271
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), S = [
|
|
2266
2272
|
...e.components.filters.selectorStates,
|
|
2267
2273
|
...e.components.tabBy.selectorStates
|
|
2268
|
-
],
|
|
2269
|
-
if (
|
|
2274
|
+
], h = Y(S), x = S.map((g) => b(g.selectedSource)).filter(O), w = [r, a].filter(O).map((g) => g.toCanonicalString());
|
|
2275
|
+
if (w.length === 0)
|
|
2270
2276
|
throw Error("One of X and Y should be a column");
|
|
2271
|
-
const
|
|
2272
|
-
for (const { selectedSource:
|
|
2273
|
-
|
|
2277
|
+
const v = await Q(t, w), D = [r, a, ...x], B = [], C = [[], []], d = [], i = [];
|
|
2278
|
+
for (const { selectedSource: g, fixedAxes: A } of S)
|
|
2279
|
+
i.push(...await V(
|
|
2274
2280
|
t,
|
|
2275
|
-
|
|
2281
|
+
p,
|
|
2276
2282
|
m,
|
|
2277
|
-
w,
|
|
2278
2283
|
v,
|
|
2279
|
-
|
|
2284
|
+
g,
|
|
2285
|
+
A
|
|
2280
2286
|
)), C.push(
|
|
2281
|
-
(
|
|
2287
|
+
(A ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
2282
2288
|
);
|
|
2283
2289
|
const y = [
|
|
2284
2290
|
e.components.grouping,
|
|
@@ -2289,114 +2295,118 @@ var lt = class extends Q {
|
|
|
2289
2295
|
e.components.label,
|
|
2290
2296
|
e.components.highlight
|
|
2291
2297
|
];
|
|
2292
|
-
for (const
|
|
2293
|
-
for (const { selectedSource:
|
|
2294
|
-
|
|
2295
|
-
(
|
|
2296
|
-
),
|
|
2298
|
+
for (const g of y)
|
|
2299
|
+
for (const { selectedSource: A, fixedAxes: P } of g.selectorStates) {
|
|
2300
|
+
B.push(b(A)), d.push(
|
|
2301
|
+
(P ?? []).map(({ axisIdx: L, axisValue: N }) => ({ idx: L, value: N }))
|
|
2302
|
+
), i.push(...await V(
|
|
2297
2303
|
t,
|
|
2298
|
-
|
|
2304
|
+
p,
|
|
2299
2305
|
m,
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2306
|
+
v,
|
|
2307
|
+
A,
|
|
2308
|
+
P
|
|
2303
2309
|
));
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2310
|
+
const E = await k(t, A, w);
|
|
2311
|
+
E && B.push(E);
|
|
2306
2312
|
}
|
|
2307
2313
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
2308
|
-
[
|
|
2309
|
-
|
|
2310
|
-
|
|
2314
|
+
[r, a, ...i, ...x],
|
|
2315
|
+
B,
|
|
2316
|
+
h,
|
|
2311
2317
|
!1,
|
|
2312
2318
|
C,
|
|
2313
|
-
|
|
2319
|
+
d
|
|
2314
2320
|
);
|
|
2315
|
-
return [...D, ...
|
|
2316
|
-
const
|
|
2317
|
-
|
|
2318
|
-
}),
|
|
2321
|
+
return [...D, ...B].forEach((g) => {
|
|
2322
|
+
const A = g.toCanonicalString();
|
|
2323
|
+
u.values[A] = O(g) ? f.columnsData[A] : f.axesData[A];
|
|
2324
|
+
}), u.values.key = new Array(u.values[Object.keys(u.values)[0]].length).fill(0).map((g, A) => A), e.components.highlight.selectorStates.length && (u.values.highlight = Be(e.components.highlight.selectorStates, f)), { byColumns: u };
|
|
2319
2325
|
}
|
|
2320
2326
|
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 || !
|
|
2327
|
+
var o, n, l, s, c;
|
|
2328
|
+
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 ? b(r) : null, p = a ? b(a) : null;
|
|
2329
|
+
if (!r || !a || !u || !p || !O(u) && !O(p))
|
|
2324
2330
|
throw Error("Empty or invalid required data");
|
|
2325
|
-
const
|
|
2331
|
+
const m = [u, p].filter(O).map((i) => i.toCanonicalString()), S = {
|
|
2326
2332
|
type: "column",
|
|
2327
2333
|
value: r,
|
|
2328
|
-
label: await T(t, r,
|
|
2329
|
-
},
|
|
2334
|
+
label: await T(t, r, m)
|
|
2335
|
+
}, h = {
|
|
2330
2336
|
type: "column",
|
|
2331
|
-
value:
|
|
2332
|
-
label: await T(t,
|
|
2337
|
+
value: a,
|
|
2338
|
+
label: await T(t, a, m)
|
|
2333
2339
|
}, x = {
|
|
2334
2340
|
type: "column",
|
|
2335
2341
|
value: "key"
|
|
2336
|
-
},
|
|
2337
|
-
e.components.facetBy.selectorStates.map(async (
|
|
2338
|
-
var
|
|
2342
|
+
}, w = await Promise.all(
|
|
2343
|
+
e.components.facetBy.selectorStates.map(async (i) => {
|
|
2344
|
+
var y, f;
|
|
2339
2345
|
return {
|
|
2340
2346
|
type: "column",
|
|
2341
|
-
value: (
|
|
2347
|
+
value: (f = (y = await k(t, i.selectedSource, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i.selectedSource
|
|
2342
2348
|
};
|
|
2343
2349
|
})
|
|
2344
|
-
),
|
|
2345
|
-
...e.components.grouping.selectorStates.map((
|
|
2346
|
-
...e.components.size.selectorStates.map((
|
|
2347
|
-
...e.components.shape.selectorStates.map((
|
|
2348
|
-
]),
|
|
2349
|
-
|
|
2350
|
-
var
|
|
2350
|
+
), v = pe.uniq([
|
|
2351
|
+
...e.components.grouping.selectorStates.map((i) => i.selectedSource),
|
|
2352
|
+
...e.components.size.selectorStates.map((i) => i.selectedSource),
|
|
2353
|
+
...e.components.shape.selectorStates.map((i) => i.selectedSource)
|
|
2354
|
+
]), D = await Promise.all(
|
|
2355
|
+
v.map(async (i) => {
|
|
2356
|
+
var y, f;
|
|
2351
2357
|
return {
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2358
|
+
columnName: {
|
|
2359
|
+
type: "column",
|
|
2360
|
+
label: await T(t, i, m) || i,
|
|
2361
|
+
value: i,
|
|
2362
|
+
valueLabels: (f = (y = await k(t, i, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i
|
|
2363
|
+
}
|
|
2356
2364
|
};
|
|
2357
2365
|
})
|
|
2358
|
-
),
|
|
2359
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
2360
|
-
var
|
|
2361
|
-
const
|
|
2366
|
+
), B = await Promise.all(
|
|
2367
|
+
e.components.tooltipContent.selectorStates.map(async (i) => {
|
|
2368
|
+
var y, f;
|
|
2369
|
+
const g = i.selectedSource, A = b(g), P = (y = await k(t, g, m)) != null ? y : A, E = await J(t, g, m);
|
|
2362
2370
|
return {
|
|
2363
2371
|
type: "column",
|
|
2364
|
-
label: await T(t,
|
|
2365
|
-
value:
|
|
2366
|
-
valueLabels:
|
|
2372
|
+
label: await T(t, g, m) || g,
|
|
2373
|
+
value: g,
|
|
2374
|
+
valueLabels: P.toCanonicalString(),
|
|
2375
|
+
format: (f = E == null ? void 0 : E.annotations) == null ? void 0 : f[ne]
|
|
2367
2376
|
};
|
|
2368
2377
|
})
|
|
2369
2378
|
);
|
|
2370
|
-
let
|
|
2379
|
+
let C;
|
|
2371
2380
|
if (e.components.label.selectorStates.length) {
|
|
2372
|
-
const
|
|
2373
|
-
|
|
2381
|
+
const i = e.components.label.selectorStates[0].selectedSource, y = await J(t, i, m);
|
|
2382
|
+
C = {
|
|
2374
2383
|
type: "column",
|
|
2375
|
-
value:
|
|
2376
|
-
label: await T(t,
|
|
2377
|
-
valueLabels: (s = (l = await k(t,
|
|
2384
|
+
value: i,
|
|
2385
|
+
label: await T(t, i, m),
|
|
2386
|
+
valueLabels: (s = (l = await k(t, i, m)) == null ? void 0 : l.toCanonicalString()) != null ? s : i,
|
|
2387
|
+
format: (c = y == null ? void 0 : y.annotations) == null ? void 0 : c[ne]
|
|
2378
2388
|
};
|
|
2379
2389
|
}
|
|
2380
|
-
let
|
|
2381
|
-
return e.components.highlight.selectorStates.length && (
|
|
2390
|
+
let d;
|
|
2391
|
+
return e.components.highlight.selectorStates.length && (d = {
|
|
2382
2392
|
type: "column",
|
|
2383
2393
|
value: "highlight"
|
|
2384
2394
|
}), {
|
|
2385
2395
|
type: "scatterplot",
|
|
2386
|
-
x:
|
|
2387
|
-
y:
|
|
2396
|
+
x: S,
|
|
2397
|
+
y: h,
|
|
2388
2398
|
keyColumn: x,
|
|
2389
|
-
facetBy:
|
|
2390
|
-
grouping:
|
|
2391
|
-
label:
|
|
2392
|
-
highlight:
|
|
2399
|
+
facetBy: w,
|
|
2400
|
+
grouping: D,
|
|
2401
|
+
label: C,
|
|
2402
|
+
highlight: d,
|
|
2393
2403
|
tooltips: {
|
|
2394
2404
|
show: !0,
|
|
2395
|
-
content:
|
|
2405
|
+
content: B
|
|
2396
2406
|
}
|
|
2397
2407
|
};
|
|
2398
2408
|
}
|
|
2399
|
-
},
|
|
2409
|
+
}, ut = {
|
|
2400
2410
|
type: "scatterplot-umap",
|
|
2401
2411
|
components: {
|
|
2402
2412
|
x: { type: "simple", selectorStates: [] },
|
|
@@ -2411,7 +2421,7 @@ var lt = class extends Q {
|
|
|
2411
2421
|
size: { type: "simple", selectorStates: [] }
|
|
2412
2422
|
},
|
|
2413
2423
|
dividedAxes: {}
|
|
2414
|
-
},
|
|
2424
|
+
}, pt = class extends Z {
|
|
2415
2425
|
constructor() {
|
|
2416
2426
|
super(
|
|
2417
2427
|
{
|
|
@@ -2541,41 +2551,41 @@ var lt = class extends Q {
|
|
|
2541
2551
|
async getMustBeConsumedAxes(t, e) {
|
|
2542
2552
|
if (!e.components.x.selectorStates.length || !e.components.y.selectorStates.length)
|
|
2543
2553
|
return /* @__PURE__ */ new Set();
|
|
2544
|
-
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(
|
|
2554
|
+
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(b(o)), s = await t.pFrameProvider.getColumnSpecById(b(n));
|
|
2545
2555
|
if (!l || !s)
|
|
2546
2556
|
return /* @__PURE__ */ new Set();
|
|
2547
|
-
const
|
|
2548
|
-
return /* @__PURE__ */ new Set([...
|
|
2557
|
+
const c = l.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), r = s.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), a = c.filter((p) => !r.some((m) => m === p)), u = r.filter((p) => !c.some((m) => m === p));
|
|
2558
|
+
return /* @__PURE__ */ new Set([...a, ...u]);
|
|
2549
2559
|
}
|
|
2550
2560
|
async createDataByColumns(t, e) {
|
|
2551
2561
|
var o, n, l;
|
|
2552
|
-
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2553
|
-
if (!s || !
|
|
2562
|
+
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;
|
|
2563
|
+
if (!s || !c)
|
|
2554
2564
|
throw Error("X or Y column is not valid");
|
|
2555
|
-
const
|
|
2556
|
-
if (!
|
|
2565
|
+
const r = b(s), a = b(c);
|
|
2566
|
+
if (!r || !a)
|
|
2557
2567
|
throw Error("X or Y column is not valid");
|
|
2558
|
-
const
|
|
2568
|
+
const u = {
|
|
2559
2569
|
type: "columns",
|
|
2560
2570
|
id: (l = z(e.components)) != null ? l : "",
|
|
2561
2571
|
values: {}
|
|
2562
|
-
}, { linkerColumnsMap:
|
|
2572
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), S = [
|
|
2563
2573
|
...e.components.filters.selectorStates,
|
|
2564
2574
|
...e.components.tabBy.selectorStates
|
|
2565
|
-
],
|
|
2566
|
-
if (
|
|
2575
|
+
], h = Y(S), x = S.map((g) => b(g.selectedSource)).filter(O), w = [r, a].filter(O).map((g) => g.toCanonicalString());
|
|
2576
|
+
if (w.length === 0)
|
|
2567
2577
|
throw Error("One of X and Y should be a column");
|
|
2568
|
-
const
|
|
2569
|
-
for (const { selectedSource:
|
|
2570
|
-
|
|
2578
|
+
const v = await Q(t, w), D = [r, a, ...x], B = [], C = [[], []], d = [], i = [];
|
|
2579
|
+
for (const { selectedSource: g, fixedAxes: A } of S)
|
|
2580
|
+
i.push(...await V(
|
|
2571
2581
|
t,
|
|
2572
|
-
|
|
2582
|
+
p,
|
|
2573
2583
|
m,
|
|
2574
|
-
w,
|
|
2575
2584
|
v,
|
|
2576
|
-
|
|
2585
|
+
g,
|
|
2586
|
+
A
|
|
2577
2587
|
)), C.push(
|
|
2578
|
-
(
|
|
2588
|
+
(A ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
2579
2589
|
);
|
|
2580
2590
|
const y = [
|
|
2581
2591
|
e.components.grouping,
|
|
@@ -2585,116 +2595,120 @@ var lt = class extends Q {
|
|
|
2585
2595
|
e.components.highlight,
|
|
2586
2596
|
e.components.size
|
|
2587
2597
|
];
|
|
2588
|
-
for (const
|
|
2589
|
-
for (const { selectedSource:
|
|
2590
|
-
|
|
2591
|
-
(
|
|
2592
|
-
),
|
|
2598
|
+
for (const g of y)
|
|
2599
|
+
for (const { selectedSource: A, fixedAxes: P } of g.selectorStates) {
|
|
2600
|
+
B.push(b(A)), d.push(
|
|
2601
|
+
(P ?? []).map(({ axisIdx: L, axisValue: N }) => ({ idx: L, value: N }))
|
|
2602
|
+
), i.push(...await V(
|
|
2593
2603
|
t,
|
|
2594
|
-
|
|
2604
|
+
p,
|
|
2595
2605
|
m,
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2606
|
+
v,
|
|
2607
|
+
A,
|
|
2608
|
+
P
|
|
2599
2609
|
));
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2610
|
+
const E = await k(t, A, w);
|
|
2611
|
+
E && B.push(E);
|
|
2602
2612
|
}
|
|
2603
2613
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
2604
|
-
[
|
|
2605
|
-
|
|
2606
|
-
|
|
2614
|
+
[r, a, ...i, ...x],
|
|
2615
|
+
B,
|
|
2616
|
+
h,
|
|
2607
2617
|
!1,
|
|
2608
2618
|
C,
|
|
2609
|
-
|
|
2619
|
+
d
|
|
2610
2620
|
);
|
|
2611
|
-
return [...D, ...
|
|
2612
|
-
const
|
|
2613
|
-
|
|
2614
|
-
}), e.components.highlight.selectorStates.length && (
|
|
2615
|
-
byColumns:
|
|
2621
|
+
return [...D, ...B].forEach((g) => {
|
|
2622
|
+
const A = g.toCanonicalString();
|
|
2623
|
+
u.values[A] = O(g) ? f.columnsData[A] : f.axesData[A];
|
|
2624
|
+
}), e.components.highlight.selectorStates.length && (u.values.highlight = Be(e.components.highlight.selectorStates, f)), {
|
|
2625
|
+
byColumns: u,
|
|
2616
2626
|
axesData: f.axesData
|
|
2617
2627
|
};
|
|
2618
2628
|
}
|
|
2619
2629
|
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 || !
|
|
2630
|
+
var o, n, l, s, c;
|
|
2631
|
+
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 ? b(r) : null, p = a ? b(a) : null;
|
|
2632
|
+
if (!r || !a || !u || !p || !O(u) && !O(p))
|
|
2623
2633
|
throw Error("Empty or invalid required data");
|
|
2624
|
-
const
|
|
2634
|
+
const m = [u, p].filter(O).map((i) => i.toCanonicalString()), S = {
|
|
2625
2635
|
type: "column",
|
|
2626
2636
|
value: r,
|
|
2627
|
-
label: await T(t, r,
|
|
2628
|
-
},
|
|
2637
|
+
label: await T(t, r, m)
|
|
2638
|
+
}, h = {
|
|
2629
2639
|
type: "column",
|
|
2630
|
-
value:
|
|
2631
|
-
label: await T(t,
|
|
2640
|
+
value: a,
|
|
2641
|
+
label: await T(t, a, m)
|
|
2632
2642
|
}, x = {
|
|
2633
2643
|
type: "column",
|
|
2634
2644
|
value: "key"
|
|
2635
|
-
},
|
|
2636
|
-
e.components.facetBy.selectorStates.map(async (
|
|
2637
|
-
var
|
|
2645
|
+
}, w = await Promise.all(
|
|
2646
|
+
e.components.facetBy.selectorStates.map(async (i) => {
|
|
2647
|
+
var y, f;
|
|
2638
2648
|
return {
|
|
2639
2649
|
type: "column",
|
|
2640
|
-
value: (
|
|
2650
|
+
value: (f = (y = await k(t, i.selectedSource, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i.selectedSource
|
|
2641
2651
|
};
|
|
2642
2652
|
})
|
|
2643
|
-
),
|
|
2644
|
-
...e.components.grouping.selectorStates.map((
|
|
2645
|
-
...e.components.size.selectorStates.map((
|
|
2646
|
-
]),
|
|
2647
|
-
|
|
2648
|
-
var
|
|
2653
|
+
), v = pe.uniq([
|
|
2654
|
+
...e.components.grouping.selectorStates.map((i) => i.selectedSource),
|
|
2655
|
+
...e.components.size.selectorStates.map((i) => i.selectedSource)
|
|
2656
|
+
]), D = await Promise.all(
|
|
2657
|
+
v.map(async (i) => {
|
|
2658
|
+
var y, f;
|
|
2649
2659
|
return {
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2660
|
+
columnName: {
|
|
2661
|
+
type: "column",
|
|
2662
|
+
label: await T(t, i, m) || i,
|
|
2663
|
+
value: i,
|
|
2664
|
+
valueLabels: (f = (y = await k(t, i, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i
|
|
2665
|
+
}
|
|
2654
2666
|
};
|
|
2655
2667
|
})
|
|
2656
|
-
),
|
|
2657
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
2658
|
-
var
|
|
2659
|
-
const
|
|
2668
|
+
), B = await Promise.all(
|
|
2669
|
+
e.components.tooltipContent.selectorStates.map(async (i) => {
|
|
2670
|
+
var y, f, g;
|
|
2671
|
+
const A = i.selectedSource, P = await J(t, A, m);
|
|
2660
2672
|
return {
|
|
2661
2673
|
type: "column",
|
|
2662
|
-
label: await T(t,
|
|
2663
|
-
value:
|
|
2664
|
-
valueLabels: (
|
|
2674
|
+
label: await T(t, A, m) || A,
|
|
2675
|
+
value: A,
|
|
2676
|
+
valueLabels: (f = (y = await k(t, A, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : A,
|
|
2677
|
+
format: (g = P == null ? void 0 : P.annotations) == null ? void 0 : g[ne]
|
|
2665
2678
|
};
|
|
2666
2679
|
})
|
|
2667
2680
|
);
|
|
2668
|
-
let
|
|
2681
|
+
let C;
|
|
2669
2682
|
if (e.components.label.selectorStates.length) {
|
|
2670
|
-
const
|
|
2671
|
-
|
|
2683
|
+
const i = e.components.label.selectorStates[0].selectedSource, y = await J(t, i, m);
|
|
2684
|
+
C = {
|
|
2672
2685
|
type: "column",
|
|
2673
|
-
value:
|
|
2674
|
-
label: await T(t,
|
|
2675
|
-
valueLabels: (s = (l = await k(t,
|
|
2686
|
+
value: i,
|
|
2687
|
+
label: await T(t, i, m),
|
|
2688
|
+
valueLabels: (s = (l = await k(t, i, m)) == null ? void 0 : l.toCanonicalString()) != null ? s : i,
|
|
2689
|
+
format: (c = y == null ? void 0 : y.annotations) == null ? void 0 : c[ne]
|
|
2676
2690
|
};
|
|
2677
2691
|
}
|
|
2678
|
-
let
|
|
2679
|
-
return e.components.highlight.selectorStates.length && (
|
|
2692
|
+
let d;
|
|
2693
|
+
return e.components.highlight.selectorStates.length && (d = {
|
|
2680
2694
|
type: "column",
|
|
2681
2695
|
value: "highlight"
|
|
2682
2696
|
}), {
|
|
2683
2697
|
type: "scatterplot-umap",
|
|
2684
|
-
x:
|
|
2685
|
-
y:
|
|
2698
|
+
x: S,
|
|
2699
|
+
y: h,
|
|
2686
2700
|
keyColumn: x,
|
|
2687
|
-
facetBy:
|
|
2688
|
-
grouping:
|
|
2689
|
-
label:
|
|
2690
|
-
highlight:
|
|
2701
|
+
facetBy: w,
|
|
2702
|
+
grouping: D,
|
|
2703
|
+
label: C,
|
|
2704
|
+
highlight: d,
|
|
2691
2705
|
tooltips: {
|
|
2692
2706
|
show: !0,
|
|
2693
|
-
content:
|
|
2707
|
+
content: B
|
|
2694
2708
|
}
|
|
2695
2709
|
};
|
|
2696
2710
|
}
|
|
2697
|
-
},
|
|
2711
|
+
}, Se = "pl7.app/dendrogram/nodeId", ye = "id", mt = {
|
|
2698
2712
|
type: "dendro",
|
|
2699
2713
|
components: {
|
|
2700
2714
|
value: { type: "simple", selectorStates: [] },
|
|
@@ -2714,7 +2728,7 @@ var lt = class extends Q {
|
|
|
2714
2728
|
heatmapGroup: { type: "simple", selectorStates: [] }
|
|
2715
2729
|
},
|
|
2716
2730
|
dividedAxes: {}
|
|
2717
|
-
},
|
|
2731
|
+
}, dt = class extends Z {
|
|
2718
2732
|
constructor() {
|
|
2719
2733
|
super(
|
|
2720
2734
|
{
|
|
@@ -2898,23 +2912,23 @@ var lt = class extends Q {
|
|
|
2898
2912
|
}
|
|
2899
2913
|
})
|
|
2900
2914
|
}
|
|
2901
|
-
), this.ignoredOptionIdNames = [
|
|
2915
|
+
), this.ignoredOptionIdNames = [Se];
|
|
2902
2916
|
}
|
|
2903
2917
|
readyDataInputs(t) {
|
|
2904
2918
|
return t.components.value.selectorStates.length > 0;
|
|
2905
2919
|
}
|
|
2906
2920
|
async createTableData(t, e) {
|
|
2907
2921
|
var o;
|
|
2908
|
-
const n = {}, l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, s =
|
|
2909
|
-
if (!l || !
|
|
2922
|
+
const n = {}, l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, s = b(l);
|
|
2923
|
+
if (!l || !O(s))
|
|
2910
2924
|
throw Error("Value column is not valid");
|
|
2911
|
-
const { linkerColumnsMap:
|
|
2925
|
+
const { linkerColumnsMap: c, compositeLinkerMap: r } = await X(t), a = Y([
|
|
2912
2926
|
...e.components.filters.selectorStates,
|
|
2913
2927
|
...e.components.tabBy.selectorStates
|
|
2914
|
-
]),
|
|
2915
|
-
...e.components.filters.selectorStates.map((
|
|
2916
|
-
...e.components.tabBy.selectorStates.map((
|
|
2917
|
-
].filter(
|
|
2928
|
+
]), u = [
|
|
2929
|
+
...e.components.filters.selectorStates.map((d) => b(d.selectedSource)),
|
|
2930
|
+
...e.components.tabBy.selectorStates.map((d) => b(d.selectedSource))
|
|
2931
|
+
].filter(O), p = [l], m = await Q(t, p), S = [], h = [], x = [], w = [e.components.value], v = [
|
|
2918
2932
|
e.components.tableContent,
|
|
2919
2933
|
// next components can content data mapped on tree
|
|
2920
2934
|
e.components.labels,
|
|
@@ -2923,71 +2937,71 @@ var lt = class extends Q {
|
|
|
2923
2937
|
e.components.nodeShape,
|
|
2924
2938
|
e.components.lineColor
|
|
2925
2939
|
], D = {};
|
|
2926
|
-
for (const
|
|
2927
|
-
for (const { selectedSource:
|
|
2928
|
-
|
|
2940
|
+
for (const d of w)
|
|
2941
|
+
for (const { selectedSource: i, fixedAxes: y } of d.selectorStates) {
|
|
2942
|
+
x.push(...await V(
|
|
2929
2943
|
t,
|
|
2930
|
-
r,
|
|
2931
2944
|
c,
|
|
2945
|
+
r,
|
|
2932
2946
|
m,
|
|
2933
|
-
|
|
2947
|
+
i,
|
|
2934
2948
|
y
|
|
2935
2949
|
));
|
|
2936
|
-
const f = await k(t,
|
|
2937
|
-
D[
|
|
2950
|
+
const f = await k(t, i, p), g = f ?? b(i);
|
|
2951
|
+
D[g.toCanonicalString()] = i, S.push(g);
|
|
2938
2952
|
}
|
|
2939
|
-
for (const
|
|
2940
|
-
for (const { selectedSource:
|
|
2941
|
-
|
|
2953
|
+
for (const d of v)
|
|
2954
|
+
for (const { selectedSource: i, fixedAxes: y } of d.selectorStates) {
|
|
2955
|
+
x.push(...await V(
|
|
2942
2956
|
t,
|
|
2943
|
-
r,
|
|
2944
2957
|
c,
|
|
2958
|
+
r,
|
|
2945
2959
|
m,
|
|
2946
|
-
|
|
2960
|
+
i,
|
|
2947
2961
|
y
|
|
2948
2962
|
));
|
|
2949
|
-
const f = await k(t,
|
|
2950
|
-
D[
|
|
2963
|
+
const f = await k(t, i, p), g = f ?? b(i);
|
|
2964
|
+
D[i] = g.toCanonicalString(), h.push(g);
|
|
2951
2965
|
}
|
|
2952
|
-
const
|
|
2953
|
-
[...
|
|
2954
|
-
|
|
2955
|
-
|
|
2966
|
+
const B = await t.pFrameProvider.getTableOuterJoin(
|
|
2967
|
+
[...S, ...u, ...x],
|
|
2968
|
+
h,
|
|
2969
|
+
a,
|
|
2956
2970
|
!1
|
|
2957
2971
|
);
|
|
2958
|
-
for (const
|
|
2959
|
-
const
|
|
2972
|
+
for (const d of [...S, ...h]) {
|
|
2973
|
+
const i = d.toCanonicalString(), y = D[d.toCanonicalString()];
|
|
2960
2974
|
n[y] = {
|
|
2961
|
-
data:
|
|
2962
|
-
spec:
|
|
2963
|
-
label: await T(t, y,
|
|
2975
|
+
data: O(d) ? B.columnsData[i] : B.axesData[i],
|
|
2976
|
+
spec: O(d) ? B.columnSpecs[i] : B.axesSpecs[i],
|
|
2977
|
+
label: await T(t, y, p)
|
|
2964
2978
|
};
|
|
2965
2979
|
}
|
|
2966
|
-
const C = Object.keys(
|
|
2967
|
-
(
|
|
2968
|
-
var
|
|
2969
|
-
return ((
|
|
2980
|
+
const C = Object.keys(B.axesData).find(
|
|
2981
|
+
(d) => {
|
|
2982
|
+
var i;
|
|
2983
|
+
return ((i = b(d)) == null ? void 0 : i.name) === Se;
|
|
2970
2984
|
}
|
|
2971
2985
|
);
|
|
2972
|
-
return C ? n[
|
|
2973
|
-
data:
|
|
2986
|
+
return C ? n[ye] = {
|
|
2987
|
+
data: B.axesData[C],
|
|
2974
2988
|
spec: { kind: "PColumn", valueType: "Int", name: "Node id" },
|
|
2975
2989
|
label: "Node id"
|
|
2976
2990
|
} : console.warn("Missed node id axis in data column"), n;
|
|
2977
2991
|
}
|
|
2978
2992
|
async createDataByColumns(t, e) {
|
|
2979
2993
|
var o, n, l;
|
|
2980
|
-
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2981
|
-
if (!s || !
|
|
2994
|
+
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 = b(s), a = c ? b(c) : null;
|
|
2995
|
+
if (!s || !O(r))
|
|
2982
2996
|
throw Error("Value column is not valid");
|
|
2983
|
-
const
|
|
2997
|
+
const u = {
|
|
2984
2998
|
type: "columns",
|
|
2985
2999
|
id: (l = z(e.components)) != null ? l : "",
|
|
2986
3000
|
values: {}
|
|
2987
|
-
},
|
|
3001
|
+
}, p = [
|
|
2988
3002
|
...e.components.filters.selectorStates,
|
|
2989
3003
|
...e.components.tabBy.selectorStates
|
|
2990
|
-
], m = Y(
|
|
3004
|
+
], m = Y(p), S = p.map((y) => b(y.selectedSource)).filter(O), h = [r, a].filter(O).map((y) => y.toCanonicalString()), x = [], w = [], v = [], D = [], B = [
|
|
2991
3005
|
e.components.value,
|
|
2992
3006
|
e.components.height,
|
|
2993
3007
|
e.components.labels,
|
|
@@ -3003,150 +3017,150 @@ var lt = class extends Q {
|
|
|
3003
3017
|
e.components.heatmapGroup,
|
|
3004
3018
|
e.components.tableContent
|
|
3005
3019
|
];
|
|
3006
|
-
for (const y of
|
|
3007
|
-
for (const { selectedSource: f, fixedAxes:
|
|
3008
|
-
|
|
3009
|
-
(
|
|
3020
|
+
for (const y of B)
|
|
3021
|
+
for (const { selectedSource: f, fixedAxes: g } of y.selectorStates) {
|
|
3022
|
+
x.push(b(f)), v.push(
|
|
3023
|
+
(g ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
3010
3024
|
);
|
|
3011
|
-
const
|
|
3012
|
-
|
|
3025
|
+
const A = await k(t, f, h);
|
|
3026
|
+
A && x.push(A);
|
|
3013
3027
|
}
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
(y ?? []).map(({ axisIdx: f, axisValue:
|
|
3028
|
+
p.forEach(({ fixedAxes: y }) => {
|
|
3029
|
+
v.push(
|
|
3030
|
+
(y ?? []).map(({ axisIdx: f, axisValue: g }) => ({ idx: f, value: g }))
|
|
3017
3031
|
);
|
|
3018
3032
|
});
|
|
3019
3033
|
for (const y of C)
|
|
3020
|
-
for (const { selectedSource: f, fixedAxes:
|
|
3021
|
-
|
|
3022
|
-
(
|
|
3034
|
+
for (const { selectedSource: f, fixedAxes: g } of y.selectorStates) {
|
|
3035
|
+
w.push(b(f)), D.push(
|
|
3036
|
+
(g ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
3023
3037
|
);
|
|
3024
|
-
const
|
|
3025
|
-
|
|
3038
|
+
const A = await k(t, f, h);
|
|
3039
|
+
A && w.push(A);
|
|
3026
3040
|
}
|
|
3027
|
-
const
|
|
3028
|
-
[...
|
|
3029
|
-
|
|
3041
|
+
const d = await t.pFrameProvider.getTableOuterJoin(
|
|
3042
|
+
[...x, ...S],
|
|
3043
|
+
w,
|
|
3030
3044
|
m,
|
|
3031
3045
|
!1,
|
|
3032
|
-
|
|
3046
|
+
v,
|
|
3033
3047
|
D
|
|
3034
3048
|
);
|
|
3035
|
-
[...
|
|
3036
|
-
const f = y.toCanonicalString(),
|
|
3037
|
-
|
|
3049
|
+
[...x, ...w].forEach((y) => {
|
|
3050
|
+
const f = y.toCanonicalString(), g = O(y) ? d.columnsData[f] : d.axesData[f];
|
|
3051
|
+
u.values[f] = [], u.values[f] = g;
|
|
3038
3052
|
});
|
|
3039
|
-
const
|
|
3053
|
+
const i = Object.keys(d.axesData).find(
|
|
3040
3054
|
(y) => {
|
|
3041
3055
|
var f;
|
|
3042
|
-
return ((f =
|
|
3056
|
+
return ((f = b(y)) == null ? void 0 : f.name) === Se;
|
|
3043
3057
|
}
|
|
3044
3058
|
);
|
|
3045
|
-
return
|
|
3059
|
+
return i ? u.values[ye] = d.axesData[i] : console.warn("Missed node id axis in data column"), { byColumns: u };
|
|
3046
3060
|
}
|
|
3047
3061
|
async createChartSettings(t, e) {
|
|
3048
3062
|
var o, n, l;
|
|
3049
|
-
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
3050
|
-
if (!s || !
|
|
3063
|
+
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = b(s);
|
|
3064
|
+
if (!s || !O(c))
|
|
3051
3065
|
throw Error("Data column is not valid");
|
|
3052
|
-
const
|
|
3066
|
+
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, S = {};
|
|
3053
3067
|
if (e.components.nodeColor.selectorStates.length) {
|
|
3054
|
-
const
|
|
3055
|
-
|
|
3068
|
+
const v = e.components.nodeColor.selectorStates[0].selectedSource;
|
|
3069
|
+
S.nodeColor = {
|
|
3056
3070
|
columnName: {
|
|
3057
3071
|
type: "column",
|
|
3058
|
-
value:
|
|
3059
|
-
label: await T(t,
|
|
3072
|
+
value: v,
|
|
3073
|
+
label: await T(t, v, r)
|
|
3060
3074
|
}
|
|
3061
3075
|
};
|
|
3062
3076
|
}
|
|
3063
3077
|
if (e.components.nodeShape.selectorStates.length) {
|
|
3064
|
-
const
|
|
3065
|
-
|
|
3078
|
+
const v = e.components.nodeShape.selectorStates[0].selectedSource;
|
|
3079
|
+
S.nodeShape = {
|
|
3066
3080
|
columnName: {
|
|
3067
3081
|
type: "column",
|
|
3068
|
-
value:
|
|
3069
|
-
label: await T(t,
|
|
3082
|
+
value: v,
|
|
3083
|
+
label: await T(t, v, r)
|
|
3070
3084
|
}
|
|
3071
3085
|
};
|
|
3072
3086
|
}
|
|
3073
3087
|
if (e.components.nodeSize.selectorStates.length) {
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3088
|
+
const v = e.components.nodeSize.selectorStates[0].selectedSource;
|
|
3089
|
+
S.nodeSize = {
|
|
3076
3090
|
columnName: {
|
|
3077
3091
|
type: "column",
|
|
3078
|
-
value:
|
|
3079
|
-
label: await T(t,
|
|
3092
|
+
value: v,
|
|
3093
|
+
label: await T(t, v, r)
|
|
3080
3094
|
}
|
|
3081
3095
|
};
|
|
3082
3096
|
}
|
|
3083
3097
|
if (e.components.lineColor.selectorStates.length) {
|
|
3084
|
-
const
|
|
3085
|
-
|
|
3098
|
+
const v = e.components.lineColor.selectorStates[0].selectedSource;
|
|
3099
|
+
S.lineColor = {
|
|
3086
3100
|
columnName: {
|
|
3087
3101
|
type: "column",
|
|
3088
|
-
value:
|
|
3089
|
-
label: await T(t,
|
|
3102
|
+
value: v,
|
|
3103
|
+
label: await T(t, v, r)
|
|
3090
3104
|
}
|
|
3091
3105
|
};
|
|
3092
3106
|
}
|
|
3093
|
-
let
|
|
3107
|
+
let h, x, w;
|
|
3094
3108
|
if (e.components.heatmapAnnotation.selectorStates.length && e.components.heatmapAxis.selectorStates.length) {
|
|
3095
|
-
const
|
|
3096
|
-
|
|
3109
|
+
const v = e.components.heatmapAnnotation.selectorStates[0].selectedSource;
|
|
3110
|
+
h = {
|
|
3097
3111
|
type: "column",
|
|
3098
|
-
value:
|
|
3099
|
-
label: await T(t,
|
|
3100
|
-
valueLabels: (n = await k(t,
|
|
3112
|
+
value: v,
|
|
3113
|
+
label: await T(t, v, []),
|
|
3114
|
+
valueLabels: (n = await k(t, v, [])) == null ? void 0 : n.toCanonicalString()
|
|
3101
3115
|
};
|
|
3102
3116
|
const D = e.components.heatmapAxis.selectorStates[0].selectedSource;
|
|
3103
|
-
|
|
3117
|
+
x = {
|
|
3104
3118
|
type: "column",
|
|
3105
3119
|
value: D,
|
|
3106
|
-
label: await T(t, D, [
|
|
3107
|
-
valueLabels: (l = await k(t, D, [
|
|
3108
|
-
},
|
|
3109
|
-
e.components.heatmapGroup.selectorStates.map(async (
|
|
3120
|
+
label: await T(t, D, [v]),
|
|
3121
|
+
valueLabels: (l = await k(t, D, [v])) == null ? void 0 : l.toCanonicalString()
|
|
3122
|
+
}, w = await Promise.all(
|
|
3123
|
+
e.components.heatmapGroup.selectorStates.map(async (B) => {
|
|
3110
3124
|
var C;
|
|
3111
3125
|
return {
|
|
3112
3126
|
type: "column",
|
|
3113
|
-
value:
|
|
3114
|
-
label: await T(t,
|
|
3115
|
-
valueLabels: (C = await k(t,
|
|
3127
|
+
value: B.selectedSource,
|
|
3128
|
+
label: await T(t, B.selectedSource, [v]),
|
|
3129
|
+
valueLabels: (C = await k(t, B.selectedSource, [v])) == null ? void 0 : C.toCanonicalString()
|
|
3116
3130
|
};
|
|
3117
3131
|
})
|
|
3118
3132
|
);
|
|
3119
3133
|
} else if (e.components.heatmapForSequence.selectorStates.length) {
|
|
3120
|
-
const
|
|
3121
|
-
|
|
3134
|
+
const v = e.components.heatmapForSequence.selectorStates[0].selectedSource;
|
|
3135
|
+
h = {
|
|
3122
3136
|
type: "column",
|
|
3123
|
-
value:
|
|
3124
|
-
label: await T(t,
|
|
3137
|
+
value: v,
|
|
3138
|
+
label: await T(t, v, [])
|
|
3125
3139
|
};
|
|
3126
3140
|
}
|
|
3127
3141
|
return {
|
|
3128
3142
|
type: "dendro",
|
|
3129
|
-
id:
|
|
3130
|
-
parentId:
|
|
3131
|
-
height:
|
|
3143
|
+
id: a,
|
|
3144
|
+
parentId: u,
|
|
3145
|
+
height: p,
|
|
3132
3146
|
labels: m,
|
|
3133
|
-
aes:
|
|
3134
|
-
heatmapAnnotation:
|
|
3135
|
-
heatmapAxis:
|
|
3136
|
-
heatmapGroup:
|
|
3147
|
+
aes: S,
|
|
3148
|
+
heatmapAnnotation: h,
|
|
3149
|
+
heatmapAxis: x,
|
|
3150
|
+
heatmapGroup: w
|
|
3137
3151
|
};
|
|
3138
3152
|
}
|
|
3139
|
-
},
|
|
3140
|
-
function
|
|
3153
|
+
}, he = 1e6;
|
|
3154
|
+
function ue(t, e) {
|
|
3141
3155
|
if (t === "String")
|
|
3142
3156
|
return e.data;
|
|
3143
3157
|
const o = new Array(e.data.length);
|
|
3144
3158
|
for (let n = 0; n < e.data.length; n++)
|
|
3145
|
-
o[n] =
|
|
3159
|
+
o[n] = Te(e, n, { absent: null, na: null });
|
|
3146
3160
|
return o;
|
|
3147
3161
|
}
|
|
3148
3162
|
var H = !1;
|
|
3149
|
-
var
|
|
3163
|
+
var St = class {
|
|
3150
3164
|
constructor(t, e) {
|
|
3151
3165
|
this.pframeHandle = t, this.pframeDriver = e;
|
|
3152
3166
|
}
|
|
@@ -3167,19 +3181,19 @@ var mt = class {
|
|
|
3167
3181
|
},
|
|
3168
3182
|
filters: e,
|
|
3169
3183
|
sorting: []
|
|
3170
|
-
}), l = n.filter((
|
|
3184
|
+
}), l = n.filter((c) => c.spec.type === "axis"), s = n.filter((c) => c.spec.type === "column");
|
|
3171
3185
|
return {
|
|
3172
|
-
axesData: l.reduce((
|
|
3173
|
-
const
|
|
3174
|
-
return
|
|
3186
|
+
axesData: l.reduce((c, r) => {
|
|
3187
|
+
const a = F.fromAxisSpec(r.spec.spec);
|
|
3188
|
+
return c[a.toCanonicalString()] = ue(a.type, r.data), c;
|
|
3175
3189
|
}, {}),
|
|
3176
|
-
data: s.length ?
|
|
3190
|
+
data: s.length ? ue(t.type, s[0].data) : []
|
|
3177
3191
|
};
|
|
3178
3192
|
} catch (o) {
|
|
3179
3193
|
throw console.error("PFrame: calculateTableData error"), o;
|
|
3180
3194
|
}
|
|
3181
3195
|
}
|
|
3182
|
-
async getColumnUniqueValues(t, e =
|
|
3196
|
+
async getColumnUniqueValues(t, e = he, o = []) {
|
|
3183
3197
|
if (!await this.isColumnExisted(t))
|
|
3184
3198
|
return { values: [], overflow: !1 };
|
|
3185
3199
|
const n = {
|
|
@@ -3189,25 +3203,25 @@ var mt = class {
|
|
|
3189
3203
|
};
|
|
3190
3204
|
try {
|
|
3191
3205
|
const l = Date.now(), s = await this.pframeDriver.getUniqueValues(this.pframeHandle, n);
|
|
3192
|
-
let
|
|
3193
|
-
return s.overflow && (
|
|
3206
|
+
let c = !1;
|
|
3207
|
+
return s.overflow && (c = !0, console.warn(`More than ${e} values for ${t.name} column`)), {
|
|
3194
3208
|
values: Array.from(s.values.data).map(String),
|
|
3195
|
-
overflow:
|
|
3209
|
+
overflow: c
|
|
3196
3210
|
};
|
|
3197
3211
|
} catch (l) {
|
|
3198
3212
|
throw console.error("PFrame: getUniqueValues for column error"), l;
|
|
3199
3213
|
}
|
|
3200
3214
|
}
|
|
3201
|
-
async getAxisUniqueValues(t, e, o =
|
|
3202
|
-
const l = e.filter(
|
|
3203
|
-
const
|
|
3204
|
-
return
|
|
3215
|
+
async getAxisUniqueValues(t, e, o = he, n = []) {
|
|
3216
|
+
const l = e.filter(O), s = await Promise.all(l.map((a) => this.getColumnSpecById(a))), c = t.toCanonicalString(), r = l.filter((a, u) => {
|
|
3217
|
+
const p = s[u];
|
|
3218
|
+
return p !== null && p.axesSpec.some((m) => F.fromAxisSpec(m).toCanonicalString() === c);
|
|
3205
3219
|
});
|
|
3206
|
-
if (
|
|
3220
|
+
if (r.length === 0)
|
|
3207
3221
|
return { values: [], overflow: !1 };
|
|
3208
3222
|
try {
|
|
3209
|
-
const
|
|
3210
|
-
|
|
3223
|
+
const a = Date.now(), u = await Promise.all(
|
|
3224
|
+
r.map(
|
|
3211
3225
|
(m) => this.pframeDriver.getUniqueValues(this.pframeHandle, {
|
|
3212
3226
|
columnId: m.name,
|
|
3213
3227
|
axis: t.toPFrameId(),
|
|
@@ -3216,58 +3230,58 @@ var mt = class {
|
|
|
3216
3230
|
})
|
|
3217
3231
|
)
|
|
3218
3232
|
);
|
|
3219
|
-
let
|
|
3220
|
-
return
|
|
3221
|
-
m.overflow && (
|
|
3233
|
+
let p = !1;
|
|
3234
|
+
return u.forEach((m, S) => {
|
|
3235
|
+
m.overflow && (p = !0, console.warn(`More than ${o} values for ${r[S].name} column`));
|
|
3222
3236
|
}), {
|
|
3223
|
-
values:
|
|
3224
|
-
|
|
3237
|
+
values: pe.uniq(
|
|
3238
|
+
pe.flatten(u.map((m) => Array.from(m.values.data).map(String)))
|
|
3225
3239
|
),
|
|
3226
|
-
overflow:
|
|
3240
|
+
overflow: p
|
|
3227
3241
|
};
|
|
3228
|
-
} catch (
|
|
3229
|
-
throw console.error("PFrame: getUniqueValues for axis error",
|
|
3242
|
+
} catch (a) {
|
|
3243
|
+
throw console.error("PFrame: getUniqueValues for axis error", a), a;
|
|
3230
3244
|
}
|
|
3231
3245
|
}
|
|
3232
3246
|
async getTableOuterJoin(t, e, o = [], n = !0, l = [], s = []) {
|
|
3233
|
-
const
|
|
3247
|
+
const c = t.filter(O), r = e.filter(O), a = {
|
|
3234
3248
|
src: {
|
|
3235
3249
|
type: "outer",
|
|
3236
3250
|
primary: {
|
|
3237
3251
|
type: n ? "inner" : "full",
|
|
3238
|
-
entries:
|
|
3252
|
+
entries: c.map((u, p) => {
|
|
3239
3253
|
var m;
|
|
3240
|
-
const
|
|
3254
|
+
const S = (m = l[p]) == null ? void 0 : m.map((h) => ({
|
|
3241
3255
|
type: "constant",
|
|
3242
|
-
axisIndex:
|
|
3243
|
-
constant:
|
|
3244
|
-
})).filter((
|
|
3245
|
-
return
|
|
3256
|
+
axisIndex: h.idx,
|
|
3257
|
+
constant: h.value
|
|
3258
|
+
})).filter((h) => h.constant !== void 0);
|
|
3259
|
+
return S != null && S.length ? {
|
|
3246
3260
|
type: "slicedColumn",
|
|
3247
|
-
newId:
|
|
3248
|
-
column:
|
|
3249
|
-
axisFilters:
|
|
3261
|
+
newId: u.name,
|
|
3262
|
+
column: u.name,
|
|
3263
|
+
axisFilters: S
|
|
3250
3264
|
} : {
|
|
3251
3265
|
type: "column",
|
|
3252
|
-
column:
|
|
3266
|
+
column: u.name
|
|
3253
3267
|
};
|
|
3254
3268
|
})
|
|
3255
3269
|
},
|
|
3256
|
-
secondary:
|
|
3270
|
+
secondary: r.map((u, p) => {
|
|
3257
3271
|
var m;
|
|
3258
|
-
const
|
|
3272
|
+
const S = (m = s[p]) == null ? void 0 : m.map((h) => ({
|
|
3259
3273
|
type: "constant",
|
|
3260
|
-
axisIndex:
|
|
3261
|
-
constant:
|
|
3262
|
-
})).filter((
|
|
3263
|
-
return
|
|
3274
|
+
axisIndex: h.idx,
|
|
3275
|
+
constant: h.value
|
|
3276
|
+
})).filter((h) => h.constant !== void 0);
|
|
3277
|
+
return S != null && S.length ? {
|
|
3264
3278
|
type: "slicedColumn",
|
|
3265
|
-
newId:
|
|
3266
|
-
column:
|
|
3267
|
-
axisFilters:
|
|
3279
|
+
newId: u.name,
|
|
3280
|
+
column: u.name,
|
|
3281
|
+
axisFilters: S
|
|
3268
3282
|
} : {
|
|
3269
3283
|
type: "column",
|
|
3270
|
-
column:
|
|
3284
|
+
column: u.name
|
|
3271
3285
|
};
|
|
3272
3286
|
})
|
|
3273
3287
|
},
|
|
@@ -3275,33 +3289,33 @@ var mt = class {
|
|
|
3275
3289
|
sorting: []
|
|
3276
3290
|
};
|
|
3277
3291
|
try {
|
|
3278
|
-
const
|
|
3292
|
+
const u = Date.now(), p = await this.pframeDriver.calculateTableData(this.pframeHandle, a), m = p.filter((h) => h.spec.type === "axis"), S = p.filter((h) => h.spec.type === "column");
|
|
3279
3293
|
return {
|
|
3280
|
-
axesData: m.reduce((
|
|
3281
|
-
const
|
|
3282
|
-
return
|
|
3294
|
+
axesData: m.reduce((h, x) => {
|
|
3295
|
+
const w = F.fromAxisSpec(x.spec.spec);
|
|
3296
|
+
return h[w.toCanonicalString()] = ue(w.type, x.data), h;
|
|
3283
3297
|
}, {}),
|
|
3284
|
-
columnsData:
|
|
3285
|
-
const
|
|
3286
|
-
name:
|
|
3287
|
-
type:
|
|
3298
|
+
columnsData: S.reduce((h, x) => {
|
|
3299
|
+
const w = x.spec.spec, v = new W({
|
|
3300
|
+
name: x.spec.id,
|
|
3301
|
+
type: w.valueType
|
|
3288
3302
|
});
|
|
3289
|
-
return
|
|
3303
|
+
return h[v.toCanonicalString()] = ue(v.type, x.data), h;
|
|
3290
3304
|
}, {}),
|
|
3291
|
-
columnSpecs:
|
|
3292
|
-
const
|
|
3293
|
-
name:
|
|
3294
|
-
type:
|
|
3305
|
+
columnSpecs: S.reduce((h, x) => {
|
|
3306
|
+
const w = x.spec.spec, v = new W({
|
|
3307
|
+
name: x.spec.id,
|
|
3308
|
+
type: w.valueType
|
|
3295
3309
|
});
|
|
3296
|
-
return
|
|
3310
|
+
return h[v.toCanonicalString()] = w, h;
|
|
3297
3311
|
}, {}),
|
|
3298
|
-
axesSpecs: m.reduce((
|
|
3299
|
-
const
|
|
3300
|
-
return
|
|
3312
|
+
axesSpecs: m.reduce((h, x) => {
|
|
3313
|
+
const w = x.spec.spec, v = F.fromAxisSpec(w);
|
|
3314
|
+
return h[v.toCanonicalString()] = w, h;
|
|
3301
3315
|
}, {})
|
|
3302
3316
|
};
|
|
3303
|
-
} catch (
|
|
3304
|
-
throw console.error("PFrame: table outer join error"), console.info("error with request: ",
|
|
3317
|
+
} catch (u) {
|
|
3318
|
+
throw console.error("PFrame: table outer join error"), console.info("error with request: ", a), u;
|
|
3305
3319
|
}
|
|
3306
3320
|
}
|
|
3307
3321
|
async getColumnSpecById(t) {
|
|
@@ -3314,15 +3328,15 @@ var mt = class {
|
|
|
3314
3328
|
}
|
|
3315
3329
|
async getColumnAxesIds(t) {
|
|
3316
3330
|
var e, o;
|
|
3317
|
-
return (o = (e = await this.getColumnSpecById(t)) == null ? void 0 : e.axesSpec.map((n) =>
|
|
3331
|
+
return (o = (e = await this.getColumnSpecById(t)) == null ? void 0 : e.axesSpec.map((n) => F.fromAxisSpec(n))) != null ? o : [];
|
|
3318
3332
|
}
|
|
3319
3333
|
async getRequestColumnsFromSelectedSources(t) {
|
|
3320
3334
|
var e, o;
|
|
3321
3335
|
const n = [];
|
|
3322
3336
|
for (const l of t)
|
|
3323
|
-
if (
|
|
3337
|
+
if (O(l)) {
|
|
3324
3338
|
const s = (o = (e = await this.getColumnSpecById(l)) == null ? void 0 : e.axesSpec) != null ? o : [];
|
|
3325
|
-
n.push(...s.map((
|
|
3339
|
+
n.push(...s.map((c) => F.fromAxisSpec(c).toPFrameId()));
|
|
3326
3340
|
}
|
|
3327
3341
|
return n;
|
|
3328
3342
|
}
|
|
@@ -3340,10 +3354,10 @@ var mt = class {
|
|
|
3340
3354
|
compatibleWith: await this.getRequestColumnsFromSelectedSources(t),
|
|
3341
3355
|
strictlyCompatible: e
|
|
3342
3356
|
// should be true if we want to get meta and false if X/Y
|
|
3343
|
-
},
|
|
3344
|
-
return
|
|
3345
|
-
|
|
3346
|
-
}),
|
|
3357
|
+
}, c = Date.now(), r = await this.pframeDriver.findColumns(this.pframeHandle, s), a = [];
|
|
3358
|
+
return r.hits.forEach((u) => {
|
|
3359
|
+
a.push(u);
|
|
3360
|
+
}), a;
|
|
3347
3361
|
} catch (s) {
|
|
3348
3362
|
throw console.error("PFrame: findColumns error"), s;
|
|
3349
3363
|
}
|
|
@@ -3367,56 +3381,56 @@ var mt = class {
|
|
|
3367
3381
|
},
|
|
3368
3382
|
compatibleWith: [],
|
|
3369
3383
|
strictlyCompatible: !1
|
|
3370
|
-
}, s = Date.now(),
|
|
3371
|
-
return
|
|
3372
|
-
|
|
3373
|
-
}),
|
|
3384
|
+
}, s = Date.now(), c = await this.pframeDriver.findColumns(this.pframeHandle, l), r = [];
|
|
3385
|
+
return c.hits.forEach(({ columnId: a, spec: u }) => {
|
|
3386
|
+
r.push(new W({ name: a, type: u.valueType }));
|
|
3387
|
+
}), 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
3388
|
} catch (l) {
|
|
3375
3389
|
throw console.error("PFrame: findColumns error"), l;
|
|
3376
3390
|
}
|
|
3377
3391
|
}
|
|
3378
|
-
},
|
|
3392
|
+
}, ht = class {
|
|
3379
3393
|
constructor(t, e, o = (n, l) => l ?? n) {
|
|
3380
|
-
this.labelsModifier = o, this.pFrameProvider = new
|
|
3394
|
+
this.labelsModifier = o, this.pFrameProvider = new St(t, e);
|
|
3381
3395
|
}
|
|
3382
|
-
},
|
|
3396
|
+
}, _e = {
|
|
3383
3397
|
controllers: {
|
|
3384
|
-
discrete: new
|
|
3385
|
-
scatterplot: new
|
|
3386
|
-
"scatterplot-umap": new
|
|
3387
|
-
heatmap: new
|
|
3388
|
-
dendro: new
|
|
3389
|
-
histogram: new
|
|
3390
|
-
bubble: new
|
|
3398
|
+
discrete: new lt(),
|
|
3399
|
+
scatterplot: new it(),
|
|
3400
|
+
"scatterplot-umap": new pt(),
|
|
3401
|
+
heatmap: new rt(),
|
|
3402
|
+
dendro: new dt(),
|
|
3403
|
+
histogram: new ot(),
|
|
3404
|
+
bubble: new tt()
|
|
3391
3405
|
},
|
|
3392
3406
|
initialStates: {
|
|
3393
|
-
discrete:
|
|
3394
|
-
scatterplot:
|
|
3395
|
-
"scatterplot-umap":
|
|
3396
|
-
heatmap:
|
|
3397
|
-
dendro:
|
|
3398
|
-
histogram:
|
|
3399
|
-
bubble:
|
|
3407
|
+
discrete: st,
|
|
3408
|
+
scatterplot: ct,
|
|
3409
|
+
"scatterplot-umap": ut,
|
|
3410
|
+
heatmap: at,
|
|
3411
|
+
dendro: mt,
|
|
3412
|
+
histogram: nt,
|
|
3413
|
+
bubble: et
|
|
3400
3414
|
}
|
|
3401
3415
|
};
|
|
3402
|
-
function
|
|
3403
|
-
return
|
|
3416
|
+
function wt(t) {
|
|
3417
|
+
return _e.controllers[t];
|
|
3404
3418
|
}
|
|
3405
|
-
function
|
|
3406
|
-
return
|
|
3419
|
+
function vt(t) {
|
|
3420
|
+
return _e.initialStates[t];
|
|
3407
3421
|
}
|
|
3408
3422
|
export {
|
|
3409
|
-
|
|
3410
|
-
|
|
3423
|
+
F as AxisId,
|
|
3424
|
+
tt as BubbleStateController,
|
|
3411
3425
|
W as ColumnId,
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3426
|
+
ht as DemoDataStore,
|
|
3427
|
+
dt as DendroStateController,
|
|
3428
|
+
lt as DiscreteStateController,
|
|
3429
|
+
rt as HeatmapStateController,
|
|
3430
|
+
it as ScatterplotStateController,
|
|
3431
|
+
b as columnOrAxisIdFromString,
|
|
3432
|
+
wt as getControllerByType,
|
|
3433
|
+
vt as getInitialStateByType,
|
|
3434
|
+
O as isColumnId
|
|
3421
3435
|
};
|
|
3422
3436
|
//# sourceMappingURL=index.js.map
|