@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
package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
0: 64,
|
|
3
|
+
1: 64,
|
|
4
|
+
2: 64,
|
|
5
|
+
3: 64,
|
|
6
|
+
4: 64,
|
|
7
|
+
5: 64,
|
|
8
|
+
6: 64,
|
|
9
|
+
7: 64,
|
|
10
|
+
8: 64,
|
|
11
|
+
9: 64,
|
|
12
|
+
a: 61,
|
|
13
|
+
b: 63,
|
|
14
|
+
c: 55,
|
|
15
|
+
d: 63,
|
|
16
|
+
e: 62,
|
|
17
|
+
f: 38,
|
|
18
|
+
g: 63,
|
|
19
|
+
h: 63,
|
|
20
|
+
i: 28,
|
|
21
|
+
j: 30,
|
|
22
|
+
k: 58,
|
|
23
|
+
l: 28,
|
|
24
|
+
m: 97,
|
|
25
|
+
n: 63,
|
|
26
|
+
o: 61,
|
|
27
|
+
p: 63,
|
|
28
|
+
q: 63,
|
|
29
|
+
r: 42,
|
|
30
|
+
s: 52,
|
|
31
|
+
t: 39,
|
|
32
|
+
u: 63,
|
|
33
|
+
v: 59,
|
|
34
|
+
w: 82,
|
|
35
|
+
x: 59,
|
|
36
|
+
y: 59,
|
|
37
|
+
z: 52,
|
|
38
|
+
A: 68,
|
|
39
|
+
B: 69,
|
|
40
|
+
C: 70,
|
|
41
|
+
D: 77,
|
|
42
|
+
E: 63,
|
|
43
|
+
F: 58,
|
|
44
|
+
G: 77,
|
|
45
|
+
H: 75,
|
|
46
|
+
I: 30,
|
|
47
|
+
J: 36,
|
|
48
|
+
K: 68,
|
|
49
|
+
L: 56,
|
|
50
|
+
M: 86,
|
|
51
|
+
N: 75,
|
|
52
|
+
O: 79,
|
|
53
|
+
P: 60,
|
|
54
|
+
Q: 79,
|
|
55
|
+
R: 69,
|
|
56
|
+
S: 63,
|
|
57
|
+
T: 63,
|
|
58
|
+
U: 73,
|
|
59
|
+
V: 68,
|
|
60
|
+
W: 99,
|
|
61
|
+
X: 69,
|
|
62
|
+
Y: 63,
|
|
63
|
+
Z: 69,
|
|
64
|
+
"!": 40,
|
|
65
|
+
'"': 46,
|
|
66
|
+
"#": 84,
|
|
67
|
+
$: 64,
|
|
68
|
+
"%": 95,
|
|
69
|
+
"&": 78,
|
|
70
|
+
"'": 27,
|
|
71
|
+
"(": 39,
|
|
72
|
+
")": 39,
|
|
73
|
+
"*": 50,
|
|
74
|
+
"+": 84,
|
|
75
|
+
",": 32,
|
|
76
|
+
"-": 36,
|
|
77
|
+
".": 32,
|
|
78
|
+
"/": 34,
|
|
79
|
+
":": 34,
|
|
80
|
+
";": 34,
|
|
81
|
+
"<": 84,
|
|
82
|
+
"=": 84,
|
|
83
|
+
">": 84,
|
|
84
|
+
"?": 53,
|
|
85
|
+
"@": 100,
|
|
86
|
+
"[": 39,
|
|
87
|
+
"\\": 34,
|
|
88
|
+
"]": 39,
|
|
89
|
+
"^": 84,
|
|
90
|
+
_: 52,
|
|
91
|
+
"`": 50,
|
|
92
|
+
"{": 64,
|
|
93
|
+
"|": 34,
|
|
94
|
+
"}": 64,
|
|
95
|
+
"~": 84,
|
|
96
|
+
" ": 32
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
o as default
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=charToWidth.json.js.map
|
package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charToWidth.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextMeasurer as F } from "./TextMeasurer.js";
|
|
1
|
+
import { TextMeasurer as F } from "./TextMeasurer/TextMeasurer.js";
|
|
2
2
|
import { getContinuousLegendWidth as G } from "./getLegendWidth.js";
|
|
3
3
|
const C = new F("600 14px Manrope"), N = 16, W = 48, O = 20, a = 24;
|
|
4
4
|
function b(l, o) {
|
|
@@ -36,9 +36,9 @@ function k(l, o, d) {
|
|
|
36
36
|
let u = o - e;
|
|
37
37
|
u < i && (u = o, n += t + a, t = 0, e = 0);
|
|
38
38
|
const p = P(g, u, o, i), M = b([], y), m = t === 0, x = n + M + a;
|
|
39
|
-
p.forEach((
|
|
40
|
-
const
|
|
41
|
-
|
|
39
|
+
p.forEach((T, w) => {
|
|
40
|
+
const E = w === p.length - 1, $ = w > 0 ? "" : y, S = w > 0 ? `${v}_${w}` : v, L = b(T.map((B) => r[B]), m && !E ? "" : $), z = T.length * i, _ = n, A = e;
|
|
41
|
+
L > t && (t = L), E ? e += z + W : e = o, e >= o && (n += t + a, m && E && n < x && (n = x), t = 0, e = 0), c.push({ ...s, id: S, title: $, width: L, height: z, left: _, top: A, values: T });
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
}), c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrangeLegendParts.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/arrangeLegendParts.ts"],"sourcesContent":["import type { LegendItem } from '../common/types';\nimport { TextMeasurer } from './TextMeasurer';\nimport { getContinuousLegendWidth } from './getLegendWidth';\n\nconst textMeasurer = new TextMeasurer('600 14px Manrope');\nconst LINE_HEIGHT = 16;\nconst GROUP_OFFSET = 48;\nconst TEXT_LEFT_DISCRETE = 20;\nconst COLUMN_OFFSET = 24;\n\nfunction getLegendItemWidth(keys: string[], title: string) {\n return Math.max(\n ...keys.map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_DISCRETE),\n textMeasurer.getTextWidth(title)\n );\n}\n\nfunction splitLegendPart<T extends string | number>(values:T[], firstPartHeight:number, maxHeight:number, lineHeight: number):T[][] {\n const parts:T[][] = [[]];\n let currentPartHeight = 0;\n let currentAvailableHeight = firstPartHeight;\n let partIdx = 0;\n values.forEach(v => {\n if (currentPartHeight + lineHeight <= currentAvailableHeight) {\n parts[partIdx].push(v);\n currentPartHeight += lineHeight;\n } else {\n parts.push([v]);\n partIdx++;\n currentPartHeight = lineHeight;\n currentAvailableHeight = maxHeight;\n }\n });\n return parts;\n}\n\nexport function arrangeLegendParts(legendItems: LegendItem[], maxHeight:number, continuousHeight?:number):LegendItem[] {\n const continuousItemHeight = continuousHeight ?? maxHeight;\n let currentColumnWidth = 0;\n let currentColumnHeight = 0;\n let currentLeft = 0;\n // continuous bars on the left, then discrete lists, then sizes\n legendItems.sort((item1, item2) => {\n if (item1.type === 'continuous' && item2.type !== 'continuous') {\n return -1;\n }\n if (item2.type === 'continuous' && item1.type !== 'continuous') {\n return 1;\n }\n if (item1.type === 'dots' && item2.type !== 'dots') {\n return -1;\n }\n if (item2.type === 'dots' && item1.type !== 'dots') {\n return 1;\n }\n return 0;\n });\n\n const updatedLegendItems:LegendItem[] = [];\n legendItems.forEach((item) => {\n const {type, values, title, id, scale} = item;\n if (type === 'continuous') {\n const width = getContinuousLegendWidth(values, title);\n const height = continuousItemHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n \n updatedLegendItems.push({...item, width, height, left, top});\n } else if (type === 'size') {\n const {labels} = item;\n const lineHeight = (scale(Math.max(...values)) * 2 + 4);\n const width = getLegendItemWidth(values.map(v => labels[v]), title);\n const height = values.length * lineHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, width, height, left, top});\n } else {\n const {labels} = item;\n const lineHeight = LINE_HEIGHT;\n\n let verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < lineHeight) {\n verticalRest = maxHeight;\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n // split values under one title into several columns if too many values\n const groupedValues = splitLegendPart<typeof values[0]>(values, verticalRest, maxHeight, lineHeight);\n\n const titleWidth = getLegendItemWidth([], title);\n\n const startFromTheTop = currentColumnWidth === 0;\n const leftByTitle = currentLeft + titleWidth + COLUMN_OFFSET; // for very wide titles; we don't want include title width to first column width; but if the title is too wide we move it after all column parts;\n groupedValues.forEach((valuesPart, idx) => {\n const last = idx === groupedValues.length - 1;\n const partTitle = idx > 0 ? '' : title;\n const partId = idx > 0 ? `${id}_${idx}` : id;\n const width = getLegendItemWidth(valuesPart.map(v => labels[v]), startFromTheTop && !last ? '' : partTitle);\n const height = valuesPart.length * lineHeight;\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n if (last) {\n currentColumnHeight += height + GROUP_OFFSET;\n } else {\n currentColumnHeight = maxHeight;\n }\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n if (startFromTheTop && last && currentLeft < leftByTitle) {\n currentLeft = leftByTitle;\n }\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, id: partId, title: partTitle, width, height, left, top, values: valuesPart} as LegendItem);\n });\n }\n });\n return updatedLegendItems;\n}"],"names":["textMeasurer","TextMeasurer","LINE_HEIGHT","GROUP_OFFSET","TEXT_LEFT_DISCRETE","COLUMN_OFFSET","getLegendItemWidth","keys","title","text","splitLegendPart","values","firstPartHeight","maxHeight","lineHeight","parts","currentPartHeight","currentAvailableHeight","partIdx","v","arrangeLegendParts","legendItems","continuousHeight","continuousItemHeight","currentColumnWidth","currentColumnHeight","currentLeft","item1","item2","updatedLegendItems","item","type","id","scale","width","getContinuousLegendWidth","height","left","top","labels","g","verticalRest","groupedValues","titleWidth","startFromTheTop","leftByTitle","valuesPart","idx","last","partTitle","partId"],"mappings":";;AAIA,MAAMA,IAAe,IAAIC,EAAa,kBAAkB,GAClDC,IAAc,IACdC,IAAe,IACfC,IAAqB,IACrBC,IAAgB;AAEtB,SAASC,EAAmBC,GAAgBC,GAAe;AACvD,SAAO,KAAK;AAAA,IACR,GAAGD,EAAK,IAAI,CAAAE,MAAQT,EAAa,aAAa,OAAOS,CAAI,CAAC,IAAIL,CAAkB;AAAA,IAChFJ,EAAa,aAAaQ,CAAK;AAAA,EAAA;AAEvC;AAEA,SAASE,EAA2CC,GAAYC,GAAwBC,GAA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CAAC,CAAC,GAAGyB,KAAmB,CAACI,IAAO,KAAKC,CAAS,GACpGb,IAASU,EAAW,SAAShC,GAC7BuB,IAAOX,GACPY,IAAMb;AACRS,QAAAA,IAAQV,MACRA,IAAqBU,IAErBc,IACAvB,KAAuBW,IAASjC,IAEhCsB,IAAsBZ,GAEtBY,KAAuBZ,MACvBa,KAAeF,IAAqBnB,GAChCuC,KAAmBI,KAAQtB,IAAcmB,MACzCnB,IAAcmB,IAElBrB,IAAqB,GACrBC,IAAsB,IAE1BI,EAAmB,KAAK,EAAC,GAAGC,GAAM,IAAIoB,GAAQ,OAAOD,GAAW,OAAAf,GAAO,QAAAE,GAAQ,MAAAC,GAAM,KAAAC,GAAK,QAAQQ,GAAyB;AAAA,MAC/H,CAAC;AAAA,IACL;AAAA,EACJ,CAAC,GACMjB;AACX;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"arrangeLegendParts.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/arrangeLegendParts.ts"],"sourcesContent":["import type { LegendItem } from '../common/types';\nimport { TextMeasurer } from './TextMeasurer/TextMeasurer';\nimport { getContinuousLegendWidth } from './getLegendWidth';\n\nconst textMeasurer = new TextMeasurer('600 14px Manrope');\nconst LINE_HEIGHT = 16;\nconst GROUP_OFFSET = 48;\nconst TEXT_LEFT_DISCRETE = 20;\nconst COLUMN_OFFSET = 24;\n\nfunction getLegendItemWidth(keys: string[], title: string) {\n return Math.max(\n ...keys.map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_DISCRETE),\n textMeasurer.getTextWidth(title)\n );\n}\n\nfunction splitLegendPart<T extends string | number>(values: T[], firstPartHeight: number, maxHeight: number, lineHeight: number):T[][] {\n const parts:T[][] = [[]];\n let currentPartHeight = 0;\n let currentAvailableHeight = firstPartHeight;\n let partIdx = 0;\n values.forEach(v => {\n if (currentPartHeight + lineHeight <= currentAvailableHeight) {\n parts[partIdx].push(v);\n currentPartHeight += lineHeight;\n } else {\n parts.push([v]);\n partIdx++;\n currentPartHeight = lineHeight;\n currentAvailableHeight = maxHeight;\n }\n });\n return parts;\n}\n\nexport function arrangeLegendParts(legendItems: LegendItem[], maxHeight:number, continuousHeight?:number):LegendItem[] {\n const continuousItemHeight = continuousHeight ?? maxHeight;\n let currentColumnWidth = 0;\n let currentColumnHeight = 0;\n let currentLeft = 0;\n // continuous bars on the left, then discrete lists, then sizes\n legendItems.sort((item1, item2) => {\n if (item1.type === 'continuous' && item2.type !== 'continuous') {\n return -1;\n }\n if (item2.type === 'continuous' && item1.type !== 'continuous') {\n return 1;\n }\n if (item1.type === 'dots' && item2.type !== 'dots') {\n return -1;\n }\n if (item2.type === 'dots' && item1.type !== 'dots') {\n return 1;\n }\n return 0;\n });\n\n const updatedLegendItems:LegendItem[] = [];\n legendItems.forEach((item) => {\n const {type, values, title, id, scale} = item;\n if (type === 'continuous') {\n const width = getContinuousLegendWidth(values, title);\n const height = continuousItemHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n \n updatedLegendItems.push({...item, width, height, left, top});\n } else if (type === 'size') {\n const {labels} = item;\n const lineHeight = (scale(Math.max(...values)) * 2 + 4);\n const width = getLegendItemWidth(values.map(v => labels[v]), title);\n const height = values.length * lineHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, width, height, left, top});\n } else {\n const {labels} = item;\n const lineHeight = LINE_HEIGHT;\n\n let verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < lineHeight) {\n verticalRest = maxHeight;\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n // split values under one title into several columns if too many values\n const groupedValues = splitLegendPart<typeof values[number]>(values, verticalRest, maxHeight, lineHeight);\n\n const titleWidth = getLegendItemWidth([], title);\n\n const startFromTheTop = currentColumnWidth === 0;\n const leftByTitle = currentLeft + titleWidth + COLUMN_OFFSET; // for very wide titles; we don't want include title width to first column width; but if the title is too wide we move it after all column parts;\n groupedValues.forEach((valuesPart, idx) => {\n const last = idx === groupedValues.length - 1;\n const partTitle = idx > 0 ? '' : title;\n const partId = idx > 0 ? `${id}_${idx}` : id;\n const width = getLegendItemWidth(valuesPart.map(v => labels[v]), startFromTheTop && !last ? '' : partTitle);\n const height = valuesPart.length * lineHeight;\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n if (last) {\n currentColumnHeight += height + GROUP_OFFSET;\n } else {\n currentColumnHeight = maxHeight;\n }\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n if (startFromTheTop && last && currentLeft < leftByTitle) {\n currentLeft = leftByTitle;\n }\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, id: partId, title: partTitle, width, height, left, top, values: valuesPart} as LegendItem);\n });\n }\n });\n return updatedLegendItems;\n}"],"names":["textMeasurer","TextMeasurer","LINE_HEIGHT","GROUP_OFFSET","TEXT_LEFT_DISCRETE","COLUMN_OFFSET","getLegendItemWidth","keys","title","text","splitLegendPart","values","firstPartHeight","maxHeight","lineHeight","parts","currentPartHeight","currentAvailableHeight","partIdx","v","arrangeLegendParts","legendItems","continuousHeight","continuousItemHeight","currentColumnWidth","currentColumnHeight","currentLeft","item1","item2","updatedLegendItems","item","type","id","scale","width","getContinuousLegendWidth","height","left","top","labels","g","verticalRest","groupedValues","titleWidth","startFromTheTop","leftByTitle","valuesPart","idx","last","partTitle","partId"],"mappings":";;AAIA,MAAMA,IAAe,IAAIC,EAAa,kBAAkB,GAClDC,IAAc,IACdC,IAAe,IACfC,IAAqB,IACrBC,IAAgB;AAEtB,SAASC,EAAmBC,GAAgBC,GAAe;AACvD,SAAO,KAAK;AAAA,IACR,GAAGD,EAAK,IAAI,CAAAE,MAAQT,EAAa,aAAa,OAAOS,CAAI,CAAC,IAAIL,CAAkB;AAAA,IAChFJ,EAAa,aAAaQ,CAAK;AAAA,EAAA;AAEvC;AAEA,SAASE,EAA2CC,GAAaC,GAAyBC,GAAmBC,GAA0B;AACnI,QAAMC,IAAc,CAAC,EAAE;AACvB,MAAIC,IAAoB,GACpBC,IAAyBL,GACzBM,IAAU;AACd,SAAAP,EAAO,QAAQ,CAAAQ,MAAK;AACZH,QAAoBF,KAAcG,KAClCF,EAAMG,CAAO,EAAE,KAAKC,CAAC,GACrBH,KAAqBF,MAErBC,EAAM,KAAK,CAACI,CAAC,CAAC,GACdD,KACAF,IAAoBF,GACpBG,IAAyBJ;AAAAA,EAEjC,CAAC,GACME;AACX;AAEO,SAASK,EAAmBC,GAA2BR,GAAkBS,GAAuC;AACnH,QAAMC,IAAuBD,KAAoBT;AACjD,MAAIW,IAAqB,GACrBC,IAAsB,GACtBC,IAAc;AAElBL,EAAAA,EAAY,KAAK,CAACM,GAAOC,MACjBD,EAAM,SAAS,gBAAgBC,EAAM,SAAS,eACvC,KAEPA,EAAM,SAAS,gBAAgBD,EAAM,SAAS,eACvC,IAEPA,EAAM,SAAS,UAAUC,EAAM,SAAS,SACjC,KAEPA,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(l == null ? void 0 : l.length) !== (n == null ? void 0 : n.length) ? !0 : l == null ? void 0 : l.some((r, u) => r !== (n == null ? void 0 : n[u]));
|
|
3
|
+
}
|
|
4
|
+
export {
|
|
5
|
+
o as arraysAreDifferent
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=arraysAreDifferent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arraysAreDifferent.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/arraysAreDifferent.ts"],"sourcesContent":["\nexport function arraysAreDifferent(arr1?:unknown[] | null, arr2?:unknown[] | null) {\n if (!arr1 && !arr2) {\n return false;\n }\n if (!arr1 && arr2 || !arr2 && arr1 || arr1?.length !== arr2?.length) {\n return true;\n }\n return arr1?.some((el, idx) => el !== arr2?.[idx]) as boolean;\n}"],"names":["arraysAreDifferent","arr1","arr2","el","idx"],"mappings":"AACO,SAASA,EAAmBC,GAAwBC,GAAwB;AAC/E,SAAI,CAACD,KAAQ,CAACC,IACH,KAEP,CAACD,KAAQC,KAAQ,CAACA,KAAQD,MAAQA,KAAA,gBAAAA,EAAM,aAAWC,KAAA,OAAA,SAAAA,EAAM,UAClD,KAEJD,KAAA,OAAA,SAAAA,EAAM,KAAK,CAACE,GAAIC,MAAQD,OAAOD,KAAA,gBAAAA,EAAOE,CAAAA,EAAAA;AACjD;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextMeasurer as r } from "./TextMeasurer.js";
|
|
1
|
+
import { TextMeasurer as r } from "./TextMeasurer/TextMeasurer.js";
|
|
2
2
|
const t = new r("bold 14px Arial"), a = 20, d = 24;
|
|
3
3
|
function o(e, i) {
|
|
4
4
|
return Math.max(
|
|
@@ -6,7 +6,7 @@ function o(e, i) {
|
|
|
6
6
|
t.getTextWidth(i)
|
|
7
7
|
);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function x(e, i) {
|
|
10
10
|
return Math.max(
|
|
11
11
|
...e.domain().map((n) => t.getTextWidth(String(n)) + a),
|
|
12
12
|
t.getTextWidth(i)
|
|
@@ -14,6 +14,6 @@ function h(e, i) {
|
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
16
|
o as getContinuousLegendWidth,
|
|
17
|
-
|
|
17
|
+
x as getDiscreteLegendWidth
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=getLegendWidth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLegendWidth.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/getLegendWidth.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"getLegendWidth.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/getLegendWidth.ts"],"sourcesContent":["import type { ScaleOrdinal } from 'd3-scale';\nimport { TextMeasurer } from './TextMeasurer/TextMeasurer';\n\nconst textMeasurer = new TextMeasurer('bold 14px Arial');\nconst TEXT_LEFT_DISCRETE = 20;\nconst TEXT_LEFT_CONTINUOUS = 24;\nexport function getContinuousLegendWidth(scaleTicks: number[], title: string) {\n return Math.max(\n ...scaleTicks.map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_CONTINUOUS),\n textMeasurer.getTextWidth(title)\n );\n}\nexport function getDiscreteLegendWidth(scale: ScaleOrdinal<string, string>, title: string) {\n return Math.max(\n ...scale.domain().map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_DISCRETE),\n textMeasurer.getTextWidth(title)\n );\n}"],"names":["textMeasurer","TextMeasurer","TEXT_LEFT_DISCRETE","TEXT_LEFT_CONTINUOUS","getContinuousLegendWidth","scaleTicks","title","text","getDiscreteLegendWidth","scale"],"mappings":";AAGA,MAAMA,IAAe,IAAIC,EAAa,iBAAiB,GACjDC,IAAqB,IACrBC,IAAuB;AACtB,SAASC,EAAyBC,GAAsBC,GAAe;AAC1E,SAAO,KAAK;AAAA,IACR,GAAGD,EAAW,IAAI,CAAAE,MAAQP,EAAa,aAAa,OAAOO,CAAI,CAAC,IAAIJ,CAAoB;AAAA,IACxFH,EAAa,aAAaM,CAAK;AAAA,EAAA;AAEvC;AACO,SAASE,EAAuBC,GAAqCH,GAAe;AACvF,SAAO,KAAK;AAAA,IACR,GAAGG,EAAM,SAAS,IAAI,CAAAF,MAAQP,EAAa,aAAa,OAAOO,CAAI,CAAC,IAAIL,CAAkB;AAAA,IAC1FF,EAAa,aAAaM,CAAK;AAAA,EAAA;AAEvC;","x_google_ignoreList":[0]}
|