@undp/data-viz 2.4.1 → 2.5.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 (262) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.d.ts +11 -9
  4. package/dist/AreaChart.js +320 -322
  5. package/dist/AreaChart.js.map +1 -1
  6. package/dist/BarGraph.cjs +1 -1
  7. package/dist/BarGraph.cjs.map +1 -1
  8. package/dist/BarGraph.d.ts +15 -25
  9. package/dist/BarGraph.js +1694 -1694
  10. package/dist/BarGraph.js.map +1 -1
  11. package/dist/BasicStatCard.cjs +1 -1
  12. package/dist/BasicStatCard.cjs.map +1 -1
  13. package/dist/BasicStatCard.d.ts +13 -9
  14. package/dist/BasicStatCard.js +79 -81
  15. package/dist/BasicStatCard.js.map +1 -1
  16. package/dist/BeeSwarmChart.cjs +1 -1
  17. package/dist/BeeSwarmChart.cjs.map +1 -1
  18. package/dist/BeeSwarmChart.d.ts +11 -9
  19. package/dist/BeeSwarmChart.js +335 -336
  20. package/dist/BeeSwarmChart.js.map +1 -1
  21. package/dist/BiVariateChoroplethMap.cjs +1 -1
  22. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  23. package/dist/BiVariateChoroplethMap.d.ts +13 -3
  24. package/dist/BiVariateChoroplethMap.js +247 -245
  25. package/dist/BiVariateChoroplethMap.js.map +1 -1
  26. package/dist/BulletChart.cjs +1 -1
  27. package/dist/BulletChart.cjs.map +1 -1
  28. package/dist/BulletChart.d.ts +11 -5
  29. package/dist/BulletChart.js +560 -559
  30. package/dist/BulletChart.js.map +1 -1
  31. package/dist/ButterflyChart.cjs +1 -1
  32. package/dist/ButterflyChart.cjs.map +1 -1
  33. package/dist/ButterflyChart.d.ts +11 -9
  34. package/dist/ButterflyChart.js +348 -350
  35. package/dist/ButterflyChart.js.map +1 -1
  36. package/dist/ChoroplethMap.cjs +1 -1
  37. package/dist/ChoroplethMap.cjs.map +1 -1
  38. package/dist/ChoroplethMap.d.ts +11 -3
  39. package/dist/ChoroplethMap.js +213 -213
  40. package/dist/ChoroplethMap.js.map +1 -1
  41. package/dist/CirclePackingGraph.cjs +1 -1
  42. package/dist/CirclePackingGraph.d.ts +11 -9
  43. package/dist/CirclePackingGraph.js +1 -1
  44. package/dist/DataCards.cjs +1 -1
  45. package/dist/DataCards.d.ts +1 -1
  46. package/dist/DataCards.js +1 -1
  47. package/dist/DataTable.cjs +1 -1
  48. package/dist/DataTable.cjs.map +1 -1
  49. package/dist/DataTable.d.ts +4 -5
  50. package/dist/DataTable.js +114 -116
  51. package/dist/DataTable.js.map +1 -1
  52. package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
  53. package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
  54. package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
  55. package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
  56. package/dist/DifferenceLineChart.cjs +1 -1
  57. package/dist/DifferenceLineChart.cjs.map +1 -1
  58. package/dist/DifferenceLineChart.d.ts +11 -9
  59. package/dist/DifferenceLineChart.js +502 -504
  60. package/dist/DifferenceLineChart.js.map +1 -1
  61. package/dist/DonutChart.cjs +1 -1
  62. package/dist/DonutChart.cjs.map +1 -1
  63. package/dist/DonutChart.d.ts +14 -9
  64. package/dist/DonutChart.js +174 -179
  65. package/dist/DonutChart.js.map +1 -1
  66. package/dist/DotDensityMap.cjs +1 -1
  67. package/dist/DotDensityMap.d.ts +1 -1
  68. package/dist/DotDensityMap.js +2 -2
  69. package/dist/DualAxisLineChart.cjs +1 -1
  70. package/dist/DualAxisLineChart.cjs.map +1 -1
  71. package/dist/DualAxisLineChart.d.ts +13 -9
  72. package/dist/DualAxisLineChart.js +341 -351
  73. package/dist/DualAxisLineChart.js.map +1 -1
  74. package/dist/DumbbellChart.cjs +1 -1
  75. package/dist/DumbbellChart.cjs.map +1 -1
  76. package/dist/DumbbellChart.d.ts +11 -9
  77. package/dist/DumbbellChart.js +592 -593
  78. package/dist/DumbbellChart.js.map +1 -1
  79. package/dist/GeoHubCompareMaps.cjs +1 -1
  80. package/dist/GeoHubCompareMaps.d.ts +1 -1
  81. package/dist/GeoHubCompareMaps.js +1 -1
  82. package/dist/GeoHubMap.cjs +1 -1
  83. package/dist/GeoHubMap.d.ts +1 -1
  84. package/dist/GeoHubMap.js +1 -1
  85. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  86. package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
  87. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  88. package/dist/GraphEl-B7x5ku_y.cjs +2 -0
  89. package/dist/GraphEl-B7x5ku_y.cjs.map +1 -0
  90. package/dist/GraphEl-B8tGXqWk.js +1829 -0
  91. package/dist/GraphEl-B8tGXqWk.js.map +1 -0
  92. package/dist/GriddedGraphs.cjs +1 -1
  93. package/dist/GriddedGraphs.d.ts +28 -16
  94. package/dist/GriddedGraphs.js +1 -1
  95. package/dist/GriddedGraphsFromConfig.d.ts +28 -16
  96. package/dist/HeatMap.cjs +1 -1
  97. package/dist/HeatMap.cjs.map +1 -1
  98. package/dist/HeatMap.d.ts +11 -9
  99. package/dist/HeatMap.js +203 -205
  100. package/dist/HeatMap.js.map +1 -1
  101. package/dist/Histogram.cjs +1 -1
  102. package/dist/Histogram.cjs.map +1 -1
  103. package/dist/Histogram.d.ts +11 -5
  104. package/dist/Histogram.js +88 -89
  105. package/dist/Histogram.js.map +1 -1
  106. package/dist/HybridMap.cjs +1 -1
  107. package/dist/HybridMap.cjs.map +1 -1
  108. package/dist/HybridMap.d.ts +11 -3
  109. package/dist/HybridMap.js +279 -279
  110. package/dist/HybridMap.js.map +1 -1
  111. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  112. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  113. package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
  114. package/dist/LineChartWithConfidenceInterval.js +393 -395
  115. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  116. package/dist/LinearColorLegend.cjs +1 -1
  117. package/dist/LinearColorLegend.js +1 -1
  118. package/dist/MultiGraphDashboard.d.ts +28 -16
  119. package/dist/MultiGraphDashboardFromConfig.d.ts +28 -16
  120. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
  121. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
  122. package/dist/MultiLineAltChart.cjs +1 -1
  123. package/dist/MultiLineAltChart.cjs.map +1 -1
  124. package/dist/MultiLineAltChart.d.ts +11 -9
  125. package/dist/MultiLineAltChart.js +411 -413
  126. package/dist/MultiLineAltChart.js.map +1 -1
  127. package/dist/MultiLineChart.cjs +1 -1
  128. package/dist/MultiLineChart.cjs.map +1 -1
  129. package/dist/MultiLineChart.d.ts +11 -9
  130. package/dist/MultiLineChart.js +438 -440
  131. package/dist/MultiLineChart.js.map +1 -1
  132. package/dist/ParetoChart.cjs +1 -1
  133. package/dist/ParetoChart.cjs.map +1 -1
  134. package/dist/ParetoChart.d.ts +13 -13
  135. package/dist/ParetoChart.js +347 -355
  136. package/dist/ParetoChart.js.map +1 -1
  137. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +28 -16
  138. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +28 -16
  139. package/dist/PerformanceIntensiveScrollStory.d.ts +28 -16
  140. package/dist/RadarChart.cjs +1 -1
  141. package/dist/RadarChart.cjs.map +1 -1
  142. package/dist/RadarChart.d.ts +11 -5
  143. package/dist/RadarChart.js +213 -213
  144. package/dist/RadarChart.js.map +1 -1
  145. package/dist/SankeyChart.cjs +1 -1
  146. package/dist/SankeyChart.cjs.map +1 -1
  147. package/dist/SankeyChart.d.ts +11 -9
  148. package/dist/SankeyChart.js +448 -450
  149. package/dist/SankeyChart.js.map +1 -1
  150. package/dist/ScatterPlot.cjs +1 -1
  151. package/dist/ScatterPlot.cjs.map +1 -1
  152. package/dist/ScatterPlot.d.ts +13 -13
  153. package/dist/ScatterPlot.js +490 -498
  154. package/dist/ScatterPlot.js.map +1 -1
  155. package/dist/ScrollStory.d.ts +28 -16
  156. package/dist/SimpleLineChart.cjs +1 -1
  157. package/dist/SimpleLineChart.cjs.map +1 -1
  158. package/dist/SimpleLineChart.d.ts +11 -9
  159. package/dist/SimpleLineChart.js +362 -364
  160. package/dist/SimpleLineChart.js.map +1 -1
  161. package/dist/SingleGraphDashboard.cjs +1 -1
  162. package/dist/SingleGraphDashboard.d.ts +28 -16
  163. package/dist/SingleGraphDashboard.js +1 -1
  164. package/dist/SingleGraphDashboardFromConfig.d.ts +28 -16
  165. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +28 -16
  166. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +28 -16
  167. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  168. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  169. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +28 -16
  170. package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
  171. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  172. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +28 -16
  173. package/dist/SlopeChart.cjs +1 -1
  174. package/dist/SlopeChart.d.ts +1 -1
  175. package/dist/SlopeChart.js +2 -2
  176. package/dist/SparkLine.cjs +1 -1
  177. package/dist/SparkLine.d.ts +1 -1
  178. package/dist/SparkLine.js +1 -1
  179. package/dist/StatCardFromData.cjs +1 -1
  180. package/dist/StatCardFromData.cjs.map +1 -1
  181. package/dist/StatCardFromData.d.ts +11 -9
  182. package/dist/StatCardFromData.js +113 -116
  183. package/dist/StatCardFromData.js.map +1 -1
  184. package/dist/StripChart.cjs +1 -1
  185. package/dist/StripChart.cjs.map +1 -1
  186. package/dist/StripChart.d.ts +11 -9
  187. package/dist/StripChart.js +434 -435
  188. package/dist/StripChart.js.map +1 -1
  189. package/dist/ThreeDGlobe.cjs +1 -1
  190. package/dist/ThreeDGlobe.cjs.map +1 -1
  191. package/dist/ThreeDGlobe.d.ts +11 -3
  192. package/dist/ThreeDGlobe.js +143 -143
  193. package/dist/ThreeDGlobe.js.map +1 -1
  194. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  195. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  196. package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
  197. package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
  198. package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
  199. package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
  200. package/dist/TreeMapGraph.cjs +1 -1
  201. package/dist/TreeMapGraph.cjs.map +1 -1
  202. package/dist/TreeMapGraph.d.ts +11 -9
  203. package/dist/TreeMapGraph.js +369 -371
  204. package/dist/TreeMapGraph.js.map +1 -1
  205. package/dist/Types.d.ts +28 -16
  206. package/dist/UnitChart.cjs +1 -1
  207. package/dist/UnitChart.cjs.map +1 -1
  208. package/dist/UnitChart.d.ts +11 -5
  209. package/dist/UnitChart.js +118 -119
  210. package/dist/UnitChart.js.map +1 -1
  211. package/dist/WaterfallChart.cjs +1 -1
  212. package/dist/WaterfallChart.cjs.map +1 -1
  213. package/dist/WaterfallChart.d.ts +11 -9
  214. package/dist/WaterfallChart.js +306 -308
  215. package/dist/WaterfallChart.js.map +1 -1
  216. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
  217. package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
  218. package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
  219. package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
  220. package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
  221. package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
  222. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
  223. package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
  224. package/dist/index-BPyj_6hG.js +375 -0
  225. package/dist/index-BPyj_6hG.js.map +1 -0
  226. package/dist/index-DuLvdHo2.cjs +2 -0
  227. package/dist/index-DuLvdHo2.cjs.map +1 -0
  228. package/dist/index.cjs +1 -1
  229. package/dist/index.d.ts +105 -245
  230. package/dist/index.js +2 -2
  231. package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
  232. package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
  233. package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
  234. package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
  235. package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
  236. package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
  237. package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
  238. package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
  239. package/dist/utils.cjs +1 -1
  240. package/dist/utils.d.ts +1 -1
  241. package/dist/utils.js +1 -1
  242. package/package.json +2 -2
  243. package/dist/GraphEl-B73N4RIA.js +0 -1906
  244. package/dist/GraphEl-B73N4RIA.js.map +0 -1
  245. package/dist/GraphEl-Lt1og0C-.cjs +0 -2
  246. package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
  247. package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
  248. package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
  249. package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
  250. package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
  251. package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
  252. package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
  253. package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
  254. package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
  255. package/dist/index-B0Awa_de.js +0 -377
  256. package/dist/index-B0Awa_de.js.map +0 -1
  257. package/dist/index-CP8cmNzt.cjs +0 -2
  258. package/dist/index-CP8cmNzt.cjs.map +0 -1
  259. package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
  260. package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
  261. package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
  262. package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import { FeatureCollection } from 'geojson';
2
2
  import { JSX } from 'react/jsx-runtime';
3
+ import { ReactElement } from 'react';
3
4
 
4
5
  declare interface AdvancedDataSelectionDataType {
5
6
  label?: string;
@@ -191,6 +192,9 @@ declare interface DataTableColumnDataType {
191
192
  align?: 'left' | 'right' | 'center';
192
193
  suffix?: string;
193
194
  prefix?: string;
195
+ locale?: string;
196
+ precision?: number;
197
+ padZeros?: boolean;
194
198
  columnWidth?: number;
195
199
  }
196
200
 
@@ -245,8 +249,6 @@ declare interface GraphSettingsDataType {
245
249
  footNote?: string | React.ReactNode;
246
250
  height?: number;
247
251
  width?: number;
248
- suffix?: string;
249
- prefix?: string;
250
252
  sources?: SourcesDataType[];
251
253
  barPadding?: number;
252
254
  showTicks?: boolean;
@@ -276,7 +278,14 @@ declare interface GraphSettingsDataType {
276
278
  barColors?: [string, string];
277
279
  centerGap?: number;
278
280
  columnData?: DataTableColumnDataType[];
279
- mainText?: string;
281
+ mainText?: string | {
282
+ label: string;
283
+ suffix?: string;
284
+ prefix?: string;
285
+ locale?: string;
286
+ padZeros?: boolean;
287
+ precision?: number;
288
+ } | ReactElement;
280
289
  subNote?: string;
281
290
  radius?: number;
282
291
  strokeWidth?: number;
@@ -432,16 +441,6 @@ declare interface GraphSettingsDataType {
432
441
  colorLegendColors?: string[];
433
442
  colorLegendDomain?: string[];
434
443
  barAxisTitle?: string;
435
- barSuffix?: string;
436
- barPrefix?: string;
437
- lineSuffix?: string;
438
- linePrefix?: string;
439
- xSuffix?: string;
440
- xPrefix?: string;
441
- ySuffix?: string;
442
- yPrefix?: string;
443
- lineSuffixes?: [string, string];
444
- linePrefixes?: [string, string];
445
444
  allowDataDownloadOnDetail?: string | boolean;
446
445
  noOfItemsInAPage?: number;
447
446
  curveType?: CurveTypes;
@@ -461,7 +460,6 @@ declare interface GraphSettingsDataType {
461
460
  measureBarWidthFactor?: number;
462
461
  mapLegend?: string | React.ReactNode | MapLegendDataType[];
463
462
  dimmedOpacity?: number;
464
- precision?: number;
465
463
  customLayers?: CustomLayerDataType[];
466
464
  dashedLines?: (string | number)[];
467
465
  dashSettings?: string[];
@@ -498,7 +496,13 @@ declare interface GraphSettingsDataType {
498
496
  showVoronoiTesselation?: boolean;
499
497
  mapOverlay?: MapOverlayDataType;
500
498
  useVoronoiInteraction?: boolean;
501
- locale?: string;
499
+ numberDisplayOptions?: NumberFormatOptions;
500
+ leftLineNumberDisplayOptions?: NumberFormatOptions;
501
+ rightLineNumberDisplayOptions?: NumberFormatOptions;
502
+ barNumberDisplayOptions?: NumberFormatOptions;
503
+ lineNumberDisplayOptions?: NumberFormatOptions;
504
+ xNumberDisplayOptions?: NumberFormatOptions;
505
+ yNumberDisplayOptions?: NumberFormatOptions;
502
506
  }
503
507
 
504
508
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -523,7 +527,7 @@ declare interface HighlightAreaSettingsForScatterPlotDataType {
523
527
  strokeWidth?: number;
524
528
  }
525
529
 
526
- declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
530
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'ja' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
527
531
 
528
532
  declare type LightConfig = AmbientLightConfig | DirectionalLightConfig | PointLightConfig | SpotLightConfig;
529
533
 
@@ -540,6 +544,14 @@ declare interface MapOverlayDataType {
540
544
 
541
545
  declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
542
546
 
547
+ declare interface NumberFormatOptions {
548
+ locale?: string;
549
+ precision?: number;
550
+ prefix?: string;
551
+ suffix?: string;
552
+ padZeros?: boolean;
553
+ }
554
+
543
555
  declare interface PointLightConfig extends BaseLightConfig {
544
556
  type: 'point';
545
557
  distance?: number;
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"),E=require("react"),Je=require("./index-DQA8q5sC.cjs"),Ke=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Qe=require("./Tooltip-Hr46paWP.cjs"),Ze=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Be=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),_e=require("./XAxesLabels-C03jHniq.cjs"),et=require("./YAxesLabels-DeENFC2M.cjs"),Ye=require("./uniqBy-O05lp2S5.cjs"),tt=require("./DetailsModal-jmmKRMRM.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),ot=require("./ordinal-CrsysVE-.cjs"),st=require("./threshold-DNsSUf8Q.cjs"),it=require("./linear-CgUCbw9F.cjs"),Ie=require("./proxy-CqH8m8IQ.cjs"),rt=require("./use-in-view-dnRv_qqF.cjs"),nt=require("./GraphHeader.cjs"),lt=require("./GraphFooter.cjs"),at=require("./ColorLegendWithMouseOver.cjs"),ct=require("./LinearColorLegend.cjs"),ut=require("./ThresholdColorLegendWithMouseOver.cjs"),m=require("./Colors.cjs"),dt=require("./EmptyState-CFmiFPHz.cjs"),Ue=require("./GraphContainer-Cul9b74X.cjs");function ht(u){const e=o.compilerRuntimeExports.c(87),{data:l,showColumnLabels:z,leftMargin:C,rightMargin:J,truncateBy:b,width:K,height:Q,topMargin:he,bottomMargin:xe,tooltip:Z,onSeriesMouseOver:n,suffix:$e,prefix:r,showValues:_,colorDomain:j,colors:B,noDataColor:re,scaleType:ne,showRowLabels:me,selectedColor:ee,onSeriesMouseClick:W,resetSelectionOnDoubleClick:ge,detailsOnClick:$,styles:x,classNames:c,animate:h,precision:le,locale:pe}=u,Me=E.useRef(null);let te;e[0]!==h.amount||e[1]!==h.once?(te={once:h.once,amount:h.amount},e[0]=h.amount,e[1]=h.once,e[2]=te):te=e[2];const G=rt.useInView(Me,te);let ae;e[3]!==xe||e[4]!==C||e[5]!==J||e[6]!==he?(ae={top:he,bottom:xe,left:C,right:J},e[3]=xe,e[4]=C,e[5]=J,e[6]=he,e[7]=ae):ae=e[7];const d=ae,[M,fe]=E.useState(void 0),[v,Ce]=E.useState(void 0),[oe,ve]=E.useState(void 0),[se,a]=E.useState(void 0),i=K-d.left-d.right,ye=Q-d.top-d.bottom;let F,X,Y,O,k,L,S,D,N,A,V,H,y;if(e[8]!==h.duration||e[9]!==c?.graphObjectValues||e[10]!==c?.xAxis?.labels||e[11]!==c?.yAxis?.labels||e[12]!==j||e[13]!==B||e[14]!==l||e[15]!==$||e[16]!==ye||e[17]!==i||e[18]!==Q||e[19]!==G||e[20]!==pe||e[21]!==d.left||e[22]!==d.top||e[23]!==M||e[24]!==v||e[25]!==re||e[26]!==W||e[27]!==n||e[28]!==le||e[29]!==r||e[30]!==ge||e[31]!==ne||e[32]!==ee||e[33]!==z||e[34]!==me||e[35]!==_||e[36]!==x?.graphObjectValues||e[37]!==x?.xAxis?.labels||e[38]!==x?.yAxis?.labels||e[39]!==$e||e[40]!==b||e[41]!==K){const ce=Ye.uniqBy(l,"column",!0),ie=Ye.uniqBy(l,"row",!0),P=Pe.band().domain(ie).range([0,ye]),s=P.bandwidth(),U=Pe.band().domain(ce).range([0,i]),I=U.bandwidth(),Oe=ne==="categorical"?ot.ordinal().domain(j).range(B):ne==="threshold"?st.threshold().domain(j).range(B):it.linear().domain(j).range(B);F=Ie.motion.svg,A=`${K}px`,V=`${Q}px`,H=`0 0 ${K} ${Q}`,e[55]===Symbol.for("react.memo_cache_sentinel")?(y={marginLeft:"auto",marginRight:"auto"},e[55]=y):y=e[55],X="ltr",Y=Me,O=o.jsxRuntimeExports.jsx("g",{transform:`translate(${d.left},0)`,children:z?ce.map((t,R)=>o.jsxRuntimeExports.jsx(_e.XAxesLabels,{y:0,x:U(t),width:I,height:d.top-5,value:`${t}`.length<b?`${t}`:`${`${t}`.substring(0,b)}...`,style:x?.xAxis?.labels,className:c?.xAxis?.labels,alignment:"bottom",animate:{duration:0,once:!0,amount:0},isInView:G},R)):null}),k=o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${d.top})`,children:me?ie.map((t,R)=>o.jsxRuntimeExports.jsx(et.YAxesLabels,{value:`${t}`.length<b?`${t}`:`${`${t}`.substring(0,b)}...`,y:P(t),x:0,width:d.left,height:s,alignment:"right",style:x?.yAxis?.labels,className:c?.yAxis?.labels,animate:{duration:0,once:!0,amount:0},isInView:G},R)):null}),L=`translate(${d.left},${d.top})`,S=ie.map((t,R)=>o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${P(t)})`,children:ce.map(p=>o.jsxRuntimeExports.jsx("rect",{x:U(p),y:0,width:I,height:s,style:{fill:re},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"},`${t}-${p}`))},R)),D=l.filter(xt).map((t,R)=>{const p=Be.checkIfNullOrUndefined(t.value)?re:Oe(t.value);return o.jsxRuntimeExports.jsxs("g",{transform:`translate(${U(t.column)},${P(t.row)})`,onMouseEnter:ue=>{Ce(t),a(ue.clientY),ve(ue.clientX),n?.(t)},onClick:()=>{(W||$)&&(Je.isEqual(M,t)&&ge?(fe(void 0),W?.(void 0)):(fe(t),W?.(t)))},onMouseMove:ue=>{Ce(t),a(ue.clientY),ve(ue.clientX)},onMouseLeave:()=>{Ce(void 0),ve(void 0),a(void 0),n?.(void 0)},opacity:ee?ee===p?1:.3:1,children:[o.jsxRuntimeExports.jsx(Ie.motion.rect,{x:0,y:0,width:I,height:s,className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700",exit:{opacity:0,transition:{duration:h.duration}},variants:{initial:{fill:p,opacity:0},whileInView:{fill:p,opacity:1,transition:{duration:h.duration}}},initial:"initial",animate:G?"whileInView":"initial"}),_&&!Be.checkIfNullOrUndefined(t.value)?o.jsxRuntimeExports.jsx(Ie.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:h.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},children:o.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:I,height:s,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",c?.graphObjectValues),style:{color:Ze.getTextColorBasedOnBgColor(p),...x?.graphObjectValues||{}},children:Ke.numberFormattingFunction(t.value,void 0,le,r,$e,pe)})})},R)}):null]},`${t.column}-${t.row}`)}),N=v?o.jsxRuntimeExports.jsx("rect",{x:U(v.column),y:P(v.row),width:I,height:s,style:{fill:"none",fillOpacity:0,strokeWidth:1.5},className:"stroke-primary-gray-700 dark:stroke-primary-gray-300"}):null,e[8]=h.duration,e[9]=c?.graphObjectValues,e[10]=c?.xAxis?.labels,e[11]=c?.yAxis?.labels,e[12]=j,e[13]=B,e[14]=l,e[15]=$,e[16]=ye,e[17]=i,e[18]=Q,e[19]=G,e[20]=pe,e[21]=d.left,e[22]=d.top,e[23]=M,e[24]=v,e[25]=re,e[26]=W,e[27]=n,e[28]=le,e[29]=r,e[30]=ge,e[31]=ne,e[32]=ee,e[33]=z,e[34]=me,e[35]=_,e[36]=x?.graphObjectValues,e[37]=x?.xAxis?.labels,e[38]=x?.yAxis?.labels,e[39]=$e,e[40]=b,e[41]=K,e[42]=F,e[43]=X,e[44]=Y,e[45]=O,e[46]=k,e[47]=L,e[48]=S,e[49]=D,e[50]=N,e[51]=A,e[52]=V,e[53]=H,e[54]=y}else F=e[42],X=e[43],Y=e[44],O=e[45],k=e[46],L=e[47],S=e[48],D=e[49],N=e[50],A=e[51],V=e[52],H=e[53],y=e[54];let f;e[56]!==L||e[57]!==S||e[58]!==D||e[59]!==N?(f=o.jsxRuntimeExports.jsxs("g",{transform:L,children:[S,D,N]}),e[56]=L,e[57]=S,e[58]=D,e[59]=N,e[60]=f):f=e[60];let T;e[61]!==F||e[62]!==X||e[63]!==Y||e[64]!==O||e[65]!==k||e[66]!==f||e[67]!==A||e[68]!==V||e[69]!==H||e[70]!==y?(T=o.jsxRuntimeExports.jsxs(F,{width:A,height:V,viewBox:H,style:y,direction:X,ref:Y,children:[O,k,f]}),e[61]=F,e[62]=X,e[63]=Y,e[64]=O,e[65]=k,e[66]=f,e[67]=A,e[68]=V,e[69]=H,e[70]=y,e[71]=T):T=e[71];let w;e[72]!==c?.tooltip||e[73]!==oe||e[74]!==se||e[75]!==v||e[76]!==x?.tooltip||e[77]!==Z?(w=v&&Z&&oe&&se?o.jsxRuntimeExports.jsx(Qe.Tooltip,{data:v,body:Z,xPos:oe,yPos:se,backgroundStyle:x?.tooltip,className:c?.tooltip}):null,e[72]=c?.tooltip,e[73]=oe,e[74]=se,e[75]=v,e[76]=x?.tooltip,e[77]=Z,e[78]=w):w=e[78];let q;e[79]!==c?.modal||e[80]!==$||e[81]!==M?(q=$&&M!==void 0?o.jsxRuntimeExports.jsx(tt.DetailsModal,{body:$,data:M,setData:fe,className:c?.modal}):null,e[79]=c?.modal,e[80]=$,e[81]=M,e[82]=q):q=e[82];let g;return e[83]!==T||e[84]!==w||e[85]!==q?(g=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[T,w,q]}),e[83]=T,e[84]=w,e[85]=q,e[86]=g):g=e[86],g}function xt(u){return!Be.checkIfNullOrUndefined(u.value)}function mt(u){const e=o.compilerRuntimeExports.c(90),{data:l,graphTitle:z,colors:C,sources:J,graphDescription:b,showColumnLabels:K,leftMargin:Q,rightMargin:he,truncateBy:xe,height:Z,width:n,scaleType:$e,colorDomain:r,footNote:_,colorLegendTitle:j,padding:B,backgroundColor:re,topMargin:ne,bottomMargin:me,tooltip:ee,onSeriesMouseOver:W,suffix:ge,prefix:$,showRowLabels:x,relativeHeight:c,showValues:h,graphID:le,noDataColor:pe,showColorScale:Me,onSeriesMouseClick:te,graphDownload:G,dataDownload:ae,fillContainer:d,language:M,showNAColor:fe,minHeight:v,theme:Ce,ariaLabel:oe,resetSelectionOnDoubleClick:ve,detailsOnClick:se,styles:a,classNames:i,animate:ye,precision:F,locale:X,naLabel:Y}=u,O=K===void 0?!0:K,k=Q===void 0?100:Q,L=he===void 0?10:he,S=xe===void 0?999:xe,D=re===void 0?!1:re,N=ne===void 0?30:ne,A=me===void 0?10:me,V=ge===void 0?"":ge,H=$===void 0?"":$,y=x===void 0?!0:x,f=pe===void 0?m.Colors.gray:pe,T=Me===void 0?!0:Me,w=G===void 0?!1:G,q=ae===void 0?!1:ae,g=d===void 0?!0:d,ce=M===void 0?"en":M,ie=fe===void 0?!0:fe,P=v===void 0?0:v,s=Ce===void 0?"light":Ce,U=ve===void 0?!0:ve,I=ye===void 0?!1:ye,Oe=F===void 0?2:F,t=X===void 0?"en":X,R=Y===void 0?"NA":Y,[p,ue]=E.useState(0),[ke,ze]=E.useState(0),[Ne,We]=E.useState(void 0),Ae=E.useRef(null),Ge=E.useRef(null);let Le,Se;e[0]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>{const Fe=new ResizeObserver(Xe=>{ue(Xe[0].target.clientWidth||620),ze(Xe[0].target.clientHeight||480)});return Ae.current&&Fe.observe(Ae.current),()=>Fe.disconnect()},Se=[],e[0]=Le,e[1]=Se):(Le=e[0],Se=e[1]),E.useEffect(Le,Se);const de=$e||(typeof r[0]=="string"?"categorical":r.length===2?"linear":"threshold"),Ve=i?.graphContainer,He=a?.graphContainer,Te=g?void 0:n;let be;e[2]!==i?.description||e[3]!==i?.title||e[4]!==l||e[5]!==q||e[6]!==b||e[7]!==w||e[8]!==z||e[9]!==a?.description||e[10]!==a?.title||e[11]!==n?(be=z||b||w||q?o.jsxRuntimeExports.jsx(nt.GraphHeader,{styles:{title:a?.title,description:a?.description},classNames:{title:i?.title,description:i?.description},graphTitle:z,graphDescription:b,width:n,graphDownload:w?Ge:void 0,dataDownload:q?l.map(yt).filter(vt).length>0?l.map(Ct).filter(ft):l.filter(pt):null}):null,e[2]=i?.description,e[3]=i?.title,e[4]=l,e[5]=q,e[6]=b,e[7]=w,e[8]=z,e[9]=a?.description,e[10]=a?.title,e[11]=n,e[12]=be):be=e[12];let je;e[13]!==i?.colorLegend||e[14]!==r||e[15]!==j||e[16]!==C||e[17]!==l.length||e[18]!==g||e[19]!==t||e[20]!==R||e[21]!==f||e[22]!==de||e[23]!==T||e[24]!==ie||e[25]!==s||e[26]!==n?(je=T&&l.length>0?de==="categorical"?o.jsxRuntimeExports.jsx(at.ColorLegendWithMouseOver,{width:g?void 0:n,colorLegendTitle:j,colors:C||(typeof r[0]=="string"?m.Colors[s].categoricalColors.colors:r.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${r.length+1}`]),colorDomain:r.map(gt),setSelectedColor:We,showNAColor:ie,className:i?.colorLegend}):de==="threshold"?o.jsxRuntimeExports.jsx(ut.ThresholdColorLegendWithMouseOver,{width:g?void 0:n,colorLegendTitle:j,colors:C||(typeof r[0]=="string"?m.Colors[s].categoricalColors.colors:r.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${r.length+1}`]),colorDomain:r,setSelectedColor:We,naColor:f,locale:t,showNAColor:ie,naLabel:R}):o.jsxRuntimeExports.jsx(ct.LinearColorLegend,{width:g?void 0:n,colorLegendTitle:j,colors:C||[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]],locale:t,colorDomain:r,className:i?.colorLegend}):null,e[13]=i?.colorLegend,e[14]=r,e[15]=j,e[16]=C,e[17]=l.length,e[18]=g,e[19]=t,e[20]=R,e[21]=f,e[22]=de,e[23]=T,e[24]=ie,e[25]=s,e[26]=n,e[27]=je):je=e[27];let we;e[28]!==l.length?(we=l.length===0&&o.jsxRuntimeExports.jsx(dt.EmptyState,{}),e[28]=l.length,e[29]=we):we=e[29];let qe;e[30]!==I||e[31]!==A||e[32]!==i||e[33]!==r||e[34]!==C||e[35]!==l||e[36]!==se||e[37]!==g||e[38]!==k||e[39]!==t||e[40]!==f||e[41]!==te||e[42]!==W||e[43]!==Oe||e[44]!==H||e[45]!==U||e[46]!==L||e[47]!==de||e[48]!==Ne||e[49]!==O||e[50]!==y||e[51]!==h||e[52]!==a||e[53]!==V||e[54]!==ke||e[55]!==p||e[56]!==s||e[57]!==ee||e[58]!==N||e[59]!==S||e[60]!==n?(qe=p&&ke&&l.length>0?o.jsxRuntimeExports.jsx(ht,{data:l,colorDomain:r,width:g||!n||p<n?p:n,height:ke,colors:C||(typeof r[0]=="string"?m.Colors[s].categoricalColors.colors:r.length===2?[m.Colors[s].sequentialColors.neutralColorsx09[0],m.Colors[s].sequentialColors.neutralColorsx09[8]]:m.Colors[s].sequentialColors[`neutralColorsx0${r.length+1}`]),noDataColor:f,scaleType:de,showColumnLabels:O,leftMargin:k,rightMargin:L,topMargin:N,bottomMargin:A,selectedColor:Ne,truncateBy:S,showRowLabels:y,tooltip:ee,onSeriesMouseOver:W,showValues:h,suffix:V,prefix:H,onSeriesMouseClick:te,resetSelectionOnDoubleClick:U,detailsOnClick:se,styles:a,classNames:i,animate:I===!0?{duration:.5,once:!0,amount:.5}:I||{duration:0,once:!0,amount:0},precision:Oe,locale:t}):null,e[30]=I,e[31]=A,e[32]=i,e[33]=r,e[34]=C,e[35]=l,e[36]=se,e[37]=g,e[38]=k,e[39]=t,e[40]=f,e[41]=te,e[42]=W,e[43]=Oe,e[44]=H,e[45]=U,e[46]=L,e[47]=de,e[48]=Ne,e[49]=O,e[50]=y,e[51]=h,e[52]=a,e[53]=V,e[54]=ke,e[55]=p,e[56]=s,e[57]=ee,e[58]=N,e[59]=S,e[60]=n,e[61]=qe):qe=e[61];let Re;e[62]!==we||e[63]!==qe?(Re=o.jsxRuntimeExports.jsxs(Ue.GraphArea,{ref:Ae,children:[we,qe]}),e[62]=we,e[63]=qe,e[64]=Re):Re=e[64];let Ee;e[65]!==i?.footnote||e[66]!==i?.source||e[67]!==_||e[68]!==J||e[69]!==a?.footnote||e[70]!==a?.source||e[71]!==n?(Ee=J||_?o.jsxRuntimeExports.jsx(lt.GraphFooter,{styles:{footnote:a?.footnote,source:a?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:J,footNote:_,width:n}):null,e[65]=i?.footnote,e[66]=i?.source,e[67]=_,e[68]=J,e[69]=a?.footnote,e[70]=a?.source,e[71]=n,e[72]=Ee):Ee=e[72];let De;return e[73]!==oe||e[74]!==D||e[75]!==le||e[76]!==Z||e[77]!==ce||e[78]!==P||e[79]!==B||e[80]!==c||e[81]!==Ve||e[82]!==He||e[83]!==Te||e[84]!==be||e[85]!==je||e[86]!==Re||e[87]!==Ee||e[88]!==s?(De=o.jsxRuntimeExports.jsxs(Ue.GraphContainer,{className:Ve,style:He,id:le,ref:Ge,"aria-label":oe,backgroundColor:D,theme:s,language:ce,minHeight:P,width:Te,height:Z,relativeHeight:c,padding:B,children:[be,je,Re,Ee]}),e[73]=oe,e[74]=D,e[75]=le,e[76]=Z,e[77]=ce,e[78]=P,e[79]=B,e[80]=c,e[81]=Ve,e[82]=He,e[83]=Te,e[84]=be,e[85]=je,e[86]=Re,e[87]=Ee,e[88]=s,e[89]=De):De=e[89],De}function gt(u){return`${u}`}function pt(u){return u!==void 0}function ft(u){return u!==void 0}function Ct(u){return u.data}function vt(u){return u!==void 0}function yt(u){return u.data}exports.HeatMap=mt;
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;
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}\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 } = 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 )}\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} 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 /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Maximum value for the chart */\r\n 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 /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\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 suffix = '',\r\n prefix = '',\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 precision = 2,\r\n locale = 'en',\r\n naLabel = 'NA',\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={locale}\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={locale}\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 suffix={suffix}\r\n prefix={prefix}\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 precision={precision}\r\n locale={locale}\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","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","t19","t20","t21","t22","naLabel","t23","Colors","gray","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t24","t25","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","scale","t26","graphContainer","t27","t28","t29","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","t30","colorLegend","ColorLegendWithMouseOver","categoricalColors","sequentialColors","neutralColorsx09","_temp6","ThresholdColorLegendWithMouseOver","LinearColorLegend","t31","EmptyState","t32","t33","GraphArea","t34","footnote","source","GraphFooter","t35","GraphContainer","d_4"],"mappings":"mjCAyDO,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,EAAAC,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,EAAAA,EA6BI9B,EACJ+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AAlG,EAAA,CAAA,OA4G6CL,IAAMlD,MAAS,CA5G5D,SAAAwJ,GAAAtG,EAAA,CAAA,OA4GyBA,EAAC9F,IAAK,CA5G/B,SAAAmM,GAAAvF,EAAA,CAAA,OA2G2Cd,IAAMlD,MAAS,CA3G1D,SAAA+D,GAAAgC,EAAA,CAAA,OA2GuB7C,EAAC9F,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":"mjCA0DO,SAAAA,GAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,KAAAA,EAAAC,iBAAAA,EAAAC,WAAAA,EAAAC,YAAAA,EAAAC,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E,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"}
package/dist/HeatMap.d.ts CHANGED
@@ -48,7 +48,15 @@ declare interface HeatMapDataType {
48
48
  data?: object;
49
49
  }
50
50
 
51
- declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
51
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'ja' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
52
+
53
+ declare interface NumberFormatOptions {
54
+ locale?: string;
55
+ precision?: number;
56
+ prefix?: string;
57
+ suffix?: string;
58
+ padZeros?: boolean;
59
+ }
52
60
 
53
61
  declare interface Props {
54
62
  /** Array of data objects */
@@ -95,10 +103,6 @@ declare interface Props {
95
103
  bottomMargin?: number;
96
104
  /** Toggles the background to fill the container. This only works if the width of the graph is defined. */
97
105
  fillContainer?: boolean;
98
- /** Prefix for values */
99
- prefix?: string;
100
- /** Suffix for values */
101
- suffix?: string;
102
106
  /** Maximum value for the chart */
103
107
  truncateBy?: number;
104
108
  /** Reference values for comparison */
@@ -118,10 +122,8 @@ declare interface Props {
118
122
  animate?: boolean | AnimateDataType;
119
123
  /** Domain for the colors in the cell. */
120
124
  colorDomain: number[] | string[];
121
- /** Specifies the number of decimal places to display in the value. */
122
- precision?: number;
123
- /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */
124
- locale?: string;
125
+ /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */
126
+ numberDisplayOptions?: NumberFormatOptions;
125
127
  /** Defines how “NA” values should be displayed/labelled in the graph */
126
128
  naLabel?: string;
127
129
  /** Enable graph download option as png */