@undp/data-viz 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +2 -0
- package/dist/AreaChart.cjs.map +1 -0
- package/dist/AreaChart.js +530 -1
- package/dist/AreaChart.js.map +1 -1
- package/dist/Axis-DE7dSn1_.cjs +2 -0
- package/dist/{Axis-BlyBRMNw.cjs.map → Axis-DE7dSn1_.cjs.map} +1 -1
- package/dist/{Axis-CvK-w3E2.js → Axis-Ddg-seDi.js} +10 -11
- package/dist/{Axis-CvK-w3E2.js.map → Axis-Ddg-seDi.js.map} +1 -1
- package/dist/AxisTitle-BmHLMRJZ.js +20 -0
- package/dist/{AxisTitle-BeMxcw5I.js.map → AxisTitle-BmHLMRJZ.js.map} +1 -1
- package/dist/AxisTitle-CK9YeovX.cjs +2 -0
- package/dist/{AxisTitle-BY8MI9jC.cjs.map → AxisTitle-CK9YeovX.cjs.map} +1 -1
- package/dist/BarGraph.cjs +2 -0
- package/dist/BarGraph.cjs.map +1 -0
- package/dist/BarGraph.js +4043 -1
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +2 -0
- package/dist/BasicStatCard.cjs.map +1 -0
- package/dist/BasicStatCard.js +190 -1
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +2 -0
- package/dist/BeeSwarmChart.cjs.map +1 -0
- package/dist/BeeSwarmChart.d.ts +0 -8
- package/dist/BeeSwarmChart.js +1042 -1
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +2 -0
- package/dist/BiVariateChoroplethMap.cjs.map +1 -0
- package/dist/BiVariateChoroplethMap.js +720 -1
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +2 -0
- package/dist/BulletChart.cjs.map +1 -0
- package/dist/BulletChart.js +1431 -1
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +2 -0
- package/dist/ButterflyChart.cjs.map +1 -0
- package/dist/ButterflyChart.js +692 -1
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +2 -0
- package/dist/ChoroplethMap.cjs.map +1 -0
- package/dist/ChoroplethMap.js +745 -1
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +2 -0
- package/dist/CirclePackingGraph.cjs.map +1 -0
- package/dist/CirclePackingGraph.d.ts +0 -8
- package/dist/CirclePackingGraph.js +14 -1
- package/dist/CirclePackingGraph.js.map +1 -1
- package/dist/ColorLegend.cjs +2 -0
- package/dist/ColorLegend.cjs.map +1 -0
- package/dist/ColorLegend.js +47 -1
- package/dist/ColorLegend.js.map +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +2 -0
- package/dist/ColorLegendWithMouseOver.cjs.map +1 -0
- package/dist/ColorLegendWithMouseOver.js +70 -1
- package/dist/ColorLegendWithMouseOver.js.map +1 -1
- package/dist/Colors.cjs +2 -0
- package/dist/Colors.cjs.map +1 -0
- package/dist/Colors.js +561 -1
- package/dist/Colors.js.map +1 -1
- package/dist/CopyTextButton.cjs +17 -0
- package/dist/CopyTextButton.cjs.map +1 -0
- package/dist/CopyTextButton.js +698 -16
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +23 -0
- package/dist/CsvDownloadButton.cjs.map +1 -0
- package/dist/CsvDownloadButton.js +852 -7
- package/dist/CsvDownloadButton.js.map +1 -1
- package/dist/DataCards.cjs +22 -0
- package/dist/DataCards.cjs.map +1 -0
- package/dist/DataCards.js +624 -1
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +2 -0
- package/dist/DataTable.cjs.map +1 -0
- package/dist/DataTable.js +331 -1
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +2 -0
- package/dist/DifferenceLineChart.cjs.map +1 -0
- package/dist/DifferenceLineChart.js +805 -1
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +2 -0
- package/dist/DonutChart.cjs.map +1 -0
- package/dist/DonutChart.js +478 -1
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +2 -0
- package/dist/DotDensityMap.cjs.map +1 -0
- package/dist/DotDensityMap.js +600 -1
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DropdownSelect-0I2QxaVy.cjs +29 -0
- package/dist/DropdownSelect-0I2QxaVy.cjs.map +1 -0
- package/dist/DropdownSelect-CDC9lEqU.js +4193 -0
- package/dist/DropdownSelect-CDC9lEqU.js.map +1 -0
- package/dist/DualAxisLineChart.cjs +2 -0
- package/dist/DualAxisLineChart.cjs.map +1 -0
- package/dist/DualAxisLineChart.js +699 -1
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +2 -0
- package/dist/DumbbellChart.cjs.map +1 -0
- package/dist/DumbbellChart.js +1510 -1
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-b2Ln487i.js → EmptyState-DdTp-Mdn.js} +8 -8
- package/dist/{EmptyState-b2Ln487i.js.map → EmptyState-DdTp-Mdn.js.map} +1 -1
- package/dist/EmptyState-d8_8SxeW.cjs +2 -0
- package/dist/{EmptyState-BQguKAp5.cjs.map → EmptyState-d8_8SxeW.cjs.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +2 -0
- package/dist/ExcelDownloadButton.cjs.map +1 -0
- package/dist/ExcelDownloadButton.js +29 -1
- package/dist/ExcelDownloadButton.js.map +1 -1
- package/dist/FootNote.cjs +2 -0
- package/dist/FootNote.cjs.map +1 -0
- package/dist/FootNote.js +20 -1
- package/dist/FootNote.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +2 -0
- package/dist/GeoHubCompareMaps.cjs.map +1 -0
- package/dist/GeoHubCompareMaps.js +370 -1
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +2 -0
- package/dist/GeoHubMap.cjs.map +1 -0
- package/dist/GeoHubMap.js +429 -1
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +2 -0
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -0
- package/dist/GeoHubMapWithLayerSelection.js +307 -1
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/GraphDescription.cjs +2 -0
- package/dist/GraphDescription.cjs.map +1 -0
- package/dist/GraphDescription.js +20 -1
- package/dist/GraphDescription.js.map +1 -1
- package/dist/GraphEl-B6SoGRFW.cjs +2 -0
- package/dist/GraphEl-B6SoGRFW.cjs.map +1 -0
- package/dist/{checkIfMultiple-CaefP4X2.js → GraphEl-Cw2tDUb3.js} +123 -662
- package/dist/GraphEl-Cw2tDUb3.js.map +1 -0
- package/dist/GraphFooter.cjs +2 -0
- package/dist/GraphFooter.cjs.map +1 -0
- package/dist/GraphFooter.js +21 -1
- package/dist/GraphFooter.js.map +1 -1
- package/dist/GraphHeader.cjs +2 -0
- package/dist/GraphHeader.cjs.map +1 -0
- package/dist/GraphHeader.js +63 -1
- package/dist/GraphHeader.js.map +1 -1
- package/dist/GraphTitle.cjs +2 -0
- package/dist/GraphTitle.cjs.map +1 -0
- package/dist/GraphTitle.js +28 -1
- package/dist/GraphTitle.js.map +1 -1
- package/dist/GriddedGraphs.cjs +2 -0
- package/dist/GriddedGraphs.cjs.map +1 -0
- package/dist/GriddedGraphs.d.ts +2 -4
- package/dist/GriddedGraphs.js +483 -1
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.cjs +2 -0
- package/dist/GriddedGraphsFromConfig.cjs.map +1 -0
- package/dist/GriddedGraphsFromConfig.d.ts +2 -4
- package/dist/GriddedGraphsFromConfig.js +42 -1
- package/dist/GriddedGraphsFromConfig.js.map +1 -1
- package/dist/HeatMap.cjs +2 -0
- package/dist/HeatMap.cjs.map +1 -0
- package/dist/HeatMap.js +451 -1
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +2 -0
- package/dist/Histogram.cjs.map +1 -0
- package/dist/Histogram.js +287 -1
- package/dist/Histogram.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +2 -0
- package/dist/ImageDownloadButton.cjs.map +1 -0
- package/dist/ImageDownloadButton.js +28 -1
- package/dist/ImageDownloadButton.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +2 -0
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -0
- package/dist/LineChartWithConfidenceInterval.js +818 -1
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +2 -0
- package/dist/LinearColorLegend.cjs.map +1 -0
- package/dist/LinearColorLegend.js +33 -1
- package/dist/LinearColorLegend.js.map +1 -1
- package/dist/Modal-CUU6ZK3U.js +1019 -0
- package/dist/Modal-CUU6ZK3U.js.map +1 -0
- package/dist/Modal-C_dl0EtQ.cjs +46 -0
- package/dist/Modal-C_dl0EtQ.cjs.map +1 -0
- package/dist/MultiGraphDashboard.cjs +2 -0
- package/dist/MultiGraphDashboard.cjs.map +1 -0
- package/dist/MultiGraphDashboard.d.ts +16 -12
- package/dist/MultiGraphDashboard.js +303 -1
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs +2 -0
- package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +16 -12
- package/dist/MultiGraphDashboardFromConfig.js +37 -1
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +243 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +2 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +30 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +2 -0
- package/dist/MultiLineAltChart.cjs.map +1 -0
- package/dist/MultiLineAltChart.js +689 -1
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +2 -0
- package/dist/MultiLineChart.cjs.map +1 -0
- package/dist/MultiLineChart.js +722 -1
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +2 -0
- package/dist/ParetoChart.cjs.map +1 -0
- package/dist/ParetoChart.js +636 -1
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +566 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +353 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +570 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +38 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.cjs +2 -0
- package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +493 -0
- package/dist/PerformanceIntensiveScrollStory.js +122 -0
- package/dist/PerformanceIntensiveScrollStory.js.map +1 -0
- package/dist/RadarChart.cjs +2 -0
- package/dist/RadarChart.cjs.map +1 -0
- package/dist/RadarChart.js +677 -1
- package/dist/RadarChart.js.map +1 -1
- package/dist/{ReferenceLine-BgDdQbDI.js → ReferenceLine-C1GpoG9d.js} +33 -34
- package/dist/ReferenceLine-C1GpoG9d.js.map +1 -0
- package/dist/ReferenceLine-CuFMk0cI.cjs +2 -0
- package/dist/ReferenceLine-CuFMk0cI.cjs.map +1 -0
- package/dist/RegressionLine-7_rKTHN_.cjs +2 -0
- package/dist/{RegressionLine-BfpCuD7B.cjs.map → RegressionLine-7_rKTHN_.cjs.map} +1 -1
- package/dist/{RegressionLine-cSljpHaE.js → RegressionLine-BFwDCTUU.js} +17 -18
- package/dist/{RegressionLine-cSljpHaE.js.map → RegressionLine-BFwDCTUU.js.map} +1 -1
- package/dist/SVGDownloadButton.cjs +2 -0
- package/dist/SVGDownloadButton.cjs.map +1 -0
- package/dist/SVGDownloadButton.js +28 -1
- package/dist/SVGDownloadButton.js.map +1 -1
- package/dist/SankeyChart.cjs +2 -0
- package/dist/SankeyChart.cjs.map +1 -0
- package/dist/SankeyChart.js +989 -1
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +2 -0
- package/dist/ScatterPlot.cjs.map +1 -0
- package/dist/ScatterPlot.js +828 -1
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +2 -0
- package/dist/ScrollStory.cjs.map +1 -0
- package/dist/ScrollStory.d.ts +3 -5
- package/dist/ScrollStory.js +105 -1
- package/dist/ScrollStory.js.map +1 -1
- package/dist/SimpleLineChart.cjs +2 -0
- package/dist/SimpleLineChart.cjs.map +1 -0
- package/dist/SimpleLineChart.js +619 -1
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +2 -0
- package/dist/SingleGraphDashboard.cjs.map +1 -0
- package/dist/SingleGraphDashboard.d.ts +2 -5
- package/dist/SingleGraphDashboard.js +522 -1
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -4
- package/dist/SingleGraphDashboardFromConfig.js +34 -1
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +428 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +185 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +432 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +25 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +540 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +610 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +543 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +35 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -0
- package/dist/SlopeChart.cjs +2 -0
- package/dist/SlopeChart.cjs.map +1 -0
- package/dist/SlopeChart.js +582 -1
- package/dist/SlopeChart.js.map +1 -1
- package/dist/Source.cjs +2 -0
- package/dist/Source.cjs.map +1 -0
- package/dist/Source.js +40 -1
- package/dist/Source.js.map +1 -1
- package/dist/SparkLine.cjs +2 -0
- package/dist/SparkLine.cjs.map +1 -0
- package/dist/SparkLine.js +320 -1
- package/dist/SparkLine.js.map +1 -1
- package/dist/Spinner-C85UF28E.js +30 -0
- package/dist/Spinner-C85UF28E.js.map +1 -0
- package/dist/Spinner-DA6Z5E4n.cjs +2 -0
- package/dist/Spinner-DA6Z5E4n.cjs.map +1 -0
- package/dist/StatCardFromData.cjs +2 -0
- package/dist/StatCardFromData.cjs.map +1 -0
- package/dist/StatCardFromData.js +249 -1
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +2 -0
- package/dist/StripChart.cjs.map +1 -0
- package/dist/StripChart.js +988 -1
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +2 -0
- package/dist/ThreeDGlobe.cjs.map +1 -0
- package/dist/ThreeDGlobe.js +451 -1
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +2 -0
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -0
- package/dist/ThresholdColorLegendWithMouseOver.js +130 -1
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/{Tooltip-CzZ1wFyF.js → Tooltip-DyM5snqx.js} +15 -16
- package/dist/{Tooltip-CzZ1wFyF.js.map → Tooltip-DyM5snqx.js.map} +1 -1
- package/dist/Tooltip-n8z5bfav.cjs +2 -0
- package/dist/{Tooltip-BM18N_3l.cjs.map → Tooltip-n8z5bfav.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +2 -0
- package/dist/TreeMapGraph.cjs.map +1 -0
- package/dist/TreeMapGraph.js +760 -1
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.cjs +2 -0
- package/dist/Types.cjs.map +1 -0
- package/dist/Types.d.ts +38 -11
- package/dist/Types.js +1 -1
- package/dist/Typography-Ctgfl1J5.js +140 -0
- package/dist/Typography-Ctgfl1J5.js.map +1 -0
- package/dist/Typography-k-kOjICQ.cjs +2 -0
- package/dist/Typography-k-kOjICQ.cjs.map +1 -0
- package/dist/UnitChart.cjs +2 -0
- package/dist/UnitChart.cjs.map +1 -0
- package/dist/UnitChart.js +216 -1
- package/dist/UnitChart.js.map +1 -1
- package/dist/XAxesLabels-CJMQbfVy.cjs +2 -0
- package/dist/{XAxesLabels-C9REbQQs.cjs.map → XAxesLabels-CJMQbfVy.cjs.map} +1 -1
- package/dist/{XAxesLabels-DVw7Lvuz.js → XAxesLabels-DQFo_z2R.js} +21 -22
- package/dist/{XAxesLabels-DVw7Lvuz.js.map → XAxesLabels-DQFo_z2R.js.map} +1 -1
- package/dist/{XTicksAndGridLines-CUefTINd.js → XTicksAndGridLines-Bn9u5gOM.js} +19 -20
- package/dist/{XTicksAndGridLines-CUefTINd.js.map → XTicksAndGridLines-Bn9u5gOM.js.map} +1 -1
- package/dist/XTicksAndGridLines-CCzXIV8d.cjs +2 -0
- package/dist/{XTicksAndGridLines-DuK35ROS.cjs.map → XTicksAndGridLines-CCzXIV8d.cjs.map} +1 -1
- package/dist/YAxesLabels-BXLTX7AI.cjs +2 -0
- package/dist/{YAxesLabels-DhBdLk3Z.cjs.map → YAxesLabels-BXLTX7AI.cjs.map} +1 -1
- package/dist/{YAxesLabels-CYVY053X.js → YAxesLabels-H5-002X5.js} +11 -12
- package/dist/{YAxesLabels-CYVY053X.js.map → YAxesLabels-H5-002X5.js.map} +1 -1
- package/dist/{YTicksAndGridLines-BJRXuBdC.js → YTicksAndGridLines-B6ah7CRf.js} +14 -15
- package/dist/{YTicksAndGridLines-BJRXuBdC.js.map → YTicksAndGridLines-B6ah7CRf.js.map} +1 -1
- package/dist/YTicksAndGridLines-DBDuz6vb.cjs +2 -0
- package/dist/{YTicksAndGridLines-CtLvzExe.cjs.map → YTicksAndGridLines-DBDuz6vb.cjs.map} +1 -1
- package/dist/checkIfMultiple-CYp3vADF.js +912 -0
- package/dist/checkIfMultiple-CYp3vADF.js.map +1 -0
- package/dist/checkIfMultiple-Do4kADNr.cjs +12 -0
- package/dist/checkIfMultiple-Do4kADNr.cjs.map +1 -0
- package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs +2 -0
- package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs.map +1 -0
- package/dist/checkIfNullOrUndefined-DmfiKkNw.js +7 -0
- package/dist/checkIfNullOrUndefined-DmfiKkNw.js.map +1 -0
- package/dist/customArea-BYNyxAkm.cjs +2 -0
- package/dist/{customArea-B47Ew5cT.cjs.map → customArea-BYNyxAkm.cjs.map} +1 -1
- package/dist/{customArea-I3MsoqIl.js → customArea-CaxScFmW.js} +29 -30
- package/dist/{customArea-I3MsoqIl.js.map → customArea-CaxScFmW.js.map} +1 -1
- package/dist/excelDownload-BOA-lskf.js +19 -0
- package/dist/excelDownload-BOA-lskf.js.map +1 -0
- package/dist/excelDownload-BQpsCa62.cjs +2 -0
- package/dist/excelDownload-BQpsCa62.cjs.map +1 -0
- package/dist/fetchAndParseData-Bcmr659B.js +1196 -0
- package/dist/fetchAndParseData-Bcmr659B.js.map +1 -0
- package/dist/fetchAndParseData-DmgQtB9n.cjs +16 -0
- package/dist/fetchAndParseData-DmgQtB9n.cjs.map +1 -0
- package/dist/fetchAndParseData.cjs +2 -0
- package/dist/fetchAndParseData.cjs.map +1 -0
- package/dist/fetchAndParseData.js +9 -15
- package/dist/fetchAndParseData.js.map +1 -1
- package/dist/getGraphList-DuColTJM.js +265 -0
- package/dist/getGraphList-DuColTJM.js.map +1 -0
- package/dist/getGraphList-gf02xgT2.cjs +2 -0
- package/dist/getGraphList-gf02xgT2.cjs.map +1 -0
- package/dist/getJenks-TWQvbuOz.cjs +2 -0
- package/dist/getJenks-TWQvbuOz.cjs.map +1 -0
- package/dist/getJenks-VhM3GIoC.js +23 -0
- package/dist/getJenks-VhM3GIoC.js.map +1 -0
- package/dist/getSchema.cjs +2 -0
- package/dist/getSchema.cjs.map +1 -0
- package/dist/getSchema.d.ts +7 -5
- package/dist/getSchema.js +910 -1
- package/dist/getSchema.js.map +1 -1
- package/dist/getSliderMarks-C0jptXeP.js +1054 -0
- package/dist/getSliderMarks-C0jptXeP.js.map +1 -0
- package/dist/getSliderMarks-CtsEXiLV.cjs +6 -0
- package/dist/getSliderMarks-CtsEXiLV.cjs.map +1 -0
- package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js +28 -0
- package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js.map +1 -0
- package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs +2 -0
- package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs.map +1 -0
- package/dist/getUniqValue-BtUENB2H.js +20 -0
- package/dist/getUniqValue-BtUENB2H.js.map +1 -0
- package/dist/getUniqValue-CHqgSss5.cjs +2 -0
- package/dist/getUniqValue-CHqgSss5.cjs.map +1 -0
- package/dist/imageDownload-CgDcm1Sj.cjs +3 -0
- package/dist/imageDownload-CgDcm1Sj.cjs.map +1 -0
- package/dist/imageDownload-Dcci2LEy.js +495 -0
- package/dist/imageDownload-Dcci2LEy.js.map +1 -0
- package/dist/index-BVnYktl4.js +435 -0
- package/dist/index-BVnYktl4.js.map +1 -0
- package/dist/index-BW_-wD2k.cjs +2 -0
- package/dist/index-BW_-wD2k.cjs.map +1 -0
- package/dist/{index-DXmF_0ez.js → index-BmCqpO1B.js} +74 -40
- package/dist/index-BmCqpO1B.js.map +1 -0
- package/dist/{index-Db-Yg_Ud.js → index-BxAUvrua.js} +19 -19
- package/dist/{index-Db-Yg_Ud.js.map → index-BxAUvrua.js.map} +1 -1
- package/dist/index-CHPV5EwG-BPSP-7Jg.js +3341 -0
- package/dist/index-CHPV5EwG-BPSP-7Jg.js.map +1 -0
- package/dist/index-CHPV5EwG-DDoeWRVt.cjs +44 -0
- package/dist/index-CHPV5EwG-DDoeWRVt.cjs.map +1 -0
- package/dist/index-CylX-pWB.cjs +2 -0
- package/dist/{index-BYroABPm.cjs.map → index-CylX-pWB.cjs.map} +1 -1
- package/dist/index-DG3YrCr5-D3FrrXj8.js +459 -0
- package/dist/index-DG3YrCr5-D3FrrXj8.js.map +1 -0
- package/dist/index-DG3YrCr5-v7rayV3N.cjs +2 -0
- package/dist/index-DG3YrCr5-v7rayV3N.cjs.map +1 -0
- package/dist/index-DVOJ7vxH.cjs +10 -0
- package/dist/{index-a2C2Bqn2.cjs.map → index-DVOJ7vxH.cjs.map} +1 -1
- package/dist/index-D_n8aamX.cjs +2 -0
- package/dist/index-D_n8aamX.cjs.map +1 -0
- package/dist/{index-DzdwZ2OA.js → index-n_RI8T0n.js} +3 -3
- package/dist/{index-DzdwZ2OA.js.map → index-n_RI8T0n.js.map} +1 -1
- package/dist/index-tvAyXPPW-DBlMKnNB.js +47 -0
- package/dist/index-tvAyXPPW-DBlMKnNB.js.map +1 -0
- package/dist/index-tvAyXPPW-DPOG-C2i.cjs +2 -0
- package/dist/index-tvAyXPPW-DPOG-C2i.cjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +331 -168
- package/dist/index.js +194 -1
- package/dist/index.js.map +1 -1
- package/dist/numberFormattingFunction-02t-wJta.cjs +2 -0
- package/dist/numberFormattingFunction-02t-wJta.cjs.map +1 -0
- package/dist/numberFormattingFunction-14YCbkN2.js +13 -0
- package/dist/numberFormattingFunction-14YCbkN2.js.map +1 -0
- package/dist/{use-in-view-CZPXmTZM.js → proxy-DJxJg1kD.js} +699 -732
- package/dist/proxy-DJxJg1kD.js.map +1 -0
- package/dist/{use-in-view-Dl1CsAIo.cjs → proxy-PQd2AItT.cjs} +2 -2
- package/dist/proxy-PQd2AItT.cjs.map +1 -0
- package/dist/removeOutliers-DR48e-18.js +57 -0
- package/dist/removeOutliers-DR48e-18.js.map +1 -0
- package/dist/removeOutliers-WELHHqiI.cjs +2 -0
- package/dist/removeOutliers-WELHHqiI.cjs.map +1 -0
- package/dist/{string2HTML-BX0oNw83.js → string2HTML-CWHGfz_d.js} +2 -2
- package/dist/{string2HTML-BX0oNw83.js.map → string2HTML-CWHGfz_d.js.map} +1 -1
- package/dist/{string2HTML-X4ZYX5jI.cjs → string2HTML-D2Avudmb.cjs} +2 -2
- package/dist/{string2HTML-X4ZYX5jI.cjs.map → string2HTML-D2Avudmb.cjs.map} +1 -1
- package/dist/svgDownload-C2-E3yf2.js +9 -0
- package/dist/svgDownload-C2-E3yf2.js.map +1 -0
- package/dist/svgDownload-D9zEGjTF.cjs +2 -0
- package/dist/svgDownload-D9zEGjTF.cjs.map +1 -0
- package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +4 -0
- package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +1 -0
- package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +145 -0
- package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +1 -0
- package/dist/transformData.cjs +2 -0
- package/dist/transformData.cjs.map +1 -0
- package/dist/transformData.d.ts +170 -0
- package/dist/transformData.js +10 -0
- package/dist/transformData.js.map +1 -0
- package/dist/transformDataForAggregation-CdcwlnNe.js +759 -0
- package/dist/transformDataForAggregation-CdcwlnNe.js.map +1 -0
- package/dist/transformDataForAggregation-Du-Hei-W.cjs +2 -0
- package/dist/transformDataForAggregation-Du-Hei-W.cjs.map +1 -0
- package/dist/transformDataForGraphFromFile-CA0rw80A.js +24 -0
- package/dist/transformDataForGraphFromFile-CA0rw80A.js.map +1 -0
- package/dist/transformDataForGraphFromFile-D9G3ToQf.cjs +2 -0
- package/dist/transformDataForGraphFromFile-D9G3ToQf.cjs.map +1 -0
- package/dist/transformDataForSelect-D8AuvYdf.js +14 -0
- package/dist/transformDataForSelect-D8AuvYdf.js.map +1 -0
- package/dist/transformDataForSelect-YmStusCI.cjs +2 -0
- package/dist/transformDataForSelect-YmStusCI.cjs.map +1 -0
- package/dist/use-in-view-BAHrBy6b.js +40 -0
- package/dist/use-in-view-BAHrBy6b.js.map +1 -0
- package/dist/use-in-view-BCmzDU2O.cjs +2 -0
- package/dist/use-in-view-BCmzDU2O.cjs.map +1 -0
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +217 -0
- package/dist/utils.js +27 -0
- package/dist/utils.js.map +1 -0
- package/dist/validateSchema.cjs +2 -0
- package/dist/validateSchema.cjs.map +1 -0
- package/dist/validateSchema.d.ts +2 -4
- package/dist/validateSchema.js +104 -1
- package/dist/validateSchema.js.map +1 -1
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +27 -0
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +1 -0
- package/dist/x-CnsEH4Ox-DDvAJndW.js +101 -0
- package/dist/x-CnsEH4Ox-DDvAJndW.js.map +1 -0
- package/package.json +50 -90
- package/dist/Axis-BlyBRMNw.cjs +0 -2
- package/dist/AxisTitle-BY8MI9jC.cjs +0 -2
- package/dist/AxisTitle-BeMxcw5I.js +0 -21
- package/dist/DropdownSelect-CuzV7gdj.cjs +0 -29
- package/dist/DropdownSelect-CuzV7gdj.cjs.map +0 -1
- package/dist/DropdownSelect-DmZsXrhY.js +0 -2698
- package/dist/DropdownSelect-DmZsXrhY.js.map +0 -1
- package/dist/EmptyState-BQguKAp5.cjs +0 -2
- package/dist/Modal-C9txyGOk.js +0 -723
- package/dist/Modal-C9txyGOk.js.map +0 -1
- package/dist/Modal-cQF2UQIa.cjs +0 -46
- package/dist/Modal-cQF2UQIa.cjs.map +0 -1
- package/dist/ReferenceLine-BgDdQbDI.js.map +0 -1
- package/dist/ReferenceLine-Bsb5jeE4.cjs +0 -2
- package/dist/ReferenceLine-Bsb5jeE4.cjs.map +0 -1
- package/dist/RegressionLine-BfpCuD7B.cjs +0 -2
- package/dist/Spinner-DN3s4S0H.js +0 -17
- package/dist/Spinner-DN3s4S0H.js.map +0 -1
- package/dist/Spinner-UmN-KPe9.cjs +0 -2
- package/dist/Spinner-UmN-KPe9.cjs.map +0 -1
- package/dist/Tooltip-BM18N_3l.cjs +0 -2
- package/dist/Typography-CDR-DAHH.cjs +0 -2
- package/dist/Typography-CDR-DAHH.cjs.map +0 -1
- package/dist/Typography-XJoSE-By.js +0 -58
- package/dist/Typography-XJoSE-By.js.map +0 -1
- package/dist/XAxesLabels-C9REbQQs.cjs +0 -2
- package/dist/XTicksAndGridLines-DuK35ROS.cjs +0 -2
- package/dist/YAxesLabels-DhBdLk3Z.cjs +0 -2
- package/dist/YTicksAndGridLines-CtLvzExe.cjs +0 -2
- package/dist/checkIfMultiple-CaefP4X2.js.map +0 -1
- package/dist/checkIfMultiple-D3h8to1T.cjs +0 -12
- package/dist/checkIfMultiple-D3h8to1T.cjs.map +0 -1
- package/dist/checkIfNullOrUndefined.d.ts +0 -15
- package/dist/checkIfNullOrUndefined.js +0 -2
- package/dist/checkIfNullOrUndefined.js.map +0 -1
- package/dist/customArea-B47Ew5cT.cjs +0 -2
- package/dist/excelDownload.d.ts +0 -31
- package/dist/excelDownload.js +0 -2
- package/dist/excelDownload.js.map +0 -1
- package/dist/generateCodes.d.ts +0 -25
- package/dist/generateCodes.js +0 -2
- package/dist/generateCodes.js.map +0 -1
- package/dist/getJenks.d.ts +0 -17
- package/dist/getJenks.js +0 -2
- package/dist/getJenks.js.map +0 -1
- package/dist/getPercentileValue.d.ts +0 -13
- package/dist/getPercentileValue.js +0 -2
- package/dist/getPercentileValue.js.map +0 -1
- package/dist/getQueryParamsFromLink.d.ts +0 -18
- package/dist/getQueryParamsFromLink.js +0 -2
- package/dist/getQueryParamsFromLink.js.map +0 -1
- package/dist/getSliderMarks-CWajGCGq.js +0 -719
- package/dist/getSliderMarks-CWajGCGq.js.map +0 -1
- package/dist/getSliderMarks-DDJ1CdhL.cjs +0 -6
- package/dist/getSliderMarks-DDJ1CdhL.cjs.map +0 -1
- package/dist/getTextColorBasedOnBgColor.d.ts +0 -13
- package/dist/getTextColorBasedOnBgColor.js +0 -2
- package/dist/getTextColorBasedOnBgColor.js.map +0 -1
- package/dist/getUniqValue.d.ts +0 -18
- package/dist/getUniqValue.js +0 -2
- package/dist/getUniqValue.js.map +0 -1
- package/dist/graphList.d.ts +0 -9
- package/dist/graphList.js +0 -2
- package/dist/graphList.js.map +0 -1
- package/dist/imageDownload.d.ts +0 -16
- package/dist/imageDownload.js +0 -3
- package/dist/imageDownload.js.map +0 -1
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs +0 -2
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs.map +0 -1
- package/dist/index-01r5X3Gr-kH7FxQ7P.js +0 -451
- package/dist/index-01r5X3Gr-kH7FxQ7P.js.map +0 -1
- package/dist/index-BGMGC-HN.cjs +0 -22
- package/dist/index-BGMGC-HN.cjs.map +0 -1
- package/dist/index-BHm2KTjD-2e-Fu8L-.js +0 -702
- package/dist/index-BHm2KTjD-2e-Fu8L-.js.map +0 -1
- package/dist/index-BHm2KTjD-D8FylaKc.cjs +0 -44
- package/dist/index-BHm2KTjD-D8FylaKc.cjs.map +0 -1
- package/dist/index-BIPNFFja.js +0 -506
- package/dist/index-BIPNFFja.js.map +0 -1
- package/dist/index-BYroABPm.cjs +0 -2
- package/dist/index-CEc_9zWy.cjs +0 -2
- package/dist/index-CEc_9zWy.cjs.map +0 -1
- package/dist/index-CbVeVrla.cjs +0 -2
- package/dist/index-CbVeVrla.cjs.map +0 -1
- package/dist/index-CqzhBPuO-CfQywbdq.js +0 -41
- package/dist/index-CqzhBPuO-CfQywbdq.js.map +0 -1
- package/dist/index-CqzhBPuO-raKZqS7l.cjs +0 -2
- package/dist/index-CqzhBPuO-raKZqS7l.cjs.map +0 -1
- package/dist/index-DSnvdkHZ.js +0 -495
- package/dist/index-DSnvdkHZ.js.map +0 -1
- package/dist/index-DXmF_0ez.js.map +0 -1
- package/dist/index-a2C2Bqn2.cjs +0 -10
- package/dist/numberFormattingFunction.d.ts +0 -22
- package/dist/numberFormattingFunction.js +0 -2
- package/dist/numberFormattingFunction.js.map +0 -1
- package/dist/removeOutliers.d.ts +0 -16
- package/dist/removeOutliers.js +0 -2
- package/dist/removeOutliers.js.map +0 -1
- package/dist/svgDownload.d.ts +0 -16
- package/dist/svgDownload.js +0 -2
- package/dist/svgDownload.js.map +0 -1
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js +0 -139
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js.map +0 -1
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs +0 -4
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs.map +0 -1
- package/dist/transformColumnsToArray.d.ts +0 -38
- package/dist/transformColumnsToArray.js +0 -2
- package/dist/transformColumnsToArray.js.map +0 -1
- package/dist/transformDataForAggregation.d.ts +0 -38
- package/dist/transformDataForAggregation.js +0 -2
- package/dist/transformDataForAggregation.js.map +0 -1
- package/dist/transformDataForGraph.d.ts +0 -47
- package/dist/transformDataForGraph.js +0 -2
- package/dist/transformDataForGraph.js.map +0 -1
- package/dist/transformDataForGraphFromFile.d.ts +0 -66
- package/dist/transformDataForGraphFromFile.js +0 -2
- package/dist/transformDataForGraphFromFile.js.map +0 -1
- package/dist/use-in-view-CZPXmTZM.js.map +0 -1
- package/dist/use-in-view-Dl1CsAIo.cjs.map +0 -1
- package/dist/x-Dft9NVe_-DcB7wtv5.js +0 -61
- package/dist/x-Dft9NVe_-DcB7wtv5.js.map +0 -1
- package/dist/x-Dft9NVe_-LeyJu02C.cjs +0 -27
- package/dist/x-Dft9NVe_-LeyJu02C.cjs.map +0 -1
package/dist/TreeMapGraph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeMapGraph.js","sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../src/Components/Graphs/TreeMapGraph/Graph.tsx","../src/Components/Graphs/TreeMapGraph/index.tsx"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import { stratify, treemap } from 'd3-hierarchy';\r\nimport { useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { AnimateDataType, ClassNameObject, Languages, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n language?: Languages;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n precision: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n selectedColor,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n language,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const treeMapData = [\r\n {\r\n id: 'root',\r\n parent: undefined,\r\n value: undefined,\r\n data: undefined,\r\n },\r\n ...data.map((d: TreeMapDataType) => ({\r\n id: d.label,\r\n value: d.size,\r\n parent: 'root',\r\n data: d,\r\n })),\r\n ];\r\n const treeData = stratify()\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .id((d: any) => d.id)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .parentId((d: any) => d.parent)(treeMapData);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n treeData.sum((d: any) => d.value);\r\n const treeMapVizData = treemap().size([graphWidth, graphHeight]).padding(2)(treeData);\r\n\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <AnimatePresence>\r\n {treeMapVizData.children?.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n key={(d.data as any).id}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: d.x0,\r\n y: d.y0,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color\r\n ? colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n highlightedDataPoints.indexOf((d.data as any).id) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n x: d.x0,\r\n y: d.y0,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?.((d.data as any).data);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mouseClickData === (d.data as any).id &&\r\n resetSelectionOnDoubleClick\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseClickData((d.data as any).id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?.((d.data as any).data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n exit={{\r\n width: 0,\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n height: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n },\r\n whileInView: {\r\n width: d.x1 - d.x0,\r\n height: d.y1 - d.y0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {d.x1 - d.x0 > 50 && d.y1 - d.y0 > 25 && (showLabels || showValues) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={d.x1 - d.x0} height={d.y1 - d.y0}>\r\n <div\r\n className='flex flex-col gap-0.5 p-2 w-full'\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n ),\r\n }}\r\n >\r\n {showLabels ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full treemap-label',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n WebkitLineClamp:\r\n d.y1 - d.y0 > 50\r\n ? d.y1 - d.y0 > 100\r\n ? d.y1 - d.y0 > 150\r\n ? undefined\r\n : 3\r\n : 2\r\n : 1,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).id\r\n }\r\n </P>\r\n ) : null}\r\n {showValues ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full font-bold treemap-value',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).value,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n </P>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport {\r\n TreeMapDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Maximum radius of the circle */\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function TreeMapGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues = true,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a chart where data points are represented by squares, and their sizes reflect their values. ${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.size))}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n selectedColor={selectedColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n language={language}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["count","node","sum","children","i","node_count","node_each","callback","that","index","node_eachBefore","nodes","node_eachAfter","next","n","node_find","node_sum","value","node_sort","compare","node_path","end","start","ancestor","leastCommonAncestor","k","a","b","aNodes","bNodes","c","node_ancestors","node_descendants","node_leaves","leaves","node_links","root","links","node_iterator","current","hierarchy","data","mapChildren","objectChildren","Node","child","childs","computeHeight","node_copy","copyData","d","height","optional","f","required","constantZero","constant","x","roundNode","treemapDice","parent","x0","y0","x1","y1","preroot","ambiguous","imputed","defaultId","defaultParentId","stratify","id","parentId","path","currentId","currentParentId","nodeId","nodeKey","nodeByKey","I","normalize","P","parentof","S","_","slash","treemapSlice","phi","squarifyRatio","ratio","rows","row","nodeValue","i0","i1","dx","dy","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","squarify","custom","treemap","tile","round","paddingStack","paddingInner","paddingTop","paddingRight","paddingBottom","paddingLeft","positionNode","p","Graph","props","colors","leftMargin","width","colorDomain","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","selectedColor","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","language","styles","classNames","animate","dimmedOpacity","precision","svgRef","useRef","isInView","useInView","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","margin","graphWidth","graphHeight","treeMapData","treeData","treeMapVizData","jsxs","Fragment","jsx","motion","AnimatePresence","event","el","Colors","getTextColorBasedOnBgColor","cn","numberFormattingFunction","Tooltip","Modal","string2HTML","TreeMapGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","useEffect","resizeObserver","entries","GraphHeader","EmptyState","ColorLegendWithMouseOver","uniqBy","checkIfNullOrUndefined","GraphFooter"],"mappings":"ysBAAA,SAASA,GAAMC,EAAM,CACnB,IAAIC,EAAM,EACNC,EAAWF,EAAK,SAChBG,EAAID,GAAYA,EAAS,OAC7B,GAAI,CAACC,EAAGF,EAAM,MACT,MAAO,EAAEE,GAAK,GAAGF,GAAOC,EAASC,CAAC,EAAE,MACzCH,EAAK,MAAQC,CACf,CAEe,SAAAG,IAAW,CACxB,OAAO,KAAK,UAAUL,EAAK,CAC7B,CCXe,SAAAM,GAASC,EAAUC,EAAM,CACtC,IAAIC,EAAQ,GACZ,UAAWR,KAAQ,KACjBM,EAAS,KAAKC,EAAMP,EAAM,EAAEQ,EAAO,IAAI,EAEzC,OAAO,IACT,CCNe,SAAAC,GAASH,EAAUC,EAAM,CAEtC,QADIP,EAAO,KAAMU,EAAQ,CAACV,CAAI,EAAGE,EAAUC,EAAGK,EAAQ,GAC/CR,EAAOU,EAAM,OAElB,GADAJ,EAAS,KAAKC,EAAMP,EAAM,EAAEQ,EAAO,IAAI,EACnCN,EAAWF,EAAK,SAClB,IAAKG,EAAID,EAAS,OAAS,EAAGC,GAAK,EAAG,EAAEA,EACtCO,EAAM,KAAKR,EAASC,CAAC,CAAC,EAI5B,OAAO,IACT,CCXe,SAAAQ,GAASL,EAAUC,EAAM,CAEtC,QADIP,EAAO,KAAMU,EAAQ,CAACV,CAAI,EAAGY,EAAO,CAAA,EAAIV,EAAUC,EAAGU,EAAGL,EAAQ,GAC7DR,EAAOU,EAAM,OAElB,GADAE,EAAK,KAAKZ,CAAI,EACVE,EAAWF,EAAK,SAClB,IAAKG,EAAI,EAAGU,EAAIX,EAAS,OAAQC,EAAIU,EAAG,EAAEV,EACxCO,EAAM,KAAKR,EAASC,CAAC,CAAC,EAI5B,KAAOH,EAAOY,EAA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,EAAiBM,GACpCrE,GAASwE,GAAYT,EACtBM,GACDrE,GAASwE,GAAYT,EACxBW,EAAA,EAER,WAAA3E,EACA,YAAAG,EACA,UAAAC,EACA,aAAAC,EACA,WAAAC,EACA,WAAAI,EACA,OAAAC,EACA,OAAAC,EACA,cAAAH,GACA,QAAAF,EACA,kBAAAC,EACA,mBAAAM,EACA,sBAAAD,EACA,4BAAAE,EACA,eAAAC,EACA,OAAAE,EACA,WAAAC,EACA,SAAAF,EACA,QACEG,IAAY,GACR,CAAE,SAAU,GAAK,KAAM,GAAM,OAAQ,EAAA,EACrCA,GAAW,CAAE,SAAU,EAAG,KAAM,GAAM,OAAQ,CAAA,EAEpD,cAAAC,GACA,UAAAC,CAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CACF,CAAA,CAEJ,EACCoC,GAAWE,EACVhB,EAAAA,kBAAAA,IAAC4C,GAAAA,YAAA,CACC,OAAQ,CAAE,SAAUtE,GAAQ,SAAU,OAAQA,GAAQ,MAAA,EACtD,WAAY,CACV,SAAUC,GAAY,SACtB,OAAQA,GAAY,MAAA,EAEtB,QAAAuC,EACA,SAAAE,EACA,MAAA3D,CAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAGN","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]}
|
|
1
|
+
{"version":3,"file":"TreeMapGraph.js","sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../src/Components/Graphs/TreeMapGraph/Graph.tsx","../src/Components/Graphs/TreeMapGraph/index.tsx"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import { stratify, treemap } from 'd3-hierarchy';\r\nimport { useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { AnimateDataType, ClassNameObject, Languages, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n language?: Languages;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n precision: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n selectedColor,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n language,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const treeMapData = [\r\n {\r\n id: 'root',\r\n parent: undefined,\r\n value: undefined,\r\n data: undefined,\r\n },\r\n ...data.map((d: TreeMapDataType) => ({\r\n id: d.label,\r\n value: d.size,\r\n parent: 'root',\r\n data: d,\r\n })),\r\n ];\r\n const treeData = stratify()\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .id((d: any) => d.id)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .parentId((d: any) => d.parent)(treeMapData);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n treeData.sum((d: any) => d.value);\r\n const treeMapVizData = treemap().size([graphWidth, graphHeight]).padding(2)(treeData);\r\n\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <AnimatePresence>\r\n {treeMapVizData.children?.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n key={(d.data as any).id}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: d.x0,\r\n y: d.y0,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color\r\n ? colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n highlightedDataPoints.indexOf((d.data as any).id) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n x: d.x0,\r\n y: d.y0,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?.((d.data as any).data);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mouseClickData === (d.data as any).id &&\r\n resetSelectionOnDoubleClick\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseClickData((d.data as any).id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?.((d.data as any).data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n exit={{\r\n width: 0,\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n height: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n },\r\n whileInView: {\r\n width: d.x1 - d.x0,\r\n height: d.y1 - d.y0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {d.x1 - d.x0 > 50 && d.y1 - d.y0 > 25 && (showLabels || showValues) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={d.x1 - d.x0} height={d.y1 - d.y0}>\r\n <div\r\n className='flex flex-col gap-0.5 p-2 w-full'\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n ),\r\n }}\r\n >\r\n {showLabels ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full treemap-label',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n WebkitLineClamp:\r\n d.y1 - d.y0 > 50\r\n ? d.y1 - d.y0 > 100\r\n ? d.y1 - d.y0 > 150\r\n ? undefined\r\n : 3\r\n : 2\r\n : 1,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).id\r\n }\r\n </P>\r\n ) : null}\r\n {showValues ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full font-bold treemap-value',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).value,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n </P>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport {\r\n TreeMapDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Maximum radius of the circle */\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function TreeMapGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues = true,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a chart where data points are represented by squares, and their sizes reflect their values. ${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.size))}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n selectedColor={selectedColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n language={language}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["count","node","sum","children","i","node_count","node_each","callback","that","index","node_eachBefore","nodes","node_eachAfter","next","n","node_find","node_sum","value","node_sort","compare","node_path","end","start","ancestor","leastCommonAncestor","k","a","b","aNodes","bNodes","c","node_ancestors","node_descendants","node_leaves","leaves","node_links","root","links","node_iterator","current","hierarchy","data","mapChildren","objectChildren","Node","child","childs","computeHeight","node_copy","copyData","d","height","optional","f","required","constantZero","constant","x","roundNode","treemapDice","parent","x0","y0","x1","y1","preroot","ambiguous","imputed","defaultId","defaultParentId","stratify","id","parentId","path","currentId","currentParentId","nodeId","nodeKey","nodeByKey","I","normalize","P","parentof","S","_","slash","treemapSlice","phi","squarifyRatio","ratio","rows","row","nodeValue","i0","i1","dx","dy","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","squarify","custom","treemap","tile","round","paddingStack","paddingInner","paddingTop","paddingRight","paddingBottom","paddingLeft","positionNode","p","Graph","props","colors","leftMargin","width","colorDomain","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","selectedColor","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","language","styles","classNames","animate","dimmedOpacity","precision","svgRef","useRef","isInView","useInView","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","margin","graphWidth","graphHeight","treeMapData","treeData","treeMapVizData","jsxs","Fragment","jsx","motion","AnimatePresence","event","el","Colors","getTextColorBasedOnBgColor","cn","numberFormattingFunction","Tooltip","Modal","string2HTML","TreeMapGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","useEffect","resizeObserver","entries","GraphHeader","EmptyState","ColorLegendWithMouseOver","uniqBy","checkIfNullOrUndefined","GraphFooter"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAASA,GAAMC,GAAM;AACnB,MAAIC,IAAM,GACNC,IAAWF,EAAK,UAChBG,IAAID,KAAYA,EAAS;AAC7B,MAAI,CAACC,EAAG,CAAAF,IAAM;AAAA,MACT,QAAO,EAAEE,KAAK,IAAG,CAAAF,KAAOC,EAASC,CAAC,EAAE;AACzC,EAAAH,EAAK,QAAQC;AACf;AAEe,SAAAG,KAAW;AACxB,SAAO,KAAK,UAAUL,EAAK;AAC7B;ACXe,SAAAM,GAASC,GAAUC,GAAM;AACtC,MAAIC,IAAQ;AACZ,aAAWR,KAAQ;AACjB,IAAAM,EAAS,KAAKC,GAAMP,GAAM,EAAEQ,GAAO,IAAI;AAEzC,SAAO;AACT;ACNe,SAAAC,GAASH,GAAUC,GAAM;AAEtC,WADIP,IAAO,MAAMU,IAAQ,CAACV,CAAI,GAAGE,GAAUC,GAAGK,IAAQ,IAC/CR,IAAOU,EAAM;AAElB,QADAJ,EAAS,KAAKC,GAAMP,GAAM,EAAEQ,GAAO,IAAI,GACnCN,IAAWF,EAAK;AAClB,WAAKG,IAAID,EAAS,SAAS,GAAGC,KAAK,GAAG,EAAEA;AACtC,QAAAO,EAAM,KAAKR,EAASC,CAAC,CAAC;AAI5B,SAAO;AACT;ACXe,SAAAQ,GAASL,GAAUC,GAAM;AAEtC,WADIP,IAAO,MAAMU,IAAQ,CAACV,CAAI,GAAGY,IAAO,CAAA,GAAIV,GAAUC,GAAGU,GAAGL,IAAQ,IAC7DR,IAAOU,EAAM;AAElB,QADAE,EAAK,KAAKZ,CAAI,GACVE,IAAWF,EAAK;AAClB,WAAKG,IAAI,GAAGU,IAAIX,EAAS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AAA,gBACN,EAAA,CACF,EAAA,CAEJ;AAAA,gBACCoC,KAAWE,IACVhB,gBAAAA,EAAAA;AAAAA,kBAAC4C;AAAA,kBAAA;AAAA,oBACC,QAAQ,EAAE,UAAUtE,GAAQ,UAAU,QAAQA,GAAQ,OAAA;AAAA,oBACtD,YAAY;AAAA,sBACV,UAAUC,GAAY;AAAA,sBACtB,QAAQA,GAAY;AAAA,oBAAA;AAAA,oBAEtB,SAAAuC;AAAA,oBACA,UAAAE;AAAA,oBACA,OAAA3D;AAAA,kBAAA;AAAA,gBAAA,IAEA;AAAA,cAAA,EAAA,CACN;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]}
|
package/dist/Types.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/Types.d.ts
CHANGED
|
@@ -181,8 +181,11 @@ export declare interface CustomLayerDataType {
|
|
|
181
181
|
layer: React.ReactNode;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
export declare
|
|
184
|
+
export declare interface DashboardColumnDataType extends DashboardColumnDataWithoutGraphType {
|
|
185
185
|
graphType: GraphType;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export declare interface DashboardColumnDataWithoutGraphType {
|
|
186
189
|
attachedFilter?: string;
|
|
187
190
|
columnWidth?: number;
|
|
188
191
|
dataTransform?: {
|
|
@@ -194,7 +197,7 @@ export declare type DashboardColumnDataType = {
|
|
|
194
197
|
dataSelectionOptions?: DataSelectionDataType[];
|
|
195
198
|
advancedDataSelectionOptions?: AdvancedDataSelectionDataType[];
|
|
196
199
|
settings?: GraphSettingsDataType;
|
|
197
|
-
}
|
|
200
|
+
}
|
|
198
201
|
|
|
199
202
|
export declare type DashboardFromWideToLongFormatColumnDataType = {
|
|
200
203
|
graphType: 'donutChart' | 'barChart' | 'unitChart' | 'treeMap' | 'circlePacking';
|
|
@@ -217,17 +220,20 @@ export declare type DashboardFromWideToLongFormatLayoutDataType = {
|
|
|
217
220
|
}[];
|
|
218
221
|
};
|
|
219
222
|
|
|
220
|
-
export declare
|
|
223
|
+
export declare interface DashboardLayoutDataType extends DashboardLayoutDataWithoutRowsType {
|
|
224
|
+
rows: {
|
|
225
|
+
columns: DashboardColumnDataType[];
|
|
226
|
+
height?: number;
|
|
227
|
+
}[];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare interface DashboardLayoutDataWithoutRowsType {
|
|
221
231
|
title?: string;
|
|
222
232
|
description?: string;
|
|
223
233
|
padding?: string;
|
|
224
234
|
backgroundColor?: string | boolean;
|
|
225
235
|
language?: Languages;
|
|
226
|
-
|
|
227
|
-
columns: DashboardColumnDataType[];
|
|
228
|
-
height?: number;
|
|
229
|
-
}[];
|
|
230
|
-
};
|
|
236
|
+
}
|
|
231
237
|
|
|
232
238
|
export declare interface DataFilterDataType {
|
|
233
239
|
column: string;
|
|
@@ -623,9 +629,9 @@ export declare interface GraphSettingsDataType {
|
|
|
623
629
|
polygonAltitude?: number;
|
|
624
630
|
}
|
|
625
631
|
|
|
626
|
-
export declare type GraphType = GraphTypeForGriddedGraph
|
|
632
|
+
export declare type GraphType = GraphTypeForGriddedGraph;
|
|
627
633
|
|
|
628
|
-
export declare type GraphTypeForGriddedGraph = 'barChart' | 'stackedBarChart' | 'groupedBarChart' | 'lineChart' | 'dualAxisLineChart' | 'multiLineChart' | 'multiLineAltChart' | 'differenceLineChart' | 'stackedAreaChart' | 'choroplethMap' | 'biVariateChoroplethMap' | 'dotDensityMap' | 'donutChart' | 'slopeChart' | 'scatterPlot' | 'dumbbellChart' | 'treeMap' | 'circlePacking' | 'heatMap' | 'stripChart' | 'beeSwarmChart' | 'butterflyChart' | 'histogram' | 'sparkLine' | 'paretoChart' | 'dataTable' | 'statCard' | 'unitChart' | 'sankeyChart' | 'lineChartWithConfidenceInterval' | 'dataCards' | 'radarChart' | 'bulletChart'
|
|
634
|
+
export declare type GraphTypeForGriddedGraph = 'barChart' | 'stackedBarChart' | 'groupedBarChart' | 'lineChart' | 'dualAxisLineChart' | 'multiLineChart' | 'multiLineAltChart' | 'differenceLineChart' | 'stackedAreaChart' | 'choroplethMap' | 'biVariateChoroplethMap' | 'dotDensityMap' | 'donutChart' | 'slopeChart' | 'scatterPlot' | 'dumbbellChart' | 'treeMap' | 'circlePacking' | 'heatMap' | 'stripChart' | 'beeSwarmChart' | 'butterflyChart' | 'histogram' | 'sparkLine' | 'paretoChart' | 'dataTable' | 'statCard' | 'unitChart' | 'sankeyChart' | 'lineChartWithConfidenceInterval' | 'dataCards' | 'radarChart' | 'bulletChart';
|
|
629
635
|
|
|
630
636
|
export declare interface GroupedBarGraphDataType {
|
|
631
637
|
label: string | number;
|
|
@@ -748,6 +754,25 @@ export declare interface ParetoChartDataType {
|
|
|
748
754
|
data?: object;
|
|
749
755
|
}
|
|
750
756
|
|
|
757
|
+
export declare interface PerformanceIntensiveChaptersDataType {
|
|
758
|
+
dataSettings: DataSettingsDataType;
|
|
759
|
+
graphSettings: GraphSettingsDataType;
|
|
760
|
+
graphType: GraphType | GeoHubGraphType | ThreeDGraphType;
|
|
761
|
+
graphDataConfiguration?: GraphConfigurationDataType[];
|
|
762
|
+
sections: SectionsDataType[];
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export declare interface PerformanceIntensiveDashboardColumnDataType extends DashboardColumnDataWithoutGraphType {
|
|
766
|
+
graphType: GraphType | ThreeDGraphType | GeoHubGraphType;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export declare interface PerformanceIntensiveDashboardLayoutDataType extends DashboardLayoutDataWithoutRowsType {
|
|
770
|
+
rows: {
|
|
771
|
+
columns: PerformanceIntensiveDashboardColumnDataType[];
|
|
772
|
+
height?: number;
|
|
773
|
+
}[];
|
|
774
|
+
}
|
|
775
|
+
|
|
751
776
|
export declare interface RadarChartDataType {
|
|
752
777
|
values: number[];
|
|
753
778
|
label?: string | number;
|
|
@@ -793,7 +818,7 @@ export declare interface SectionsArrDataType {
|
|
|
793
818
|
section: number;
|
|
794
819
|
dataSettings: DataSettingsDataType;
|
|
795
820
|
graphSettings: GraphSettingsDataType;
|
|
796
|
-
graphType: GraphType;
|
|
821
|
+
graphType: GraphType | GeoHubGraphType | ThreeDGraphType;
|
|
797
822
|
graphDataConfiguration: GraphConfigurationDataType[];
|
|
798
823
|
infoBox: InfoBoxDataType;
|
|
799
824
|
}
|
|
@@ -851,6 +876,8 @@ export declare interface TableColumnSettingsDataType {
|
|
|
851
876
|
type: string;
|
|
852
877
|
}
|
|
853
878
|
|
|
879
|
+
export declare type ThreeDGraphType = 'threeDGlobe';
|
|
880
|
+
|
|
854
881
|
export declare interface TimelineDataType {
|
|
855
882
|
autoplay: boolean;
|
|
856
883
|
enabled: boolean;
|
package/dist/Types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
//# sourceMappingURL=Types.js.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { a as n, m as s, b as r } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
|
+
const d = r("mt-0 ml-0 mr-0", {
|
|
3
|
+
variants: {
|
|
4
|
+
size: {
|
|
5
|
+
xs: "text-xs",
|
|
6
|
+
sm: "text-sm",
|
|
7
|
+
base: "text-base",
|
|
8
|
+
"base-responsive": "text-base md:text-xl",
|
|
9
|
+
lg: "text-lg",
|
|
10
|
+
xl: "text-xl"
|
|
11
|
+
},
|
|
12
|
+
leading: {
|
|
13
|
+
none: "leading-none",
|
|
14
|
+
xs: "leading-[1.25]",
|
|
15
|
+
sm: "leading-[1.375]",
|
|
16
|
+
base: "leading-[1.4]",
|
|
17
|
+
lg: "leading-[1.625]",
|
|
18
|
+
xl: "leading-[2]"
|
|
19
|
+
},
|
|
20
|
+
marginBottom: {
|
|
21
|
+
none: "mb-0",
|
|
22
|
+
"3xs": "mb-1",
|
|
23
|
+
"2xs": "mb-2",
|
|
24
|
+
xs: "mb-3",
|
|
25
|
+
sm: "mb-4",
|
|
26
|
+
base: "mb-5",
|
|
27
|
+
lg: "mb-6",
|
|
28
|
+
xl: "mb-7"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
size: "base-responsive",
|
|
33
|
+
leading: "base",
|
|
34
|
+
marginBottom: "base"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
function x({
|
|
38
|
+
children: e,
|
|
39
|
+
className: t,
|
|
40
|
+
size: m,
|
|
41
|
+
leading: a,
|
|
42
|
+
marginBottom: l,
|
|
43
|
+
...o
|
|
44
|
+
}) {
|
|
45
|
+
return /* @__PURE__ */ n.jsx("p", { ...o, className: s(d({ size: m, leading: a, marginBottom: l }), t), children: e });
|
|
46
|
+
}
|
|
47
|
+
const i = r("mt-0 ml-0 mr-0 p-0", {
|
|
48
|
+
variants: {
|
|
49
|
+
marginBottom: {
|
|
50
|
+
none: "mb-0",
|
|
51
|
+
"2xs": "mb-1",
|
|
52
|
+
xs: "mb-2",
|
|
53
|
+
sm: "mb-3",
|
|
54
|
+
"base-responsive": "mb-3 md:mb-4",
|
|
55
|
+
base: "mb-4",
|
|
56
|
+
lg: "mb-5",
|
|
57
|
+
xl: "mb-6"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: { marginBottom: "base-responsive" }
|
|
61
|
+
});
|
|
62
|
+
function g({
|
|
63
|
+
children: e,
|
|
64
|
+
className: t,
|
|
65
|
+
marginBottom: m,
|
|
66
|
+
...a
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ n.jsx(
|
|
69
|
+
"h2",
|
|
70
|
+
{
|
|
71
|
+
...a,
|
|
72
|
+
className: s(
|
|
73
|
+
"text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] font-bold leading-[1.1]",
|
|
74
|
+
i({ marginBottom: m }),
|
|
75
|
+
t
|
|
76
|
+
),
|
|
77
|
+
children: e
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function c({
|
|
82
|
+
children: e,
|
|
83
|
+
className: t,
|
|
84
|
+
marginBottom: m,
|
|
85
|
+
...a
|
|
86
|
+
}) {
|
|
87
|
+
return /* @__PURE__ */ n.jsx(
|
|
88
|
+
"h3",
|
|
89
|
+
{
|
|
90
|
+
...a,
|
|
91
|
+
className: s(
|
|
92
|
+
"text-[1.875rem] md:text-[2.188rem] font-semibold leading-[1.15]",
|
|
93
|
+
i({ marginBottom: m }),
|
|
94
|
+
t
|
|
95
|
+
),
|
|
96
|
+
children: e
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function u({
|
|
101
|
+
children: e,
|
|
102
|
+
className: t,
|
|
103
|
+
marginBottom: m,
|
|
104
|
+
...a
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */ n.jsx(
|
|
107
|
+
"h5",
|
|
108
|
+
{
|
|
109
|
+
...a,
|
|
110
|
+
className: s(
|
|
111
|
+
"text-[1.25rem] md:text-[1.563rem] font-normal leading-[1.15]",
|
|
112
|
+
i({ marginBottom: m }),
|
|
113
|
+
t
|
|
114
|
+
),
|
|
115
|
+
children: e
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function h({ children: e, className: t, ...m }) {
|
|
120
|
+
return /* @__PURE__ */ n.jsx(
|
|
121
|
+
"a",
|
|
122
|
+
{
|
|
123
|
+
...m,
|
|
124
|
+
className: s(
|
|
125
|
+
"undp-link light text-primary-black dark:text-primary-white dark:text-primary-white bg-double-red dark:bg-double-white",
|
|
126
|
+
"cursor-pointer no-underline focus-visible:outline-hidden focus-visible:shadow-[0_0_0_#0468b1]",
|
|
127
|
+
t
|
|
128
|
+
),
|
|
129
|
+
children: e
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
h as H,
|
|
135
|
+
g as f,
|
|
136
|
+
c as h,
|
|
137
|
+
u as k,
|
|
138
|
+
x as u
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=Typography-Ctgfl1J5.js.map
|