@undp/data-viz 2.5.3 → 2.6.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.
Files changed (444) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +17 -16
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/Axis-DY7jsk1Y.cjs +2 -0
  6. package/dist/{Axis-BTaS9oPQ.cjs.map → Axis-DY7jsk1Y.cjs.map} +1 -1
  7. package/dist/{Axis-CNZYWzH0.js → Axis-RRx-0Rlw.js} +9 -8
  8. package/dist/{Axis-CNZYWzH0.js.map → Axis-RRx-0Rlw.js.map} +1 -1
  9. package/dist/AxisTitle-B9F80_Z0.js +30 -0
  10. package/dist/AxisTitle-B9F80_Z0.js.map +1 -0
  11. package/dist/AxisTitle-CyFFbdNU.cjs +2 -0
  12. package/dist/{AxisTitle-DP_evhbe.cjs.map → AxisTitle-CyFFbdNU.cjs.map} +1 -1
  13. package/dist/BarGraph.cjs +1 -1
  14. package/dist/BarGraph.cjs.map +1 -1
  15. package/dist/BarGraph.js +203 -201
  16. package/dist/BarGraph.js.map +1 -1
  17. package/dist/BasicStatCard.cjs +1 -1
  18. package/dist/BasicStatCard.cjs.map +1 -1
  19. package/dist/BasicStatCard.js +15 -14
  20. package/dist/BasicStatCard.js.map +1 -1
  21. package/dist/BeeSwarmChart.cjs +1 -1
  22. package/dist/BeeSwarmChart.cjs.map +1 -1
  23. package/dist/BeeSwarmChart.js +60 -59
  24. package/dist/BeeSwarmChart.js.map +1 -1
  25. package/dist/BiVariateChoroplethMap.cjs +1 -1
  26. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  27. package/dist/BiVariateChoroplethMap.js +88 -86
  28. package/dist/BiVariateChoroplethMap.js.map +1 -1
  29. package/dist/BulletChart.cjs +1 -1
  30. package/dist/BulletChart.cjs.map +1 -1
  31. package/dist/BulletChart.js +88 -86
  32. package/dist/BulletChart.js.map +1 -1
  33. package/dist/ButterflyChart.cjs +1 -1
  34. package/dist/ButterflyChart.cjs.map +1 -1
  35. package/dist/ButterflyChart.js +100 -98
  36. package/dist/ButterflyChart.js.map +1 -1
  37. package/dist/ChoroplethMap.cjs +1 -1
  38. package/dist/ChoroplethMap.cjs.map +1 -1
  39. package/dist/ChoroplethMap.js +266 -243
  40. package/dist/ChoroplethMap.js.map +1 -1
  41. package/dist/CirclePackingGraph.cjs +1 -1
  42. package/dist/CirclePackingGraph.js +4 -4
  43. package/dist/ColorLegend.cjs +1 -1
  44. package/dist/ColorLegend.cjs.map +1 -1
  45. package/dist/ColorLegend.js +17 -16
  46. package/dist/ColorLegend.js.map +1 -1
  47. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  48. package/dist/ColorLegendWithMouseOver.cjs.map +1 -1
  49. package/dist/ColorLegendWithMouseOver.js +13 -12
  50. package/dist/ColorLegendWithMouseOver.js.map +1 -1
  51. package/dist/Colors.cjs +1 -1
  52. package/dist/Colors.cjs.map +1 -1
  53. package/dist/Colors.d.ts +16 -0
  54. package/dist/Colors.js +16 -0
  55. package/dist/Colors.js.map +1 -1
  56. package/dist/CopyTextButton.cjs +1 -1
  57. package/dist/CopyTextButton.cjs.map +1 -1
  58. package/dist/CopyTextButton.js +37 -754
  59. package/dist/CopyTextButton.js.map +1 -1
  60. package/dist/CsvDownloadButton.cjs +4 -4
  61. package/dist/CsvDownloadButton.cjs.map +1 -1
  62. package/dist/CsvDownloadButton.js +47 -45
  63. package/dist/CsvDownloadButton.js.map +1 -1
  64. package/dist/DataCards.cjs +1 -1
  65. package/dist/DataCards.cjs.map +1 -1
  66. package/dist/DataCards.js +213 -467
  67. package/dist/DataCards.js.map +1 -1
  68. package/dist/DataTable.cjs +1 -1
  69. package/dist/DataTable.cjs.map +1 -1
  70. package/dist/DataTable.js +19 -19
  71. package/dist/DetailsModal-BmjtLqrZ.cjs +2 -0
  72. package/dist/{DetailsModal-Du8Fr1QD.cjs.map → DetailsModal-BmjtLqrZ.cjs.map} +1 -1
  73. package/dist/{DetailsModal-GqEbGHY2.js → DetailsModal-k-Me_U_T.js} +3 -3
  74. package/dist/{DetailsModal-GqEbGHY2.js.map → DetailsModal-k-Me_U_T.js.map} +1 -1
  75. package/dist/DifferenceLineChart.cjs +1 -1
  76. package/dist/DifferenceLineChart.cjs.map +1 -1
  77. package/dist/DifferenceLineChart.js +61 -60
  78. package/dist/DifferenceLineChart.js.map +1 -1
  79. package/dist/DonutChart.cjs +1 -1
  80. package/dist/DonutChart.cjs.map +1 -1
  81. package/dist/DonutChart.js +47 -46
  82. package/dist/DonutChart.js.map +1 -1
  83. package/dist/DotDensityMap.cjs +1 -1
  84. package/dist/DotDensityMap.cjs.map +1 -1
  85. package/dist/DotDensityMap.js +112 -110
  86. package/dist/DotDensityMap.js.map +1 -1
  87. package/dist/DualAxisLineChart.cjs +1 -1
  88. package/dist/DualAxisLineChart.cjs.map +1 -1
  89. package/dist/DualAxisLineChart.js +13 -12
  90. package/dist/DualAxisLineChart.js.map +1 -1
  91. package/dist/DumbbellChart.cjs +1 -1
  92. package/dist/DumbbellChart.cjs.map +1 -1
  93. package/dist/DumbbellChart.js +104 -102
  94. package/dist/DumbbellChart.js.map +1 -1
  95. package/dist/EmptyState-BoaUUuo6.cjs +2 -0
  96. package/dist/{EmptyState-CFmiFPHz.cjs.map → EmptyState-BoaUUuo6.cjs.map} +1 -1
  97. package/dist/{EmptyState-CaxXCkiN.js → EmptyState-prZ8OnEs.js} +4 -4
  98. package/dist/{EmptyState-CaxXCkiN.js.map → EmptyState-prZ8OnEs.js.map} +1 -1
  99. package/dist/ExcelDownloadButton.cjs +1 -1
  100. package/dist/ExcelDownloadButton.cjs.map +1 -1
  101. package/dist/ExcelDownloadButton.js +15 -13
  102. package/dist/ExcelDownloadButton.js.map +1 -1
  103. package/dist/FootNote.cjs +1 -1
  104. package/dist/FootNote.cjs.map +1 -1
  105. package/dist/FootNote.js +10 -9
  106. package/dist/FootNote.js.map +1 -1
  107. package/dist/GeoHubCompareMaps.cjs +1 -1
  108. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  109. package/dist/GeoHubCompareMaps.js +14 -14
  110. package/dist/GeoHubMap.cjs +1 -1
  111. package/dist/GeoHubMap.cjs.map +1 -1
  112. package/dist/GeoHubMap.js +59 -59
  113. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  114. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
  115. package/dist/GeoHubMapWithLayerSelection.js +50 -50
  116. package/dist/{GraphContainer-B8ZqOzKI.js → GraphContainer-DcOM2CI6.js} +28 -27
  117. package/dist/GraphContainer-DcOM2CI6.js.map +1 -0
  118. package/dist/GraphContainer-gaG9TSy4.cjs +2 -0
  119. package/dist/{GraphContainer-Cul9b74X.cjs.map → GraphContainer-gaG9TSy4.cjs.map} +1 -1
  120. package/dist/GraphDescription.cjs +1 -1
  121. package/dist/GraphDescription.cjs.map +1 -1
  122. package/dist/GraphDescription.js +14 -13
  123. package/dist/GraphDescription.js.map +1 -1
  124. package/dist/{GraphEl-Ch0uAeZw.js → GraphEl-C7KBBHvB.js} +9 -9
  125. package/dist/{GraphEl-Ch0uAeZw.js.map → GraphEl-C7KBBHvB.js.map} +1 -1
  126. package/dist/GraphEl-CGALp07K.cjs +2 -0
  127. package/dist/{GraphEl-BgkDbq50.cjs.map → GraphEl-CGALp07K.cjs.map} +1 -1
  128. package/dist/GraphFooter.cjs +1 -1
  129. package/dist/GraphFooter.cjs.map +1 -1
  130. package/dist/GraphFooter.js +2 -2
  131. package/dist/GraphHeader.cjs +1 -1
  132. package/dist/GraphHeader.cjs.map +1 -1
  133. package/dist/GraphHeader.js +1 -1
  134. package/dist/GraphTitle.cjs +1 -1
  135. package/dist/GraphTitle.cjs.map +1 -1
  136. package/dist/GraphTitle.js +14 -13
  137. package/dist/GraphTitle.js.map +1 -1
  138. package/dist/GriddedGraphs.cjs +1 -1
  139. package/dist/GriddedGraphs.cjs.map +1 -1
  140. package/dist/GriddedGraphs.js +58 -55
  141. package/dist/GriddedGraphs.js.map +1 -1
  142. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  143. package/dist/GriddedGraphsFromConfig.cjs.map +1 -1
  144. package/dist/GriddedGraphsFromConfig.js +15 -15
  145. package/dist/HeatMap.cjs +1 -1
  146. package/dist/HeatMap.cjs.map +1 -1
  147. package/dist/HeatMap.js +17 -16
  148. package/dist/HeatMap.js.map +1 -1
  149. package/dist/Histogram.cjs +1 -1
  150. package/dist/Histogram.cjs.map +1 -1
  151. package/dist/Histogram.js +3 -3
  152. package/dist/HybridMap.cjs +1 -1
  153. package/dist/HybridMap.cjs.map +1 -1
  154. package/dist/HybridMap.js +409 -420
  155. package/dist/HybridMap.js.map +1 -1
  156. package/dist/ImageDownloadButton.cjs +1 -1
  157. package/dist/ImageDownloadButton.cjs.map +1 -1
  158. package/dist/ImageDownloadButton.js +16 -14
  159. package/dist/ImageDownloadButton.js.map +1 -1
  160. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  161. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  162. package/dist/LineChartWithConfidenceInterval.js +16 -15
  163. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  164. package/dist/LinearColorLegend.cjs +1 -1
  165. package/dist/LinearColorLegend.cjs.map +1 -1
  166. package/dist/LinearColorLegend.js +5 -4
  167. package/dist/LinearColorLegend.js.map +1 -1
  168. package/dist/MultiGraphDashboard.cjs +1 -1
  169. package/dist/MultiGraphDashboard.cjs.map +1 -1
  170. package/dist/MultiGraphDashboard.js +62 -60
  171. package/dist/MultiGraphDashboard.js.map +1 -1
  172. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  173. package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -1
  174. package/dist/MultiGraphDashboardFromConfig.js +7 -7
  175. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  176. package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
  177. package/dist/MultiGraphDashboardWideToLongFormat.js +21 -21
  178. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
  179. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  180. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -1
  181. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +3 -3
  182. package/dist/MultiLineAltChart.cjs +1 -1
  183. package/dist/MultiLineAltChart.cjs.map +1 -1
  184. package/dist/MultiLineAltChart.js +16 -15
  185. package/dist/MultiLineAltChart.js.map +1 -1
  186. package/dist/MultiLineChart.cjs +1 -1
  187. package/dist/MultiLineChart.cjs.map +1 -1
  188. package/dist/MultiLineChart.js +16 -15
  189. package/dist/MultiLineChart.js.map +1 -1
  190. package/dist/ParetoChart.cjs +1 -1
  191. package/dist/ParetoChart.cjs.map +1 -1
  192. package/dist/ParetoChart.js +14 -13
  193. package/dist/ParetoChart.js.map +1 -1
  194. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  195. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  196. package/dist/PerformanceIntensiveMultiGraphDashboard.js +67 -65
  197. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  198. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  199. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -1
  200. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +8 -8
  201. package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
  202. package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -1
  203. package/dist/PerformanceIntensiveScrollStory.js +3 -3
  204. package/dist/RadarChart.cjs +1 -1
  205. package/dist/RadarChart.cjs.map +1 -1
  206. package/dist/RadarChart.js +11 -10
  207. package/dist/RadarChart.js.map +1 -1
  208. package/dist/ReferenceLine-CxITVT1K.cjs +2 -0
  209. package/dist/{ReferenceLine-CpU4G01Y.cjs.map → ReferenceLine-CxITVT1K.cjs.map} +1 -1
  210. package/dist/{ReferenceLine-D41VuUhE.js → ReferenceLine-NF4g3Reh.js} +26 -25
  211. package/dist/ReferenceLine-NF4g3Reh.js.map +1 -0
  212. package/dist/RegressionLine-BQ6h-NZP.js +88 -0
  213. package/dist/RegressionLine-BQ6h-NZP.js.map +1 -0
  214. package/dist/RegressionLine-BpcVBjL0.cjs +2 -0
  215. package/dist/{RegressionLine-BFoBiVJk.cjs.map → RegressionLine-BpcVBjL0.cjs.map} +1 -1
  216. package/dist/SVGDownloadButton.cjs +1 -1
  217. package/dist/SVGDownloadButton.cjs.map +1 -1
  218. package/dist/SVGDownloadButton.js +11 -9
  219. package/dist/SVGDownloadButton.js.map +1 -1
  220. package/dist/SankeyChart.cjs +1 -1
  221. package/dist/SankeyChart.cjs.map +1 -1
  222. package/dist/SankeyChart.js +63 -62
  223. package/dist/SankeyChart.js.map +1 -1
  224. package/dist/ScatterPlot.cjs +1 -1
  225. package/dist/ScatterPlot.cjs.map +1 -1
  226. package/dist/ScatterPlot.js +109 -107
  227. package/dist/ScatterPlot.js.map +1 -1
  228. package/dist/ScrollStory.cjs +1 -1
  229. package/dist/ScrollStory.cjs.map +1 -1
  230. package/dist/ScrollStory.js +3 -3
  231. package/dist/SimpleLineChart.cjs +1 -1
  232. package/dist/SimpleLineChart.cjs.map +1 -1
  233. package/dist/SimpleLineChart.js +17 -16
  234. package/dist/SimpleLineChart.js.map +1 -1
  235. package/dist/SingleGraphDashboard.cjs +1 -1
  236. package/dist/SingleGraphDashboard.cjs.map +1 -1
  237. package/dist/SingleGraphDashboard.js +59 -56
  238. package/dist/SingleGraphDashboard.js.map +1 -1
  239. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  240. package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -1
  241. package/dist/SingleGraphDashboardFromConfig.js +6 -6
  242. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  243. package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
  244. package/dist/SingleGraphDashboardGeoHubMaps.js +12 -12
  245. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  246. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -1
  247. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +8 -8
  248. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  249. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  250. package/dist/SingleGraphDashboardThreeDGraphs.js +59 -56
  251. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  252. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  253. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -1
  254. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +7 -7
  255. package/dist/SlopeChart.cjs +1 -1
  256. package/dist/SlopeChart.cjs.map +1 -1
  257. package/dist/SlopeChart.js +60 -59
  258. package/dist/SlopeChart.js.map +1 -1
  259. package/dist/Source.cjs +1 -1
  260. package/dist/Source.cjs.map +1 -1
  261. package/dist/Source.js +38 -4
  262. package/dist/Source.js.map +1 -1
  263. package/dist/SparkLine.cjs +1 -1
  264. package/dist/SparkLine.cjs.map +1 -1
  265. package/dist/SparkLine.js +11 -10
  266. package/dist/SparkLine.js.map +1 -1
  267. package/dist/StatCardFromData.cjs +1 -1
  268. package/dist/StatCardFromData.cjs.map +1 -1
  269. package/dist/StatCardFromData.js +15 -14
  270. package/dist/StatCardFromData.js.map +1 -1
  271. package/dist/StripChart.cjs +1 -1
  272. package/dist/StripChart.cjs.map +1 -1
  273. package/dist/StripChart.js +11 -10
  274. package/dist/StripChart.js.map +1 -1
  275. package/dist/ThreeDGlobe.cjs +1 -1
  276. package/dist/ThreeDGlobe.cjs.map +1 -1
  277. package/dist/ThreeDGlobe.js +52 -51
  278. package/dist/ThreeDGlobe.js.map +1 -1
  279. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  280. package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
  281. package/dist/ThresholdColorLegendWithMouseOver.js +17 -16
  282. package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
  283. package/dist/{Tooltip-3EYDVa3w.js → Tooltip-DO56mY4b.js} +11 -10
  284. package/dist/{Tooltip-3EYDVa3w.js.map → Tooltip-DO56mY4b.js.map} +1 -1
  285. package/dist/Tooltip-DwUFLDrj.cjs +2 -0
  286. package/dist/{Tooltip-C9F3uYG0.cjs.map → Tooltip-DwUFLDrj.cjs.map} +1 -1
  287. package/dist/TreeMapGraph.cjs +1 -1
  288. package/dist/TreeMapGraph.cjs.map +1 -1
  289. package/dist/TreeMapGraph.js +34 -33
  290. package/dist/TreeMapGraph.js.map +1 -1
  291. package/dist/UnitChart.cjs +1 -1
  292. package/dist/UnitChart.cjs.map +1 -1
  293. package/dist/UnitChart.js +27 -27
  294. package/dist/WaterfallChart.cjs +1 -1
  295. package/dist/WaterfallChart.cjs.map +1 -1
  296. package/dist/WaterfallChart.js +21 -20
  297. package/dist/WaterfallChart.js.map +1 -1
  298. package/dist/XAxesLabels-0ROJnigy.cjs +2 -0
  299. package/dist/{XAxesLabels-C03jHniq.cjs.map → XAxesLabels-0ROJnigy.cjs.map} +1 -1
  300. package/dist/{XAxesLabels-B9gkjUiC.js → XAxesLabels-CPZX3OJN.js} +12 -11
  301. package/dist/XAxesLabels-CPZX3OJN.js.map +1 -0
  302. package/dist/XTicksAndGridLines-BO6KJc8d.cjs +2 -0
  303. package/dist/{XTicksAndGridLines-B4UhDVyU.cjs.map → XTicksAndGridLines-BO6KJc8d.cjs.map} +1 -1
  304. package/dist/{XTicksAndGridLines-CkYwVshF.js → XTicksAndGridLines-obTK2e7G.js} +10 -9
  305. package/dist/{XTicksAndGridLines-CkYwVshF.js.map → XTicksAndGridLines-obTK2e7G.js.map} +1 -1
  306. package/dist/{YAxesLabels-hWEUCTvs.js → YAxesLabels-CwVnFG2a.js} +13 -12
  307. package/dist/YAxesLabels-CwVnFG2a.js.map +1 -0
  308. package/dist/YAxesLabels-DIa2cEXL.cjs +2 -0
  309. package/dist/{YAxesLabels-DeENFC2M.cjs.map → YAxesLabels-DIa2cEXL.cjs.map} +1 -1
  310. package/dist/YTicksAndGridLines-C7glLI5b.cjs +2 -0
  311. package/dist/{YTicksAndGridLines-sT3zdCs6.cjs.map → YTicksAndGridLines-C7glLI5b.cjs.map} +1 -1
  312. package/dist/{YTicksAndGridLines-BbujwxOB.js → YTicksAndGridLines-wtuAKNeT.js} +10 -9
  313. package/dist/{YTicksAndGridLines-BbujwxOB.js.map → YTicksAndGridLines-wtuAKNeT.js.map} +1 -1
  314. package/dist/checkIfMultiple-BIEQDuA3.cjs +2 -0
  315. package/dist/checkIfMultiple-BIEQDuA3.cjs.map +1 -0
  316. package/dist/checkIfMultiple-D2tgEnYM.js +11 -0
  317. package/dist/checkIfMultiple-D2tgEnYM.js.map +1 -0
  318. package/dist/compiler-runtime-oPPev21o.cjs +11 -0
  319. package/dist/compiler-runtime-oPPev21o.cjs.map +1 -0
  320. package/dist/compiler-runtime-qHgugrLy.js +297 -0
  321. package/dist/compiler-runtime-qHgugrLy.js.map +1 -0
  322. package/dist/customArea-BCGIYDQa.cjs +2 -0
  323. package/dist/{customArea-BAcQ3pBM.cjs.map → customArea-BCGIYDQa.cjs.map} +1 -1
  324. package/dist/{customArea-D89lETG0.js → customArea-Dixg0NtQ.js} +10 -9
  325. package/dist/{customArea-D89lETG0.js.map → customArea-Dixg0NtQ.js.map} +1 -1
  326. package/dist/{fetchAndParseData-BAXhgTDM.js → fetchAndParseData-CDjQZ1fL.js} +5 -5
  327. package/dist/{fetchAndParseData-BAXhgTDM.js.map → fetchAndParseData-CDjQZ1fL.js.map} +1 -1
  328. package/dist/fetchAndParseData.js +1 -1
  329. package/dist/getSliderMarks-Bj_JJTtX.cjs +2 -0
  330. package/dist/getSliderMarks-Bj_JJTtX.cjs.map +1 -0
  331. package/dist/getSliderMarks-DSxFGb1f.js +21 -0
  332. package/dist/getSliderMarks-DSxFGb1f.js.map +1 -0
  333. package/dist/index-5BQWR1Z8.cjs +10 -0
  334. package/dist/{index-FXfr51ZM.cjs.map → index-5BQWR1Z8.cjs.map} +1 -1
  335. package/dist/index-BaXzoD4r.cjs +2 -0
  336. package/dist/{index-BuhBhuCq.cjs.map → index-BaXzoD4r.cjs.map} +1 -1
  337. package/dist/{index-Cv_5q6Rb.js → index-CNUlPiEL.js} +3 -3
  338. package/dist/{index-Cv_5q6Rb.js.map → index-CNUlPiEL.js.map} +1 -1
  339. package/dist/{index-DHVGV8Df.js → index-CmkqqFRG.js} +3 -3
  340. package/dist/{index-DHVGV8Df.js.map → index-CmkqqFRG.js.map} +1 -1
  341. package/dist/index-D_ls5oK8.js +142 -0
  342. package/dist/index-D_ls5oK8.js.map +1 -0
  343. package/dist/index-DbSnila_.cjs +2 -0
  344. package/dist/index-DbSnila_.cjs.map +1 -0
  345. package/dist/{index-BPyj_6hG.js → index-_w-CQAbR.js} +113 -112
  346. package/dist/{index-BPyj_6hG.js.map → index-_w-CQAbR.js.map} +1 -1
  347. package/dist/index-dN3wiQgD.cjs +2 -0
  348. package/dist/{index-DuLvdHo2.cjs.map → index-dN3wiQgD.cjs.map} +1 -1
  349. package/dist/index.cjs +1 -1
  350. package/dist/index.d.ts +16 -0
  351. package/dist/index.js +181 -180
  352. package/dist/index.js.map +1 -1
  353. package/dist/{proxy-BsxtcZKa.js → proxy-D31SA_aE.js} +2 -2
  354. package/dist/{proxy-BsxtcZKa.js.map → proxy-D31SA_aE.js.map} +1 -1
  355. package/dist/proxy-QMeVVqam.cjs +2 -0
  356. package/dist/{proxy-CqH8m8IQ.cjs.map → proxy-QMeVVqam.cjs.map} +1 -1
  357. package/dist/style.css +1 -1
  358. package/dist/transformData.js +2 -2
  359. package/dist/{transformDataForGraphFromFile-dt9sHTVy.js → transformDataForGraphFromFile-COZC6A0_.js} +4 -4
  360. package/dist/{transformDataForGraphFromFile-dt9sHTVy.js.map → transformDataForGraphFromFile-COZC6A0_.js.map} +1 -1
  361. package/dist/{use-in-view-KOXq5Kmc.js → use-in-view-Co5SmzfT.js} +2 -2
  362. package/dist/{use-in-view-KOXq5Kmc.js.map → use-in-view-Co5SmzfT.js.map} +1 -1
  363. package/dist/use-in-view-DjR_gqJP.cjs +2 -0
  364. package/dist/{use-in-view-dnRv_qqF.cjs.map → use-in-view-DjR_gqJP.cjs.map} +1 -1
  365. package/package.json +1 -1
  366. package/dist/Axis-BTaS9oPQ.cjs +0 -2
  367. package/dist/AxisTitle-CyLCqpW6.js +0 -29
  368. package/dist/AxisTitle-CyLCqpW6.js.map +0 -1
  369. package/dist/AxisTitle-DP_evhbe.cjs +0 -2
  370. package/dist/DetailsModal-Du8Fr1QD.cjs +0 -2
  371. package/dist/DropdownSelect-CX1yMemd.cjs +0 -5
  372. package/dist/DropdownSelect-CX1yMemd.cjs.map +0 -1
  373. package/dist/DropdownSelect-Dz7imdTB.js +0 -4191
  374. package/dist/DropdownSelect-Dz7imdTB.js.map +0 -1
  375. package/dist/EmptyState-CFmiFPHz.cjs +0 -2
  376. package/dist/GraphContainer-B8ZqOzKI.js.map +0 -1
  377. package/dist/GraphContainer-Cul9b74X.cjs +0 -2
  378. package/dist/GraphEl-BgkDbq50.cjs +0 -2
  379. package/dist/Modal-BIErPPKT.cjs +0 -46
  380. package/dist/Modal-BIErPPKT.cjs.map +0 -1
  381. package/dist/Modal-CrUYln5V.js +0 -1047
  382. package/dist/Modal-CrUYln5V.js.map +0 -1
  383. package/dist/ReferenceLine-CpU4G01Y.cjs +0 -2
  384. package/dist/ReferenceLine-D41VuUhE.js.map +0 -1
  385. package/dist/RegressionLine-BFoBiVJk.cjs +0 -2
  386. package/dist/RegressionLine-CuwB42I6.js +0 -87
  387. package/dist/RegressionLine-CuwB42I6.js.map +0 -1
  388. package/dist/Source-PKuwZOn3.cjs +0 -2
  389. package/dist/Source-PKuwZOn3.cjs.map +0 -1
  390. package/dist/Source-QGk8vhkS.js +0 -78
  391. package/dist/Source-QGk8vhkS.js.map +0 -1
  392. package/dist/Spinner-B2IIKg9r.js +0 -47
  393. package/dist/Spinner-B2IIKg9r.js.map +0 -1
  394. package/dist/Spinner-WHzzloYQ.cjs +0 -2
  395. package/dist/Spinner-WHzzloYQ.cjs.map +0 -1
  396. package/dist/Tooltip-C9F3uYG0.cjs +0 -2
  397. package/dist/Typography-BO0gQDIT.js +0 -270
  398. package/dist/Typography-BO0gQDIT.js.map +0 -1
  399. package/dist/Typography-BqmyF1gP.cjs +0 -2
  400. package/dist/Typography-BqmyF1gP.cjs.map +0 -1
  401. package/dist/XAxesLabels-B9gkjUiC.js.map +0 -1
  402. package/dist/XAxesLabels-C03jHniq.cjs +0 -2
  403. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +0 -2
  404. package/dist/YAxesLabels-DeENFC2M.cjs +0 -2
  405. package/dist/YAxesLabels-hWEUCTvs.js.map +0 -1
  406. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +0 -2
  407. package/dist/checkIfMultiple-CH5tqj4q.cjs +0 -2
  408. package/dist/checkIfMultiple-CH5tqj4q.cjs.map +0 -1
  409. package/dist/checkIfMultiple-Dpyy6BUP.js +0 -938
  410. package/dist/checkIfMultiple-Dpyy6BUP.js.map +0 -1
  411. package/dist/customArea-BAcQ3pBM.cjs +0 -2
  412. package/dist/getSliderMarks-BzrpHrHS.cjs +0 -2
  413. package/dist/getSliderMarks-BzrpHrHS.cjs.map +0 -1
  414. package/dist/getSliderMarks-X-_goqH9.js +0 -1027
  415. package/dist/getSliderMarks-X-_goqH9.js.map +0 -1
  416. package/dist/index-ApTBN0kp.js +0 -196
  417. package/dist/index-ApTBN0kp.js.map +0 -1
  418. package/dist/index-BhI7mBJx.cjs +0 -2
  419. package/dist/index-BhI7mBJx.cjs.map +0 -1
  420. package/dist/index-BuhBhuCq.cjs +0 -2
  421. package/dist/index-CHPV5EwG-BzibaIRc.js +0 -3360
  422. package/dist/index-CHPV5EwG-BzibaIRc.js.map +0 -1
  423. package/dist/index-CHPV5EwG-D4pAp7u0.cjs +0 -20
  424. package/dist/index-CHPV5EwG-D4pAp7u0.cjs.map +0 -1
  425. package/dist/index-DuLvdHo2.cjs +0 -2
  426. package/dist/index-FXfr51ZM.cjs +0 -10
  427. package/dist/index-Scxs_wcm-BAjU0Cob.js +0 -49
  428. package/dist/index-Scxs_wcm-BAjU0Cob.js.map +0 -1
  429. package/dist/index-Scxs_wcm-DUDU-Gll.cjs +0 -2
  430. package/dist/index-Scxs_wcm-DUDU-Gll.cjs.map +0 -1
  431. package/dist/index-w64Zl8io-DrMm5QSb.cjs +0 -2
  432. package/dist/index-w64Zl8io-DrMm5QSb.cjs.map +0 -1
  433. package/dist/index-w64Zl8io-ihagHOdP.js +0 -459
  434. package/dist/index-w64Zl8io-ihagHOdP.js.map +0 -1
  435. package/dist/proxy-CqH8m8IQ.cjs +0 -2
  436. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +0 -4
  437. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +0 -1
  438. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +0 -145
  439. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +0 -1
  440. package/dist/use-in-view-dnRv_qqF.cjs +0 -2
  441. package/dist/x-BXShoIAM-BC2sxios.cjs +0 -2
  442. package/dist/x-BXShoIAM-BC2sxios.cjs.map +0 -1
  443. package/dist/x-BXShoIAM-D6VWO6z5.js +0 -74
  444. package/dist/x-BXShoIAM-D6VWO6z5.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ChoroplethMap.js","sources":["../src/Components/Graphs/Maps/ChoroplethMap/Graph.tsx","../src/Components/Graphs/Maps/ChoroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { RefObject, useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold, scaleOrdinal } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n NumberFormatOptions,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { ImageDownloadButton } from '@/Components/Actions/ImageDownloadButton';\r\nimport { CsvDownloadButton } from '@/Components/Actions/CsvDownloadButton';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n mapData: FeatureCollection;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\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 showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds?: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: 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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n zoomAndCenterByHighlightedIds: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n graphDownload?: RefObject<HTMLDivElement | null>;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataDownload: any;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n numberDisplayOptions,\r\n graphDownload,\r\n dataDownload,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\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\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds?.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds?.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n className='undp-map-shapes'\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? !highlightedIds || highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 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 onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\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 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 >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\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 stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n ))\r\n : null}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\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\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\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 className={\r\n selectedColor === 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 ...(selectedColor === colors[i] ? {} : { 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(\r\n d as number,\r\n 'NA',\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\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 className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\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\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\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='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n {(graphDownload || dataDownload) && (\r\n <div className='absolute right-4 top-4 flex flex-col image-download-button gap-2'>\r\n {graphDownload && (\r\n <ImageDownloadButton nodeID={graphDownload} buttonSmall className='p-1' />\r\n )}\r\n {dataDownload && dataDownload.length > 0 && (\r\n <CsvDownloadButton\r\n csvData={dataDownload}\r\n buttonSmall\r\n headers={Object.keys(dataDownload[0]).map(d => ({\r\n label: d,\r\n key: d,\r\n }))}\r\n className='p-1'\r\n />\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n MapOverlayDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\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 mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: 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 /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\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 /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\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 ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.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 scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\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 onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\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 mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n projectionRotate = [0, 0],\r\n zoomAndCenterByHighlightedIds = false,\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\r\n numberDisplayOptions,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | 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(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.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\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription ? (\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 />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].categoricalColors.colors\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\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 customLayers={customLayers}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n numberDisplayOptions={numberDisplayOptions}\r\n graphDownload={graphDownload ? graphParentDiv : 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 ) : (\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 </GraphArea>\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 </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","numberDisplayOptions","graphDownload","dataDownload","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","i","path","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","index","findIndex","el","id","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","pointerEvents","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","textAnchor","numberFormattingFunction","precision","locale","padZeros","ExpandIcon","ImageDownloadButton","CsvDownloadButton","Object","keys","label","key","DetailsModal","modal","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","t13","showAntarctica","t14","language","t15","minHeight","t16","theme","t17","ariaLabel","t18","t19","t20","t21","t22","t23","timeline","t24","t25","t26","t27","mapOverlay","Colors","light","graphNoData","grays","t28","t29","t30","enabled","autoplay","showOnlyActiveDate","t31","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t32","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t33","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t34","shape","onUpdateShape","useEffectEvent","t35","shape_0","onUpdateOverlayMapShape","t36","fetchAndParseJSON","then","d_1","t37","t38","d_2","t39","t40","t41","getUniqValue","getJenks","_temp3","t42","t43","speed","interval","setInterval","clearInterval","t44","t45","getSliderMarks","markObj","t46","graphContainer","t47","t48","description","title","GraphHeader","t49","Pause","Play","SliderUI","nextValue","nextValue_0","t50","GraphArea","d_4","format","_temp4","categoricalColors","sequentialColors","_temp5","_temp6","_temp7","_temp8","_temp9","max","Spinner","t51","footnote","source","GraphFooter","t52","GraphContainer","d_7","d_6","d_5","d_9","d_8","NAME","d_3","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,+BAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,4BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC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oroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { RefObject, useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold, scaleOrdinal } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n NumberFormatOptions,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { ImageDownloadButton } from '@/Components/Actions/ImageDownloadButton';\r\nimport { CsvDownloadButton } from '@/Components/Actions/CsvDownloadButton';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n mapData: FeatureCollection;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\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 showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds?: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: 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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n zoomAndCenterByHighlightedIds: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n graphDownload?: RefObject<HTMLDivElement | null>;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataDownload: any;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n numberDisplayOptions,\r\n graphDownload,\r\n dataDownload,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\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\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds?.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds?.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n className='undp-map-shapes'\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? !highlightedIds || highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 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 onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\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 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 >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\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 stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n ))\r\n : null}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical || colorDomain.length < 2 ? 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 && colorDomain.length > 1 ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\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 className={\r\n selectedColor === 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 ...(selectedColor === colors[i] ? {} : { 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(\r\n d as number,\r\n 'NA',\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\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 className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : categorical ? (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\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 className='flex flex-col gap-3'>\r\n <div\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[0]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[0] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {`<= ${numberFormattingFunction(\r\n colorDomain[0] as number,\r\n 'NA',\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}`}\r\n </P>\r\n </div>\r\n <div\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[1]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[1] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {`> ${numberFormattingFunction(\r\n colorDomain[0] as number,\r\n 'NA',\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}`}\r\n </P>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n {(graphDownload || dataDownload) && (\r\n <div className='absolute right-4 top-4 flex flex-col image-download-button gap-2'>\r\n {graphDownload && (\r\n <ImageDownloadButton nodeID={graphDownload} buttonSmall className='p-1' />\r\n )}\r\n {dataDownload && dataDownload.length > 0 && (\r\n <CsvDownloadButton\r\n csvData={dataDownload}\r\n buttonSmall\r\n headers={Object.keys(dataDownload[0]).map(d => ({\r\n label: d,\r\n key: d,\r\n }))}\r\n className='p-1'\r\n />\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n MapOverlayDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\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 mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: 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 /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\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 /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\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 ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.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 scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\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 onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\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 mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n projectionRotate = [0, 0],\r\n zoomAndCenterByHighlightedIds = false,\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\r\n numberDisplayOptions,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | 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(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.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\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription ? (\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 />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].categoricalColors.colors\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\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 customLayers={customLayers}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n numberDisplayOptions={numberDisplayOptions}\r\n graphDownload={graphDownload ? graphParentDiv : 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 ) : (\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 </GraphArea>\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 </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","numberDisplayOptions","graphDownload","dataDownload","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","i","path","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","index","findIndex","el","id","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","pointerEvents","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","textAnchor","numberFormattingFunction","precision","locale","padZeros","backgroundColor","ExpandIcon","ImageDownloadButton","CsvDownloadButton","Object","keys","label","key","DetailsModal","modal","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","t13","showAntarctica","t14","language","t15","minHeight","t16","theme","t17","ariaLabel","t18","t19","t20","t21","t22","t23","timeline","t24","t25","t26","t27","mapOverlay","Colors","light","graphNoData","grays","t28","t29","t30","enabled","autoplay","showOnlyActiveDate","t31","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t32","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t33","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t34","shape","onUpdateShape","useEffectEvent","t35","shape_0","onUpdateOverlayMapShape","t36","fetchAndParseJSON","then","d_1","t37","t38","d_2","t39","t40","t41","getUniqValue","getJenks","_temp3","t42","t43","speed","interval","setInterval","clearInterval","t44","t45","getSliderMarks","markObj","t46","graphContainer","t47","t48","description","title","GraphHeader","t49","Pause","Play","SliderUI","nextValue","nextValue_0","t50","GraphArea","d_4","format","_temp4","categoricalColors","sequentialColors","_temp5","_temp6","_temp7","_temp8","_temp9","max","Spinner","t51","footnote","source","GraphFooter","t52","GraphContainer","d_7","d_6","d_5","d_9","d_8","NAME","d_3","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,+BAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,4BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,uBAAAA;AAAAA,IACAC,uBAAAA;AAAAA,IACAC,sBAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,EAAAA,IACExC,GACEyC,IAAmBC,GAAQ,MAC1BR,IAEES,GAAOvC,GAAS;AAAA,IAAEwC,SAAS;AAAA,EAAA,CAAM,IAFAxC,GAGvC,CAACA,GAAS8B,CAA0B,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,GAAiBvJ,SAAAiC,GAAAjC,SAAAZ,GAAAY,SAAAqB,GAAArB,SAAAlL,GAAAkL,SAAA2B,GAAA3B,SAAA6B,GAAA7B,SAAAW,IAAAX,SAAAgB,GAAAhB,SAAA4H,IAAA5H,SAAA8H,IAAA9H,SAAA+H,IAAA/H,SAAAmI,IAAAnI,SAAAyI,IAAAzI,SAAAuJ,IAAAvJ,SAAA+B,GAAA/B,SAAAjL,GAAAiL,SAAA2J,MAAAA,KAAA3J,EAAA,GAAA,GAtKjB2J;AAsKiB;AAtTd,SAAAP,GAAAS,GAAA;AAAA,SAiR8BlP,MAAMnD;AAAS;AAjR7C,SAAA2R,GAAAW,GAAA;AAAA,SAgR+CnP,MAAMnD;AAAS;AAhR9D,SAAA0R,GAAAa,GAAA;AAAA,SAgR2BpP,EAACnG;AAAK;AAhRjC,SAAAyU,GAAAe,GAAA;AAAA,SA+Q6CrP,MAAMnD;AAAS;AA/Q5D,SAAAwR,GAAAiB,GAAA;AAAA,SA+QyBtP,EAACnG;AAAK;AA/Q/B,SAAAqU,GAAArL,GAAA;AAAA,SAyNsDA,EAAE1C,YAAiBoP,SAAK;AAAY;AAzN1F,SAAAjD,GAAAkD,GAAA;AAAA,SA0HiBxP,EAACiD;AAA+B;AA1HjD,SAAA8G,GAAA0F,GAAAC,GAAA;AAAA,SAmEkBD,IAAIC;AAAC;AAnEvB,SAAA7F,GAAA7J,GAAA;AAAA,SA+DgBA,EAACyJ;AAAK;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-D4pAp7u0.cjs");require("react");const e=require("./index-DuLvdHo2.cjs");require("./GraphFooter.cjs");require("./GraphHeader.cjs");require("./ColorLegendWithMouseOver.cjs");require("./Colors.cjs");require("./EmptyState-CFmiFPHz.cjs");require("./uniqBy-O05lp2S5.cjs");require("./GraphContainer-Cul9b74X.cjs");exports.CirclePackingGraph=e.CirclePackingGraph;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./compiler-runtime-oPPev21o.cjs");require("react");const e=require("./index-dN3wiQgD.cjs");require("./GraphFooter.cjs");require("./GraphHeader.cjs");require("./ColorLegendWithMouseOver.cjs");require("./Colors.cjs");require("./EmptyState-BoaUUuo6.cjs");require("./uniqBy-O05lp2S5.cjs");require("./GraphContainer-gaG9TSy4.cjs");exports.CirclePackingGraph=e.CirclePackingGraph;
2
2
  //# sourceMappingURL=CirclePackingGraph.cjs.map
@@ -1,13 +1,13 @@
1
- import "./index-CHPV5EwG-BzibaIRc.js";
1
+ import "./compiler-runtime-qHgugrLy.js";
2
2
  import "react";
3
- import { C as g } from "./index-BPyj_6hG.js";
3
+ import { C as g } from "./index-_w-CQAbR.js";
4
4
  import "./GraphFooter.js";
5
5
  import "./GraphHeader.js";
6
6
  import "./ColorLegendWithMouseOver.js";
7
7
  import "./Colors.js";
8
- import "./EmptyState-CaxXCkiN.js";
8
+ import "./EmptyState-prZ8OnEs.js";
9
9
  import "./uniqBy-BHy4I8PK.js";
10
- import "./GraphContainer-B8ZqOzKI.js";
10
+ import "./GraphContainer-DcOM2CI6.js";
11
11
  export {
12
12
  g as CirclePackingGraph
13
13
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-D4pAp7u0.cjs"),b=require("./Typography-BqmyF1gP.cjs"),B=require("./Colors.cjs");function T(w){const e=s.compilerRuntimeExports.c(29),{colorLegendTitle:a,colorDomain:g,colors:t,showNAColor:h,width:v,isCenter:d,className:E,labelsToBeHidden:u}=w;let j;e[0]!==u?(j=u===void 0?[]:u,e[0]=u,e[1]=j):j=e[1];const m=j,R=d&&"justify-center";let l;e[2]!==E||e[3]!==R?(l=s.mo("flex leading-0 pb-3",R,E),e[2]=E,e[3]=R,e[4]=l):l=e[4];const C=v?`${v}px`:"none";let o;e[5]!==C?(o={maxWidth:C},e[5]=C,e[6]=o):o=e[6];let n;e[7]!==a||e[8]!==d?(n=a&&a!==""?s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"2xs",className:d?"text-center":"",children:a}):null,e[7]=a,e[8]=d,e[9]=n):n=e[9];let i;if(e[10]!==g||e[11]!==t||e[12]!==m){let f;e[14]!==t||e[15]!==m?(f=(N,y)=>m.includes(N)?null:s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:t[y%t.length]}}),N===""?null:s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"none",children:N})]},y),e[14]=t,e[15]=m,e[16]=f):f=e[16],i=g.map(f),e[10]=g,e[11]=t,e[12]=m,e[13]=i}else i=e[13];let r;e[17]!==h?(r=h?s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:B.Colors.gray}}),s.jsxRuntimeExports.jsx(b._,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[17]=h,e[18]=r):r=e[18];let x;e[19]!==i||e[20]!==r?(x=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap mb-0 gap-3.5",children:[i,r]}),e[19]=i,e[20]=r,e[21]=x):x=e[21];let c;e[22]!==n||e[23]!==x?(c=s.jsxRuntimeExports.jsxs("div",{children:[n,x]}),e[22]=n,e[23]=x,e[24]=c):c=e[24];let p;return e[25]!==c||e[26]!==l||e[27]!==o?(p=s.jsxRuntimeExports.jsx("div",{className:l,style:o,"aria-label":"Color legend",children:c}),e[25]=c,e[26]=l,e[27]=o,e[28]=p):p=e[28],p}exports.ColorLegend=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./compiler-runtime-oPPev21o.cjs"),B=require("@undp/design-system-react/cn"),v=require("@undp/design-system-react/Typography"),T=require("./Colors.cjs");function q(w){const e=s.compilerRuntimeExports.c(29),{colorLegendTitle:a,colorDomain:g,colors:t,showNAColor:h,width:y,isCenter:d,className:R,labelsToBeHidden:u}=w;let p;e[0]!==u?(p=u===void 0?[]:u,e[0]=u,e[1]=p):p=e[1];const m=p,E=d&&"justify-center";let l;e[2]!==R||e[3]!==E?(l=B.cn("flex leading-0 pb-3",E,R),e[2]=R,e[3]=E,e[4]=l):l=e[4];const N=y?`${y}px`:"none";let n;e[5]!==N?(n={maxWidth:N},e[5]=N,e[6]=n):n=e[6];let o;e[7]!==a||e[8]!==d?(o=a&&a!==""?s.jsxRuntimeExports.jsx(v.P,{size:"sm",marginBottom:"2xs",className:d?"text-center":"",children:a}):null,e[7]=a,e[8]=d,e[9]=o):o=e[9];let i;if(e[10]!==g||e[11]!==t||e[12]!==m){let f;e[14]!==t||e[15]!==m?(f=(b,C)=>m.includes(b)?null:s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:t[C%t.length]}}),b===""?null:s.jsxRuntimeExports.jsx(v.P,{size:"sm",marginBottom:"none",children:b})]},C),e[14]=t,e[15]=m,e[16]=f):f=e[16],i=g.map(f),e[10]=g,e[11]=t,e[12]=m,e[13]=i}else i=e[13];let r;e[17]!==h?(r=h?s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:T.Colors.gray}}),s.jsxRuntimeExports.jsx(v.P,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[17]=h,e[18]=r):r=e[18];let c;e[19]!==i||e[20]!==r?(c=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap mb-0 gap-3.5",children:[i,r]}),e[19]=i,e[20]=r,e[21]=c):c=e[21];let x;e[22]!==o||e[23]!==c?(x=s.jsxRuntimeExports.jsxs("div",{children:[o,c]}),e[22]=o,e[23]=c,e[24]=x):x=e[24];let j;return e[25]!==x||e[26]!==l||e[27]!==n?(j=s.jsxRuntimeExports.jsx("div",{className:l,style:n,"aria-label":"Color legend",children:x}),e[25]=x,e[26]=l,e[27]=n,e[28]=j):j=e[28],j}exports.ColorLegend=q;
2
2
  //# sourceMappingURL=ColorLegend.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorLegend.cjs","sources":["../src/Components/Elements/ColorLegend.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\n\r\ninterface Props {\r\n colors: string[];\r\n colorDomain: (string | number)[];\r\n dashedLines?: (string | number)[];\r\n labelsToBeHidden?: (string | number)[];\r\n colorLegendTitle?: string;\r\n showNAColor: boolean;\r\n width?: number;\r\n isCenter?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function ColorLegend(props: Props) {\r\n const {\r\n colorLegendTitle,\r\n colorDomain,\r\n colors,\r\n showNAColor,\r\n width,\r\n isCenter,\r\n className,\r\n labelsToBeHidden = [],\r\n } = props;\r\n\r\n return (\r\n <div\r\n className={cn('flex leading-0 pb-3', isCenter && 'justify-center', className)}\r\n style={{ maxWidth: width ? `${width}px` : 'none' }}\r\n aria-label='Color legend'\r\n >\r\n <div>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P size='sm' marginBottom='2xs' className={isCenter ? 'text-center' : ''}>\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n <div className='flex flex-wrap mb-0 gap-3.5'>\r\n {colorDomain.map((d, i) =>\r\n labelsToBeHidden.includes(d) ? null : (\r\n <div key={i} className='flex items-center gap-1'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n {d === '' ? null : (\r\n <P size='sm' marginBottom='none'>\r\n {d}\r\n </P>\r\n )}\r\n </div>\r\n ),\r\n )}\r\n {showNAColor ? (\r\n <div className='flex items-center gap-1'>\r\n <div className='w-3 h-3 rounded-full' style={{ backgroundColor: Colors.gray }} />\r\n <P size='sm' marginBottom='none'>\r\n NA\r\n </P>\r\n </div>\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["ColorLegend","props","$","_c","colorLegendTitle","colorDomain","colors","showNAColor","width","isCenter","className","labelsToBeHidden","t0","t1","undefined","t2","t3","cn","t4","t5","maxWidth","t6","jsx","P","t7","t8","d","i","includes","jsxs","backgroundColor","length","map","Colors","gray","t9","t10","t11"],"mappings":"kMAiBO,SAAAA,EAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,iBAAAA,EAAAC,YAAAA,EAAAC,OAAAA,EAAAC,YAAAA,EAAAC,MAAAA,EAAAC,SAAAA,EAAAC,UAAAA,EAAAC,iBAAAC,CAAAA,EASIX,EAAM,IAAAY,EAAAX,OAAAU,GADRC,EAAAD,IAAAE,OAAA,CAAA,EAAAF,EAAqBV,KAAAU,EAAAV,KAAAW,GAAAA,EAAAX,EAAA,CAAA,EAArB,MAAAS,EAAAE,EAKuCE,EAAAN,GAAA,iBAA4B,IAAAO,EAAAd,EAAA,CAAA,IAAAQ,GAAAR,OAAAa,GAAtDC,EAAAC,EAAAA,GAAG,sBAAuBF,EAA8BL,CAAS,EAACR,KAAAQ,EAAAR,KAAAa,EAAAb,KAAAc,GAAAA,EAAAd,EAAA,CAAA,EAC1D,MAAAgB,EAAAV,EAAA,GAAWA,CAAK,KAAhB,OAA6B,IAAAW,EAAAjB,OAAAgB,GAAzCC,EAAA,CAAAC,SAAYF,CAAAA,EAA+BhB,KAAAgB,EAAAhB,KAAAiB,GAAAA,EAAAjB,EAAA,CAAA,EAAA,IAAAmB,EAAAnB,EAAA,CAAA,IAAAE,GAAAF,OAAAO,GAI/CY,EAAAjB,GAAoBA,IAAqB,GACxCkB,EAAAA,kBAAAA,IAACC,EAAAA,GAAO,KAAA,KAAkB,aAAA,MAAiB,UAAAd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GAAAtB,QAAAuB,GAvBVU,EAAAN,EAAAA,kBAAAA,KAAA,MAAA,CAAe,UAAA,8BACZL,SAAAA,CAAAA,EAeAC,CAAAA,EAQH,EAAMvB,MAAAsB,EAAAtB,MAAAuB,EAAAvB,MAAAiC,GAAAA,EAAAjC,EAAA,EAAA,EAAA,IAAAkC,EAAAlC,EAAA,EAAA,IAAAmB,GAAAnB,QAAAiC,GA9BRC,2BAAA,MAAA,CACGf,SAAAA,CAAAA,EAKDc,CAAAA,EAyBF,EAAMjC,MAAAmB,EAAAnB,MAAAiC,EAAAjC,MAAAkC,GAAAA,EAAAlC,EAAA,EAAA,EAAA,IAAAmC,EAAA,OAAAnC,EAAA,EAAA,IAAAkC,GAAAlC,QAAAc,GAAAd,EAAA,EAAA,IAAAiB,GApCRkB,EAAAf,EAAAA,kBAAAA,IAAA,OACa,UAAAN,EACJ,MAAAG,EACI,aAAA,eAEXiB,SAAAA,CAAAA,CAgCF,EAAMlC,MAAAkC,EAAAlC,MAAAc,EAAAd,MAAAiB,EAAAjB,MAAAmC,GAAAA,EAAAnC,EAAA,EAAA,EArCNmC,CAqCM"}
1
+ {"version":3,"file":"ColorLegend.cjs","sources":["../src/Components/Elements/ColorLegend.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\n\r\ninterface Props {\r\n colors: string[];\r\n colorDomain: (string | number)[];\r\n dashedLines?: (string | number)[];\r\n labelsToBeHidden?: (string | number)[];\r\n colorLegendTitle?: string;\r\n showNAColor: boolean;\r\n width?: number;\r\n isCenter?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function ColorLegend(props: Props) {\r\n const {\r\n colorLegendTitle,\r\n colorDomain,\r\n colors,\r\n showNAColor,\r\n width,\r\n isCenter,\r\n className,\r\n labelsToBeHidden = [],\r\n } = props;\r\n\r\n return (\r\n <div\r\n className={cn('flex leading-0 pb-3', isCenter && 'justify-center', className)}\r\n style={{ maxWidth: width ? `${width}px` : 'none' }}\r\n aria-label='Color legend'\r\n >\r\n <div>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P size='sm' marginBottom='2xs' className={isCenter ? 'text-center' : ''}>\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n <div className='flex flex-wrap mb-0 gap-3.5'>\r\n {colorDomain.map((d, i) =>\r\n labelsToBeHidden.includes(d) ? null : (\r\n <div key={i} className='flex items-center gap-1'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n {d === '' ? null : (\r\n <P size='sm' marginBottom='none'>\r\n {d}\r\n </P>\r\n )}\r\n </div>\r\n ),\r\n )}\r\n {showNAColor ? (\r\n <div className='flex items-center gap-1'>\r\n <div className='w-3 h-3 rounded-full' style={{ backgroundColor: Colors.gray }} />\r\n <P size='sm' marginBottom='none'>\r\n NA\r\n </P>\r\n </div>\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["ColorLegend","props","$","_c","colorLegendTitle","colorDomain","colors","showNAColor","width","isCenter","className","labelsToBeHidden","t0","t1","undefined","t2","t3","cn","t4","t5","maxWidth","t6","jsx","P","t7","t8","d","i","includes","jsxs","backgroundColor","length","map","Colors","gray","t9","t10","t11"],"mappings":"yPAiBO,SAAAA,EAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,iBAAAA,EAAAC,YAAAA,EAAAC,OAAAA,EAAAC,YAAAA,EAAAC,MAAAA,EAAAC,SAAAA,EAAAC,UAAAA,EAAAC,iBAAAC,CAAAA,EASIX,EAAM,IAAAY,EAAAX,OAAAU,GADRC,EAAAD,IAAAE,OAAA,CAAA,EAAAF,EAAqBV,KAAAU,EAAAV,KAAAW,GAAAA,EAAAX,EAAA,CAAA,EAArB,MAAAS,EAAAE,EAKuCE,EAAAN,GAAA,iBAA4B,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 @@
1
- import { c as T, m as k, j as l } from "./index-CHPV5EwG-BzibaIRc.js";
2
- import { _ as w } from "./Typography-BO0gQDIT.js";
1
+ import { c as T, j as l } from "./compiler-runtime-qHgugrLy.js";
2
+ import { cn as k } from "@undp/design-system-react/cn";
3
+ import { P as w } from "@undp/design-system-react/Typography";
3
4
  import { Colors as A } from "./Colors.js";
4
- function R(z) {
5
+ function $(z) {
5
6
  const e = T.c(29), {
6
7
  colorLegendTitle: m,
7
- colorDomain: p,
8
+ colorDomain: h,
8
9
  colors: s,
9
10
  showNAColor: j,
10
11
  width: y,
11
- isCenter: x,
12
+ isCenter: f,
12
13
  className: N,
13
- labelsToBeHidden: f
14
+ labelsToBeHidden: x
14
15
  } = z;
15
16
  let u;
16
- e[0] !== f ? (u = f === void 0 ? [] : f, e[0] = f, e[1] = u) : u = e[1];
17
- const d = u, v = x && "justify-center";
17
+ e[0] !== x ? (u = x === void 0 ? [] : x, e[0] = x, e[1] = u) : u = e[1];
18
+ const d = u, v = f && "justify-center";
18
19
  let t;
19
20
  e[2] !== N || e[3] !== v ? (t = k("flex leading-0 pb-3", v, N), e[2] = N, e[3] = v, e[4] = t) : t = e[4];
20
21
  const b = y ? `${y}px` : "none";
@@ -23,16 +24,16 @@ function R(z) {
23
24
  maxWidth: b
24
25
  }, e[5] = b, e[6] = o) : o = e[6];
25
26
  let i;
26
- e[7] !== m || e[8] !== x ? (i = m && m !== "" ? /* @__PURE__ */ l.jsx(w, { size: "sm", marginBottom: "2xs", className: x ? "text-center" : "", children: m }) : null, e[7] = m, e[8] = x, e[9] = i) : i = e[9];
27
+ e[7] !== m || e[8] !== f ? (i = m && m !== "" ? /* @__PURE__ */ l.jsx(w, { size: "sm", marginBottom: "2xs", className: f ? "text-center" : "", children: m }) : null, e[7] = m, e[8] = f, e[9] = i) : i = e[9];
27
28
  let n;
28
- if (e[10] !== p || e[11] !== s || e[12] !== d) {
29
- let h;
30
- e[14] !== s || e[15] !== d ? (h = (C, B) => d.includes(C) ? null : /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-1", children: [
29
+ if (e[10] !== h || e[11] !== s || e[12] !== d) {
30
+ let g;
31
+ e[14] !== s || e[15] !== d ? (g = (C, B) => d.includes(C) ? null : /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-1", children: [
31
32
  /* @__PURE__ */ l.jsx("div", { className: "w-3 h-3 rounded-full", style: {
32
33
  backgroundColor: s[B % s.length]
33
34
  } }),
34
35
  C === "" ? null : /* @__PURE__ */ l.jsx(w, { size: "sm", marginBottom: "none", children: C })
35
- ] }, B), e[14] = s, e[15] = d, e[16] = h) : h = e[16], n = p.map(h), e[10] = p, e[11] = s, e[12] = d, e[13] = n;
36
+ ] }, B), e[14] = s, e[15] = d, e[16] = g) : g = e[16], n = h.map(g), e[10] = h, e[11] = s, e[12] = d, e[13] = n;
36
37
  } else
37
38
  n = e[13];
38
39
  let r;
@@ -52,10 +53,10 @@ function R(z) {
52
53
  i,
53
54
  a
54
55
  ] }), e[22] = i, e[23] = a, e[24] = c) : c = e[24];
55
- let g;
56
- return e[25] !== c || e[26] !== t || e[27] !== o ? (g = /* @__PURE__ */ l.jsx("div", { className: t, style: o, "aria-label": "Color legend", children: c }), e[25] = c, e[26] = t, e[27] = o, e[28] = g) : g = e[28], g;
56
+ let p;
57
+ return e[25] !== c || e[26] !== t || e[27] !== o ? (p = /* @__PURE__ */ l.jsx("div", { className: t, style: o, "aria-label": "Color legend", children: c }), e[25] = c, e[26] = t, e[27] = o, e[28] = p) : p = e[28], p;
57
58
  }
58
59
  export {
59
- R as ColorLegend
60
+ $ as ColorLegend
60
61
  };
61
62
  //# sourceMappingURL=ColorLegend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorLegend.js","sources":["../src/Components/Elements/ColorLegend.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\n\r\ninterface Props {\r\n colors: string[];\r\n colorDomain: (string | number)[];\r\n dashedLines?: (string | number)[];\r\n labelsToBeHidden?: (string | number)[];\r\n colorLegendTitle?: string;\r\n showNAColor: boolean;\r\n width?: number;\r\n isCenter?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function ColorLegend(props: Props) {\r\n const {\r\n colorLegendTitle,\r\n colorDomain,\r\n colors,\r\n showNAColor,\r\n width,\r\n isCenter,\r\n className,\r\n labelsToBeHidden = [],\r\n } = props;\r\n\r\n return (\r\n <div\r\n className={cn('flex leading-0 pb-3', isCenter && 'justify-center', className)}\r\n style={{ maxWidth: width ? `${width}px` : 'none' }}\r\n aria-label='Color legend'\r\n >\r\n <div>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P size='sm' marginBottom='2xs' className={isCenter ? 'text-center' : ''}>\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n <div className='flex flex-wrap mb-0 gap-3.5'>\r\n {colorDomain.map((d, i) =>\r\n labelsToBeHidden.includes(d) ? null : (\r\n <div key={i} className='flex items-center gap-1'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n {d === '' ? null : (\r\n <P size='sm' marginBottom='none'>\r\n {d}\r\n </P>\r\n )}\r\n </div>\r\n ),\r\n )}\r\n {showNAColor ? (\r\n <div className='flex items-center gap-1'>\r\n <div className='w-3 h-3 rounded-full' style={{ backgroundColor: Colors.gray }} />\r\n <P size='sm' marginBottom='none'>\r\n NA\r\n </P>\r\n </div>\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["ColorLegend","props","$","_c","colorLegendTitle","colorDomain","colors","showNAColor","width","isCenter","className","labelsToBeHidden","t0","t1","undefined","t2","t3","cn","t4","t5","maxWidth","t6","jsx","P","t7","t8","d","i","includes","jsxs","backgroundColor","length","map","Colors","gray","t9","t10","t11"],"mappings":";;;AAiBO,SAAAA,EAAAC,GAAA;AAAA,Q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A,EAAA;AAAA,MAAAkC;AAAA,EAAAlC,EAAA,EAAA,MAAAmB,KAAAnB,UAAAiC,KA9BRC,2BAAA,OAAA,EACGf,UAAAA;AAAAA,IAAAA;AAAAA,IAKDc;AAAAA,EAAAA,GAyBF,GAAMjC,QAAAmB,GAAAnB,QAAAiC,GAAAjC,QAAAkC,KAAAA,IAAAlC,EAAA,EAAA;AAAA,MAAAmC;AAAA,SAAAnC,EAAA,EAAA,MAAAkC,KAAAlC,UAAAc,KAAAd,EAAA,EAAA,MAAAiB,KApCRkB,IAAAf,gBAAAA,EAAAA,IAAA,SACa,WAAAN,GACJ,OAAAG,GACI,cAAA,gBAEXiB,UAAAA,EAAAA,CAgCF,GAAMlC,QAAAkC,GAAAlC,QAAAc,GAAAd,QAAAiB,GAAAjB,QAAAmC,KAAAA,IAAAnC,EAAA,EAAA,GArCNmC;AAqCM;"}
1
+ {"version":3,"file":"ColorLegend.js","sources":["../src/Components/Elements/ColorLegend.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\n\r\ninterface Props {\r\n colors: string[];\r\n colorDomain: (string | number)[];\r\n dashedLines?: (string | number)[];\r\n labelsToBeHidden?: (string | number)[];\r\n colorLegendTitle?: string;\r\n showNAColor: boolean;\r\n width?: number;\r\n isCenter?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function ColorLegend(props: Props) {\r\n const {\r\n colorLegendTitle,\r\n colorDomain,\r\n colors,\r\n showNAColor,\r\n width,\r\n isCenter,\r\n className,\r\n labelsToBeHidden = [],\r\n } = props;\r\n\r\n return (\r\n <div\r\n className={cn('flex leading-0 pb-3', isCenter && 'justify-center', className)}\r\n style={{ maxWidth: width ? `${width}px` : 'none' }}\r\n aria-label='Color legend'\r\n >\r\n <div>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P size='sm' marginBottom='2xs' className={isCenter ? 'text-center' : ''}>\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n <div className='flex flex-wrap mb-0 gap-3.5'>\r\n {colorDomain.map((d, i) =>\r\n labelsToBeHidden.includes(d) ? null : (\r\n <div key={i} className='flex items-center gap-1'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n {d === '' ? null : (\r\n <P size='sm' marginBottom='none'>\r\n {d}\r\n </P>\r\n )}\r\n </div>\r\n ),\r\n )}\r\n {showNAColor ? (\r\n <div className='flex items-center gap-1'>\r\n <div className='w-3 h-3 rounded-full' style={{ backgroundColor: Colors.gray }} />\r\n <P size='sm' marginBottom='none'>\r\n NA\r\n </P>\r\n </div>\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["ColorLegend","props","$","_c","colorLegendTitle","colorDomain","colors","showNAColor","width","isCenter","className","labelsToBeHidden","t0","t1","undefined","t2","t3","cn","t4","t5","maxWidth","t6","jsx","P","t7","t8","d","i","includes","jsxs","backgroundColor","length","map","Colors","gray","t9","t10","t11"],"mappings":";;;;AAiBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,kBAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,kBAAAC;AAAAA,EAAAA,IASIX;AAAM,MAAAY;AAAA,EAAAX,SAAAU,KADRC,IAAAD,MAAAE,SAAA,CAAA,IAAAF,GAAqBV,OAAAU,GAAAV,OAAAW,KAAAA,IAAAX,EAAA,CAAA;AAArB,QAAAS,IAAAE,GAKuCE,IAAAN,KAAA;AAA4B,MAAAO;AAAA,EAAAd,EAAA,CAAA,MAAAQ,KAAAR,SAAAa,KAAtDC,IAAAC,EAAG,uBAAuBF,GAA8BL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A,IAAAnC,EAAA,EAAA,GArCNmC;AAqCM;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-D4pAp7u0.cjs"),C=require("./Typography-BqmyF1gP.cjs"),N=require("./Colors.cjs");function M(b){const e=s.compilerRuntimeExports.c(28),{colorLegendTitle:m,colorDomain:j,colors:o,setSelectedColor:t,showNAColor:g,width:R,isCenter:u,className:f}=b,h=u&&"justify-center";let l;e[0]!==f||e[1]!==h?(l=s.mo("flex leading-0 pb-3",h,f),e[0]=f,e[1]=h,e[2]=l):l=e[2];const v=R?`${R}px`:"none";let r;e[3]!==v?(r={maxWidth:v},e[3]=v,e[4]=r):r=e[4];let n;e[5]!==m||e[6]!==u?(n=m&&m!==""?s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"2xs",className:u?"text-center":"",children:m}):null,e[5]=m,e[6]=u,e[7]=n):n=e[7];let i;if(e[8]!==j||e[9]!==o||e[10]!==t){let p;e[12]!==o||e[13]!==t?(p=(y,E)=>s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1 cursor-pointer",onMouseEnter:()=>{t(o[E%o.length])},onMouseLeave:()=>{t(void 0)},children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:o[E%o.length]}}),y===""?null:s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"none",children:y})]},E),e[12]=o,e[13]=t,e[14]=p):p=e[14],i=j.map(p),e[8]=j,e[9]=o,e[10]=t,e[11]=i}else i=e[11];let x;e[15]!==t||e[16]!==g?(x=g?s.jsxRuntimeExports.jsxs("div",{onMouseEnter:()=>{t(N.Colors.gray)},onMouseLeave:()=>{t(void 0)},className:"flex items-center gap-1 cursor-pointer",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:N.Colors.gray}}),s.jsxRuntimeExports.jsx(C._,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[15]=t,e[16]=g,e[17]=x):x=e[17];let c;e[18]!==i||e[19]!==x?(c=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-3.5 mb-0",children:[i,x]}),e[18]=i,e[19]=x,e[20]=c):c=e[20];let a;e[21]!==n||e[22]!==c?(a=s.jsxRuntimeExports.jsxs("div",{children:[n,c]}),e[21]=n,e[22]=c,e[23]=a):a=e[23];let d;return e[24]!==l||e[25]!==r||e[26]!==a?(d=s.jsxRuntimeExports.jsx("div",{className:l,style:r,"aria-label":"Color legend",children:a}),e[24]=l,e[25]=r,e[26]=a,e[27]=d):d=e[27],d}exports.ColorLegendWithMouseOver=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./compiler-runtime-oPPev21o.cjs"),M=require("@undp/design-system-react/cn"),R=require("@undp/design-system-react/Typography"),N=require("./Colors.cjs");function w(b){const e=s.compilerRuntimeExports.c(28),{colorLegendTitle:u,colorDomain:j,colors:o,setSelectedColor:t,showNAColor:g,width:C,isCenter:m,className:f}=b,h=m&&"justify-center";let l;e[0]!==f||e[1]!==h?(l=M.cn("flex leading-0 pb-3",h,f),e[0]=f,e[1]=h,e[2]=l):l=e[2];const v=C?`${C}px`:"none";let r;e[3]!==v?(r={maxWidth:v},e[3]=v,e[4]=r):r=e[4];let n;e[5]!==u||e[6]!==m?(n=u&&u!==""?s.jsxRuntimeExports.jsx(R.P,{size:"sm",marginBottom:"2xs",className:m?"text-center":"",children:u}):null,e[5]=u,e[6]=m,e[7]=n):n=e[7];let i;if(e[8]!==j||e[9]!==o||e[10]!==t){let p;e[12]!==o||e[13]!==t?(p=(y,E)=>s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1 cursor-pointer",onMouseEnter:()=>{t(o[E%o.length])},onMouseLeave:()=>{t(void 0)},children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:o[E%o.length]}}),y===""?null:s.jsxRuntimeExports.jsx(R.P,{size:"sm",marginBottom:"none",children:y})]},E),e[12]=o,e[13]=t,e[14]=p):p=e[14],i=j.map(p),e[8]=j,e[9]=o,e[10]=t,e[11]=i}else i=e[11];let c;e[15]!==t||e[16]!==g?(c=g?s.jsxRuntimeExports.jsxs("div",{onMouseEnter:()=>{t(N.Colors.gray)},onMouseLeave:()=>{t(void 0)},className:"flex items-center gap-1 cursor-pointer",children:[s.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:N.Colors.gray}}),s.jsxRuntimeExports.jsx(R.P,{size:"sm",marginBottom:"none",children:"NA"})]}):null,e[15]=t,e[16]=g,e[17]=c):c=e[17];let x;e[18]!==i||e[19]!==c?(x=s.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-3.5 mb-0",children:[i,c]}),e[18]=i,e[19]=c,e[20]=x):x=e[20];let a;e[21]!==n||e[22]!==x?(a=s.jsxRuntimeExports.jsxs("div",{children:[n,x]}),e[21]=n,e[22]=x,e[23]=a):a=e[23];let d;return e[24]!==l||e[25]!==r||e[26]!==a?(d=s.jsxRuntimeExports.jsx("div",{className:l,style:r,"aria-label":"Color legend",children:a}),e[24]=l,e[25]=r,e[26]=a,e[27]=d):d=e[27],d}exports.ColorLegendWithMouseOver=w;
2
2
  //# sourceMappingURL=ColorLegendWithMouseOver.cjs.map