@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,29 +1,29 @@
1
- import { c as f, j as s } from "./index-CHPV5EwG-BzibaIRc.js";
2
- import { useState as p, useEffect as h } from "react";
3
- import { w as c } from "./Spinner-B2IIKg9r.js";
1
+ import { c as p, j as s } from "./compiler-runtime-qHgugrLy.js";
2
+ import { useState as f, useEffect as h } from "react";
3
+ import { Spinner as c } from "@undp/design-system-react/Spinner";
4
4
  import { GriddedGraphs as g } from "./GriddedGraphs.js";
5
- import { f as u } from "./fetchAndParseData-BAXhgTDM.js";
6
- function w(l) {
7
- const e = f.c(23), {
5
+ import { b as S } from "./fetchAndParseData-CDjQZ1fL.js";
6
+ function b(l) {
7
+ const t = p.c(23), {
8
8
  config: a
9
- } = l, [t, d] = p(void 0);
10
- let i, r;
11
- if (e[0] !== a ? (i = () => {
9
+ } = l, [e, d] = f(void 0);
10
+ let i, n;
11
+ if (t[0] !== a ? (i = () => {
12
12
  (async () => {
13
13
  if (typeof a == "string") {
14
- const m = await u(a);
14
+ const m = await S(a);
15
15
  d(m);
16
16
  } else
17
17
  d(a);
18
18
  })();
19
- }, r = [a], e[0] = a, e[1] = i, e[2] = r) : (i = e[1], r = e[2]), h(i, r), !t) {
19
+ }, n = [a], t[0] = a, t[1] = i, t[2] = n) : (i = t[1], n = t[2]), h(i, n), !e) {
20
20
  let o;
21
- return e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ s.jsx("div", { className: "w-full flex justify-center p-4", children: /* @__PURE__ */ s.jsx(c, {}) }), e[3] = o) : o = e[3], o;
21
+ return t[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ s.jsx("div", { className: "w-full flex justify-center p-4", children: /* @__PURE__ */ s.jsx(c, {}) }), t[3] = o) : o = t[3], o;
22
22
  }
23
- let n;
24
- return e[4] !== t.advancedDataSelectionOptions || e[5] !== t.columnGridBy || e[6] !== t.dataFilters || e[7] !== t.dataSelectionOptions || e[8] !== t.dataSettings || e[9] !== t.dataTransform || e[10] !== t.debugMode || e[11] !== t.filters || e[12] !== t.graphDataConfiguration || e[13] !== t.graphSettings || e[14] !== t.graphType || e[15] !== t.minGraphHeight || e[16] !== t.minGraphWidth || e[17] !== t.noOfColumns || e[18] !== t.noOfFiltersPerRow || e[19] !== t.readableHeader || e[20] !== t.showCommonColorScale || e[21] !== t.theme ? (n = /* @__PURE__ */ s.jsx(g, { noOfColumns: t.noOfColumns, columnGridBy: t.columnGridBy, graphSettings: t.graphSettings, dataSettings: t.dataSettings, filters: t.filters, graphType: t.graphType, minGraphHeight: t.minGraphHeight, minGraphWidth: t.minGraphWidth, dataTransform: t.dataTransform, graphDataConfiguration: t.graphDataConfiguration, dataFilters: t.dataFilters, showCommonColorScale: t.showCommonColorScale, debugMode: t.debugMode, dataSelectionOptions: t.dataSelectionOptions, advancedDataSelectionOptions: t.advancedDataSelectionOptions, readableHeader: t.readableHeader, noOfFiltersPerRow: t.noOfFiltersPerRow, theme: t.theme }), e[4] = t.advancedDataSelectionOptions, e[5] = t.columnGridBy, e[6] = t.dataFilters, e[7] = t.dataSelectionOptions, e[8] = t.dataSettings, e[9] = t.dataTransform, e[10] = t.debugMode, e[11] = t.filters, e[12] = t.graphDataConfiguration, e[13] = t.graphSettings, e[14] = t.graphType, e[15] = t.minGraphHeight, e[16] = t.minGraphWidth, e[17] = t.noOfColumns, e[18] = t.noOfFiltersPerRow, e[19] = t.readableHeader, e[20] = t.showCommonColorScale, e[21] = t.theme, e[22] = n) : n = e[22], n;
23
+ let r;
24
+ return t[4] !== e.advancedDataSelectionOptions || t[5] !== e.columnGridBy || t[6] !== e.dataFilters || t[7] !== e.dataSelectionOptions || t[8] !== e.dataSettings || t[9] !== e.dataTransform || t[10] !== e.debugMode || t[11] !== e.filters || t[12] !== e.graphDataConfiguration || t[13] !== e.graphSettings || t[14] !== e.graphType || t[15] !== e.minGraphHeight || t[16] !== e.minGraphWidth || t[17] !== e.noOfColumns || t[18] !== e.noOfFiltersPerRow || t[19] !== e.readableHeader || t[20] !== e.showCommonColorScale || t[21] !== e.theme ? (r = /* @__PURE__ */ s.jsx(g, { noOfColumns: e.noOfColumns, columnGridBy: e.columnGridBy, graphSettings: e.graphSettings, dataSettings: e.dataSettings, filters: e.filters, graphType: e.graphType, minGraphHeight: e.minGraphHeight, minGraphWidth: e.minGraphWidth, dataTransform: e.dataTransform, graphDataConfiguration: e.graphDataConfiguration, dataFilters: e.dataFilters, showCommonColorScale: e.showCommonColorScale, debugMode: e.debugMode, dataSelectionOptions: e.dataSelectionOptions, advancedDataSelectionOptions: e.advancedDataSelectionOptions, readableHeader: e.readableHeader, noOfFiltersPerRow: e.noOfFiltersPerRow, theme: e.theme }), t[4] = e.advancedDataSelectionOptions, t[5] = e.columnGridBy, t[6] = e.dataFilters, t[7] = e.dataSelectionOptions, t[8] = e.dataSettings, t[9] = e.dataTransform, t[10] = e.debugMode, t[11] = e.filters, t[12] = e.graphDataConfiguration, t[13] = e.graphSettings, t[14] = e.graphType, t[15] = e.minGraphHeight, t[16] = e.minGraphWidth, t[17] = e.noOfColumns, t[18] = e.noOfFiltersPerRow, t[19] = e.readableHeader, t[20] = e.showCommonColorScale, t[21] = e.theme, t[22] = r) : r = t[22], r;
25
25
  }
26
26
  export {
27
- w as GriddedGraphsFromConfig
27
+ b as GriddedGraphsFromConfig
28
28
  };
29
29
  //# sourceMappingURL=GriddedGraphsFromConfig.js.map
package/dist/HeatMap.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-D4pAp7u0.cjs"),M=require("react"),Ge=require("./index-DQA8q5sC.cjs"),Fe=require("./numberFormattingFunction-u2iNHL_c.cjs"),Xe=require("./Tooltip-C9F3uYG0.cjs"),Ye=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Ve=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Pe=require("./XAxesLabels-C03jHniq.cjs"),Ze=require("./YAxesLabels-DeENFC2M.cjs"),Ie=require("./uniqBy-O05lp2S5.cjs"),Ue=require("./DetailsModal-Du8Fr1QD.cjs"),Be=require("./band-VYfcZeJ2.cjs"),ze=require("./ordinal-CrsysVE-.cjs"),Je=require("./threshold-DNsSUf8Q.cjs"),Ke=require("./linear-CgUCbw9F.cjs"),Ae=require("./proxy-CqH8m8IQ.cjs"),Qe=require("./use-in-view-dnRv_qqF.cjs"),_e=require("./GraphHeader.cjs"),et=require("./GraphFooter.cjs"),tt=require("./ColorLegendWithMouseOver.cjs"),ot=require("./LinearColorLegend.cjs"),st=require("./ThresholdColorLegendWithMouseOver.cjs"),g=require("./Colors.cjs"),it=require("./EmptyState-CFmiFPHz.cjs"),We=require("./GraphContainer-Cul9b74X.cjs");function rt(d){const e=o.compilerRuntimeExports.c(88),{data:a,showColumnLabels:z,leftMargin:C,rightMargin:J,truncateBy:j,width:K,height:Q,topMargin:me,bottomMargin:ge,tooltip:_,onSeriesMouseOver:n,suffix:Me,prefix:r,showValues:ee,colorDomain:w,colors:X,noDataColor:oe,scaleType:se,showRowLabels:fe,selectedColor:te,onSeriesMouseClick:Y,resetSelectionOnDoubleClick:Ce,detailsOnClick:q,styles:p,classNames:u,animate:m,precision:ve,locale:ie,padZeros:ye}=d,Oe=M.useRef(null);let re;e[0]!==m.amount||e[1]!==m.once?(re={once:m.once,amount:m.amount},e[0]=m.amount,e[1]=m.once,e[2]=re):re=e[2];const P=Qe.useInView(Oe,re);let le;e[3]!==ge||e[4]!==C||e[5]!==J||e[6]!==me?(le={top:me,bottom:ge,left:C,right:J},e[3]=ge,e[4]=C,e[5]=J,e[6]=me,e[7]=le):le=e[7];const h=le,[O,ne]=M.useState(void 0),[v,ae]=M.useState(void 0),[c,i]=M.useState(void 0),[ce,be]=M.useState(void 0),l=K-h.left-h.right,ue=Q-h.top-h.bottom;let k,L,D,S,N,A,V,f,H,R,E,x,y;if(e[8]!==m.duration||e[9]!==u?.graphObjectValues||e[10]!==u?.xAxis?.labels||e[11]!==u?.yAxis?.labels||e[12]!==w||e[13]!==X||e[14]!==a||e[15]!==q||e[16]!==ue||e[17]!==l||e[18]!==Q||e[19]!==P||e[20]!==ie||e[21]!==h.left||e[22]!==h.top||e[23]!==O||e[24]!==v||e[25]!==oe||e[26]!==Y||e[27]!==n||e[28]!==ye||e[29]!==ve||e[30]!==r||e[31]!==Ce||e[32]!==se||e[33]!==te||e[34]!==z||e[35]!==fe||e[36]!==ee||e[37]!==p?.graphObjectValues||e[38]!==p?.xAxis?.labels||e[39]!==p?.yAxis?.labels||e[40]!==Me||e[41]!==j||e[42]!==K){const de=Ie.uniqBy(a,"column",!0),B=Ie.uniqBy(a,"row",!0),he=Be.band().domain(B).range([0,ue]),W=he.bandwidth(),pe=Be.band().domain(de).range([0,l]),U=pe.bandwidth(),ke=se==="categorical"?ze.ordinal().domain(w).range(X):se==="threshold"?Je.threshold().domain(w).range(X):Ke.linear().domain(w).range(X);k=Ae.motion.svg,R=`${K}px`,E=`${Q}px`,x=`0 0 ${K} ${Q}`,e[56]===Symbol.for("react.memo_cache_sentinel")?(y={marginLeft:"auto",marginRight:"auto"},e[56]=y):y=e[56],L="ltr",D=Oe,S=o.jsxRuntimeExports.jsx("g",{transform:`translate(${h.left},0)`,children:z?de.map((t,G)=>o.jsxRuntimeExports.jsx(Pe.XAxesLabels,{y:0,x:pe(t),width:U,height:h.top-5,value:`${t}`.length<j?`${t}`:`${`${t}`.substring(0,j)}...`,style:p?.xAxis?.labels,className:u?.xAxis?.labels,alignment:"bottom",animate:{duration:0,once:!0,amount:0},isInView:P},G)):null}),N=o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${h.top})`,children:fe?B.map((t,G)=>o.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${t}`.length<j?`${t}`:`${`${t}`.substring(0,j)}...`,y:he(t),x:0,width:h.left,height:W,alignment:"right",style:p?.yAxis?.labels,className:u?.yAxis?.labels,animate:{duration:0,once:!0,amount:0},isInView:P},G)):null}),A=`translate(${h.left},${h.top})`,V=B.map((t,G)=>o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${he(t)})`,children:de.map(b=>o.jsxRuntimeExports.jsx("rect",{x:pe(b),y:0,width:U,height:W,style:{fill:oe},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"},`${t}-${b}`))},G)),f=a.filter(lt).map((t,G)=>{const b=Ve.checkIfNullOrUndefined(t.value)?oe:ke(t.value);return o.jsxRuntimeExports.jsxs("g",{transform:`translate(${pe(t.column)},${he(t.row)})`,onMouseEnter:F=>{ae(t),be(F.clientY),i(F.clientX),n?.(t)},onClick:()=>{(Y||q)&&(Ge.isEqual(O,t)&&Ce?(ne(void 0),Y?.(void 0)):(ne(t),Y?.(t)))},onMouseMove:F=>{ae(t),be(F.clientY),i(F.clientX)},onMouseLeave:()=>{ae(void 0),i(void 0),be(void 0),n?.(void 0)},opacity:te?te===b?1:.3:1,children:[o.jsxRuntimeExports.jsx(Ae.motion.rect,{x:0,y:0,width:U,height:W,className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{fill:b,opacity:0},whileInView:{fill:b,opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:P?"whileInView":"initial"}),ee&&!Ve.checkIfNullOrUndefined(t.value)?o.jsxRuntimeExports.jsx(Ae.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:P?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:o.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:U,height:W,children:o.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit p-1",children:o.jsxRuntimeExports.jsx("p",{className:o.mo("text-xs text-center m-0 leading-[1.25] graph-value",u?.graphObjectValues),style:{color:Ye.getTextColorBasedOnBgColor(b),...p?.graphObjectValues||{}},children:Fe.numberFormattingFunction(t.value,void 0,ve,r,Me,ie,ye)})})},G)}):null]},`${t.column}-${t.row}`)}),H=v?o.jsxRuntimeExports.jsx("rect",{x:pe(v.column),y:he(v.row),width:U,height:W,style:{fill:"none",fillOpacity:0,strokeWidth:1.5},className:"stroke-primary-gray-700 dark:stroke-primary-gray-300"}):null,e[8]=m.duration,e[9]=u?.graphObjectValues,e[10]=u?.xAxis?.labels,e[11]=u?.yAxis?.labels,e[12]=w,e[13]=X,e[14]=a,e[15]=q,e[16]=ue,e[17]=l,e[18]=Q,e[19]=P,e[20]=ie,e[21]=h.left,e[22]=h.top,e[23]=O,e[24]=v,e[25]=oe,e[26]=Y,e[27]=n,e[28]=ye,e[29]=ve,e[30]=r,e[31]=Ce,e[32]=se,e[33]=te,e[34]=z,e[35]=fe,e[36]=ee,e[37]=p?.graphObjectValues,e[38]=p?.xAxis?.labels,e[39]=p?.yAxis?.labels,e[40]=Me,e[41]=j,e[42]=K,e[43]=k,e[44]=L,e[45]=D,e[46]=S,e[47]=N,e[48]=A,e[49]=V,e[50]=f,e[51]=H,e[52]=R,e[53]=E,e[54]=x,e[55]=y}else k=e[43],L=e[44],D=e[45],S=e[46],N=e[47],A=e[48],V=e[49],f=e[50],H=e[51],R=e[52],E=e[53],x=e[54],y=e[55];let $;e[57]!==A||e[58]!==V||e[59]!==f||e[60]!==H?($=o.jsxRuntimeExports.jsxs("g",{transform:A,children:[V,f,H]}),e[57]=A,e[58]=V,e[59]=f,e[60]=H,e[61]=$):$=e[61];let T;e[62]!==k||e[63]!==L||e[64]!==D||e[65]!==S||e[66]!==N||e[67]!==$||e[68]!==R||e[69]!==E||e[70]!==x||e[71]!==y?(T=o.jsxRuntimeExports.jsxs(k,{width:R,height:E,viewBox:x,style:y,direction:L,ref:D,children:[S,N,$]}),e[62]=k,e[63]=L,e[64]=D,e[65]=S,e[66]=N,e[67]=$,e[68]=R,e[69]=E,e[70]=x,e[71]=y,e[72]=T):T=e[72];let s;e[73]!==u?.tooltip||e[74]!==c||e[75]!==ce||e[76]!==v||e[77]!==p?.tooltip||e[78]!==_?(s=v&&_&&c&&ce?o.jsxRuntimeExports.jsx(Xe.Tooltip,{data:v,body:_,xPos:c,yPos:ce,backgroundStyle:p?.tooltip,className:u?.tooltip}):null,e[73]=u?.tooltip,e[74]=c,e[75]=ce,e[76]=v,e[77]=p?.tooltip,e[78]=_,e[79]=s):s=e[79];let I;e[80]!==u?.modal||e[81]!==q||e[82]!==O?(I=q&&O!==void 0?o.jsxRuntimeExports.jsx(Ue.DetailsModal,{body:q,data:O,setData:ne,className:u?.modal}):null,e[80]=u?.modal,e[81]=q,e[82]=O,e[83]=I):I=e[83];let Z;return e[84]!==T||e[85]!==s||e[86]!==I?(Z=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[T,s,I]}),e[84]=T,e[85]=s,e[86]=I,e[87]=Z):Z=e[87],Z}function lt(d){return!Ve.checkIfNullOrUndefined(d.value)}function nt(d){const e=o.compilerRuntimeExports.c(91),{data:a,graphTitle:z,colors:C,sources:J,graphDescription:j,showColumnLabels:K,leftMargin:Q,rightMargin:me,truncateBy:ge,height:_,width:n,scaleType:Me,colorDomain:r,footNote:ee,colorLegendTitle:w,padding:X,backgroundColor:oe,topMargin:se,bottomMargin:fe,tooltip:te,onSeriesMouseOver:Y,showRowLabels:Ce,relativeHeight:q,showValues:p,graphID:u,noDataColor:m,showColorScale:ve,onSeriesMouseClick:ie,graphDownload:ye,dataDownload:Oe,fillContainer:re,language:P,showNAColor:le,minHeight:h,theme:O,ariaLabel:ne,resetSelectionOnDoubleClick:v,detailsOnClick:ae,styles:c,classNames:i,animate:ce,naLabel:be,numberDisplayOptions:l}=d,ue=K===void 0?!0:K,k=Q===void 0?100:Q,L=me===void 0?10:me,D=ge===void 0?999:ge,S=oe===void 0?!1:oe,N=se===void 0?30:se,A=fe===void 0?10:fe,V=Ce===void 0?!0:Ce,f=m===void 0?g.Colors.gray:m,H=ve===void 0?!0:ve,R=ye===void 0?!1:ye,E=Oe===void 0?!1:Oe,x=re===void 0?!0:re,y=P===void 0?"en":P,$=le===void 0?!0:le,T=h===void 0?0:h,s=O===void 0?"light":O,I=v===void 0?!0:v,Z=ce===void 0?!1:ce,de=be===void 0?"NA":be,[B,he]=M.useState(0),[W,pe]=M.useState(0),[U,ke]=M.useState(void 0),t=M.useRef(null),G=M.useRef(null);let b,F;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{const He=new ResizeObserver(Te=>{he(Te[0].target.clientWidth||620),pe(Te[0].target.clientHeight||480)});return t.current&&He.observe(t.current),()=>He.disconnect()},F=[],e[0]=b,e[1]=F):(b=e[0],F=e[1]),M.useEffect(b,F);const xe=Me||(typeof r[0]=="string"?"categorical":r.length===2?"linear":"threshold"),De=i?.graphContainer,Se=c?.graphContainer,Ne=x?void 0:n;let je;e[2]!==i?.description||e[3]!==i?.title||e[4]!==a||e[5]!==E||e[6]!==j||e[7]!==R||e[8]!==z||e[9]!==c?.description||e[10]!==c?.title||e[11]!==n?(je=z||j||R||E?o.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:i?.title,description:i?.description},graphTitle:z,graphDescription:j,width:n,graphDownload:R?G:void 0,dataDownload:E?a.map(pt).filter(ht).length>0?a.map(dt).filter(ut):a.filter(ct):null}):null,e[2]=i?.description,e[3]=i?.title,e[4]=a,e[5]=E,e[6]=j,e[7]=R,e[8]=z,e[9]=c?.description,e[10]=c?.title,e[11]=n,e[12]=je):je=e[12];let we;e[13]!==i?.colorLegend||e[14]!==r||e[15]!==w||e[16]!==C||e[17]!==a.length||e[18]!==x||e[19]!==de||e[20]!==f||e[21]!==l?.locale||e[22]!==xe||e[23]!==H||e[24]!==$||e[25]!==s||e[26]!==n?(we=H&&a.length>0?xe==="categorical"?o.jsxRuntimeExports.jsx(tt.ColorLegendWithMouseOver,{width:x?void 0:n,colorLegendTitle:w,colors:C||(typeof r[0]=="string"?g.Colors[s].categoricalColors.colors:r.length===2?[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]]:g.Colors[s].sequentialColors[`neutralColorsx0${r.length+1}`]),colorDomain:r.map(at),setSelectedColor:ke,showNAColor:$,className:i?.colorLegend}):xe==="threshold"?o.jsxRuntimeExports.jsx(st.ThresholdColorLegendWithMouseOver,{width:x?void 0:n,colorLegendTitle:w,colors:C||(typeof r[0]=="string"?g.Colors[s].categoricalColors.colors:r.length===2?[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]]:g.Colors[s].sequentialColors[`neutralColorsx0${r.length+1}`]),colorDomain:r,setSelectedColor:ke,naColor:f,locale:l?.locale||"en",showNAColor:$,naLabel:de}):o.jsxRuntimeExports.jsx(ot.LinearColorLegend,{width:x?void 0:n,colorLegendTitle:w,colors:C||[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]],locale:l?.locale||"en",colorDomain:r,className:i?.colorLegend}):null,e[13]=i?.colorLegend,e[14]=r,e[15]=w,e[16]=C,e[17]=a.length,e[18]=x,e[19]=de,e[20]=f,e[21]=l?.locale,e[22]=xe,e[23]=H,e[24]=$,e[25]=s,e[26]=n,e[27]=we):we=e[27];let qe;e[28]!==a.length?(qe=a.length===0&&o.jsxRuntimeExports.jsx(it.EmptyState,{}),e[28]=a.length,e[29]=qe):qe=e[29];let Re;e[30]!==Z||e[31]!==A||e[32]!==i||e[33]!==r||e[34]!==C||e[35]!==a||e[36]!==ae||e[37]!==x||e[38]!==k||e[39]!==f||e[40]!==l?.locale||e[41]!==l?.padZeros||e[42]!==l?.precision||e[43]!==l?.prefix||e[44]!==l?.suffix||e[45]!==ie||e[46]!==Y||e[47]!==I||e[48]!==L||e[49]!==xe||e[50]!==U||e[51]!==ue||e[52]!==V||e[53]!==p||e[54]!==c||e[55]!==W||e[56]!==B||e[57]!==s||e[58]!==te||e[59]!==N||e[60]!==D||e[61]!==n?(Re=B&&W&&a.length>0?o.jsxRuntimeExports.jsx(rt,{data:a,colorDomain:r,width:x||!n||B<n?B:n,height:W,colors:C||(typeof r[0]=="string"?g.Colors[s].categoricalColors.colors:r.length===2?[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]]:g.Colors[s].sequentialColors[`neutralColorsx0${r.length+1}`]),noDataColor:f,scaleType:xe,showColumnLabels:ue,leftMargin:k,rightMargin:L,topMargin:N,bottomMargin:A,selectedColor:U,truncateBy:D,showRowLabels:V,tooltip:te,onSeriesMouseOver:Y,showValues:p,onSeriesMouseClick:ie,resetSelectionOnDoubleClick:I,detailsOnClick:ae,styles:c,classNames:i,animate:Z===!0?{duration:.5,once:!0,amount:.5}:Z||{duration:0,once:!0,amount:0},locale:l?.locale||"en",padZeros:l?.padZeros||!1,suffix:l?.suffix||"",prefix:l?.prefix||"",precision:l?.precision??2}):null,e[30]=Z,e[31]=A,e[32]=i,e[33]=r,e[34]=C,e[35]=a,e[36]=ae,e[37]=x,e[38]=k,e[39]=f,e[40]=l?.locale,e[41]=l?.padZeros,e[42]=l?.precision,e[43]=l?.prefix,e[44]=l?.suffix,e[45]=ie,e[46]=Y,e[47]=I,e[48]=L,e[49]=xe,e[50]=U,e[51]=ue,e[52]=V,e[53]=p,e[54]=c,e[55]=W,e[56]=B,e[57]=s,e[58]=te,e[59]=N,e[60]=D,e[61]=n,e[62]=Re):Re=e[62];let Ee;e[63]!==qe||e[64]!==Re?(Ee=o.jsxRuntimeExports.jsxs(We.GraphArea,{ref:t,children:[qe,Re]}),e[63]=qe,e[64]=Re,e[65]=Ee):Ee=e[65];let $e;e[66]!==i?.footnote||e[67]!==i?.source||e[68]!==ee||e[69]!==J||e[70]!==c?.footnote||e[71]!==c?.source||e[72]!==n?($e=J||ee?o.jsxRuntimeExports.jsx(et.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:J,footNote:ee,width:n}):null,e[66]=i?.footnote,e[67]=i?.source,e[68]=ee,e[69]=J,e[70]=c?.footnote,e[71]=c?.source,e[72]=n,e[73]=$e):$e=e[73];let Le;return e[74]!==ne||e[75]!==S||e[76]!==u||e[77]!==_||e[78]!==y||e[79]!==T||e[80]!==X||e[81]!==q||e[82]!==De||e[83]!==Se||e[84]!==Ne||e[85]!==je||e[86]!==we||e[87]!==Ee||e[88]!==$e||e[89]!==s?(Le=o.jsxRuntimeExports.jsxs(We.GraphContainer,{className:De,style:Se,id:u,ref:G,"aria-label":ne,backgroundColor:S,theme:s,language:y,minHeight:T,width:Ne,height:_,relativeHeight:q,padding:X,children:[je,we,Ee,$e]}),e[74]=ne,e[75]=S,e[76]=u,e[77]=_,e[78]=y,e[79]=T,e[80]=X,e[81]=q,e[82]=De,e[83]=Se,e[84]=Ne,e[85]=je,e[86]=we,e[87]=Ee,e[88]=$e,e[89]=s,e[90]=Le):Le=e[90],Le}function at(d){return`${d}`}function ct(d){return d!==void 0}function ut(d){return d!==void 0}function dt(d){return d.data}function ht(d){return d!==void 0}function pt(d){return d.data}exports.HeatMap=nt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./compiler-runtime-oPPev21o.cjs"),M=require("react"),Ge=require("./index-DQA8q5sC.cjs"),Fe=require("@undp/design-system-react/cn"),Xe=require("./numberFormattingFunction-u2iNHL_c.cjs"),Ye=require("./Tooltip-DwUFLDrj.cjs"),Ze=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Ve=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Pe=require("./XAxesLabels-0ROJnigy.cjs"),Ue=require("./YAxesLabels-DIa2cEXL.cjs"),Ie=require("./uniqBy-O05lp2S5.cjs"),ze=require("./DetailsModal-BmjtLqrZ.cjs"),Be=require("./band-VYfcZeJ2.cjs"),Je=require("./ordinal-CrsysVE-.cjs"),Ke=require("./threshold-DNsSUf8Q.cjs"),Qe=require("./linear-CgUCbw9F.cjs"),Ae=require("./proxy-QMeVVqam.cjs"),_e=require("./use-in-view-DjR_gqJP.cjs"),et=require("./GraphHeader.cjs"),tt=require("./GraphFooter.cjs"),ot=require("./ColorLegendWithMouseOver.cjs"),st=require("./LinearColorLegend.cjs"),rt=require("./ThresholdColorLegendWithMouseOver.cjs"),g=require("./Colors.cjs"),it=require("./EmptyState-BoaUUuo6.cjs"),We=require("./GraphContainer-gaG9TSy4.cjs");function lt(d){const e=o.compilerRuntimeExports.c(88),{data:a,showColumnLabels:z,leftMargin:C,rightMargin:J,truncateBy:j,width:K,height:Q,topMargin:me,bottomMargin:ge,tooltip:_,onSeriesMouseOver:n,suffix:Me,prefix:i,showValues:ee,colorDomain:w,colors:X,noDataColor:oe,scaleType:se,showRowLabels:fe,selectedColor:te,onSeriesMouseClick:Y,resetSelectionOnDoubleClick:Ce,detailsOnClick:q,styles:p,classNames:u,animate:m,precision:ve,locale:re,padZeros:ye}=d,Oe=M.useRef(null);let ie;e[0]!==m.amount||e[1]!==m.once?(ie={once:m.once,amount:m.amount},e[0]=m.amount,e[1]=m.once,e[2]=ie):ie=e[2];const Z=_e.useInView(Oe,ie);let le;e[3]!==ge||e[4]!==C||e[5]!==J||e[6]!==me?(le={top:me,bottom:ge,left:C,right:J},e[3]=ge,e[4]=C,e[5]=J,e[6]=me,e[7]=le):le=e[7];const h=le,[O,ne]=M.useState(void 0),[v,ae]=M.useState(void 0),[c,r]=M.useState(void 0),[ce,be]=M.useState(void 0),l=K-h.left-h.right,ue=Q-h.top-h.bottom;let k,L,D,S,N,A,V,f,T,R,E,x,y;if(e[8]!==m.duration||e[9]!==u?.graphObjectValues||e[10]!==u?.xAxis?.labels||e[11]!==u?.yAxis?.labels||e[12]!==w||e[13]!==X||e[14]!==a||e[15]!==q||e[16]!==ue||e[17]!==l||e[18]!==Q||e[19]!==Z||e[20]!==re||e[21]!==h.left||e[22]!==h.top||e[23]!==O||e[24]!==v||e[25]!==oe||e[26]!==Y||e[27]!==n||e[28]!==ye||e[29]!==ve||e[30]!==i||e[31]!==Ce||e[32]!==se||e[33]!==te||e[34]!==z||e[35]!==fe||e[36]!==ee||e[37]!==p?.graphObjectValues||e[38]!==p?.xAxis?.labels||e[39]!==p?.yAxis?.labels||e[40]!==Me||e[41]!==j||e[42]!==K){const de=Ie.uniqBy(a,"column",!0),B=Ie.uniqBy(a,"row",!0),he=Be.band().domain(B).range([0,ue]),W=he.bandwidth(),pe=Be.band().domain(de).range([0,l]),U=pe.bandwidth(),ke=se==="categorical"?Je.ordinal().domain(w).range(X):se==="threshold"?Ke.threshold().domain(w).range(X):Qe.linear().domain(w).range(X);k=Ae.motion.svg,R=`${K}px`,E=`${Q}px`,x=`0 0 ${K} ${Q}`,e[56]===Symbol.for("react.memo_cache_sentinel")?(y={marginLeft:"auto",marginRight:"auto"},e[56]=y):y=e[56],L="ltr",D=Oe,S=o.jsxRuntimeExports.jsx("g",{transform:`translate(${h.left},0)`,children:z?de.map((t,G)=>o.jsxRuntimeExports.jsx(Pe.XAxesLabels,{y:0,x:pe(t),width:U,height:h.top-5,value:`${t}`.length<j?`${t}`:`${`${t}`.substring(0,j)}...`,style:p?.xAxis?.labels,className:u?.xAxis?.labels,alignment:"bottom",animate:{duration:0,once:!0,amount:0},isInView:Z},G)):null}),N=o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${h.top})`,children:fe?B.map((t,G)=>o.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${t}`.length<j?`${t}`:`${`${t}`.substring(0,j)}...`,y:he(t),x:0,width:h.left,height:W,alignment:"right",style:p?.yAxis?.labels,className:u?.yAxis?.labels,animate:{duration:0,once:!0,amount:0},isInView:Z},G)):null}),A=`translate(${h.left},${h.top})`,V=B.map((t,G)=>o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${he(t)})`,children:de.map(b=>o.jsxRuntimeExports.jsx("rect",{x:pe(b),y:0,width:U,height:W,style:{fill:oe},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"},`${t}-${b}`))},G)),f=a.filter(nt).map((t,G)=>{const b=Ve.checkIfNullOrUndefined(t.value)?oe:ke(t.value);return o.jsxRuntimeExports.jsxs("g",{transform:`translate(${pe(t.column)},${he(t.row)})`,onMouseEnter:F=>{ae(t),be(F.clientY),r(F.clientX),n?.(t)},onClick:()=>{(Y||q)&&(Ge.isEqual(O,t)&&Ce?(ne(void 0),Y?.(void 0)):(ne(t),Y?.(t)))},onMouseMove:F=>{ae(t),be(F.clientY),r(F.clientX)},onMouseLeave:()=>{ae(void 0),r(void 0),be(void 0),n?.(void 0)},opacity:te?te===b?1:.3:1,children:[o.jsxRuntimeExports.jsx(Ae.motion.rect,{x:0,y:0,width:U,height:W,className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{fill:b,opacity:0},whileInView:{fill:b,opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:Z?"whileInView":"initial"}),ee&&!Ve.checkIfNullOrUndefined(t.value)?o.jsxRuntimeExports.jsx(Ae.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:o.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:U,height:W,children:o.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit p-1",children:o.jsxRuntimeExports.jsx("p",{className:Fe.cn("text-xs text-center m-0 leading-[1.25] graph-value",u?.graphObjectValues),style:{color:Ze.getTextColorBasedOnBgColor(b),...p?.graphObjectValues||{}},children:Xe.numberFormattingFunction(t.value,void 0,ve,i,Me,re,ye)})})},G)}):null]},`${t.column}-${t.row}`)}),T=v?o.jsxRuntimeExports.jsx("rect",{x:pe(v.column),y:he(v.row),width:U,height:W,style:{fill:"none",fillOpacity:0,strokeWidth:1.5},className:"stroke-primary-gray-700 dark:stroke-primary-gray-300"}):null,e[8]=m.duration,e[9]=u?.graphObjectValues,e[10]=u?.xAxis?.labels,e[11]=u?.yAxis?.labels,e[12]=w,e[13]=X,e[14]=a,e[15]=q,e[16]=ue,e[17]=l,e[18]=Q,e[19]=Z,e[20]=re,e[21]=h.left,e[22]=h.top,e[23]=O,e[24]=v,e[25]=oe,e[26]=Y,e[27]=n,e[28]=ye,e[29]=ve,e[30]=i,e[31]=Ce,e[32]=se,e[33]=te,e[34]=z,e[35]=fe,e[36]=ee,e[37]=p?.graphObjectValues,e[38]=p?.xAxis?.labels,e[39]=p?.yAxis?.labels,e[40]=Me,e[41]=j,e[42]=K,e[43]=k,e[44]=L,e[45]=D,e[46]=S,e[47]=N,e[48]=A,e[49]=V,e[50]=f,e[51]=T,e[52]=R,e[53]=E,e[54]=x,e[55]=y}else k=e[43],L=e[44],D=e[45],S=e[46],N=e[47],A=e[48],V=e[49],f=e[50],T=e[51],R=e[52],E=e[53],x=e[54],y=e[55];let $;e[57]!==A||e[58]!==V||e[59]!==f||e[60]!==T?($=o.jsxRuntimeExports.jsxs("g",{transform:A,children:[V,f,T]}),e[57]=A,e[58]=V,e[59]=f,e[60]=T,e[61]=$):$=e[61];let H;e[62]!==k||e[63]!==L||e[64]!==D||e[65]!==S||e[66]!==N||e[67]!==$||e[68]!==R||e[69]!==E||e[70]!==x||e[71]!==y?(H=o.jsxRuntimeExports.jsxs(k,{width:R,height:E,viewBox:x,style:y,direction:L,ref:D,children:[S,N,$]}),e[62]=k,e[63]=L,e[64]=D,e[65]=S,e[66]=N,e[67]=$,e[68]=R,e[69]=E,e[70]=x,e[71]=y,e[72]=H):H=e[72];let s;e[73]!==u?.tooltip||e[74]!==c||e[75]!==ce||e[76]!==v||e[77]!==p?.tooltip||e[78]!==_?(s=v&&_&&c&&ce?o.jsxRuntimeExports.jsx(Ye.Tooltip,{data:v,body:_,xPos:c,yPos:ce,backgroundStyle:p?.tooltip,className:u?.tooltip}):null,e[73]=u?.tooltip,e[74]=c,e[75]=ce,e[76]=v,e[77]=p?.tooltip,e[78]=_,e[79]=s):s=e[79];let I;e[80]!==u?.modal||e[81]!==q||e[82]!==O?(I=q&&O!==void 0?o.jsxRuntimeExports.jsx(ze.DetailsModal,{body:q,data:O,setData:ne,className:u?.modal}):null,e[80]=u?.modal,e[81]=q,e[82]=O,e[83]=I):I=e[83];let P;return e[84]!==H||e[85]!==s||e[86]!==I?(P=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[H,s,I]}),e[84]=H,e[85]=s,e[86]=I,e[87]=P):P=e[87],P}function nt(d){return!Ve.checkIfNullOrUndefined(d.value)}function at(d){const e=o.compilerRuntimeExports.c(91),{data:a,graphTitle:z,colors:C,sources:J,graphDescription:j,showColumnLabels:K,leftMargin:Q,rightMargin:me,truncateBy:ge,height:_,width:n,scaleType:Me,colorDomain:i,footNote:ee,colorLegendTitle:w,padding:X,backgroundColor:oe,topMargin:se,bottomMargin:fe,tooltip:te,onSeriesMouseOver:Y,showRowLabels:Ce,relativeHeight:q,showValues:p,graphID:u,noDataColor:m,showColorScale:ve,onSeriesMouseClick:re,graphDownload:ye,dataDownload:Oe,fillContainer:ie,language:Z,showNAColor:le,minHeight:h,theme:O,ariaLabel:ne,resetSelectionOnDoubleClick:v,detailsOnClick:ae,styles:c,classNames:r,animate:ce,naLabel:be,numberDisplayOptions:l}=d,ue=K===void 0?!0:K,k=Q===void 0?100:Q,L=me===void 0?10:me,D=ge===void 0?999:ge,S=oe===void 0?!1:oe,N=se===void 0?30:se,A=fe===void 0?10:fe,V=Ce===void 0?!0:Ce,f=m===void 0?g.Colors.gray:m,T=ve===void 0?!0:ve,R=ye===void 0?!1:ye,E=Oe===void 0?!1:Oe,x=ie===void 0?!0:ie,y=Z===void 0?"en":Z,$=le===void 0?!0:le,H=h===void 0?0:h,s=O===void 0?"light":O,I=v===void 0?!0:v,P=ce===void 0?!1:ce,de=be===void 0?"NA":be,[B,he]=M.useState(0),[W,pe]=M.useState(0),[U,ke]=M.useState(void 0),t=M.useRef(null),G=M.useRef(null);let b,F;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{const Te=new ResizeObserver(He=>{he(He[0].target.clientWidth||620),pe(He[0].target.clientHeight||480)});return t.current&&Te.observe(t.current),()=>Te.disconnect()},F=[],e[0]=b,e[1]=F):(b=e[0],F=e[1]),M.useEffect(b,F);const xe=Me||(typeof i[0]=="string"?"categorical":i.length===2?"linear":"threshold"),De=r?.graphContainer,Se=c?.graphContainer,Ne=x?void 0:n;let je;e[2]!==r?.description||e[3]!==r?.title||e[4]!==a||e[5]!==E||e[6]!==j||e[7]!==R||e[8]!==z||e[9]!==c?.description||e[10]!==c?.title||e[11]!==n?(je=z||j||R||E?o.jsxRuntimeExports.jsx(et.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:r?.title,description:r?.description},graphTitle:z,graphDescription:j,width:n,graphDownload:R?G:void 0,dataDownload:E?a.map(xt).filter(pt).length>0?a.map(ht).filter(dt):a.filter(ut):null}):null,e[2]=r?.description,e[3]=r?.title,e[4]=a,e[5]=E,e[6]=j,e[7]=R,e[8]=z,e[9]=c?.description,e[10]=c?.title,e[11]=n,e[12]=je):je=e[12];let we;e[13]!==r?.colorLegend||e[14]!==i||e[15]!==w||e[16]!==C||e[17]!==a.length||e[18]!==x||e[19]!==de||e[20]!==f||e[21]!==l?.locale||e[22]!==xe||e[23]!==T||e[24]!==$||e[25]!==s||e[26]!==n?(we=T&&a.length>0?xe==="categorical"?o.jsxRuntimeExports.jsx(ot.ColorLegendWithMouseOver,{width:x?void 0:n,colorLegendTitle:w,colors:C||(typeof i[0]=="string"?g.Colors[s].categoricalColors.colors:i.length===2?[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]]:g.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),colorDomain:i.map(ct),setSelectedColor:ke,showNAColor:$,className:r?.colorLegend}):xe==="threshold"?o.jsxRuntimeExports.jsx(rt.ThresholdColorLegendWithMouseOver,{width:x?void 0:n,colorLegendTitle:w,colors:C||(typeof i[0]=="string"?g.Colors[s].categoricalColors.colors:i.length===2?[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]]:g.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),colorDomain:i,setSelectedColor:ke,naColor:f,locale:l?.locale||"en",showNAColor:$,naLabel:de}):o.jsxRuntimeExports.jsx(st.LinearColorLegend,{width:x?void 0:n,colorLegendTitle:w,colors:C||[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]],locale:l?.locale||"en",colorDomain:i,className:r?.colorLegend}):null,e[13]=r?.colorLegend,e[14]=i,e[15]=w,e[16]=C,e[17]=a.length,e[18]=x,e[19]=de,e[20]=f,e[21]=l?.locale,e[22]=xe,e[23]=T,e[24]=$,e[25]=s,e[26]=n,e[27]=we):we=e[27];let qe;e[28]!==a.length?(qe=a.length===0&&o.jsxRuntimeExports.jsx(it.EmptyState,{}),e[28]=a.length,e[29]=qe):qe=e[29];let Re;e[30]!==P||e[31]!==A||e[32]!==r||e[33]!==i||e[34]!==C||e[35]!==a||e[36]!==ae||e[37]!==x||e[38]!==k||e[39]!==f||e[40]!==l?.locale||e[41]!==l?.padZeros||e[42]!==l?.precision||e[43]!==l?.prefix||e[44]!==l?.suffix||e[45]!==re||e[46]!==Y||e[47]!==I||e[48]!==L||e[49]!==xe||e[50]!==U||e[51]!==ue||e[52]!==V||e[53]!==p||e[54]!==c||e[55]!==W||e[56]!==B||e[57]!==s||e[58]!==te||e[59]!==N||e[60]!==D||e[61]!==n?(Re=B&&W&&a.length>0?o.jsxRuntimeExports.jsx(lt,{data:a,colorDomain:i,width:x||!n||B<n?B:n,height:W,colors:C||(typeof i[0]=="string"?g.Colors[s].categoricalColors.colors:i.length===2?[g.Colors[s].sequentialColors.neutralColorsx09[0],g.Colors[s].sequentialColors.neutralColorsx09[8]]:g.Colors[s].sequentialColors[`neutralColorsx0${i.length+1}`]),noDataColor:f,scaleType:xe,showColumnLabels:ue,leftMargin:k,rightMargin:L,topMargin:N,bottomMargin:A,selectedColor:U,truncateBy:D,showRowLabels:V,tooltip:te,onSeriesMouseOver:Y,showValues:p,onSeriesMouseClick:re,resetSelectionOnDoubleClick:I,detailsOnClick:ae,styles:c,classNames:r,animate:P===!0?{duration:.5,once:!0,amount:.5}:P||{duration:0,once:!0,amount:0},locale:l?.locale||"en",padZeros:l?.padZeros||!1,suffix:l?.suffix||"",prefix:l?.prefix||"",precision:l?.precision??2}):null,e[30]=P,e[31]=A,e[32]=r,e[33]=i,e[34]=C,e[35]=a,e[36]=ae,e[37]=x,e[38]=k,e[39]=f,e[40]=l?.locale,e[41]=l?.padZeros,e[42]=l?.precision,e[43]=l?.prefix,e[44]=l?.suffix,e[45]=re,e[46]=Y,e[47]=I,e[48]=L,e[49]=xe,e[50]=U,e[51]=ue,e[52]=V,e[53]=p,e[54]=c,e[55]=W,e[56]=B,e[57]=s,e[58]=te,e[59]=N,e[60]=D,e[61]=n,e[62]=Re):Re=e[62];let Ee;e[63]!==qe||e[64]!==Re?(Ee=o.jsxRuntimeExports.jsxs(We.GraphArea,{ref:t,children:[qe,Re]}),e[63]=qe,e[64]=Re,e[65]=Ee):Ee=e[65];let $e;e[66]!==r?.footnote||e[67]!==r?.source||e[68]!==ee||e[69]!==J||e[70]!==c?.footnote||e[71]!==c?.source||e[72]!==n?($e=J||ee?o.jsxRuntimeExports.jsx(tt.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:J,footNote:ee,width:n}):null,e[66]=r?.footnote,e[67]=r?.source,e[68]=ee,e[69]=J,e[70]=c?.footnote,e[71]=c?.source,e[72]=n,e[73]=$e):$e=e[73];let Le;return e[74]!==ne||e[75]!==S||e[76]!==u||e[77]!==_||e[78]!==y||e[79]!==H||e[80]!==X||e[81]!==q||e[82]!==De||e[83]!==Se||e[84]!==Ne||e[85]!==je||e[86]!==we||e[87]!==Ee||e[88]!==$e||e[89]!==s?(Le=o.jsxRuntimeExports.jsxs(We.GraphContainer,{className:De,style:Se,id:u,ref:G,"aria-label":ne,backgroundColor:S,theme:s,language:y,minHeight:H,width:Ne,height:_,relativeHeight:q,padding:X,children:[je,we,Ee,$e]}),e[74]=ne,e[75]=S,e[76]=u,e[77]=_,e[78]=y,e[79]=H,e[80]=X,e[81]=q,e[82]=De,e[83]=Se,e[84]=Ne,e[85]=je,e[86]=we,e[87]=Ee,e[88]=$e,e[89]=s,e[90]=Le):Le=e[90],Le}function ct(d){return`${d}`}function ut(d){return d!==void 0}function dt(d){return d!==void 0}function ht(d){return d.data}function pt(d){return d!==void 0}function xt(d){return d.data}exports.HeatMap=at;
2
2
  //# sourceMappingURL=HeatMap.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeatMap.cjs","sources":["../src/Components/Graphs/HeatMap/Graph.tsx","../src/Components/Graphs/HeatMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { scaleLinear, scaleBand, scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport { useRef, useState } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n HeatMapDataType,\r\n ScaleDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { XAxesLabels } from '@/Components/Elements/Axes/XAxesLabels';\r\nimport { YAxesLabels } from '@/Components/Elements/Axes/YAxesLabels';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HeatMapDataType[];\r\n colorDomain: string[] | number[];\r\n colors: string[];\r\n noDataColor: string;\r\n scaleType: ScaleDataType;\r\n showColumnLabels: boolean;\r\n leftMargin: number;\r\n truncateBy: number;\r\n width: number;\r\n height: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n showRowLabels: boolean;\r\n bottomMargin: number;\r\n suffix: string;\r\n prefix: string;\r\n showValues?: 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 selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\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 animate: AnimateDataType;\r\n precision: number;\r\n locale: string;\r\n padZeros: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n showColumnLabels,\r\n leftMargin,\r\n rightMargin,\r\n truncateBy,\r\n width,\r\n height,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n suffix,\r\n prefix,\r\n showValues,\r\n colorDomain,\r\n colors,\r\n noDataColor,\r\n scaleType,\r\n showRowLabels,\r\n selectedColor,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate,\r\n precision,\r\n locale,\r\n padZeros,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [mouseOverData, setMouseOverData] = useState<HeatMapDataType | undefined>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const columns = uniqBy(data, 'column', true) as string[];\r\n const rows = uniqBy(data, 'row', true) as string[];\r\n const y = scaleBand().domain(rows).range([0, graphHeight]);\r\n const barHeight = y.bandwidth();\r\n const x = scaleBand().domain(columns).range([0, graphWidth]);\r\n const barWidth = x.bandwidth();\r\n const colorScale =\r\n scaleType === 'categorical'\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleType === 'threshold'\r\n ? scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors)\r\n : scaleLinear<string, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n style={{ marginLeft: 'auto', marginRight: 'auto' }}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${0})`}>\r\n {showColumnLabels\r\n ? columns.map((d, i) => (\r\n <XAxesLabels\r\n key={i}\r\n y={0}\r\n x={x(d) as number}\r\n width={barWidth}\r\n height={margin.top - 5}\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n style={styles?.xAxis?.labels}\r\n className={classNames?.xAxis?.labels}\r\n alignment='bottom'\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${0},${margin.top})`}>\r\n {showRowLabels\r\n ? rows.map((d, i) => (\r\n <YAxesLabels\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n key={i}\r\n y={y(d) as number}\r\n x={0}\r\n width={margin.left}\r\n height={barHeight}\r\n alignment='right'\r\n style={styles?.yAxis?.labels}\r\n className={classNames?.yAxis?.labels}\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {rows.map((d, i) => (\r\n <g key={i} transform={`translate(0,${y(d)})`}>\r\n {columns.map(el => (\r\n <rect\r\n key={`${d}-${el}`}\r\n x={x(el)}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{ fill: noDataColor }}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.value))\r\n .map((d, i) => {\r\n const color = !checkIfNullOrUndefined(d.value)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.value as any)\r\n : noDataColor;\r\n return (\r\n <g\r\n key={`${d.column}-${d.row}`}\r\n transform={`translate(${x(d.column)},${y(d.row)})`}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n opacity={selectedColor ? (selectedColor === color ? 1 : 0.3) : 1}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\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 />\r\n {showValues && !checkIfNullOrUndefined(d.value) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: { opacity: 1, transition: { duration: animate.duration } },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject key={i} y={0} x={0} width={barWidth} height={barHeight}>\r\n <div className='flex flex-col justify-center items-center h-inherit p-1'>\r\n <p\r\n className={cn(\r\n 'text-xs text-center m-0 leading-[1.25] graph-value',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(color),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n d.value,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </g>\r\n );\r\n })}\r\n {mouseOverData ? (\r\n <rect\r\n x={x(mouseOverData.column)}\r\n y={y(mouseOverData.row)}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: 1.5,\r\n }}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n />\r\n ) : null}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HeatMapDataType,\r\n Languages,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { LinearColorLegend } from '@/Components/Elements/LinearColorLegend';\r\nimport { ThresholdColorLegendWithMouseOver } from '@/Components/Elements/ThresholdColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\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: HeatMapDataType[];\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 /** Array of colors for cells */\r\n colors?: string[];\r\n /** Color where data is not available */\r\n noDataColor?: string;\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Toggles the background to fill the container. This only works if the width of the graph is defined. */\r\n fillContainer?: boolean;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the chart */\r\n truncateBy?: number;\r\n /** Reference values for comparison */\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels in the column */\r\n showColumnLabels?: boolean;\r\n /** Toggle visibility of labels in the row */\r\n showRowLabels?: boolean;\r\n /** Scale for the colors in the cell */\r\n scaleType?: ScaleDataType;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Domain for the colors in the cell. */\r\n colorDomain: number[] | string[];\r\n /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n numberDisplayOptions?: NumberFormatOptions;\r\n /** Defines how “NA” values should be displayed/labelled in the graph */\r\n naLabel?: string;\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 HeatMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n showColumnLabels = true,\r\n leftMargin = 100,\r\n rightMargin = 10,\r\n truncateBy = 999,\r\n height,\r\n width,\r\n scaleType,\r\n colorDomain,\r\n footNote,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n topMargin = 30,\r\n bottomMargin = 10,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showRowLabels = true,\r\n relativeHeight,\r\n showValues,\r\n graphID,\r\n noDataColor = Colors.gray,\r\n showColorScale = true,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n fillContainer = true,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n naLabel = 'NA',\r\n numberDisplayOptions,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\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 const scale =\r\n scaleType ||\r\n (typeof colorDomain[0] === 'string'\r\n ? 'categorical'\r\n : colorDomain.length === 2\r\n ? 'linear'\r\n : 'threshold');\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={fillContainer ? undefined : width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {showColorScale && data.length > 0 ? (\r\n scale === 'categorical' ? (\r\n <ColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain.map(d => `${d}`)}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : scale === 'threshold' ? (\r\n <ThresholdColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain as number[]}\r\n setSelectedColor={setSelectedColor}\r\n naColor={noDataColor}\r\n locale={numberDisplayOptions?.locale || 'en'}\r\n showNAColor={showNAColor}\r\n naLabel={naLabel}\r\n />\r\n ) : (\r\n <LinearColorLegend\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors || [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n }\r\n locale={numberDisplayOptions?.locale || 'en'}\r\n colorDomain={colorDomain as number[]}\r\n className={classNames?.colorLegend}\r\n />\r\n )\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Graph\r\n data={data}\r\n colorDomain={colorDomain}\r\n width={fillContainer || !width ? svgWidth : svgWidth < width ? svgWidth : width}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n noDataColor={noDataColor}\r\n scaleType={scale}\r\n showColumnLabels={showColumnLabels}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n selectedColor={selectedColor}\r\n truncateBy={truncateBy}\r\n showRowLabels={showRowLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showValues={showValues}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\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 locale={numberDisplayOptions?.locale || 'en'}\r\n padZeros={numberDisplayOptions?.padZeros || false}\r\n suffix={numberDisplayOptions?.suffix || ''}\r\n prefix={numberDisplayOptions?.prefix || ''}\r\n precision={numberDisplayOptions?.precision ?? 2}\r\n />\r\n ) : null}\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","$","_c","data","showColumnLabels","leftMargin","rightMargin","truncateBy","width","height","topMargin","bottomMargin","tooltip","onSeriesMouseOver","suffix","prefix","showValues","colorDomain","colors","noDataColor","scaleType","showRowLabels","selectedColor","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","animate","precision","locale","padZeros","svgRef","useRef","t0","amount","once","isInView","useInView","t1","top","bottom","left","right","margin","mouseClickData","setMouseClickData","useState","undefined","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","graphWidth","graphHeight","T0","t10","t11","t12","t13","t2","t3","t4","t5","t6","t7","t8","t9","duration","graphObjectValues","xAxis","labels","yAxis","columns","uniqBy","rows","y","scaleBand","domain","range","barHeight","bandwidth","x","barWidth","colorScale","scaleOrdinal","scaleThreshold","scaleLinear","motion","svg","Symbol","for","marginLeft","marginRight","jsx","map","d","i","XAxesLabels","length","substring","d_0","i_0","YAxesLabels","d_1","i_1","el","fill","filter","_temp","d_3","i_2","color","checkIfNullOrUndefined","value","jsxs","column","row","event","clientY","clientX","isEqual","event_0","opacity","transition","initial","whileInView","cn","getTextColorBasedOnBgColor","numberFormattingFunction","fillOpacity","strokeWidth","t14","t15","t16","Tooltip","t17","modal","DetailsModal","t18","Fragment","d_2","HeatMap","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","graphID","showColorScale","graphDownload","dataDownload","fillContainer","language","showNAColor","minHeight","theme","ariaLabel","naLabel","t19","numberDisplayOptions","Colors","gray","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t20","t21","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","scale","t22","graphContainer","t23","t24","t25","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","t26","colorLegend","ColorLegendWithMouseOver","categoricalColors","sequentialColors","neutralColorsx09","_temp6","ThresholdColorLegendWithMouseOver","LinearColorLegend","t27","EmptyState","t28","t29","GraphArea","t30","footnote","source","GraphFooter","t31","GraphContainer","d_4"],"mappings":"mjCA0DO,SAAAA,GAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,KAAAA,EAAAC,iBAAAA,EAAAC,WAAAA,EAAAC,YAAA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DY,GAoDCE,EAAAA,EAYH,EAAiBrN,MAAAiK,GAAAjK,MAAAsJ,EAAAtJ,MAAAwJ,EAAAxJ,MAAAQ,EAAAR,MAAA6J,EAAA7J,MAAA+J,EAAA/J,MAAAqJ,EAAArJ,MAAAuJ,EAAAvJ,MAAA2L,GAAA3L,MAAA6L,GAAA7L,MAAA8L,GAAA9L,MAAA+L,GAAA/L,MAAAuM,GAAAvM,MAAAmN,GAAAnN,MAAAqN,GAAArN,MAAAgK,EAAAhK,MAAAyN,IAAAA,GAAAzN,EAAA,EAAA,EArKjByN,EAqKiB,CA9Od,SAAAZ,GAAAc,EAAA,CAAA,MAiIuC,GAAG1H,CAAC,EAAE,CAjI7C,SAAAqG,GAAA7F,EAAA,CAAA,OA0G4BR,IAAMlD,MAAS,CA1G3C,SAAAsJ,GAAA/F,EAAA,CAAA,OAyG6CL,IAAMlD,MAAS,CAzG5D,SAAAqJ,GAAAnG,EAAA,CAAA,OAyGyBA,EAAC/F,IAAK,CAzG/B,SAAAiM,GAAApF,EAAA,CAAA,OAwG2Cd,IAAMlD,MAAS,CAxG1D,SAAA+D,GAAAgC,EAAA,CAAA,OAwGuB7C,EAAC/F,IAAK"}
1
+ {"version":3,"file":"HeatMap.cjs","sources":["../src/Components/Graphs/HeatMap/Graph.tsx","../src/Components/Graphs/HeatMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { scaleLinear, scaleBand, scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport { useRef, useState } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n HeatMapDataType,\r\n ScaleDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { XAxesLabels } from '@/Components/Elements/Axes/XAxesLabels';\r\nimport { YAxesLabels } from '@/Components/Elements/Axes/YAxesLabels';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HeatMapDataType[];\r\n colorDomain: string[] | number[];\r\n colors: string[];\r\n noDataColor: string;\r\n scaleType: ScaleDataType;\r\n showColumnLabels: boolean;\r\n leftMargin: number;\r\n truncateBy: number;\r\n width: number;\r\n height: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n showRowLabels: boolean;\r\n bottomMargin: number;\r\n suffix: string;\r\n prefix: string;\r\n showValues?: 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 selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\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 animate: AnimateDataType;\r\n precision: number;\r\n locale: string;\r\n padZeros: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n showColumnLabels,\r\n leftMargin,\r\n rightMargin,\r\n truncateBy,\r\n width,\r\n height,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n suffix,\r\n prefix,\r\n showValues,\r\n colorDomain,\r\n colors,\r\n noDataColor,\r\n scaleType,\r\n showRowLabels,\r\n selectedColor,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate,\r\n precision,\r\n locale,\r\n padZeros,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [mouseOverData, setMouseOverData] = useState<HeatMapDataType | undefined>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const columns = uniqBy(data, 'column', true) as string[];\r\n const rows = uniqBy(data, 'row', true) as string[];\r\n const y = scaleBand().domain(rows).range([0, graphHeight]);\r\n const barHeight = y.bandwidth();\r\n const x = scaleBand().domain(columns).range([0, graphWidth]);\r\n const barWidth = x.bandwidth();\r\n const colorScale =\r\n scaleType === 'categorical'\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleType === 'threshold'\r\n ? scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors)\r\n : scaleLinear<string, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n style={{ marginLeft: 'auto', marginRight: 'auto' }}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${0})`}>\r\n {showColumnLabels\r\n ? columns.map((d, i) => (\r\n <XAxesLabels\r\n key={i}\r\n y={0}\r\n x={x(d) as number}\r\n width={barWidth}\r\n height={margin.top - 5}\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n style={styles?.xAxis?.labels}\r\n className={classNames?.xAxis?.labels}\r\n alignment='bottom'\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${0},${margin.top})`}>\r\n {showRowLabels\r\n ? rows.map((d, i) => (\r\n <YAxesLabels\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n key={i}\r\n y={y(d) as number}\r\n x={0}\r\n width={margin.left}\r\n height={barHeight}\r\n alignment='right'\r\n style={styles?.yAxis?.labels}\r\n className={classNames?.yAxis?.labels}\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {rows.map((d, i) => (\r\n <g key={i} transform={`translate(0,${y(d)})`}>\r\n {columns.map(el => (\r\n <rect\r\n key={`${d}-${el}`}\r\n x={x(el)}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{ fill: noDataColor }}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.value))\r\n .map((d, i) => {\r\n const color = !checkIfNullOrUndefined(d.value)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.value as any)\r\n : noDataColor;\r\n return (\r\n <g\r\n key={`${d.column}-${d.row}`}\r\n transform={`translate(${x(d.column)},${y(d.row)})`}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n opacity={selectedColor ? (selectedColor === color ? 1 : 0.3) : 1}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\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 />\r\n {showValues && !checkIfNullOrUndefined(d.value) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: { opacity: 1, transition: { duration: animate.duration } },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject key={i} y={0} x={0} width={barWidth} height={barHeight}>\r\n <div className='flex flex-col justify-center items-center h-inherit p-1'>\r\n <p\r\n className={cn(\r\n 'text-xs text-center m-0 leading-[1.25] graph-value',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(color),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n d.value,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </g>\r\n );\r\n })}\r\n {mouseOverData ? (\r\n <rect\r\n x={x(mouseOverData.column)}\r\n y={y(mouseOverData.row)}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: 1.5,\r\n }}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n />\r\n ) : null}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HeatMapDataType,\r\n Languages,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { LinearColorLegend } from '@/Components/Elements/LinearColorLegend';\r\nimport { ThresholdColorLegendWithMouseOver } from '@/Components/Elements/ThresholdColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\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: HeatMapDataType[];\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 /** Array of colors for cells */\r\n colors?: string[];\r\n /** Color where data is not available */\r\n noDataColor?: string;\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Toggles the background to fill the container. This only works if the width of the graph is defined. */\r\n fillContainer?: boolean;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the chart */\r\n truncateBy?: number;\r\n /** Reference values for comparison */\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels in the column */\r\n showColumnLabels?: boolean;\r\n /** Toggle visibility of labels in the row */\r\n showRowLabels?: boolean;\r\n /** Scale for the colors in the cell */\r\n scaleType?: ScaleDataType;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Domain for the colors in the cell. */\r\n colorDomain: number[] | string[];\r\n /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n numberDisplayOptions?: NumberFormatOptions;\r\n /** Defines how “NA” values should be displayed/labelled in the graph */\r\n naLabel?: string;\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 HeatMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n showColumnLabels = true,\r\n leftMargin = 100,\r\n rightMargin = 10,\r\n truncateBy = 999,\r\n height,\r\n width,\r\n scaleType,\r\n colorDomain,\r\n footNote,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n topMargin = 30,\r\n bottomMargin = 10,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showRowLabels = true,\r\n relativeHeight,\r\n showValues,\r\n graphID,\r\n noDataColor = Colors.gray,\r\n showColorScale = true,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n fillContainer = true,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n naLabel = 'NA',\r\n numberDisplayOptions,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\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 const scale =\r\n scaleType ||\r\n (typeof colorDomain[0] === 'string'\r\n ? 'categorical'\r\n : colorDomain.length === 2\r\n ? 'linear'\r\n : 'threshold');\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={fillContainer ? undefined : width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {showColorScale && data.length > 0 ? (\r\n scale === 'categorical' ? (\r\n <ColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain.map(d => `${d}`)}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : scale === 'threshold' ? (\r\n <ThresholdColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain as number[]}\r\n setSelectedColor={setSelectedColor}\r\n naColor={noDataColor}\r\n locale={numberDisplayOptions?.locale || 'en'}\r\n showNAColor={showNAColor}\r\n naLabel={naLabel}\r\n />\r\n ) : (\r\n <LinearColorLegend\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors || [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n }\r\n locale={numberDisplayOptions?.locale || 'en'}\r\n colorDomain={colorDomain as number[]}\r\n className={classNames?.colorLegend}\r\n />\r\n )\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Graph\r\n data={data}\r\n colorDomain={colorDomain}\r\n width={fillContainer || !width ? svgWidth : svgWidth < width ? svgWidth : width}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n noDataColor={noDataColor}\r\n scaleType={scale}\r\n showColumnLabels={showColumnLabels}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n selectedColor={selectedColor}\r\n truncateBy={truncateBy}\r\n showRowLabels={showRowLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showValues={showValues}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\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 locale={numberDisplayOptions?.locale || 'en'}\r\n padZeros={numberDisplayOptions?.padZeros || false}\r\n suffix={numberDisplayOptions?.suffix || ''}\r\n prefix={numberDisplayOptions?.prefix || ''}\r\n precision={numberDisplayOptions?.precision ?? 2}\r\n />\r\n ) : null}\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","$","_c","data","showColumnLabels","leftMargin","rightMargin","truncateBy","width","height","topMargin","bottomMargin","tooltip","onSeriesMouseOver","suffix","prefix","showValues","colorDomain","colors","noDataColor","scaleType","showRowLabels","selectedColor","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","animate","precision","locale","padZeros","svgRef","useRef","t0","amount","once","isInView","useInView","t1","top","bottom","left","right","margin","mouseClickData","setMouseClickData","useState","undefined","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","graphWidth","graphHeight","T0","t10","t11","t12","t13","t2","t3","t4","t5","t6","t7","t8","t9","duration","graphObjectValues","xAxis","labels","yAxis","columns","uniqBy","rows","y","scaleBand","domain","range","barHeight","bandwidth","x","barWidth","colorScale","scaleOrdinal","scaleThreshold","scaleLinear","motion","svg","Symbol","for","marginLeft","marginRight","jsx","map","d","i","XAxesLabels","length","substring","d_0","i_0","YAxesLabels","d_1","i_1","el","fill","filter","_temp","d_3","i_2","color","checkIfNullOrUndefined","value","jsxs","column","row","event","clientY","clientX","isEqual","event_0","opacity","transition","initial","whileInView","cn","getTextColorBasedOnBgColor","numberFormattingFunction","fillOpacity","strokeWidth","t14","t15","t16","Tooltip","t17","modal","DetailsModal","t18","Fragment","d_2","HeatMap","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","graphID","showColorScale","graphDownload","dataDownload","fillContainer","language","showNAColor","minHeight","theme","ariaLabel","naLabel","t19","numberDisplayOptions","Colors","gray","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t20","t21","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","scale","t22","graphContainer","t23","t24","t25","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","t26","colorLegend","ColorLegendWithMouseOver","categoricalColors","sequentialColors","neutralColorsx09","_temp6","ThresholdColorLegendWithMouseOver","LinearColorLegend","t27","EmptyState","t28","t29","GraphArea","t30","footnote","source","GraphFooter","t31","GraphContainer","d_4"],"mappings":"gmCA0DO,SAAAA,GAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,KAAAA,EAAAC,iBAAAA,EAAAC,WAAAA,EAAAC,YAAAA,EAAAC,WAAAA,EAAAC,MAAAA,EAAAC,OAAAA,EAAAC,UAAAA,GAAAC,aAAAA,GAAAC,QAAAA,EAAAC,kBAAAA,EAAAC,OAAAA,GAAAC,OAAAA,EAAAC,WAAAA,GAAAC,YAAAA,EAAAC,OAAAA,EAAAC,YAAAA,GAAAC,UAAAA,GAAAC,cAAAA,GAAAC,cAAAA,GAAAC,mBAAAA,EAAAC,4BAAAA,GAAAC,eAAAA,EAAAC,OAAAA,EAAAC,WAAAA,EAAAC,QAAAA,EAAAC,UAAAA,GAAAC,OAAAA,GAAAC,SAAAA,EAAAA,EA8BI/B,EACJgC,GAAeC,EAAAA,OAAO,IAAI,EAAE,IAAAC,GAAAjC,EAAA,CAAA,IAAA2B,EAAAO,QAAAlC,EAAA,CAAA,IAAA2B,EAAAQ,MACOF,GAAA,CAAAE,KAC3BR,EAAOQ,KAAKD,OACVP,EAAOO,MAAAA,EAChBlC,EAAA,CAAA,EAAA2B,EAAAO,OAAAlC,EAAA,CAAA,EAAA2B,EAAAQ,KAAAnC,KAAAiC,IAAAA,GAAAjC,EAAA,CAAA,EAHD,MAAAoC,EAAiBC,GAAAA,UAAUN,GAAQE,EAG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AK"}
package/dist/HeatMap.js CHANGED
@@ -1,28 +1,29 @@
1
- import { c as Gt, j as l, m as Xt } from "./index-CHPV5EwG-BzibaIRc.js";
2
- import { useRef as Tt, useState as pt, useEffect as Yt } from "react";
3
- import { i as Zt } from "./index-Bwrro8-q.js";
1
+ import { c as Gt, j as l } from "./compiler-runtime-qHgugrLy.js";
2
+ import { useRef as Tt, useState as pt, useEffect as Xt } from "react";
3
+ import { i as Yt } from "./index-Bwrro8-q.js";
4
+ import { cn as Zt } from "@undp/design-system-react/cn";
4
5
  import { n as Ft } from "./numberFormattingFunction-BUUV_luR.js";
5
- import { T as Pt } from "./Tooltip-3EYDVa3w.js";
6
+ import { T as Pt } from "./Tooltip-DO56mY4b.js";
6
7
  import { g as zt } from "./getTextColorBasedOnBgColor-CDY808zi.js";
7
8
  import { c as Et } from "./checkIfNullOrUndefined-DmfiKkNw.js";
8
- import { X as Ut } from "./XAxesLabels-B9gkjUiC.js";
9
- import { Y as Jt } from "./YAxesLabels-hWEUCTvs.js";
9
+ import { X as Ut } from "./XAxesLabels-CPZX3OJN.js";
10
+ import { Y as Jt } from "./YAxesLabels-CwVnFG2a.js";
10
11
  import { u as Wt } from "./uniqBy-BHy4I8PK.js";
11
- import { D as Kt } from "./DetailsModal-GqEbGHY2.js";
12
+ import { D as Kt } from "./DetailsModal-k-Me_U_T.js";
12
13
  import { b as Bt } from "./band-DYty33LD.js";
13
14
  import { o as Qt } from "./ordinal-CHaxGJ_l.js";
14
15
  import { t as _t } from "./threshold-DFfqcDMa.js";
15
16
  import { a as te } from "./linear-DNXM5Pdl.js";
16
- import { m as Ht } from "./proxy-BsxtcZKa.js";
17
- import { u as ee } from "./use-in-view-KOXq5Kmc.js";
17
+ import { m as Ht } from "./proxy-D31SA_aE.js";
18
+ import { u as ee } from "./use-in-view-Co5SmzfT.js";
18
19
  import { GraphHeader as oe } from "./GraphHeader.js";
19
20
  import { GraphFooter as le } from "./GraphFooter.js";
20
21
  import { ColorLegendWithMouseOver as ie } from "./ColorLegendWithMouseOver.js";
21
22
  import { LinearColorLegend as re } from "./LinearColorLegend.js";
22
23
  import { ThresholdColorLegendWithMouseOver as se } from "./ThresholdColorLegendWithMouseOver.js";
23
24
  import { Colors as f } from "./Colors.js";
24
- import { E as ae } from "./EmptyState-CaxXCkiN.js";
25
- import { a as ne, G as ce } from "./GraphContainer-B8ZqOzKI.js";
25
+ import { E as ae } from "./EmptyState-prZ8OnEs.js";
26
+ import { a as ne, G as ce } from "./GraphContainer-DcOM2CI6.js";
26
27
  function ue(m) {
27
28
  const t = Gt.c(88), {
28
29
  data: n,
@@ -90,7 +91,7 @@ function ue(m) {
90
91
  return /* @__PURE__ */ l.jsxs("g", { transform: `translate(${ht(e.column)},${mt(e.row)})`, onMouseEnter: (G) => {
91
92
  at(e), bt(G.clientY), i(G.clientX), a?.(e);
92
93
  }, onClick: () => {
93
- (Y || $) && (Zt(O, e) && vt ? (st(void 0), Y?.(void 0)) : (st(e), Y?.(e)));
94
+ (Y || $) && (Yt(O, e) && vt ? (st(void 0), Y?.(void 0)) : (st(e), Y?.(e)));
94
95
  }, onMouseMove: (G) => {
95
96
  at(e), bt(G.clientY), i(G.clientX);
96
97
  }, onMouseLeave: () => {
@@ -129,7 +130,7 @@ function ue(m) {
129
130
  transition: {
130
131
  duration: g.duration
131
132
  }
132
- }, children: /* @__PURE__ */ l.jsx("foreignObject", { y: 0, x: 0, width: P, height: W, children: /* @__PURE__ */ l.jsx("div", { className: "flex flex-col justify-center items-center h-inherit p-1", children: /* @__PURE__ */ l.jsx("p", { className: Xt("text-xs text-center m-0 leading-[1.25] graph-value", u?.graphObjectValues), style: {
133
+ }, children: /* @__PURE__ */ l.jsx("foreignObject", { y: 0, x: 0, width: P, height: W, children: /* @__PURE__ */ l.jsx("div", { className: "flex flex-col justify-center items-center h-inherit p-1", children: /* @__PURE__ */ l.jsx("p", { className: Zt("text-xs text-center m-0 leading-[1.25] graph-value", u?.graphObjectValues), style: {
133
134
  color: zt(b),
134
135
  ...d?.graphObjectValues || {}
135
136
  }, children: Ft(e.value, void 0, yt, r, Ot, lt, Ct) }) }) }, B) }) : null
@@ -167,7 +168,7 @@ function ue(m) {
167
168
  function me(m) {
168
169
  return !Et(m.value);
169
170
  }
170
- function Xe(m) {
171
+ function Ye(m) {
171
172
  const t = Gt.c(91), {
172
173
  data: n,
173
174
  graphTitle: z,
@@ -219,7 +220,7 @@ function Xe(m) {
219
220
  mt(It[0].target.clientWidth || 620), ht(It[0].target.clientHeight || 480);
220
221
  });
221
222
  return e.current && Rt.observe(e.current), () => Rt.disconnect();
222
- }, G = [], t[0] = b, t[1] = G) : (b = t[0], G = t[1]), Yt(b, G);
223
+ }, G = [], t[0] = b, t[1] = G) : (b = t[0], G = t[1]), Xt(b, G);
223
224
  const dt = Ot || (typeof r[0] == "string" ? "categorical" : r.length === 2 ? "linear" : "threshold"), St = i?.graphContainer, Vt = c?.graphContainer, qt = p ? void 0 : a;
224
225
  let wt;
225
226
  t[2] !== i?.description || t[3] !== i?.title || t[4] !== n || t[5] !== k || t[6] !== w || t[7] !== D || t[8] !== z || t[9] !== c?.description || t[10] !== c?.title || t[11] !== a ? (wt = z || w || D || k ? /* @__PURE__ */ l.jsx(oe, { styles: {
@@ -283,6 +284,6 @@ function xe(m) {
283
284
  return m.data;
284
285
  }
285
286
  export {
286
- Xe as HeatMap
287
+ Ye as HeatMap
287
288
  };
288
289
  //# sourceMappingURL=HeatMap.js.map