@undp/data-viz 1.2.7 → 1.3.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.d.ts +224 -0
- package/dist/AreaChart.js +2 -0
- package/dist/AreaChart.js.map +1 -0
- package/dist/Axis-BlyBRMNw.cjs +2 -0
- package/dist/Axis-BlyBRMNw.cjs.map +1 -0
- package/dist/Axis-CvK-w3E2.js +44 -0
- package/dist/Axis-CvK-w3E2.js.map +1 -0
- package/dist/AxisTitle-BY8MI9jC.cjs +2 -0
- package/dist/AxisTitle-BY8MI9jC.cjs.map +1 -0
- package/dist/AxisTitle-BeMxcw5I.js +21 -0
- package/dist/AxisTitle-BeMxcw5I.js.map +1 -0
- package/dist/BarGraph.d.ts +460 -0
- package/dist/BarGraph.js +2 -0
- package/dist/BarGraph.js.map +1 -0
- package/dist/BasicStatCard.d.ts +106 -0
- package/dist/BasicStatCard.js +2 -0
- package/dist/BasicStatCard.js.map +1 -0
- package/dist/BeeSwarmChart.d.ts +189 -0
- package/dist/BeeSwarmChart.js +2 -0
- package/dist/BeeSwarmChart.js.map +1 -0
- package/dist/BiVariateChoroplethMap.d.ts +189 -0
- package/dist/BiVariateChoroplethMap.js +2 -0
- package/dist/BiVariateChoroplethMap.js.map +1 -0
- package/dist/BulletChart.d.ts +219 -0
- package/dist/BulletChart.js +2 -0
- package/dist/BulletChart.js.map +1 -0
- package/dist/ButterflyChart.d.ts +201 -0
- package/dist/ButterflyChart.js +2 -0
- package/dist/ButterflyChart.js.map +1 -0
- package/dist/ChoroplethMap.d.ts +190 -0
- package/dist/ChoroplethMap.js +2 -0
- package/dist/ChoroplethMap.js.map +1 -0
- package/dist/CirclePackingGraph.d.ts +161 -0
- package/dist/CirclePackingGraph.js +2 -0
- package/dist/CirclePackingGraph.js.map +1 -0
- package/dist/ColorLegend.d.ts +17 -0
- package/dist/ColorLegend.js +2 -0
- package/dist/ColorLegend.js.map +1 -0
- package/dist/ColorLegendWithMouseOver.d.ts +16 -0
- package/dist/ColorLegendWithMouseOver.js +2 -0
- package/dist/ColorLegendWithMouseOver.js.map +1 -0
- package/dist/Colors.d.ts +174 -0
- package/dist/Colors.js +2 -0
- package/dist/Colors.js.map +1 -0
- package/dist/CopyTextButton.d.ts +13 -0
- package/dist/CopyTextButton.js +17 -0
- package/dist/CopyTextButton.js.map +1 -0
- package/dist/CsvDownloadButton.d.ts +22 -0
- package/dist/CsvDownloadButton.js +23 -0
- package/dist/CsvDownloadButton.js.map +1 -0
- package/dist/DataCards.d.ts +131 -0
- package/dist/DataCards.js +2 -0
- package/dist/DataCards.js.map +1 -0
- package/dist/DataTable.d.ts +122 -0
- package/dist/DataTable.js +2 -0
- package/dist/DataTable.js.map +1 -0
- package/dist/DifferenceLineChart.d.ts +237 -0
- package/dist/DifferenceLineChart.js +2 -0
- package/dist/DifferenceLineChart.js.map +1 -0
- package/dist/DonutChart.d.ts +148 -0
- package/dist/DonutChart.js +2 -0
- package/dist/DonutChart.js.map +1 -0
- package/dist/DotDensityMap.d.ts +191 -0
- package/dist/DotDensityMap.js +2 -0
- package/dist/DotDensityMap.js.map +1 -0
- package/dist/DropdownSelect-CuzV7gdj.cjs +29 -0
- package/dist/DropdownSelect-CuzV7gdj.cjs.map +1 -0
- package/dist/DropdownSelect-DmZsXrhY.js +2698 -0
- package/dist/DropdownSelect-DmZsXrhY.js.map +1 -0
- package/dist/DualAxisLineChart.d.ts +180 -0
- package/dist/DualAxisLineChart.js +2 -0
- package/dist/DualAxisLineChart.js.map +1 -0
- package/dist/DumbbellChart.d.ts +224 -0
- package/dist/DumbbellChart.js +2 -0
- package/dist/DumbbellChart.js.map +1 -0
- package/dist/EmptyState-BQguKAp5.cjs +2 -0
- package/dist/EmptyState-BQguKAp5.cjs.map +1 -0
- package/dist/EmptyState-b2Ln487i.js +22 -0
- package/dist/EmptyState-b2Ln487i.js.map +1 -0
- package/dist/ExcelDownloadButton.d.ts +22 -0
- package/dist/ExcelDownloadButton.js +2 -0
- package/dist/ExcelDownloadButton.js.map +1 -0
- package/dist/FootNote.d.ts +12 -0
- package/dist/FootNote.js +2 -0
- package/dist/FootNote.js.map +1 -0
- package/dist/GeoHubCompareMaps.d.ts +103 -0
- package/dist/GeoHubCompareMaps.js +2 -0
- package/dist/GeoHubCompareMaps.js.map +1 -0
- package/dist/GeoHubMap.d.ts +118 -0
- package/dist/GeoHubMap.js +2 -0
- package/dist/GeoHubMap.js.map +1 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +117 -0
- package/dist/GeoHubMapWithLayerSelection.js +2 -0
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -0
- package/dist/GraphDescription.d.ts +12 -0
- package/dist/GraphDescription.js +2 -0
- package/dist/GraphDescription.js.map +1 -0
- package/dist/GraphFooter.d.ts +24 -0
- package/dist/GraphFooter.js +2 -0
- package/dist/GraphFooter.js.map +1 -0
- package/dist/GraphHeader.d.ts +22 -0
- package/dist/GraphHeader.js +2 -0
- package/dist/GraphHeader.js.map +1 -0
- package/dist/GraphTitle.d.ts +13 -0
- package/dist/GraphTitle.js +2 -0
- package/dist/GraphTitle.js.map +1 -0
- package/dist/GriddedGraphs.d.ts +540 -0
- package/dist/GriddedGraphs.js +2 -0
- package/dist/GriddedGraphs.js.map +1 -0
- package/dist/GriddedGraphsFromConfig.d.ts +543 -0
- package/dist/GriddedGraphsFromConfig.js +2 -0
- package/dist/GriddedGraphsFromConfig.js.map +1 -0
- package/dist/HeatMap.d.ts +166 -0
- package/dist/HeatMap.js +2 -0
- package/dist/HeatMap.js.map +1 -0
- package/dist/Histogram.d.ts +165 -0
- package/dist/Histogram.js +2 -0
- package/dist/Histogram.js.map +1 -0
- package/dist/ImageDownloadButton.d.ts +15 -0
- package/dist/ImageDownloadButton.js +2 -0
- package/dist/ImageDownloadButton.js.map +1 -0
- package/dist/LineChartWithConfidenceInterval.d.ts +250 -0
- package/dist/LineChartWithConfidenceInterval.js +2 -0
- package/dist/LineChartWithConfidenceInterval.js.map +1 -0
- package/dist/LinearColorLegend.d.ts +13 -0
- package/dist/LinearColorLegend.js +2 -0
- package/dist/LinearColorLegend.js.map +1 -0
- package/dist/Modal-C9txyGOk.js +723 -0
- package/dist/Modal-C9txyGOk.js.map +1 -0
- package/dist/Modal-cQF2UQIa.cjs +46 -0
- package/dist/Modal-cQF2UQIa.cjs.map +1 -0
- package/dist/MultiGraphDashboard.d.ts +558 -0
- package/dist/MultiGraphDashboard.js +2 -0
- package/dist/MultiGraphDashboard.js.map +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +562 -0
- package/dist/MultiGraphDashboardFromConfig.js +2 -0
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +128 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +133 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -0
- package/dist/MultiLineAltChart.d.ts +244 -0
- package/dist/MultiLineAltChart.js +2 -0
- package/dist/MultiLineAltChart.js.map +1 -0
- package/dist/MultiLineChart.d.ts +246 -0
- package/dist/MultiLineChart.js +2 -0
- package/dist/MultiLineChart.js.map +1 -0
- package/dist/ParetoChart.d.ts +178 -0
- package/dist/ParetoChart.js +2 -0
- package/dist/ParetoChart.js.map +1 -0
- package/dist/RadarChart.d.ts +176 -0
- package/dist/RadarChart.js +2 -0
- package/dist/RadarChart.js.map +1 -0
- package/dist/ReferenceLine-BgDdQbDI.js +129 -0
- package/dist/ReferenceLine-BgDdQbDI.js.map +1 -0
- package/dist/ReferenceLine-Bsb5jeE4.cjs +2 -0
- package/dist/ReferenceLine-Bsb5jeE4.cjs.map +1 -0
- package/dist/RegressionLine-BfpCuD7B.cjs +2 -0
- package/dist/RegressionLine-BfpCuD7B.cjs.map +1 -0
- package/dist/RegressionLine-cSljpHaE.js +49 -0
- package/dist/RegressionLine-cSljpHaE.js.map +1 -0
- package/dist/SVGDownloadButton.d.ts +15 -0
- package/dist/SVGDownloadButton.js +2 -0
- package/dist/SVGDownloadButton.js.map +1 -0
- package/dist/SankeyChart.d.ts +178 -0
- package/dist/SankeyChart.js +2 -0
- package/dist/SankeyChart.js.map +1 -0
- package/dist/ScatterPlot.d.ts +266 -0
- package/dist/ScatterPlot.js +2 -0
- package/dist/ScatterPlot.js.map +1 -0
- package/dist/ScrollStory.d.ts +491 -0
- package/dist/ScrollStory.js +2 -0
- package/dist/ScrollStory.js.map +1 -0
- package/dist/SimpleLineChart.d.ts +230 -0
- package/dist/SimpleLineChart.js +2 -0
- package/dist/SimpleLineChart.js.map +1 -0
- package/dist/SingleGraphDashboard.d.ts +545 -0
- package/dist/SingleGraphDashboard.js +2 -0
- package/dist/SingleGraphDashboard.js.map +1 -0
- package/dist/SingleGraphDashboardFromConfig.d.ts +547 -0
- package/dist/SingleGraphDashboardFromConfig.js +2 -0
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -0
- package/dist/SlopeChart.d.ts +167 -0
- package/dist/SlopeChart.js +2 -0
- package/dist/SlopeChart.js.map +1 -0
- package/dist/Source.d.ts +16 -0
- package/dist/Source.js +2 -0
- package/dist/Source.js.map +1 -0
- package/dist/SparkLine.d.ts +139 -0
- package/dist/SparkLine.js +2 -0
- package/dist/SparkLine.js.map +1 -0
- package/dist/Spinner-DN3s4S0H.js +17 -0
- package/dist/Spinner-DN3s4S0H.js.map +1 -0
- package/dist/Spinner-UmN-KPe9.cjs +2 -0
- package/dist/Spinner-UmN-KPe9.cjs.map +1 -0
- package/dist/StatCardFromData.d.ts +115 -0
- package/dist/StatCardFromData.js +2 -0
- package/dist/StatCardFromData.js.map +1 -0
- package/dist/StripChart.d.ts +178 -0
- package/dist/StripChart.js +2 -0
- package/dist/StripChart.js.map +1 -0
- package/dist/ThreeDGlobe.d.ts +158 -0
- package/dist/ThreeDGlobe.js +2 -0
- package/dist/ThreeDGlobe.js.map +1 -0
- package/dist/ThresholdColorLegendWithMouseOver.d.ts +16 -0
- package/dist/ThresholdColorLegendWithMouseOver.js +2 -0
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -0
- package/dist/Tooltip-BM18N_3l.cjs +2 -0
- package/dist/Tooltip-BM18N_3l.cjs.map +1 -0
- package/dist/Tooltip-CzZ1wFyF.js +47 -0
- package/dist/Tooltip-CzZ1wFyF.js.map +1 -0
- package/dist/TreeMapGraph.d.ts +158 -0
- package/dist/TreeMapGraph.js +2 -0
- package/dist/TreeMapGraph.js.map +1 -0
- package/dist/Types.d.ts +883 -0
- package/dist/Types.js +2 -0
- package/dist/Types.js.map +1 -0
- package/dist/Typography-CDR-DAHH.cjs +2 -0
- package/dist/Typography-CDR-DAHH.cjs.map +1 -0
- package/dist/Typography-XJoSE-By.js +58 -0
- package/dist/Typography-XJoSE-By.js.map +1 -0
- package/dist/UnitChart.d.ts +132 -0
- package/dist/UnitChart.js +2 -0
- package/dist/UnitChart.js.map +1 -0
- package/dist/XAxesLabels-C9REbQQs.cjs +2 -0
- package/dist/XAxesLabels-C9REbQQs.cjs.map +1 -0
- package/dist/XAxesLabels-DVw7Lvuz.js +58 -0
- package/dist/XAxesLabels-DVw7Lvuz.js.map +1 -0
- package/dist/XTicksAndGridLines-CUefTINd.js +57 -0
- package/dist/XTicksAndGridLines-CUefTINd.js.map +1 -0
- package/dist/XTicksAndGridLines-DuK35ROS.cjs +2 -0
- package/dist/XTicksAndGridLines-DuK35ROS.cjs.map +1 -0
- package/dist/YAxesLabels-CYVY053X.js +53 -0
- package/dist/YAxesLabels-CYVY053X.js.map +1 -0
- package/dist/YAxesLabels-DhBdLk3Z.cjs +2 -0
- package/dist/YAxesLabels-DhBdLk3Z.cjs.map +1 -0
- package/dist/YTicksAndGridLines-BJRXuBdC.js +57 -0
- package/dist/YTicksAndGridLines-BJRXuBdC.js.map +1 -0
- package/dist/YTicksAndGridLines-CtLvzExe.cjs +2 -0
- package/dist/YTicksAndGridLines-CtLvzExe.cjs.map +1 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/area-BE2wo7fv.js +53 -0
- package/dist/area-BE2wo7fv.js.map +1 -0
- package/dist/area-D3Qx7k7K.cjs +2 -0
- package/dist/area-D3Qx7k7K.cjs.map +1 -0
- package/dist/array-B7TkkRH0.js +89 -0
- package/dist/array-B7TkkRH0.js.map +1 -0
- package/dist/array-DKbXV8lR.cjs +2 -0
- package/dist/array-DKbXV8lR.cjs.map +1 -0
- package/dist/band-BEjh2CHI.js +47 -0
- package/dist/band-BEjh2CHI.js.map +1 -0
- package/dist/band-CAApY4Pd.cjs +2 -0
- package/dist/band-CAApY4Pd.cjs.map +1 -0
- package/dist/checkIfMultiple-CaefP4X2.js +2264 -0
- package/dist/checkIfMultiple-CaefP4X2.js.map +1 -0
- package/dist/checkIfMultiple-D3h8to1T.cjs +12 -0
- package/dist/checkIfMultiple-D3h8to1T.cjs.map +1 -0
- package/dist/checkIfNullOrUndefined.d.ts +15 -0
- package/dist/checkIfNullOrUndefined.js +2 -0
- package/dist/checkIfNullOrUndefined.js.map +1 -0
- package/dist/customArea-B47Ew5cT.cjs +2 -0
- package/dist/customArea-B47Ew5cT.cjs.map +1 -0
- package/dist/customArea-I3MsoqIl.js +176 -0
- package/dist/customArea-I3MsoqIl.js.map +1 -0
- package/dist/defaultLocale-BEa-49Qz.js +172 -0
- package/dist/defaultLocale-BEa-49Qz.js.map +1 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs +2 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs.map +1 -0
- package/dist/delaunay-C1uAf38t.js +684 -0
- package/dist/delaunay-C1uAf38t.js.map +1 -0
- package/dist/delaunay-rcy0HhZi.cjs +2 -0
- package/dist/delaunay-rcy0HhZi.cjs.map +1 -0
- package/dist/ensureCompleteData-BBDZbDCE.js +102 -0
- package/dist/ensureCompleteData-BBDZbDCE.js.map +1 -0
- package/dist/ensureCompleteData-DqWQ2Zbi.cjs +2 -0
- package/dist/ensureCompleteData-DqWQ2Zbi.cjs.map +1 -0
- package/dist/excelDownload.d.ts +31 -0
- package/dist/excelDownload.js +2 -0
- package/dist/excelDownload.js.map +1 -0
- package/dist/fetchAndParseData.d.ts +84 -0
- package/dist/fetchAndParseData.js +16 -0
- package/dist/fetchAndParseData.js.map +1 -0
- package/dist/filterData-B8ocT57s.js +14 -0
- package/dist/filterData-B8ocT57s.js.map +1 -0
- package/dist/filterData-DN6py7y_.cjs +2 -0
- package/dist/filterData-DN6py7y_.cjs.map +1 -0
- package/dist/generateCodes.d.ts +25 -0
- package/dist/generateCodes.js +2 -0
- package/dist/generateCodes.js.map +1 -0
- package/dist/generateRandomString-B5zBiJzS.cjs +2 -0
- package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -0
- package/dist/generateRandomString-za3IQGfQ.js +11 -0
- package/dist/generateRandomString-za3IQGfQ.js.map +1 -0
- package/dist/getJenks.d.ts +17 -0
- package/dist/getJenks.js +2 -0
- package/dist/getJenks.js.map +1 -0
- package/dist/getPercentileValue.d.ts +13 -0
- package/dist/getPercentileValue.js +2 -0
- package/dist/getPercentileValue.js.map +1 -0
- package/dist/getQueryParamsFromLink.d.ts +18 -0
- package/dist/getQueryParamsFromLink.js +2 -0
- package/dist/getQueryParamsFromLink.js.map +1 -0
- package/dist/getSchema.d.ts +3256 -0
- package/dist/getSchema.js +2 -0
- package/dist/getSchema.js.map +1 -0
- package/dist/getSliderMarks-CWajGCGq.js +719 -0
- package/dist/getSliderMarks-CWajGCGq.js.map +1 -0
- package/dist/getSliderMarks-DDJ1CdhL.cjs +6 -0
- package/dist/getSliderMarks-DDJ1CdhL.cjs.map +1 -0
- package/dist/getTextColorBasedOnBgColor.d.ts +13 -0
- package/dist/getTextColorBasedOnBgColor.js +2 -0
- package/dist/getTextColorBasedOnBgColor.js.map +1 -0
- package/dist/getUniqValue.d.ts +18 -0
- package/dist/getUniqValue.js +2 -0
- package/dist/getUniqValue.js.map +1 -0
- package/dist/graphList.d.ts +9 -0
- package/dist/graphList.js +2 -0
- package/dist/graphList.js.map +1 -0
- package/dist/imageDownload.d.ts +16 -0
- package/dist/imageDownload.js +3 -0
- package/dist/imageDownload.js.map +1 -0
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs +2 -0
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs.map +1 -0
- package/dist/index-01r5X3Gr-kH7FxQ7P.js +451 -0
- package/dist/index-01r5X3Gr-kH7FxQ7P.js.map +1 -0
- package/dist/index-27yTRcko.js +35 -0
- package/dist/index-27yTRcko.js.map +1 -0
- package/dist/index-B0rbzOoC.cjs +2 -0
- package/dist/index-B0rbzOoC.cjs.map +1 -0
- package/dist/index-BGMGC-HN.cjs +22 -0
- package/dist/index-BGMGC-HN.cjs.map +1 -0
- package/dist/index-BHm2KTjD-2e-Fu8L-.js +702 -0
- package/dist/index-BHm2KTjD-2e-Fu8L-.js.map +1 -0
- package/dist/index-BHm2KTjD-D8FylaKc.cjs +44 -0
- package/dist/index-BHm2KTjD-D8FylaKc.cjs.map +1 -0
- package/dist/index-BIPNFFja.js +506 -0
- package/dist/index-BIPNFFja.js.map +1 -0
- package/dist/index-BLizQDlg.js +658 -0
- package/dist/index-BLizQDlg.js.map +1 -0
- package/dist/index-BXns0-ng.cjs +2 -0
- package/dist/index-BXns0-ng.cjs.map +1 -0
- package/dist/index-BYroABPm.cjs +2 -0
- package/dist/index-BYroABPm.cjs.map +1 -0
- package/dist/index-BczVvEBZ.cjs +2 -0
- package/dist/index-BczVvEBZ.cjs.map +1 -0
- package/dist/index-BzeLQvXk.cjs +2 -0
- package/dist/index-BzeLQvXk.cjs.map +1 -0
- package/dist/index-C1rRk_50.js +273 -0
- package/dist/index-C1rRk_50.js.map +1 -0
- package/dist/index-C21TvELx.cjs +2 -0
- package/dist/index-C21TvELx.cjs.map +1 -0
- package/dist/index-CEc_9zWy.cjs +2 -0
- package/dist/index-CEc_9zWy.cjs.map +1 -0
- package/dist/index-CZbIGs8q.cjs +2 -0
- package/dist/index-CZbIGs8q.cjs.map +1 -0
- package/dist/index-CaAIPGZo.js +631 -0
- package/dist/index-CaAIPGZo.js.map +1 -0
- package/dist/index-CbVeVrla.cjs +2 -0
- package/dist/index-CbVeVrla.cjs.map +1 -0
- package/dist/index-CqzhBPuO-CfQywbdq.js +41 -0
- package/dist/index-CqzhBPuO-CfQywbdq.js.map +1 -0
- package/dist/index-CqzhBPuO-raKZqS7l.cjs +2 -0
- package/dist/index-CqzhBPuO-raKZqS7l.cjs.map +1 -0
- package/dist/index-D7ltPi18.js +26 -0
- package/dist/index-D7ltPi18.js.map +1 -0
- package/dist/index-DSnvdkHZ.js +495 -0
- package/dist/index-DSnvdkHZ.js.map +1 -0
- package/dist/index-DXmF_0ez.js +308 -0
- package/dist/index-DXmF_0ez.js.map +1 -0
- package/dist/index-Db-Yg_Ud.js +120 -0
- package/dist/index-Db-Yg_Ud.js.map +1 -0
- package/dist/index-Ds0uHjK9.cjs +2 -0
- package/dist/index-Ds0uHjK9.cjs.map +1 -0
- package/dist/index-DxagiOHo.js +707 -0
- package/dist/index-DxagiOHo.js.map +1 -0
- package/dist/index-DzdwZ2OA.js +77 -0
- package/dist/index-DzdwZ2OA.js.map +1 -0
- package/dist/index-UV9hjG_S.js +53 -0
- package/dist/index-UV9hjG_S.js.map +1 -0
- package/dist/index-a2C2Bqn2.cjs +10 -0
- package/dist/index-a2C2Bqn2.cjs.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +1 -52484
- package/dist/index.js.map +1 -1
- package/dist/init-BhZylTFx.js +63 -0
- package/dist/init-BhZylTFx.js.map +1 -0
- package/dist/init-DU0ybBc_.cjs +2 -0
- package/dist/init-DU0ybBc_.cjs.map +1 -0
- package/dist/line-CPfhohvF.js +68 -0
- package/dist/line-CPfhohvF.js.map +1 -0
- package/dist/line-DHV4JwCR.cjs +2 -0
- package/dist/line-DHV4JwCR.cjs.map +1 -0
- package/dist/linear-BVckp9RD.cjs +2 -0
- package/dist/linear-BVckp9RD.cjs.map +1 -0
- package/dist/linear-DUdu7l2G.js +221 -0
- package/dist/linear-DUdu7l2G.js.map +1 -0
- package/dist/numberFormattingFunction.d.ts +22 -0
- package/dist/numberFormattingFunction.js +2 -0
- package/dist/numberFormattingFunction.js.map +1 -0
- package/dist/ordinal-BOeNbyae.cjs +2 -0
- package/dist/ordinal-BOeNbyae.cjs.map +1 -0
- package/dist/ordinal-w9Lu4Stb.js +62 -0
- package/dist/ordinal-w9Lu4Stb.js.map +1 -0
- package/dist/parse-DlCRUFh_.js +2768 -0
- package/dist/parse-DlCRUFh_.js.map +1 -0
- package/dist/parse-hMnG_lRV.cjs +2 -0
- package/dist/parse-hMnG_lRV.cjs.map +1 -0
- package/dist/pointer-CWRWOsrb.js +23 -0
- package/dist/pointer-CWRWOsrb.js.map +1 -0
- package/dist/pointer-Dkq5NV1q.cjs +2 -0
- package/dist/pointer-Dkq5NV1q.cjs.map +1 -0
- package/dist/pow-B5-jkdHU.cjs +2 -0
- package/dist/pow-B5-jkdHU.cjs.map +1 -0
- package/dist/pow-e8zx3AQJ.js +35 -0
- package/dist/pow-e8zx3AQJ.js.map +1 -0
- package/dist/removeOutliers.d.ts +16 -0
- package/dist/removeOutliers.js +2 -0
- package/dist/removeOutliers.js.map +1 -0
- package/dist/select-Bnfk0lJx.cjs +2 -0
- package/dist/select-Bnfk0lJx.cjs.map +1 -0
- package/dist/select-DKy99ogv.js +584 -0
- package/dist/select-DKy99ogv.js.map +1 -0
- package/dist/simple-statistics-flVzqVtt.js +65 -0
- package/dist/simple-statistics-flVzqVtt.js.map +1 -0
- package/dist/simple-statistics-xm8c0LQQ.cjs +2 -0
- package/dist/simple-statistics-xm8c0LQQ.cjs.map +1 -0
- package/dist/step-BZ3C8QFW.cjs +2 -0
- package/dist/step-BZ3C8QFW.cjs.map +1 -0
- package/dist/step-BrDul-H4.js +119 -0
- package/dist/step-BrDul-H4.js.map +1 -0
- package/dist/string-B8KlVSPX.js +364 -0
- package/dist/string-B8KlVSPX.js.map +1 -0
- package/dist/string-CRoCZCYa.cjs +2 -0
- package/dist/string-CRoCZCYa.cjs.map +1 -0
- package/dist/string2HTML-BX0oNw83.js +758 -0
- package/dist/string2HTML-BX0oNw83.js.map +1 -0
- package/dist/string2HTML-X4ZYX5jI.cjs +3 -0
- package/dist/string2HTML-X4ZYX5jI.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/svgDownload.d.ts +16 -0
- package/dist/svgDownload.js +2 -0
- package/dist/svgDownload.js.map +1 -0
- package/dist/threshold-DFfqcDMa.js +23 -0
- package/dist/threshold-DFfqcDMa.js.map +1 -0
- package/dist/threshold-DNsSUf8Q.cjs +2 -0
- package/dist/threshold-DNsSUf8Q.cjs.map +1 -0
- package/dist/time-Byw_jYQ7.cjs +2 -0
- package/dist/time-Byw_jYQ7.cjs.map +1 -0
- package/dist/time-BzJP5SPC.js +715 -0
- package/dist/time-BzJP5SPC.js.map +1 -0
- package/dist/timer-B39XOBYL.js +124 -0
- package/dist/timer-B39XOBYL.js.map +1 -0
- package/dist/timer-CKyBCVzT.cjs +2 -0
- package/dist/timer-CKyBCVzT.cjs.map +1 -0
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js +139 -0
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js.map +1 -0
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs +4 -0
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs.map +1 -0
- package/dist/transformColumnsToArray.d.ts +38 -0
- package/dist/transformColumnsToArray.js +2 -0
- package/dist/transformColumnsToArray.js.map +1 -0
- package/dist/transformDataForAggregation.d.ts +38 -0
- package/dist/transformDataForAggregation.js +2 -0
- package/dist/transformDataForAggregation.js.map +1 -0
- package/dist/transformDataForGraph.d.ts +47 -0
- package/dist/transformDataForGraph.js +2 -0
- package/dist/transformDataForGraph.js.map +1 -0
- package/dist/transformDataForGraphFromFile.d.ts +66 -0
- package/dist/transformDataForGraphFromFile.js +2 -0
- package/dist/transformDataForGraphFromFile.js.map +1 -0
- package/dist/use-in-view-CZPXmTZM.js +4645 -0
- package/dist/use-in-view-CZPXmTZM.js.map +1 -0
- package/dist/use-in-view-Dl1CsAIo.cjs +2 -0
- package/dist/use-in-view-Dl1CsAIo.cjs.map +1 -0
- package/dist/validateSchema.d.ts +68 -0
- package/dist/validateSchema.js +2 -0
- package/dist/validateSchema.js.map +1 -0
- package/dist/x-Dft9NVe_-DcB7wtv5.js +61 -0
- package/dist/x-Dft9NVe_-DcB7wtv5.js.map +1 -0
- package/dist/x-Dft9NVe_-LeyJu02C.cjs +27 -0
- package/dist/x-Dft9NVe_-LeyJu02C.cjs.map +1 -0
- package/dist/y-D0sAaVii.js +421 -0
- package/dist/y-D0sAaVii.js.map +1 -0
- package/dist/y-QcCbqrzx.cjs +2 -0
- package/dist/y-QcCbqrzx.cjs.map +1 -0
- package/dist/zoom-Lo7IAUfC.cjs +2 -0
- package/dist/zoom-Lo7IAUfC.cjs.map +1 -0
- package/dist/zoom-_lqdiGoI.js +1983 -0
- package/dist/zoom-_lqdiGoI.js.map +1 -0
- package/package.json +415 -4
- package/dist/index.cjs +0 -68
- package/dist/index.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StripChart.js","sources":["../src/Utils/getTickPosition.ts","../src/Components/Graphs/StripChart/Horizontal/Graph.tsx","../src/Components/Graphs/StripChart/Horizontal/index.tsx","../src/Components/Graphs/StripChart/Vertical/Graph.tsx","../src/Components/Graphs/StripChart/Vertical/index.tsx","../src/Components/Graphs/StripChart/index.tsx"],"sourcesContent":["export function getTickPositions(count: number, width: number) {\r\n if (count < 2) return [];\r\n const step = width / (count - 1);\r\n return Array.from({ length: count }, (_, i) => i * step);\r\n}\r\n","import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport sortBy from 'lodash.sortby';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { getTickPositions } from '@/Utils/getTickPosition';\r\n\r\ninterface Props {\r\n data: StripChartDataType[];\r\n width: number;\r\n height: number;\r\n selectedColor?: string;\r\n colors: string[];\r\n colorDomain: string[];\r\n radius: number;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\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 highlightedDataPoints: (string | number)[];\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n prefix: string;\r\n suffix: string;\r\n stripType: 'strip' | 'dot';\r\n highlightColor?: string;\r\n dotOpacity: 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 valueColor?: string;\r\n animate: AnimateDataType;\r\n noOfTicks: number;\r\n dimmedOpacity: number;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n colors,\r\n colorDomain,\r\n radius,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n highlightedDataPoints,\r\n selectedColor,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n prefix,\r\n suffix,\r\n stripType,\r\n highlightColor,\r\n dotOpacity,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n valueColor,\r\n animate,\r\n noOfTicks,\r\n dimmedOpacity,\r\n precision,\r\n customLayers,\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 dataWithId = data.map((d, i) => ({ ...d, id: `${i}` }));\r\n\r\n const sortedData = sortBy(dataWithId, item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n }).reverse();\r\n const xMaxValue = !checkIfNullOrUndefined(maxValue)\r\n ? (maxValue as number)\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) < 0\r\n ? 0\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const xMinValue = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) >= 0\r\n ? 0\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const x = scaleLinear().domain([xMinValue, xMaxValue]).range([0, graphWidth]).nice();\r\n const ticks = getTickPositions(noOfTicks, graphWidth);\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 {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {sortedData.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: x(0),\r\n y: graphHeight / 2,\r\n },\r\n whileInView: {\r\n x: x(d.position),\r\n y: graphHeight / 2,\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 0.95\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.95\r\n : dimmedOpacity\r\n : dotOpacity,\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 setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\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 {stripType === 'dot' ? (\r\n <motion.circle\r\n cy={0}\r\n cx={0}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\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={radius}\r\n />\r\n ) : (\r\n <motion.rect\r\n y={0 - radius}\r\n x={-1}\r\n height={radius * 2}\r\n width={2}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\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 )}\r\n {highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n x={0}\r\n y={0 - radius - 5}\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 style={{\r\n fill:\r\n valueColor ||\r\n (highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]),\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-sm font-bold',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(d.position, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {ticks.map((tick, i) => (\r\n <text\r\n key={i}\r\n x={tick}\r\n y={graphHeight / 2 + radius}\r\n style={{\r\n textAnchor: i === 0 ? 'start' : i === ticks.length - 1 ? 'end' : 'middle',\r\n ...(styles?.xAxis?.labels || {}),\r\n }}\r\n className={cn(\r\n 'fill-primary-gray-550 dark:fill-primary-gray-500 text-xs',\r\n classNames?.xAxis?.labels,\r\n )}\r\n dy='1em'\r\n >\r\n {numberFormattingFunction(x.invert(tick), 'NA', precision, prefix, suffix)}\r\n </text>\r\n ))}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\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 {\r\n Languages,\r\n SourcesDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\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: StripChartDataType[];\r\n graphTitle?: string | React.ReactNode;\r\n graphDescription?: string | React.ReactNode;\r\n footNote?: string | React.ReactNode;\r\n width?: number;\r\n height?: number;\r\n sources?: SourcesDataType[];\r\n stripType?: 'strip' | 'dot';\r\n colors?: string | string[];\r\n colorDomain?: string[];\r\n colorLegendTitle?: string;\r\n radius?: number;\r\n backgroundColor?: string | boolean;\r\n padding?: string;\r\n leftMargin?: number;\r\n rightMargin?: number;\r\n topMargin?: number;\r\n bottomMargin?: number;\r\n relativeHeight?: number;\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 highlightedDataPoints?: (string | number)[];\r\n showColorScale?: boolean;\r\n graphID?: string;\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n graphDownload?: boolean;\r\n dataDownload?: boolean;\r\n prefix?: string;\r\n suffix?: string;\r\n language?: Languages;\r\n highlightColor?: string;\r\n dotOpacity?: number;\r\n showNAColor?: boolean;\r\n minHeight?: number;\r\n theme?: 'light' | 'dark';\r\n ariaLabel?: string;\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 valueColor?: string;\r\n animate?: boolean | AnimateDataType;\r\n noOfTicks?: number;\r\n dimmedOpacity?: number;\r\n precision?: number;\r\n customLayers?: CustomLayerDataType[];\r\n}\r\n\r\nexport function HorizontalStripChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius = 5,\r\n padding,\r\n backgroundColor = false,\r\n leftMargin = 5,\r\n rightMargin = 5,\r\n topMargin = 10,\r\n bottomMargin = 10,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n highlightedDataPoints = [],\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n prefix = '',\r\n suffix = '',\r\n stripType = 'dot',\r\n language = 'en',\r\n highlightColor,\r\n dotOpacity = 0.3,\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 valueColor,\r\n animate = false,\r\n noOfTicks = 2,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\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 strip chart showing distribution of data along the horizontal axis. Each dot represents an individual data point, helping to visualize the spread and clustering of 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 !== false && 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={\r\n showNAColor === undefined || showNAColor === null ? true : showNAColor\r\n }\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}\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 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 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 selectedColor={selectedColor}\r\n radius={radius}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n valueColor={valueColor}\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 noOfTicks={noOfTicks}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\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","import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport sortBy from 'lodash.sortby';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { getTickPositions } from '@/Utils/getTickPosition';\r\n\r\ninterface Props {\r\n data: StripChartDataType[];\r\n width: number;\r\n height: number;\r\n selectedColor?: string;\r\n colors: string[];\r\n colorDomain: string[];\r\n radius: number;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\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 highlightedDataPoints: (string | number)[];\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n prefix: string;\r\n suffix: string;\r\n stripType: 'strip' | 'dot';\r\n highlightColor?: string;\r\n dotOpacity: 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 valueColor?: string;\r\n animate: AnimateDataType;\r\n noOfTicks: number;\r\n dimmedOpacity: number;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n colors,\r\n colorDomain,\r\n radius,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n highlightedDataPoints,\r\n selectedColor,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n noOfTicks,\r\n prefix,\r\n suffix,\r\n stripType,\r\n highlightColor,\r\n dotOpacity,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n valueColor,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n customLayers,\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 dataWithId = data.map((d, i) => ({ ...d, id: `${i}` }));\r\n\r\n const sortedData = sortBy(dataWithId, item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n }).reverse();\r\n const yMaxValue = !checkIfNullOrUndefined(maxValue)\r\n ? (maxValue as number)\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) < 0\r\n ? 0\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const yMinValue = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) >= 0\r\n ? 0\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const y = scaleLinear().domain([yMinValue, yMaxValue]).range([graphHeight, 0]).nice();\r\n const ticks = getTickPositions(noOfTicks, graphHeight);\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 {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {sortedData.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: graphWidth / 2,\r\n y: y(0),\r\n },\r\n whileInView: {\r\n x: graphWidth / 2,\r\n y: y(d.position),\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 0.95\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.95\r\n : dimmedOpacity\r\n : dotOpacity,\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 setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\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 {stripType === 'dot' ? (\r\n <motion.circle\r\n cy={0}\r\n cx={0}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\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={radius}\r\n />\r\n ) : (\r\n <motion.rect\r\n x={0 - radius}\r\n y={-1}\r\n width={radius * 2}\r\n height={2}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\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 )}\r\n {highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n y={0}\r\n dy='0.33em'\r\n x={0 + radius + 3}\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 style={{\r\n fill:\r\n valueColor ||\r\n (highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]),\r\n textAnchor: 'start',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-sm font-bold',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(d.position, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {ticks.map((tick, i) => (\r\n <text\r\n key={i}\r\n y={tick}\r\n x={graphWidth / 2 + radius + 5}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn(\r\n 'fill-primary-gray-550 dark:fill-primary-gray-500 text-xs',\r\n classNames?.yAxis?.labels,\r\n )}\r\n >\r\n {numberFormattingFunction(y.invert(tick), 'NA', precision, prefix, suffix)}\r\n </text>\r\n ))}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\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 {\r\n Languages,\r\n SourcesDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\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: StripChartDataType[];\r\n graphTitle?: string | React.ReactNode;\r\n graphDescription?: string | React.ReactNode;\r\n footNote?: string | React.ReactNode;\r\n width?: number;\r\n height?: number;\r\n sources?: SourcesDataType[];\r\n colors?: string | string[];\r\n colorDomain?: string[];\r\n colorLegendTitle?: string;\r\n radius?: number;\r\n backgroundColor?: string | boolean;\r\n padding?: string;\r\n leftMargin?: number;\r\n rightMargin?: number;\r\n topMargin?: number;\r\n bottomMargin?: number;\r\n relativeHeight?: number;\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 highlightedDataPoints?: (string | number)[];\r\n showColorScale?: boolean;\r\n graphID?: string;\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n graphDownload?: boolean;\r\n dataDownload?: boolean;\r\n prefix?: string;\r\n suffix?: string;\r\n stripType?: 'strip' | 'dot';\r\n language?: Languages;\r\n highlightColor?: string;\r\n dotOpacity?: number;\r\n showNAColor?: boolean;\r\n minHeight?: number;\r\n theme?: 'light' | 'dark';\r\n ariaLabel?: string;\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 valueColor?: string;\r\n animate?: boolean | AnimateDataType;\r\n noOfTicks?: number;\r\n dimmedOpacity?: number;\r\n precision?: number;\r\n customLayers?: CustomLayerDataType[];\r\n}\r\n\r\nexport function VerticalStripChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius = 5,\r\n padding,\r\n backgroundColor = false,\r\n leftMargin = 20,\r\n rightMargin = 20,\r\n topMargin = 10,\r\n bottomMargin = 10,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n highlightedDataPoints = [],\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n prefix = '',\r\n suffix = '',\r\n stripType = 'dot',\r\n language = 'en',\r\n highlightColor,\r\n dotOpacity = 0.3,\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 valueColor,\r\n animate = false,\r\n noOfTicks = 2,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\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 strip chart showing distribution of data along the vertical axis. Each dot represents an individual data point, helping to visualize the spread and clustering of 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 !== false && 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 >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\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 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 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 selectedColor={selectedColor}\r\n radius={radius}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n valueColor={valueColor}\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 noOfTicks={noOfTicks}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\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","import { HorizontalStripChart } from './Horizontal';\r\nimport { VerticalStripChart } from './Vertical';\r\n\r\nimport {\r\n SourcesDataType,\r\n Languages,\r\n StripChartDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: StripChartDataType[];\r\n\r\n /** Orientation of the graph */\r\n orientation?: 'vertical' | 'horizontal';\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 circles */\r\n colors?: string | string[];\r\n /** Color of the highlighted data points */\r\n highlightColor?: 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 /** Color of value labels */\r\n valueColor?: 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\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 /** Maximum value for the chart */\r\n maxValue?: number;\r\n /** Minimum value for the chart */\r\n minValue?: number;\r\n\r\n // Graph Parameters\r\n /** Number of ticks on the axis */\r\n noOfTicks?: number;\r\n /** Radius of the dots or width of the strips */\r\n radius?: number;\r\n /** Opacity of each dot or strip */\r\n dotOpacity?: number;\r\n /** Type of strip */\r\n stripType?: 'strip' | 'dot';\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 /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\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 StripChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius,\r\n padding,\r\n backgroundColor,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n highlightedDataPoints,\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n noOfTicks,\r\n graphDownload,\r\n dataDownload,\r\n prefix,\r\n suffix,\r\n stripType,\r\n language,\r\n highlightColor,\r\n dotOpacity,\r\n showNAColor,\r\n minHeight,\r\n theme,\r\n ariaLabel,\r\n valueColor,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n orientation = 'vertical',\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity = 0.3,\r\n precision,\r\n customLayers,\r\n } = props;\r\n\r\n if (orientation === 'vertical')\r\n return (\r\n <VerticalStripChart\r\n data={data}\r\n graphTitle={graphTitle}\r\n colors={colors}\r\n sources={sources}\r\n graphDescription={graphDescription}\r\n height={height}\r\n width={width}\r\n footNote={footNote}\r\n colorDomain={colorDomain}\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n padding={padding}\r\n backgroundColor={backgroundColor}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n relativeHeight={relativeHeight}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={showColorScale}\r\n highlightedDataPoints={highlightedDataPoints}\r\n graphID={graphID}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n noOfTicks={noOfTicks}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n language={language}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n showNAColor={showNAColor}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n valueColor={valueColor}\r\n detailsOnClick={detailsOnClick}\r\n classNames={classNames}\r\n animate={animate}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n );\r\n return (\r\n <HorizontalStripChart\r\n data={data}\r\n graphTitle={graphTitle}\r\n colors={colors}\r\n sources={sources}\r\n graphDescription={graphDescription}\r\n height={height}\r\n width={width}\r\n footNote={footNote}\r\n colorDomain={colorDomain}\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n padding={padding}\r\n backgroundColor={backgroundColor}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n relativeHeight={relativeHeight}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={showColorScale}\r\n highlightedDataPoints={highlightedDataPoints}\r\n graphID={graphID}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n noOfTicks={noOfTicks}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n language={language}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n showNAColor={showNAColor}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n valueColor={valueColor}\r\n detailsOnClick={detailsOnClick}\r\n classNames={classNames}\r\n animate={animate}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n );\r\n}\r\n"],"names":["getTickPositions","count","width","step","_","i","Graph","props","data","height","colors","colorDomain","radius","leftMargin","rightMargin","topMargin","bottomMargin","tooltip","onSeriesMouseOver","highlightedDataPoints","selectedColor","minValue","maxValue","onSeriesMouseClick","prefix","suffix","stripType","highlightColor","dotOpacity","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","valueColor","animate","noOfTicks","dimmedOpacity","precision","customLayers","svgRef","useRef","isInView","useInView","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","margin","graphWidth","graphHeight","dataWithId","d","sortedData","sortBy","item","index","xMaxValue","checkIfNullOrUndefined","xMinValue","x","scaleLinear","ticks","jsxs","Fragment","jsx","motion","AnimatePresence","event","isEqual","el","Colors","cn","tick","numberFormattingFunction","Tooltip","Modal","string2HTML","HorizontalStripChart","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","language","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","useEffect","resizeObserver","entries","GraphHeader","EmptyState","ColorLegendWithMouseOver","uniqBy","GraphFooter","yMaxValue","yMinValue","y","VerticalStripChart","StripChart","orientation"],"mappings":"qwBAAO,SAASA,GAAiBC,EAAeC,EAAe,CAC7D,GAAID,EAAQ,EAAG,MAAO,CAAA,EACtB,MAAME,EAAOD,GAASD,EAAQ,GAC9B,OAAO,MAAM,KAAK,CAAE,OAAQA,GAAS,CAACG,EAAGC,IAAMA,EAAIF,CAAI,CACzD,CCyDO,SAASG,GAAMC,EAAc,CAClC,KAAM,CACJ,KAAAC,EACA,MAAAN,EACA,OAAAO,EACA,OAAAC,EACA,YAAAC,EACA,OAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,aAAAC,GACA,QAAAC,EACA,kBAAAC,EACA,sBAAAC,EACA,cAAAC,EACA,SAAAC,EACA,SAAAC,EACA,mBAAAC,EACA,OAAAC,EACA,OAAAC,EACA,UAAAC,EACA,eAAAC,EACA,WAAAC,EACA,4BAAAC,GACA,eAAAC,EACA,OAAAC,EACA,WAAAC,EACA,WAAAC,EACA,QAA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,cAAAE,GACA,UAAAC,GACA,aAAAC,CAAA,CAAA,EAIJ+B,EAAAA,kBAAAA,IAACa,GAAA,CACC,KAAA1E,EACA,WAAA2E,EACA,OAAAzE,EACA,QAAA0E,EACA,iBAAAC,EACA,OAAA5E,EACA,MAAAP,EACA,SAAAoF,EACA,YAAA3E,EACA,iBAAA4E,GACA,OAAA3E,EACA,QAAA4E,EACA,gBAAAC,EACA,WAAA5E,EACA,YAAAC,EACA,UAAAC,EACA,aAAAC,EACA,QAAAC,EACA,eAAAyE,EACA,kBAAAxE,EACA,eAAAyE,EACA,sBAAAxE,EACA,QAAAyE,GACA,SAAAvE,EACA,SAAAC,EACA,mBAAAC,EACA,UAAAY,EACA,cAAA0D,EACA,aAAAC,EACA,OAAAtE,EACA,OAAAC,EACA,UAAAC,EACA,SAAAqE,EACA,eAAApE,EACA,WAAAC,EACA,YAAAoE,EACA,UAAAC,EACA,MAAAC,EACA,UAAAC,EACA,4BAAAtE,EACA,OAAAE,EACA,WAAAE,EACA,eAAAH,EACA,WAAAE,EACA,QAAAE,GACA,cAAAE,GACA,UAAAC,GACA,aAAAC,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
|
|
5
|
+
declare interface AxesClassNameObject {
|
|
6
|
+
gridLines?: string;
|
|
7
|
+
labels?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
axis?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare interface AxesStyleObject {
|
|
13
|
+
gridLines?: React.CSSProperties;
|
|
14
|
+
labels?: React.CSSProperties;
|
|
15
|
+
title?: React.CSSProperties;
|
|
16
|
+
axis?: React.CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare interface ChoroplethMapDataType {
|
|
20
|
+
x?: number | string | null;
|
|
21
|
+
id: string;
|
|
22
|
+
date?: string | number;
|
|
23
|
+
data?: object;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare interface ClassNameObject {
|
|
27
|
+
title?: string;
|
|
28
|
+
footnote?: string;
|
|
29
|
+
source?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
tooltip?: string;
|
|
32
|
+
xAxis?: AxesClassNameObject;
|
|
33
|
+
yAxis?: AxesClassNameObject;
|
|
34
|
+
legend?: string;
|
|
35
|
+
graphContainer?: string;
|
|
36
|
+
graphObjectValues?: string;
|
|
37
|
+
dataConnectors?: string;
|
|
38
|
+
mouseOverLine?: string;
|
|
39
|
+
regLine?: string;
|
|
40
|
+
dataCards?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
|
|
44
|
+
|
|
45
|
+
declare interface Props {
|
|
46
|
+
/** Array of data objects */
|
|
47
|
+
data: ChoroplethMapDataType[];
|
|
48
|
+
/** Title of the graph */
|
|
49
|
+
graphTitle?: string | default_2.ReactNode;
|
|
50
|
+
/** Description of the graph */
|
|
51
|
+
graphDescription?: string | default_2.ReactNode;
|
|
52
|
+
/** Footnote for the graph */
|
|
53
|
+
footNote?: string | default_2.ReactNode;
|
|
54
|
+
/** Source data for the graph */
|
|
55
|
+
sources?: SourcesDataType[];
|
|
56
|
+
/** Accessibility label */
|
|
57
|
+
ariaLabel?: string;
|
|
58
|
+
/** Colors for the choropleth map */
|
|
59
|
+
colors?: string[];
|
|
60
|
+
/** Domain of colors for the graph */
|
|
61
|
+
colorDomain?: number[] | string[];
|
|
62
|
+
/** Title for the color legend */
|
|
63
|
+
colorLegendTitle?: string;
|
|
64
|
+
/** Color for the areas where data is no available */
|
|
65
|
+
mapNoDataColor?: string;
|
|
66
|
+
/** Background color of the graph */
|
|
67
|
+
backgroundColor?: string | boolean;
|
|
68
|
+
/** Custom styles for the graph. Each object should be a valid React CSS style object. */
|
|
69
|
+
styles?: StyleObject;
|
|
70
|
+
/** Custom class names */
|
|
71
|
+
classNames?: ClassNameObject;
|
|
72
|
+
/** Width of the graph */
|
|
73
|
+
width?: number;
|
|
74
|
+
/** Height of the graph */
|
|
75
|
+
height?: number;
|
|
76
|
+
/** Minimum height of the graph */
|
|
77
|
+
minHeight?: number;
|
|
78
|
+
/** Relative height scaling factor. This overwrites the height props */
|
|
79
|
+
relativeHeight?: number;
|
|
80
|
+
/** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
|
|
81
|
+
padding?: string;
|
|
82
|
+
/** Map data as an object in geoJson format or a url for geoJson */
|
|
83
|
+
mapData?: any;
|
|
84
|
+
/** Stroke color of the regions in the map */
|
|
85
|
+
mapBorderColor?: string;
|
|
86
|
+
/** Center point of the map */
|
|
87
|
+
centerPoint?: [number, number];
|
|
88
|
+
/** Defines if the globe rotates automatically */
|
|
89
|
+
autoRotate?: number | boolean;
|
|
90
|
+
/** Defines the material property applied to the sphere of the globe */
|
|
91
|
+
globeMaterial?: THREE.MeshPhongMaterialProperties;
|
|
92
|
+
/** Defines the colo of the glow around the globe */
|
|
93
|
+
atmosphereColor?: string;
|
|
94
|
+
/** Defines if the globe can be zoomed when scrolled */
|
|
95
|
+
enableZoom?: boolean;
|
|
96
|
+
/** Position offset of the globe relative to the canvas center */
|
|
97
|
+
globeOffset?: [number, number];
|
|
98
|
+
/** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */
|
|
99
|
+
scale?: number;
|
|
100
|
+
/** Defines the spacing between the country shape polygon with the sphere */
|
|
101
|
+
polygonAltitude?: number;
|
|
102
|
+
/** Scale for the colors */
|
|
103
|
+
scaleType?: Exclude<ScaleDataType, 'linear'>;
|
|
104
|
+
/** Toggles if the color scaling is categorical or not */
|
|
105
|
+
categorical?: boolean;
|
|
106
|
+
/** Toggle visibility of color scale. */
|
|
107
|
+
showColorScale?: boolean;
|
|
108
|
+
/** Property in the property object in mapData geoJson object is used to match to the id in the data object */
|
|
109
|
+
mapProperty?: string;
|
|
110
|
+
/** Countries or regions to be highlighted */
|
|
111
|
+
highlightedIds?: string[];
|
|
112
|
+
/** Enable data download option as a csv */
|
|
113
|
+
dataDownload?: boolean;
|
|
114
|
+
/** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */
|
|
115
|
+
resetSelectionOnDoubleClick?: boolean;
|
|
116
|
+
/** 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 */
|
|
117
|
+
tooltip?: string | ((_d: any) => default_2.ReactNode);
|
|
118
|
+
/** 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 */
|
|
119
|
+
detailsOnClick?: string | ((_d: any) => default_2.ReactNode);
|
|
120
|
+
/** Callback for mouse over event */
|
|
121
|
+
onSeriesMouseOver?: (_d: any) => void;
|
|
122
|
+
/** Callback for mouse click event */
|
|
123
|
+
onSeriesMouseClick?: (_d: any) => void;
|
|
124
|
+
/** Language setting */
|
|
125
|
+
language?: Languages;
|
|
126
|
+
/** Color theme */
|
|
127
|
+
theme?: 'light' | 'dark';
|
|
128
|
+
/** Unique ID for the graph */
|
|
129
|
+
graphID?: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare type ScaleDataType = 'categorical' | 'linear' | 'threshold';
|
|
133
|
+
|
|
134
|
+
declare interface SourcesDataType {
|
|
135
|
+
source: string;
|
|
136
|
+
link?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare interface StyleObject {
|
|
140
|
+
title?: React.CSSProperties;
|
|
141
|
+
footnote?: React.CSSProperties;
|
|
142
|
+
source?: React.CSSProperties;
|
|
143
|
+
description?: React.CSSProperties;
|
|
144
|
+
graphContainer?: React.CSSProperties;
|
|
145
|
+
tooltip?: React.CSSProperties;
|
|
146
|
+
xAxis?: AxesStyleObject;
|
|
147
|
+
yAxis?: AxesStyleObject;
|
|
148
|
+
graphObjectValues?: React.CSSProperties;
|
|
149
|
+
dataConnectors?: React.CSSProperties;
|
|
150
|
+
mouseOverLine?: React.CSSProperties;
|
|
151
|
+
regLine?: React.CSSProperties;
|
|
152
|
+
dataCards?: React.CSSProperties;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */
|
|
156
|
+
export declare function ThreeDGlobe(props: Props): JSX.Element;
|
|
157
|
+
|
|
158
|
+
export { }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BHm2KTjD-D8FylaKc.cjs"),c=require("react"),le=require("./Spinner-UmN-KPe9.cjs"),se=require("./Typography-CDR-DAHH.cjs"),ce=require("react-globe.gl"),ue=require("./index-BXns0-ng.cjs"),de=require("three"),pe=require("./Modal-cQF2UQIa.cjs"),ge=require("./Tooltip-BM18N_3l.cjs"),me=require("./numberFormattingFunction.js"),xe=require("./index-CEc_9zWy.cjs"),he=require("./string2HTML-X4ZYX5jI.cjs"),fe=require("./ordinal-BOeNbyae.cjs"),ye=require("./threshold-DNsSUf8Q.cjs"),je=require("./GraphHeader.js"),ve=require("./GraphFooter.js"),be=require("./fetchAndParseData.js"),N=require("./Colors.js"),Ee=require("./getUniqValue.js"),Re=require("./getJenks.js");function Ce(f){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const n in f)if(n!=="default"){const p=Object.getOwnPropertyDescriptor(f,n);Object.defineProperty(u,n,p.get?p:{enumerable:!0,get:()=>f[n]})}}return u.default=f,Object.freeze(u)}const we=Ce(de);function Se(f){const{width:u,autoRotate:n,data:p,enableZoom:M,categorical:w,colorDomain:g,colors:o,globeMaterial:i,height:H,polygonData:V,mapProperty:m,mapBorderColor:q,atmosphereColor:$,tooltip:G,styles:v,classNames:J,mapNoDataColor:x,centerPoint:A,colorLegendTitle:O,showColorScale:Z,hoverStrokeColor:B,detailsOnClick:h,onSeriesMouseClick:d,onSeriesMouseOver:S,resetSelectionOnDoubleClick:X,highlightedIds:y,scale:j,globeOffset:T,polygonAltitude:K,centerLng:F,centerLat:D}=f,a=c.useRef(void 0),[E,k]=c.useState(void 0),[Y,z]=c.useState(!(u<680)),[I,Q]=c.useState({x:0,y:0}),[b,ee]=c.useState(void 0),U=w?fe.ordinal().domain(g).range(o):ye.threshold().domain(g).range(o);c.useEffect(()=>{a?.current&&(a.current.controls().autoRotate=n!==0,a.current.controls().enableZoom=M,a.current.controls().autoRotateSpeed=n)},[n,M]),c.useEffect(()=>{a.current&&(b?a.current.controls().autoRotate=!1:a.current.controls().autoRotate=n!==0)},[b,n]),c.useEffect(()=>{const r=a.current?.renderer().domElement;if(!r)return;const t=s=>{Q({x:s.clientX,y:s.clientY})};return r.addEventListener("mousemove",t),()=>r.removeEventListener("mousemove",t)},[]),c.useEffect(()=>{a.current&&a.current.pointOfView({lat:D,lng:F,altitude:j},1e3)},[j,F,D]);const W=new we.MeshLambertMaterial({color:"#fff",opacity:1,transparent:!1,...i||{}});return e.jsxRuntimeExports.jsxs("div",{className:"relative",children:[e.jsxRuntimeExports.jsx(ce,{ref:a,width:u,height:H,globeOffset:T,lineHoverPrecision:0,polygonsData:V,polygonAltitude:r=>y.includes(r?.properties?.[m])?.1:r?.properties?.[m]===b?.id?.01:K,polygonCapColor:r=>{const t=r?.properties?.[m],s=p.find(R=>R.id===t)?.x;return s!=null?U(s):x},polygonSideColor:r=>{const t=r?.properties?.[m],s=p.find(_=>_.id===t)?.x,R=s!=null?U(s):x;return y.includes(r?.properties?.[m])?R:"rgba(100,100,100,0)"},polygonStrokeColor:r=>r?.properties?.[m]===b?.id?B:q,onPolygonClick:r=>{const t=r?.properties?.[m]?p.find(s=>s.id===r?.properties?.[m]):void 0;(d||h)&&(ue.isEqual(E,t)&&X&&t?(k(void 0),d?.(void 0)):(k(t),d?.(t))),k(t),d?.(t)},onPolygonHover:r=>{const t=r?.properties?.[m]?p.find(s=>s.id===r?.properties?.[m]):void 0;ee(t),S?.(t)},atmosphereColor:$,globeMaterial:W,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{a.current&&a.current.pointOfView({lat:A[0],lng:A[1]})}}),Z===!1?null:e.jsxRuntimeExports.jsx("div",{className:"absolute left-4 bottom-4",children:Y?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{z(!1)},children:e.jsxRuntimeExports.jsx(xe.X,{})}),e.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)",width:w?void 0:"340px"},children:[O&&O!==""?e.jsxRuntimeExports.jsx(se.TypographyExports.P,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:O}):null,w?e.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:g.map((r,t)=>e.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:o[t%o.length]}}),e.jsxRuntimeExports.jsx(se.TypographyExports.P,{size:"sm",marginBottom:"none",leading:"none",children:r})]},t))}):e.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:e.jsxRuntimeExports.jsxs("g",{children:[g.map((r,t)=>e.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[e.jsxRuntimeExports.jsx("rect",{x:t*320/o.length+1,y:1,width:320/o.length-2,height:8,style:{fill:o[t],stroke:o[t]}}),e.jsxRuntimeExports.jsx("text",{x:(t+1)*320/o.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:me.numberFormattingFunction(r,"NA")})]},t)),e.jsxRuntimeExports.jsx("g",{children:e.jsxRuntimeExports.jsx("rect",{x:g.length*320/o.length+1,y:1,width:320/o.length-2,height:8,style:{fill:o[g.length],stroke:o[g.length]}})})]})})]})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{z(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),b&&G?e.jsxRuntimeExports.jsx(ge.Tooltip,{data:b,body:G,xPos:I.x,yPos:I.y,backgroundStyle:v?.tooltip,className:J?.tooltip}):null,h&&E!==void 0?e.jsxRuntimeExports.jsx(pe.ModalExports.Modal,{open:E!==void 0,onClose:()=>{k(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof h=="string"?{__html:he.string2HTML(h,E)}:void 0,children:typeof h=="function"?h(E):null})}):null]})}function De(f){const{data:u,mapData:n="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json",graphTitle:p,colors:M,sources:w,graphDescription:g,height:o,width:i,footNote:H="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.",colorDomain:V,colorLegendTitle:m,scaleType:q="threshold",padding:$,mapNoDataColor:G=N.Colors.light.graphNoData,backgroundColor:v=!1,mapBorderColor:J=N.Colors.light.grays["gray-500"],relativeHeight:x,tooltip:A,graphID:O,mapProperty:Z="ISO3",dataDownload:B=!1,language:h="en",minHeight:d=0,theme:S="light",ariaLabel:X,styles:y,classNames:j,autoRotate:T=!0,enableZoom:K=!0,globeMaterial:F,centerPoint:D=[0,0],atmosphereColor:a="#999",showColorScale:E=!0,resetSelectionOnDoubleClick:k=!0,detailsOnClick:Y,onSeriesMouseOver:z,onSeriesMouseClick:I,highlightedIds:Q=[],scale:b=1,globeOffset:ee=[0,0],polygonAltitude:U=.01}=f,[W,r]=c.useState(void 0),[t,s]=c.useState(0),[R,_]=c.useState(0),P=c.useRef(null);c.useEffect(()=>{const l=new ResizeObserver(L=>{s(i||L[0].target.clientWidth||760),_(o||L[0].target.clientHeight||480)});return P.current&&(_(P.current.clientHeight||480),s(P.current.clientWidth||760),i||l.observe(P.current)),()=>l.disconnect()},[i,o]),c.useEffect(()=>{typeof n=="string"?be.fetchAndParseJSON(n).then(L=>{if(n==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const ie=L.features.map(C=>{if(C.geometry.type==="Polygon"){const re=[...C.geometry.coordinates[0]].reverse(),oe={...C.geometry,coordinates:[re]};return{...C,geometry:oe}}const ne=[];C.geometry.coordinates.forEach(re=>{const oe=[...re[0]].reverse();ne.push([oe])});const ae={...C.geometry,coordinates:ne};return{...C,geometry:ae}});r(ie)}else r(L.features)}):r(n.features)},[n]);const te=V||(q==="categorical"?Ee.getUniqValue(u,"x"):Re.getJenks(u.map(l=>l.x),M?.length||4));return e.jsxRuntimeExports.jsx("div",{className:`${S||"light"} flex ${i?"w-fit grow-0":"w-full grow"}`,dir:h==="he"||h==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:se.cnExports.cn(`${v?v===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${h||"en"}`,j?.graphContainer),style:{...y?.graphContainer||{},...v&&v!==!0?{backgroundColor:v}:{}},id:O,"aria-label":X||`${p?`The graph shows ${p}. `:""}This is a map.${g?` ${g}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:v?$||"1rem":$||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||g||B?e.jsxRuntimeExports.jsx(je.GraphHeader,{styles:{title:y?.title,description:y?.description},classNames:{title:j?.title,description:j?.description},graphTitle:p,graphDescription:g,width:i,graphDownload:void 0,dataDownload:B?u.map(l=>l.data).filter(l=>l!==void 0).length>0?u.map(l=>l.data).filter(l=>l!==void 0):u.filter(l=>l!==void 0):null}):null,e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:P,"aria-label":"Map area",children:(i||t)&&(o||R)&&W?e.jsxRuntimeExports.jsx(Se,{data:u,globeOffset:ee,polygonData:W,colorDomain:te,width:i||t,height:Math.max(d,o||(x?d?(i||t)*x>d?(i||t)*x:d:(i||t)*x:R)),colors:M||(q==="categorical"?N.Colors[S].sequentialColors[`neutralColorsx0${te.length}`]:N.Colors[S].sequentialColors[`neutralColorsx0${te.length+1}`]),mapNoDataColor:G,categorical:q==="categorical",mapBorderColor:J,tooltip:A,mapProperty:Z,styles:y,classNames:j,autoRotate:T===!0?1.5:T===!1?0:T,enableZoom:K,globeMaterial:F,atmosphereColor:a,centerPoint:D,colorLegendTitle:m,showColorScale:E,hoverStrokeColor:S==="light"?N.Colors.light.grays["gray-700"]:N.Colors.light.grays["gray-300"],highlightedIds:Q,resetSelectionOnDoubleClick:k,detailsOnClick:Y,onSeriesMouseOver:z,onSeriesMouseClick:I,scale:b,polygonAltitude:U,centerLat:D[0],centerLng:D[1]}):e.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(d,o||(x?d?(i||t)*x>d?(i||t)*x:d:(i||t)*x:R))}px`},className:"flex items-center justify-center",children:e.jsxRuntimeExports.jsx(le.SpinnerExports.Spinner,{"aria-label":"Loading graph"})})}),w||H?e.jsxRuntimeExports.jsx(ve.GraphFooter,{styles:{footnote:y?.footnote,source:y?.source},classNames:{footnote:j?.footnote,source:j?.source},sources:w,footNote:H,width:i}):null]})})})})}exports.ThreeDGlobe=De;
|
|
2
|
+
//# sourceMappingURL=ThreeDGlobe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreeDGlobe.js","sources":["../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport {P} from '@undp/design-system-react/Typography';\r\n\r\nimport { ChoroplethMapDataType, ClassNameObject, StyleObject } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: number[] | string[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.MeshPhongMaterialProperties;\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n centerPoint: [number, number];\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n}\r\n\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n centerPoint,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n } = props;\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [showLegend, setShowLegend] = useState(!(width < 680));\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n if (globeEl?.current) {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }, [autoRotate, enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n }\r\n }\r\n }, [mouseOverData, autoRotate]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials = new THREE.MeshLambertMaterial({\r\n color: '#fff',\r\n opacity: 1,\r\n transparent: false,\r\n ...(globeMaterial || {}),\r\n });\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n width={width}\r\n height={height}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 0.1\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? 0.01\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n if (val !== undefined && val !== null) {\r\n return colorScale(val as any);\r\n }\r\n return mapNoDataColor;\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? color\r\n : 'rgba(100,100,100,0)';\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerPoint[0],\r\n lng: centerPoint[1],\r\n });\r\n }\r\n }}\r\n />\r\n {showColorScale === false ? null : (\r\n <div className='absolute left-4 bottom-4'>\r\n {showLegend ? (\r\n <>\r\n <div\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n border: '1px solid var(--gray-400)',\r\n borderRadius: '999px',\r\n width: '24px',\r\n height: '24px',\r\n padding: '3px',\r\n cursor: 'pointer',\r\n zIndex: 10,\r\n position: 'absolute',\r\n right: '-0.75rem',\r\n top: '-0.75rem',\r\n }}\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='p-2'\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g key={i} className='cursor-pointer'>\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[i],\r\n stroke: colors[i],\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n stroke: colors[colorDomain.length],\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div key={i} className='flex gap-2 items-center'>\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\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 </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n Languages,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\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 /** Colors for the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.MeshPhongMaterialProperties;\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggles if the color scaling is categorical or not */\r\n categorical?: boolean;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds = [],\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 760);\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 || 760);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n setMapShape(features);\r\n } else setMapShape(d.features);\r\n });\r\n } else {\r\n setMapShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\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 aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a map.${graphDescription ? ` ${graphDescription}` : ''}`\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 || 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={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\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\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 colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n centerPoint={centerPoint}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light'\r\n ? Colors.light.grays['gray-700']\r\n : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n />\r\n ) : (\r\n <div\r\n style={{\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 )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\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":["Graph","props","width","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","height","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","centerPoint","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","globeEl","useRef","mouseClickData","setMouseClickData","useState","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","scaleThreshold","useEffect","canvas","handleMouseMove","e","materials","THREE","jsxs","jsx","Globe","polygon","id","val","el","color","clickedData","isEqual","hoverData","Fragment","X","P","d","i","numberFormattingFunction","Tooltip","Modal","string2HTML","ThreeDGlobe","mapData","graphTitle","sources","graphDescription","footNote","scaleType","padding","Colors","backgroundColor","relativeHeight","graphID","dataDownload","language","minHeight","theme","ariaLabel","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","resizeObserver","entries","fetchAndParseJSON","features","reversed","geometry","coord","c","domain","getUniqValue","getJenks","cn","GraphHeader","Spinner","GraphFooter"],"mappings":"uhCAiDA,SAASA,GAAMC,EAAc,CAC3B,KAAM,CACJ,MAAAC,EACA,WAAAC,EACA,KAAAC,EACA,WAAAC,EACA,YAAAC,EACA,YAAAC,EACA,OAAAC,EACA,cAAAC,EACA,OAAAC,EACA,YAAAC,EACA,YAAAC,EACA,eAAAC,EACA,gBAAAC,EACA,QAAAC,EACA,OAAAC,EACA,WAAAC,EACA,eAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,mBAAAC,EACA,kBAAAC,EACA,4BAAAC,EACA,eAAAC,EACA,MAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,UAAAC,EACA,UAAAC,CAAA,EACE/B,EACEgC,EAAUC,EAAAA,OAAiC,MAAS,EACpD,CAACC,EAAgBC,CAAiB,EAAIC,EAAAA,SAAc,MAAS,EAC7D,CAACC,EAAYC,CAAa,EAAIF,EAAAA,SAAS,EAAEnC,EAAQ,IAAI,EACrD,CAACsC,EAAUC,CAAW,EAAIJ,EAAAA,SAAS,CAAE,EAAG,EAAG,EAAG,EAAG,EACjD,CAACK,EAAeC,EAAgB,EAAIN,EAAAA,SAA4C,MAAS,EACzFO,EAAatC,EACfuC,GAAAA,QAAA,EAAwC,OAAOtC,CAAW,EAAE,MAAMC,CAAM,EACxEsC,GAAAA,YACG,OAAOvC,CAAuB,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E,IAAU,QACNP,EAAAA,OAAO,MAAM,MAAM,UAAU,EAC7BA,EAAAA,OAAO,MAAM,MAAM,UAAU,EAEnC,eAAAtD,EACA,4BAAAD,EACA,eAAAH,EACA,kBAAAE,EACA,mBAAAD,EACA,MAAAI,EACA,gBAAAE,EACA,UAAWX,EAAY,CAAC,EACxB,UAAWA,EAAY,CAAC,CAAA,CAAA,EAG1BmC,EAAAA,kBAAAA,IAAC,MAAA,CACC,MAAO,CACL,OAAQ,GAAG,KAAK,IACdiC,EACA7E,IACGyE,EACGI,GACGrF,GAAS0F,GAAYT,EAAiBI,GACpCrF,GAAS0F,GAAYT,EACtBI,GACDrF,GAAS0F,GAAYT,EACxBW,EAAA,CACP,IAAA,EAEH,UAAU,mCAEV,SAAAxC,EAAAA,kBAAAA,IAACwD,GAAAA,eAAAA,QAAA,CAAQ,aAAW,eAAA,CAAgB,CAAA,CAAA,CACtC,CAAA,EAGHlC,GAAWE,EACVxB,EAAAA,kBAAAA,IAACyD,GAAAA,YAAA,CACC,OAAQ,CAAE,SAAU/F,GAAQ,SAAU,OAAQA,GAAQ,MAAA,EACtD,WAAY,CACV,SAAUC,GAAY,SACtB,OAAQA,GAAY,MAAA,EAEtB,QAAA2D,EACA,SAAAE,EACA,MAAA5E,CAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAGN"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare interface Props {
|
|
4
|
+
colors: string[];
|
|
5
|
+
colorDomain: number[];
|
|
6
|
+
colorLegendTitle?: string;
|
|
7
|
+
setSelectedColor: (_d?: string) => void;
|
|
8
|
+
width?: number;
|
|
9
|
+
naColor?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
showNAColor: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare function ThresholdColorLegendWithMouseOver(props: Props): JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-BHm2KTjD-D8FylaKc.cjs"),y=require("react"),c=require("./Typography-CDR-DAHH.cjs"),p=require("./numberFormattingFunction.js");function j(h){const{colorLegendTitle:x,colorDomain:s,colors:e,setSelectedColor:l,width:m,naColor:o,className:d,showNAColor:g}=h,[n,i]=y.useState(void 0),a=o?320:360;return r.jsxRuntimeExports.jsxs("div",{className:c.cnExports.cn("flex flex-wrap gap-0 justify-center leading-0",d),style:{maxWidth:m?`${m}px`:"none"},"aria-label":"Color legend",children:[x&&x!==""?r.jsxRuntimeExports.jsx(c.TypographyExports.P,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:x}):null,r.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 360 30",style:{maxWidth:"360px"},direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{children:[s.map((u,t)=>r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{i(e[t]),l(e[t])},onMouseLeave:()=>{i(void 0),l(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:t*a/e.length+1,y:1,width:a/e.length-2,height:8,className:`stroke-1 ${n===e[t]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:e[t],...n!==e[t]?{stroke:e[t]}:{}}}),r.jsxRuntimeExports.jsx("text",{x:(t+1)*a/e.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"middle"},children:p.numberFormattingFunction(u,"NA",2,"","")})]},t)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{i(e[s.length]),l(e[s.length])},onMouseLeave:()=>{i(void 0),l(void 0)},x:s.length*a/e.length+1,y:1,width:a/e.length-2,height:8,className:`cursor-pointer stroke-1 ${n===e[s.length]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:e[s.length],...n!==e[s.length]?{stroke:e[s.length]}:{}}})}),g?r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{i(o||"#D4D6D8"),l(o||"#D4D6D8")},onMouseLeave:()=>{i(void 0),l(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:335,y:1,width:24,height:8,className:`stroke-1 ${n===o?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:o||"#D4D6D8",...n!==o?{stroke:o}:{},strokeWidth:1}}),r.jsxRuntimeExports.jsx("text",{x:337.5,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},children:"NA"})]}):null]})})]})}exports.ThresholdColorLegendWithMouseOver=j;
|
|
2
|
+
//# sourceMappingURL=ThresholdColorLegendWithMouseOver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThresholdColorLegendWithMouseOver.js","sources":["../src/Components/Elements/ThresholdColorLegendWithMouseOver.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\n\r\ninterface Props {\r\n colors: string[];\r\n colorDomain: number[];\r\n colorLegendTitle?: string;\r\n setSelectedColor: (_d?: string) => void;\r\n width?: number;\r\n naColor?: string;\r\n className?: string;\r\n showNAColor: boolean;\r\n}\r\n\r\nexport function ThresholdColorLegendWithMouseOver(props: Props) {\r\n const {\r\n colorLegendTitle,\r\n colorDomain,\r\n colors,\r\n setSelectedColor,\r\n width,\r\n naColor,\r\n className,\r\n showNAColor,\r\n } = props;\r\n\r\n const [hoveredColor, setHoveredColor] = useState<string | undefined>(undefined);\r\n const mainColorWidth = naColor ? 320 : 360;\r\n return (\r\n <div\r\n className={cn('flex flex-wrap gap-0 justify-center leading-0', className)}\r\n style={{ maxWidth: width ? `${width}px` : 'none' }}\r\n aria-label='Color legend'\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P size='sm' marginBottom='2xs' className='w-full text-center'>\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n <svg width='100%' viewBox='0 0 360 30' style={{ maxWidth: '360px' }} direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setHoveredColor(colors[i]);\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setHoveredColor(undefined);\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * mainColorWidth) / colors.length + 1}\r\n y={1}\r\n width={mainColorWidth / colors.length - 2}\r\n height={8}\r\n className={`stroke-1 ${\r\n hoveredColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[i],\r\n ...(hoveredColor !== colors[i] ? { stroke: colors[i] } : {}),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * mainColorWidth) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-sm'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA', 2, '', '')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setHoveredColor(colors[colorDomain.length]);\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setHoveredColor(undefined);\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * mainColorWidth) / colors.length + 1}\r\n y={1}\r\n width={mainColorWidth / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer stroke-1 ${\r\n hoveredColor === colors[colorDomain.length]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(hoveredColor !== colors[colorDomain.length]\r\n ? { stroke: colors[colorDomain.length] }\r\n : {}),\r\n }}\r\n />\r\n </g>\r\n {showNAColor ? (\r\n <g\r\n onMouseOver={() => {\r\n setHoveredColor(naColor || '#D4D6D8');\r\n setSelectedColor(naColor || '#D4D6D8');\r\n }}\r\n onMouseLeave={() => {\r\n setHoveredColor(undefined);\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={335}\r\n y={1}\r\n width={24}\r\n height={8}\r\n className={`stroke-1 ${\r\n hoveredColor === naColor\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: naColor || '#D4D6D8',\r\n ...(hoveredColor !== naColor ? { stroke: naColor } : {}),\r\n strokeWidth: 1,\r\n }}\r\n />\r\n <text\r\n x={337.5}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-sm'\r\n style={{ textAnchor: 'start' }}\r\n >\r\n NA\r\n </text>\r\n </g>\r\n ) : null}\r\n </g>\r\n </svg>\r\n </div>\r\n );\r\n}\r\n"],"names":["ThresholdColorLegendWithMouseOver","props","colorLegendTitle","colorDomain","colors","setSelectedColor","width","naColor","className","showNAColor","hoveredColor","setHoveredColor","useState","mainColorWidth","jsxs","cn","jsx","P","d","i","numberFormattingFunction"],"mappings":"sOAiBO,SAASA,EAAkCC,EAAc,CAC9D,KAAM,CACJ,iBAAAC,EACA,YAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,MAAAC,EACA,QAAAC,EACA,UAAAC,EACA,YAAAC,CAAA,EACER,EAEE,CAACS,EAAcC,CAAe,EAAIC,EAAAA,SAA6B,MAAS,EACxEC,EAAiBN,EAAU,IAAM,IACvC,OACEO,EAAAA,kBAAAA,KAAC,MAAA,CACC,UAAWC,EAAAA,UAAAA,GAAG,gDAAiDP,CAAS,EACxE,MAAO,CAAE,SAAUF,E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AAY,MAAM,CAAC,EAC1CE,EAAiBD,EAAOD,EAAY,MAAM,CAAC,CAC7C,EACA,aAAc,IAAM,CAClBQ,EAAgB,MAAS,EACzBN,EAAiB,MAAS,CAC5B,EACA,EAAIF,EAAY,OAASU,EAAkBT,EAAO,OAAS,EAC3D,EAAG,EACH,MAAOS,EAAiBT,EAAO,OAAS,EACxC,OAAQ,EACR,UAAW,2BACTM,IAAiBN,EAAOD,EAAY,MAAM,EACtC,uDACA,EACN,GACA,MAAO,CACL,KAAMC,EAAOD,EAAY,MAAM,EAC/B,GAAIO,IAAiBN,EAAOD,EAAY,MAAM,EAC1C,CAAE,OAAQC,EAAOD,EAAY,MAAM,GACnC,CAAA,CAAC,CACP,CAAA,EAEJ,EACCM,EACCK,EAAAA,kBAAAA,KAAC,IAAA,CACC,YAAa,IAAM,CACjBH,EAAgBJ,GAAW,SAAS,EACpCF,EAAiBE,GAAW,SAAS,CACvC,EACA,aAAc,IAAM,CAClBI,EAAgB,MAAS,EACzBN,EAAiB,MAAS,CAC5B,EACA,UAAU,iBAEV,SAAA,CAAAW,EAAAA,kBAAAA,IAAC,OAAA,CACC,EAAG,IACH,EAAG,EACH,MAAO,GACP,OAAQ,EACR,UAAW,YACTN,IAAiBH,EACb,uDACA,EACN,GACA,MAAO,CACL,KAAMA,GAAW,UACjB,GAAIG,IAAiBH,EAAU,CAAE,OAAQA,CAAA,EAAY,CAAA,EACrD,YAAa,CAAA,CACf,CAAA,EAEFS,EAAAA,kBAAAA,IAAC,OAAA,CACC,EAAG,MACH,EAAG,GACH,UAAU,2DACV,MAAO,CAAE,WAAY,OAAA,EACtB,SAAA,IAAA,CAAA,CAED,CAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CACF,CAAA,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const i=require("./index-BHm2KTjD-D8FylaKc.cjs"),d=require("./Typography-CDR-DAHH.cjs"),p=require("react-dom"),c=require("./string2HTML-X4ZYX5jI.cjs");function l(o){const{body:r,xPos:e,yPos:t,data:n,backgroundStyle:a={maxWidth:"24rem",wordWrap:"break-word"},className:s}=o;return p.createPortal(i.jsxRuntimeExports.jsx("div",{className:"undp-container",children:i.jsxRuntimeExports.jsx("div",{className:d.cnExports.cn("graph-tooltip block p-2 fixed z-[1000] bg-primary-gray-200 dark:bg-primary-gray-600 border border-primary-gray-300 dark:border-primary-gray-500",s),style:{...a,top:`${t<window.innerHeight/2?t-10:t+10}px`,left:`${e>window.innerWidth/2?e-10:e+10}px`,transform:`translate(${e>window.innerWidth/2?"-100%":"0%"},${t>window.innerHeight/2?"-100%":"0%"})`},children:i.jsxRuntimeExports.jsx("div",{className:"text-sm leading-normal text-primary-black dark:text-primary-gray-100 m-0",dangerouslySetInnerHTML:typeof r=="string"?{__html:c.string2HTML(r,n)}:void 0,children:typeof r=="function"?r(n):null})})}),document.body)}exports.Tooltip=l;
|
|
2
|
+
//# sourceMappingURL=Tooltip-BM18N_3l.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip-BM18N_3l.cjs","sources":["../src/Components/Elements/Tooltip.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { createPortal } from 'react-dom';\r\n\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n body: string | ((_d: any) => React.ReactNode);\r\n xPos: number;\r\n yPos: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any;\r\n backgroundStyle?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Tooltip(props: Props) {\r\n const {\r\n body,\r\n xPos,\r\n yPos,\r\n data,\r\n backgroundStyle = {\r\n maxWidth: '24rem',\r\n wordWrap: 'break-word',\r\n },\r\n className,\r\n } = props;\r\n return createPortal(\r\n <div className='undp-container'>\r\n <div\r\n className={cn(\r\n 'graph-tooltip block p-2 fixed z-[1000] bg-primary-gray-200 dark:bg-primary-gray-600 border border-primary-gray-300 dark:border-primary-gray-500',\r\n className,\r\n )}\r\n style={{\r\n ...backgroundStyle,\r\n top: `${yPos < window.innerHeight / 2 ? yPos - 10 : yPos + 10}px`,\r\n left: `${xPos > window.innerWidth / 2 ? xPos - 10 : xPos + 10}px`,\r\n transform: `translate(${\r\n xPos > window.innerWidth / 2 ? '-100%' : '0%'\r\n },${yPos > window.innerHeight / 2 ? '-100%' : '0%'})`,\r\n }}\r\n >\r\n <div\r\n className='text-sm leading-normal text-primary-black dark:text-primary-gray-100 m-0'\r\n dangerouslySetInnerHTML={\r\n typeof body === 'string' ? { __html: string2HTML(body, data) } : undefined\r\n }\r\n >\r\n {typeof body === 'function' ? body(data) : null}\r\n </div>\r\n </div>\r\n </div>,\r\n document.body,\r\n );\r\n}\r\n"],"names":["Tooltip","props","body","xPos","yPos","data","backgroundStyle","className","createPortal","jsx","cn","string2HTML"],"mappings":"oKAgBO,SAASA,EAAQC,EAAc,CACpC,KAAM,CACJ,KAAAC,EACA,KAAAC,EACA,KAAAC,EACA,KAAAC,EACA,gBAAAC,EAAkB,CAChB,SAAU,QACV,SAAU,YAAA,EAEZ,UAAAC,CAAA,EACEN,EACJ,OAAOO,EAAAA,aACLC,EAAAA,kBAAAA,IAAC,MAAA,CAAI,UAAU,iBACb,SAAAA,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,UAAAA,GACT,kJACAH,CAAA,EAEF,MAAO,CACL,GAAGD,EACH,IAAK,GAAGF,EAAO,OAAO,YAAc,EAAIA,EAAO,GAAKA,EAAO,EAAE,KAC7D,KAAM,GAAGD,EAAO,OAAO,WAAa,EAAIA,EAAO,GAAKA,EAAO,EAAE,KAC7D,UAAW,aACTA,EAAO,OAAO,WAAa,EAAI,QAAU,IAC3C,IAAIC,EAAO,OAAO,YAAc,EAAI,QAAU,IAAI,GAAA,EAGpD,SAAAK,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAU,2EACV,wBACE,OAAOP,GAAS,SAAW,CAAE,OAAQS,EAAAA,YAAYT,EAAMG,CAAI,CAAA,EAAM,OAGlE,SAAA,OAAOH,GAAS,WAAaA,EAAKG,CAAI,EAAI,IAAA,CAAA,CAC7C,CAAA,EAEJ,EACA,SAAS,IAAA,CAEb"}
|