@undp/data-viz 2.4.1 → 2.5.1

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 (271) 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 +309 -304
  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 +314 -311
  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.cjs.map +1 -1
  68. package/dist/DotDensityMap.d.ts +1 -1
  69. package/dist/DotDensityMap.js +270 -267
  70. package/dist/DotDensityMap.js.map +1 -1
  71. package/dist/DualAxisLineChart.cjs +1 -1
  72. package/dist/DualAxisLineChart.cjs.map +1 -1
  73. package/dist/DualAxisLineChart.d.ts +13 -9
  74. package/dist/DualAxisLineChart.js +341 -351
  75. package/dist/DualAxisLineChart.js.map +1 -1
  76. package/dist/DumbbellChart.cjs +1 -1
  77. package/dist/DumbbellChart.cjs.map +1 -1
  78. package/dist/DumbbellChart.d.ts +11 -9
  79. package/dist/DumbbellChart.js +592 -593
  80. package/dist/DumbbellChart.js.map +1 -1
  81. package/dist/GeoHubCompareMaps.cjs +1 -1
  82. package/dist/GeoHubCompareMaps.d.ts +1 -1
  83. package/dist/GeoHubCompareMaps.js +1 -1
  84. package/dist/GeoHubMap.cjs +1 -1
  85. package/dist/GeoHubMap.d.ts +1 -1
  86. package/dist/GeoHubMap.js +1 -1
  87. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  88. package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
  89. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  90. package/dist/GraphEl-BgkDbq50.cjs +2 -0
  91. package/dist/GraphEl-BgkDbq50.cjs.map +1 -0
  92. package/dist/GraphEl-Ch0uAeZw.js +1830 -0
  93. package/dist/GraphEl-Ch0uAeZw.js.map +1 -0
  94. package/dist/GriddedGraphs.cjs +1 -1
  95. package/dist/GriddedGraphs.d.ts +29 -16
  96. package/dist/GriddedGraphs.js +1 -1
  97. package/dist/GriddedGraphsFromConfig.d.ts +29 -16
  98. package/dist/HeatMap.cjs +1 -1
  99. package/dist/HeatMap.cjs.map +1 -1
  100. package/dist/HeatMap.d.ts +11 -9
  101. package/dist/HeatMap.js +203 -205
  102. package/dist/HeatMap.js.map +1 -1
  103. package/dist/Histogram.cjs +1 -1
  104. package/dist/Histogram.cjs.map +1 -1
  105. package/dist/Histogram.d.ts +11 -5
  106. package/dist/Histogram.js +88 -89
  107. package/dist/Histogram.js.map +1 -1
  108. package/dist/HybridMap.cjs +1 -1
  109. package/dist/HybridMap.cjs.map +1 -1
  110. package/dist/HybridMap.d.ts +11 -3
  111. package/dist/HybridMap.js +339 -336
  112. package/dist/HybridMap.js.map +1 -1
  113. package/dist/ImageDownloadButton.cjs +1 -1
  114. package/dist/ImageDownloadButton.js +1 -1
  115. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  116. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  117. package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
  118. package/dist/LineChartWithConfidenceInterval.js +393 -395
  119. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  120. package/dist/LinearColorLegend.cjs +1 -1
  121. package/dist/LinearColorLegend.js +1 -1
  122. package/dist/MultiGraphDashboard.d.ts +29 -16
  123. package/dist/MultiGraphDashboardFromConfig.d.ts +29 -16
  124. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
  125. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
  126. package/dist/MultiLineAltChart.cjs +1 -1
  127. package/dist/MultiLineAltChart.cjs.map +1 -1
  128. package/dist/MultiLineAltChart.d.ts +11 -9
  129. package/dist/MultiLineAltChart.js +411 -413
  130. package/dist/MultiLineAltChart.js.map +1 -1
  131. package/dist/MultiLineChart.cjs +1 -1
  132. package/dist/MultiLineChart.cjs.map +1 -1
  133. package/dist/MultiLineChart.d.ts +11 -9
  134. package/dist/MultiLineChart.js +438 -440
  135. package/dist/MultiLineChart.js.map +1 -1
  136. package/dist/ParetoChart.cjs +1 -1
  137. package/dist/ParetoChart.cjs.map +1 -1
  138. package/dist/ParetoChart.d.ts +13 -13
  139. package/dist/ParetoChart.js +347 -355
  140. package/dist/ParetoChart.js.map +1 -1
  141. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +29 -16
  142. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +29 -16
  143. package/dist/PerformanceIntensiveScrollStory.d.ts +29 -16
  144. package/dist/RadarChart.cjs +1 -1
  145. package/dist/RadarChart.cjs.map +1 -1
  146. package/dist/RadarChart.d.ts +11 -5
  147. package/dist/RadarChart.js +213 -213
  148. package/dist/RadarChart.js.map +1 -1
  149. package/dist/SankeyChart.cjs +1 -1
  150. package/dist/SankeyChart.cjs.map +1 -1
  151. package/dist/SankeyChart.d.ts +11 -9
  152. package/dist/SankeyChart.js +448 -450
  153. package/dist/SankeyChart.js.map +1 -1
  154. package/dist/ScatterPlot.cjs +1 -1
  155. package/dist/ScatterPlot.cjs.map +1 -1
  156. package/dist/ScatterPlot.d.ts +15 -13
  157. package/dist/ScatterPlot.js +477 -483
  158. package/dist/ScatterPlot.js.map +1 -1
  159. package/dist/ScrollStory.d.ts +29 -16
  160. package/dist/SimpleLineChart.cjs +1 -1
  161. package/dist/SimpleLineChart.cjs.map +1 -1
  162. package/dist/SimpleLineChart.d.ts +11 -9
  163. package/dist/SimpleLineChart.js +362 -364
  164. package/dist/SimpleLineChart.js.map +1 -1
  165. package/dist/SingleGraphDashboard.cjs +1 -1
  166. package/dist/SingleGraphDashboard.d.ts +29 -16
  167. package/dist/SingleGraphDashboard.js +1 -1
  168. package/dist/SingleGraphDashboardFromConfig.d.ts +29 -16
  169. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +29 -16
  170. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +29 -16
  171. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  172. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  173. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +29 -16
  174. package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
  175. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  176. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +29 -16
  177. package/dist/SlopeChart.cjs +1 -1
  178. package/dist/SlopeChart.d.ts +1 -1
  179. package/dist/SlopeChart.js +2 -2
  180. package/dist/SparkLine.cjs +1 -1
  181. package/dist/SparkLine.d.ts +1 -1
  182. package/dist/SparkLine.js +1 -1
  183. package/dist/StatCardFromData.cjs +1 -1
  184. package/dist/StatCardFromData.cjs.map +1 -1
  185. package/dist/StatCardFromData.d.ts +11 -9
  186. package/dist/StatCardFromData.js +113 -116
  187. package/dist/StatCardFromData.js.map +1 -1
  188. package/dist/StripChart.cjs +1 -1
  189. package/dist/StripChart.cjs.map +1 -1
  190. package/dist/StripChart.d.ts +11 -9
  191. package/dist/StripChart.js +434 -435
  192. package/dist/StripChart.js.map +1 -1
  193. package/dist/ThreeDGlobe.cjs +1 -1
  194. package/dist/ThreeDGlobe.cjs.map +1 -1
  195. package/dist/ThreeDGlobe.d.ts +11 -3
  196. package/dist/ThreeDGlobe.js +143 -143
  197. package/dist/ThreeDGlobe.js.map +1 -1
  198. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  199. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  200. package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
  201. package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
  202. package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
  203. package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
  204. package/dist/TreeMapGraph.cjs +1 -1
  205. package/dist/TreeMapGraph.cjs.map +1 -1
  206. package/dist/TreeMapGraph.d.ts +11 -9
  207. package/dist/TreeMapGraph.js +369 -371
  208. package/dist/TreeMapGraph.js.map +1 -1
  209. package/dist/Types.d.ts +29 -16
  210. package/dist/UnitChart.cjs +1 -1
  211. package/dist/UnitChart.cjs.map +1 -1
  212. package/dist/UnitChart.d.ts +11 -5
  213. package/dist/UnitChart.js +118 -119
  214. package/dist/UnitChart.js.map +1 -1
  215. package/dist/WaterfallChart.cjs +1 -1
  216. package/dist/WaterfallChart.cjs.map +1 -1
  217. package/dist/WaterfallChart.d.ts +11 -9
  218. package/dist/WaterfallChart.js +306 -308
  219. package/dist/WaterfallChart.js.map +1 -1
  220. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
  221. package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
  222. package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
  223. package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
  224. package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
  225. package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
  226. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
  227. package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
  228. package/dist/{imageDownload-Diofs_vY.js → imageDownload-BYsNEtMS.js} +11 -11
  229. package/dist/{imageDownload-Diofs_vY.js.map → imageDownload-BYsNEtMS.js.map} +1 -1
  230. package/dist/{imageDownload-61q6jyJW.cjs → imageDownload-CkMwA7Cw.cjs} +4 -4
  231. package/dist/{imageDownload-61q6jyJW.cjs.map → imageDownload-CkMwA7Cw.cjs.map} +1 -1
  232. package/dist/index-BPyj_6hG.js +375 -0
  233. package/dist/index-BPyj_6hG.js.map +1 -0
  234. package/dist/index-DuLvdHo2.cjs +2 -0
  235. package/dist/index-DuLvdHo2.cjs.map +1 -0
  236. package/dist/index.cjs +1 -1
  237. package/dist/index.d.ts +108 -245
  238. package/dist/index.js +3 -3
  239. package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
  240. package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
  241. package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
  242. package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
  243. package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
  244. package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
  245. package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
  246. package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
  247. package/dist/style.css +1 -1
  248. package/dist/utils.cjs +1 -1
  249. package/dist/utils.d.ts +1 -1
  250. package/dist/utils.js +2 -2
  251. package/package.json +2 -2
  252. package/dist/GraphEl-B73N4RIA.js +0 -1906
  253. package/dist/GraphEl-B73N4RIA.js.map +0 -1
  254. package/dist/GraphEl-Lt1og0C-.cjs +0 -2
  255. package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
  256. package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
  257. package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
  258. package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
  259. package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
  260. package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
  261. package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
  262. package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
  263. package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
  264. package/dist/index-B0Awa_de.js +0 -377
  265. package/dist/index-B0Awa_de.js.map +0 -1
  266. package/dist/index-CP8cmNzt.cjs +0 -2
  267. package/dist/index-CP8cmNzt.cjs.map +0 -1
  268. package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
  269. package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
  270. package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
  271. 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;
@@ -187,6 +188,9 @@ declare interface DataTableColumnDataType {
187
188
  align?: 'left' | 'right' | 'center';
188
189
  suffix?: string;
189
190
  prefix?: string;
191
+ locale?: string;
192
+ precision?: number;
193
+ padZeros?: boolean;
190
194
  columnWidth?: number;
191
195
  }
192
196
 
@@ -241,8 +245,6 @@ declare interface GraphSettingsDataType {
241
245
  footNote?: string | React.ReactNode;
242
246
  height?: number;
243
247
  width?: number;
244
- suffix?: string;
245
- prefix?: string;
246
248
  sources?: SourcesDataType[];
247
249
  barPadding?: number;
248
250
  showTicks?: boolean;
@@ -272,7 +274,14 @@ declare interface GraphSettingsDataType {
272
274
  barColors?: [string, string];
273
275
  centerGap?: number;
274
276
  columnData?: DataTableColumnDataType[];
275
- mainText?: string;
277
+ mainText?: string | {
278
+ label: string;
279
+ suffix?: string;
280
+ prefix?: string;
281
+ locale?: string;
282
+ padZeros?: boolean;
283
+ precision?: number;
284
+ } | ReactElement;
276
285
  subNote?: string;
277
286
  radius?: number;
278
287
  strokeWidth?: number;
@@ -428,16 +437,6 @@ declare interface GraphSettingsDataType {
428
437
  colorLegendColors?: string[];
429
438
  colorLegendDomain?: string[];
430
439
  barAxisTitle?: string;
431
- barSuffix?: string;
432
- barPrefix?: string;
433
- lineSuffix?: string;
434
- linePrefix?: string;
435
- xSuffix?: string;
436
- xPrefix?: string;
437
- ySuffix?: string;
438
- yPrefix?: string;
439
- lineSuffixes?: [string, string];
440
- linePrefixes?: [string, string];
441
440
  allowDataDownloadOnDetail?: string | boolean;
442
441
  noOfItemsInAPage?: number;
443
442
  curveType?: CurveTypes;
@@ -457,7 +456,6 @@ declare interface GraphSettingsDataType {
457
456
  measureBarWidthFactor?: number;
458
457
  mapLegend?: string | React.ReactNode | MapLegendDataType[];
459
458
  dimmedOpacity?: number;
460
- precision?: number;
461
459
  customLayers?: CustomLayerDataType[];
462
460
  dashedLines?: (string | number)[];
463
461
  dashSettings?: string[];
@@ -494,7 +492,14 @@ declare interface GraphSettingsDataType {
494
492
  showVoronoiTesselation?: boolean;
495
493
  mapOverlay?: MapOverlayDataType;
496
494
  useVoronoiInteraction?: boolean;
497
- locale?: string;
495
+ numberDisplayOptions?: NumberFormatOptions;
496
+ leftLineNumberDisplayOptions?: NumberFormatOptions;
497
+ rightLineNumberDisplayOptions?: NumberFormatOptions;
498
+ barNumberDisplayOptions?: NumberFormatOptions;
499
+ lineNumberDisplayOptions?: NumberFormatOptions;
500
+ xNumberDisplayOptions?: NumberFormatOptions;
501
+ yNumberDisplayOptions?: NumberFormatOptions;
502
+ defaultColor?: string;
498
503
  }
499
504
 
500
505
  declare interface HighlightAreaSettingsDataType {
@@ -521,7 +526,7 @@ declare type HighlightDataPointSettingsDataType = {
521
526
  width?: string;
522
527
  };
523
528
 
524
- declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
529
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'ja' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
525
530
 
526
531
  declare type LightConfig = AmbientLightConfig | DirectionalLightConfig | PointLightConfig | SpotLightConfig;
527
532
 
@@ -538,6 +543,14 @@ declare interface MapOverlayDataType {
538
543
 
539
544
  declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
540
545
 
546
+ declare interface NumberFormatOptions {
547
+ locale?: string;
548
+ precision?: number;
549
+ prefix?: string;
550
+ suffix?: string;
551
+ padZeros?: boolean;
552
+ }
553
+
541
554
  declare interface PointLightConfig extends BaseLightConfig {
542
555
  type: 'point';
543
556
  distance?: number;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-D4pAp7u0.cjs"),H=require("react"),Qt=require("./index-DQA8q5sC.cjs"),Zt=require("./Tooltip-Hr46paWP.cjs"),Yt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),f=require("./Colors.cjs"),Xt=require("./Axis-BTaS9oPQ.cjs"),Ft=require("./AxisTitle-DP_evhbe.cjs"),_t=require("./DetailsModal-jmmKRMRM.cjs"),te=require("./linear-CgUCbw9F.cjs"),yt=require("./proxy-CqH8m8IQ.cjs"),ee=require("./use-in-view-dnRv_qqF.cjs"),ie=require("./index-FXfr51ZM.cjs"),oe=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs"),le=require("./ColorLegendWithMouseOver.cjs"),re=require("./EmptyState-CFmiFPHz.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-Cul9b74X.cjs");function se(e){const t=l.compilerRuntimeExports.c(148),{data:o,width:G,height:h,showLabels:rt,colors:n,colorDomain:x,radius:s,leftMargin:y,rightMargin:dt,topMargin:P,bottomMargin:bt,tooltip:Ot,onSeriesMouseOver:st,axisTitles:g,highlightedDataPoints:j,selectedColor:at,minValue:ct,maxValue:ut,onSeriesMouseClick:ht,resetSelectionOnDoubleClick:At,detailsOnClick:S,styles:m,classNames:u,animate:a,dimmedOpacity:v,customLayers:k}=e,Mt=H.useRef(null);let gt;t[0]!==a.amount||t[1]!==a.once?(gt={once:a.once,amount:a.amount},t[0]=a.amount,t[1]=a.once,t[2]=gt):gt=t[2];const w=ee.useInView(Mt,gt),[b,St]=H.useState(void 0),[W,Dt]=H.useState(void 0),[Et,Nt]=H.useState(void 0),[vt,It]=H.useState(void 0);let Ct;t[3]!==bt||t[4]!==y||t[5]!==dt||t[6]!==P?(Ct={top:P,bottom:bt,left:y,right:dt},t[3]=bt,t[4]=y,t[5]=dt,t[6]=P,t[7]=Ct):Ct=t[7];const c=Ct,r=G-c.left-c.right,C=h-c.top-c.bottom;let $t;t[8]!==o?($t=Math.min(...o.map(Ne)),t[8]=o,t[9]=$t):$t=t[9];let xt;t[10]!==o?(xt=Math.min(...o.map(De)),t[10]=o,t[11]=xt):xt=t[11];const Y=Math.min($t,xt);let jt;t[12]!==o?(jt=Math.max(...o.map(Se)),t[12]=o,t[13]=jt):jt=t[13];let ft;t[14]!==o?(ft=Math.max(...o.map(Me)),t[14]=o,t[15]=ft):ft=t[15];const U=Math.max(jt,ft);let B,X,R,F,z,J,D,N,I,K,Q,M,d;if(t[16]!==a.duration||t[17]!==g[0]||t[18]!==g[1]||t[19]!==u?.dataConnectors||t[20]!==u?.yAxis?.axis||t[21]!==u?.yAxis?.labels||t[22]!==u?.yAxis?.title||t[23]!==x||t[24]!==n||t[25]!==k||t[26]!==o||t[27]!==S||t[28]!==v||t[29]!==C||t[30]!==r||t[31]!==h||t[32]!==j||t[33]!==w||t[34]!==c.left||t[35]!==c.top||t[36]!==ut||t[37]!==U||t[38]!==ct||t[39]!==Y||t[40]!==W||t[41]!==b||t[42]!==ht||t[43]!==st||t[44]!==s||t[45]!==At||t[46]!==at||t[47]!==rt||t[48]!==m?.dataConnectors||t[49]!==m?.yAxis?.labels||t[50]!==m?.yAxis?.title||t[51]!==G){let mt;t[65]!==ct||t[66]!==Y?(mt=Yt.checkIfNullOrUndefined(ct)?Y>0?0:Y:ct,t[65]=ct,t[66]=Y,t[67]=mt):mt=t[67];let qt;t[68]!==ut||t[69]!==U?(qt=Yt.checkIfNullOrUndefined(ut)?U>0?U:0:ut,t[68]=ut,t[69]=U,t[70]=qt):qt=t[70];const p=te.linear().domain([mt,qt]).range([C,0]).nice();X=yt.motion.svg,F=`${G}px`,z=`${h}px`,J=`0 0 ${G} ${h}`,D="mx-auto",N="ltr",I=Mt,Q=`translate(${c.left},${c.top})`;const Pt=u?.yAxis?.axis;let et;t[71]!==Pt?(et=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",Pt),t[71]=Pt,t[72]=et):et=t[72];let pt;t[73]!==et?(pt={axis:et},t[73]=et,t[74]=pt):pt=t[74];let L;t[75]!==C||t[76]!==s||t[77]!==pt?(L=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:s,x2:s,classNames:pt}),t[75]=C,t[76]=s,t[77]=pt,t[78]=L):L=t[78];const wt=C+15,kt=m?.yAxis?.title,Rt=u?.yAxis?.title;let it;t[79]!==Rt?(it=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Rt),t[79]=Rt,t[80]=it):it=t[80];let A;t[81]!==g[0]||t[82]!==s||t[83]!==wt||t[84]!==kt||t[85]!==it?(A=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:s,y:wt,style:kt,className:it,text:g[0]}),t[81]=g[0],t[82]=s,t[83]=wt,t[84]=kt,t[85]=it,t[86]=A):A=t[86],t[87]!==L||t[88]!==A?(M=l.jsxRuntimeExports.jsxs("g",{children:[L,A]}),t[87]=L,t[88]=A,t[89]=M):M=t[89];const ot=r-s,nt=r-s,lt=u?.yAxis?.axis;let E;t[90]!==lt?(E=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",lt),t[90]=lt,t[91]=E):E=t[91];let $;t[92]!==E?($={axis:E},t[92]=E,t[93]=$):$=t[93];let T;t[94]!==C||t[95]!==ot||t[96]!==nt||t[97]!==$?(T=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:ot,x2:nt,classNames:$}),t[94]=C,t[95]=ot,t[96]=nt,t[97]=$,t[98]=T):T=t[98];const Lt=r-s,Tt=C+15,Ut=m?.yAxis?.title,Bt=u?.yAxis?.title;let Ht;t[99]!==Bt?(Ht=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Bt),t[99]=Bt,t[100]=Ht):Ht=t[100];let Gt;t[101]!==g[1]||t[102]!==Lt||t[103]!==Tt||t[104]!==Ut||t[105]!==Ht?(Gt=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:Lt,y:Tt,style:Ut,className:Ht,text:g[1]}),t[101]=g[1],t[102]=Lt,t[103]=Tt,t[104]=Ut,t[105]=Ht,t[106]=Gt):Gt=t[106],t[107]!==T||t[108]!==Gt?(d=l.jsxRuntimeExports.jsxs("g",{children:[T,Gt]}),t[107]=T,t[108]=Gt,t[109]=d):d=t[109],t[110]!==k?(R=k.filter(Re).map(ke),t[110]=k,t[111]=R):R=t[111],B=ie.AnimatePresence,K=o.map((i,Kt)=>l.jsxRuntimeExports.jsxs(yt.motion.g,{variants:{initial:{opacity:at?i.color&&n[x.indexOf(`${i.color}`)]===at?1:v:b?b.label===i.label?1:v:j?j.indexOf(i.label)!==-1?1:v:1},whileInView:{opacity:at?i.color&&n[x.indexOf(`${i.color}`)]===at?1:v:b?b.label===i.label?1:v:j?j.indexOf(i.label)!==-1?1:v:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:Wt=>{St(i),It(Wt.clientY),Nt(Wt.clientX),st?.(i)},onMouseMove:Wt=>{St(i),It(Wt.clientY),Nt(Wt.clientX)},onMouseLeave:()=>{St(void 0),Nt(void 0),It(void 0),st?.(void 0)},onClick:()=>{(ht||S)&&(Qt.isEqual(W,i)&&At?(Dt(void 0),ht?.(void 0)):(Dt(i),ht?.(i)))},children:[l.jsxRuntimeExports.jsx(yt.motion.circle,{variants:{initial:{cx:s,cy:p(i.y1),fill:o.filter($e).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(Ee).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{cx:s,cy:p(i.y1),fill:o.filter(Ae).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(Oe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},r:s,style:{fillOpacity:.6}}),rt?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y1),fill:o.filter(be).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y1),fill:o.filter(we).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"end",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",textAnchor:"end",dx:0-s-3,children:i.label}):j&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y1),fill:o.filter(je).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y1),fill:o.filter(Ce).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"end",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",dx:-3,children:i.label}):null,l.jsxRuntimeExports.jsx(yt.motion.circle,{variants:{initial:{cx:r-s,cy:p(i.y2),fill:o.filter(ve).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(ge).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{cx:r-s,cy:p(i.y2),fill:o.filter(he).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(de).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},r:s,style:{fillOpacity:.6}}),rt?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y2),fill:o.filter(ye).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y2),fill:o.filter(pe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"start",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:s+3,children:i.label}):j&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y2),fill:o.filter(me).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y2),fill:o.filter(fe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"start",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:3,children:i.label}):null,l.jsxRuntimeExports.jsx(yt.motion.line,{variants:{initial:{x1:s,x2:r-s,y1:p(i.y1),y2:p(i.y1),stroke:o.filter(xe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray},whileInView:{x1:s,x2:r-s,y1:p(i.y1),y2:p(i.y2),stroke:o.filter(ue).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},className:u?.dataConnectors,style:{fill:"none",strokeWidth:1,...m?.dataConnectors}})]},Kt)),t[16]=a.duration,t[17]=g[0],t[18]=g[1],t[19]=u?.dataConnectors,t[20]=u?.yAxis?.axis,t[21]=u?.yAxis?.labels,t[22]=u?.yAxis?.title,t[23]=x,t[24]=n,t[25]=k,t[26]=o,t[27]=S,t[28]=v,t[29]=C,t[30]=r,t[31]=h,t[32]=j,t[33]=w,t[34]=c.left,t[35]=c.top,t[36]=ut,t[37]=U,t[38]=ct,t[39]=Y,t[40]=W,t[41]=b,t[42]=ht,t[43]=st,t[44]=s,t[45]=At,t[46]=at,t[47]=rt,t[48]=m?.dataConnectors,t[49]=m?.yAxis?.labels,t[50]=m?.yAxis?.title,t[51]=G,t[52]=B,t[53]=X,t[54]=R,t[55]=F,t[56]=z,t[57]=J,t[58]=D,t[59]=N,t[60]=I,t[61]=K,t[62]=Q,t[63]=M,t[64]=d}else B=t[52],X=t[53],R=t[54],F=t[55],z=t[56],J=t[57],D=t[58],N=t[59],I=t[60],K=t[61],Q=t[62],M=t[63],d=t[64];let Z;t[112]!==B||t[113]!==K?(Z=l.jsxRuntimeExports.jsx(B,{children:K}),t[112]=B,t[113]=K,t[114]=Z):Z=t[114];let V;t[115]!==k?(V=k.filter(ce).map(ae),t[115]=k,t[116]=V):V=t[116];let _;t[117]!==R||t[118]!==Z||t[119]!==V||t[120]!==Q||t[121]!==M||t[122]!==d?(_=l.jsxRuntimeExports.jsxs("g",{transform:Q,children:[M,d,R,Z,V]}),t[117]=R,t[118]=Z,t[119]=V,t[120]=Q,t[121]=M,t[122]=d,t[123]=_):_=t[123];let q;t[124]!==X||t[125]!==F||t[126]!==z||t[127]!==J||t[128]!==D||t[129]!==N||t[130]!==I||t[131]!==_?(q=l.jsxRuntimeExports.jsx(X,{width:F,height:z,viewBox:J,className:D,direction:N,ref:I,children:_}),t[124]=X,t[125]=F,t[126]=z,t[127]=J,t[128]=D,t[129]=N,t[130]=I,t[131]=_,t[132]=q):q=t[132];let tt;t[133]!==u?.tooltip||t[134]!==Et||t[135]!==vt||t[136]!==b||t[137]!==m?.tooltip||t[138]!==Ot?(tt=b&&Ot&&Et&&vt?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:b,body:Ot,xPos:Et,yPos:vt,backgroundStyle:m?.tooltip,className:u?.tooltip}):null,t[133]=u?.tooltip,t[134]=Et,t[135]=vt,t[136]=b,t[137]=m?.tooltip,t[138]=Ot,t[139]=tt):tt=t[139];let O;t[140]!==u?.modal||t[141]!==S||t[142]!==W?(O=S&&W!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:S,data:W,setData:Dt,className:u?.modal}):null,t[140]=u?.modal,t[141]=S,t[142]=W,t[143]=O):O=t[143];let Vt;return t[144]!==q||t[145]!==tt||t[146]!==O?(Vt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[q,tt,O]}),t[144]=q,t[145]=tt,t[146]=O,t[147]=Vt):Vt=t[147],Vt}function ae(e){return e.layer}function ce(e){return e.position==="after"}function ue(e){return e.color}function xe(e){return e.color}function fe(e){return e.color}function me(e){return e.color}function pe(e){return e.color}function ye(e){return e.color}function de(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ve(e){return e.color}function Ce(e){return e.color}function je(e){return e.color}function we(e){return e.color}function be(e){return e.color}function Oe(e){return e.color}function Ae(e){return e.color}function Ee(e){return e.color}function $e(e){return e.color}function ke(e){return e.layer}function Re(e){return e.position==="before"}function Me(e){return e.y2}function Se(e){return e.y1}function De(e){return e.y2}function Ne(e){return e.y1}function Ie(e){const t=l.compilerRuntimeExports.c(87),{data:o,graphTitle:G,colors:h,sources:rt,graphDescription:n,showLabels:x,height:s,width:y,footNote:dt,colorDomain:P,colorLegendTitle:bt,radius:Ot,axisTitles:st,padding:g,backgroundColor:j,leftMargin:at,rightMargin:ct,topMargin:ut,bottomMargin:ht,tooltip:At,relativeHeight:S,onSeriesMouseOver:m,showColorScale:u,highlightedDataPoints:a,graphID:v,minValue:k,maxValue:Mt,onSeriesMouseClick:gt,graphDownload:w,dataDownload:b,fillContainer:St,language:W,showNAColor:Dt,minHeight:Et,theme:Nt,ariaLabel:vt,resetSelectionOnDoubleClick:It,detailsOnClick:Ct,styles:c,classNames:r,animate:C,dimmedOpacity:$t,customLayers:xt}=e,Y=x===void 0?!1:x,jt=Ot===void 0?5:Ot;let ft;t[0]!==st?(ft=st===void 0?["",""]:st,t[0]=st,t[1]=ft):ft=t[1];const U=ft,B=j===void 0?!1:j,X=at===void 0?50:at,R=ct===void 0?50:ct,F=ut===void 0?20:ut,z=ht===void 0?20:ht,J=u===void 0?!0:u,D=w===void 0?!1:w,N=b===void 0?!1:b,I=St===void 0?!0:St,K=W===void 0?"en":W,Q=Dt===void 0?!0:Dt,M=Et===void 0?0:Et,d=Nt===void 0?"light":Nt,Z=It===void 0?!0:It,V=C===void 0?!1:C,_=$t===void 0?.3:$t;let q;t[2]!==xt?(q=xt===void 0?[]:xt,t[2]=xt,t[3]=q):q=t[3];const tt=q,[O,Vt]=H.useState(0),[mt,qt]=H.useState(0),[p,Pt]=H.useState(void 0),et=H.useRef(null),pt=H.useRef(null);let L,wt;t[4]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{const Lt=new ResizeObserver(Tt=>{Vt(Tt[0].target.clientWidth||620),qt(Tt[0].target.clientHeight||480)});return et.current&&Lt.observe(et.current),()=>Lt.disconnect()},wt=[],t[4]=L,t[5]=wt):(L=t[4],wt=t[5]),H.useEffect(L,wt);const kt=r?.graphContainer,Rt=c?.graphContainer,it=I?void 0:y;let A;t[6]!==r?.description||t[7]!==r?.title||t[8]!==o||t[9]!==N||t[10]!==n||t[11]!==D||t[12]!==G||t[13]!==c?.description||t[14]!==c?.title||t[15]!==y?(A=G||n||D||N?l.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:r?.title,description:r?.description},graphTitle:G,graphDescription:n,width:y,graphDownload:D?pt:void 0,dataDownload:N?o.map(Ye).filter(We).length>0?o.map(Pe).filter(Ge):o.filter(He):null}):null,t[6]=r?.description,t[7]=r?.title,t[8]=o,t[9]=N,t[10]=n,t[11]=D,t[12]=G,t[13]=c?.description,t[14]=c?.title,t[15]=y,t[16]=A):A=t[16];let ot;t[17]!==r?.colorLegend||t[18]!==P||t[19]!==bt||t[20]!==h||t[21]!==o||t[22]!==J||t[23]!==Q||t[24]!==d||t[25]!==y?(ot=J&&o.filter(Te).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(le.ColorLegendWithMouseOver,{width:y,colorLegendTitle:bt,colors:h||f.Colors[d].categoricalColors.colors,colorDomain:P||zt.uniqBy(o,"color",!0),setSelectedColor:Pt,showNAColor:Q,className:r?.colorLegend}):null,t[17]=r?.colorLegend,t[18]=P,t[19]=bt,t[20]=h,t[21]=o,t[22]=J,t[23]=Q,t[24]=d,t[25]=y,t[26]=ot):ot=t[26];let nt;t[27]!==o.length?(nt=o.length===0&&l.jsxRuntimeExports.jsx(re.EmptyState,{}),t[27]=o.length,t[28]=nt):nt=t[28];let lt;t[29]!==V||t[30]!==U||t[31]!==z||t[32]!==r||t[33]!==P||t[34]!==h||t[35]!==tt||t[36]!==o||t[37]!==Ct||t[38]!==_||t[39]!==I||t[40]!==a||t[41]!==X||t[42]!==Mt||t[43]!==k||t[44]!==gt||t[45]!==m||t[46]!==jt||t[47]!==Z||t[48]!==R||t[49]!==p||t[50]!==Y||t[51]!==c||t[52]!==mt||t[53]!==O||t[54]!==d||t[55]!==At||t[56]!==F||t[57]!==y?(lt=O&&mt&&o.length>0?l.jsxRuntimeExports.jsx(se,{data:o.filter(Le),width:I||!y||O<y?O:y,height:mt,colorDomain:o.filter(qe).length===0?[]:P||zt.uniqBy(o,"color",!0),colors:o.filter(Ve).length===0?h?[h]:[f.Colors.primaryColors["blue-600"]]:h||f.Colors[d].categoricalColors.colors,selectedColor:p,axisTitles:U,showLabels:Y,radius:jt,leftMargin:X,rightMargin:R,topMargin:F,bottomMargin:z,tooltip:At,onSeriesMouseOver:m,highlightedDataPoints:a,minValue:k,maxValue:Mt,onSeriesMouseClick:gt,resetSelectionOnDoubleClick:Z,detailsOnClick:Ct,styles:c,classNames:r,animate:V===!0?{duration:.5,once:!0,amount:.5}:V||{duration:0,once:!0,amount:0},dimmedOpacity:_,customLayers:tt}):null,t[29]=V,t[30]=U,t[31]=z,t[32]=r,t[33]=P,t[34]=h,t[35]=tt,t[36]=o,t[37]=Ct,t[38]=_,t[39]=I,t[40]=a,t[41]=X,t[42]=Mt,t[43]=k,t[44]=gt,t[45]=m,t[46]=jt,t[47]=Z,t[48]=R,t[49]=p,t[50]=Y,t[51]=c,t[52]=mt,t[53]=O,t[54]=d,t[55]=At,t[56]=F,t[57]=y,t[58]=lt):lt=t[58];let E;t[59]!==nt||t[60]!==lt?(E=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:et,children:[nt,lt]}),t[59]=nt,t[60]=lt,t[61]=E):E=t[61];let $;t[62]!==r?.footnote||t[63]!==r?.source||t[64]!==dt||t[65]!==rt||t[66]!==c?.footnote||t[67]!==c?.source||t[68]!==y?($=rt||dt?l.jsxRuntimeExports.jsx(oe.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:rt,footNote:dt,width:y}):null,t[62]=r?.footnote,t[63]=r?.source,t[64]=dt,t[65]=rt,t[66]=c?.footnote,t[67]=c?.source,t[68]=y,t[69]=$):$=t[69];let T;return t[70]!==vt||t[71]!==B||t[72]!==v||t[73]!==s||t[74]!==K||t[75]!==M||t[76]!==g||t[77]!==S||t[78]!==kt||t[79]!==Rt||t[80]!==it||t[81]!==A||t[82]!==ot||t[83]!==E||t[84]!==$||t[85]!==d?(T=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:kt,style:Rt,id:v,ref:pt,"aria-label":vt,backgroundColor:B,theme:d,language:K,minHeight:M,width:it,height:s,relativeHeight:S,padding:g,children:[A,ot,E,$]}),t[70]=vt,t[71]=B,t[72]=v,t[73]=s,t[74]=K,t[75]=M,t[76]=g,t[77]=S,t[78]=kt,t[79]=Rt,t[80]=it,t[81]=A,t[82]=ot,t[83]=E,t[84]=$,t[85]=d,t[86]=T):T=t[86],T}function Ve(e){return e.color}function qe(e){return e.color}function Le(e){return!Yt.checkIfNullOrUndefined(e.y1)&&!Yt.checkIfNullOrUndefined(e.y2)}function Te(e){return e.color}function He(e){return e!==void 0}function Ge(e){return e!==void 0}function Pe(e){return e.data}function We(e){return e!==void 0}function Ye(e){return e.data}exports.SlopeChart=Ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-D4pAp7u0.cjs"),H=require("react"),Qt=require("./index-DQA8q5sC.cjs"),Zt=require("./Tooltip-C9F3uYG0.cjs"),Yt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),f=require("./Colors.cjs"),Xt=require("./Axis-BTaS9oPQ.cjs"),Ft=require("./AxisTitle-DP_evhbe.cjs"),_t=require("./DetailsModal-Du8Fr1QD.cjs"),te=require("./linear-CgUCbw9F.cjs"),yt=require("./proxy-CqH8m8IQ.cjs"),ee=require("./use-in-view-dnRv_qqF.cjs"),ie=require("./index-FXfr51ZM.cjs"),oe=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs"),le=require("./ColorLegendWithMouseOver.cjs"),re=require("./EmptyState-CFmiFPHz.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-Cul9b74X.cjs");function se(e){const t=l.compilerRuntimeExports.c(148),{data:o,width:G,height:h,showLabels:rt,colors:n,colorDomain:x,radius:s,leftMargin:y,rightMargin:dt,topMargin:P,bottomMargin:bt,tooltip:Ot,onSeriesMouseOver:st,axisTitles:g,highlightedDataPoints:j,selectedColor:at,minValue:ct,maxValue:ut,onSeriesMouseClick:ht,resetSelectionOnDoubleClick:At,detailsOnClick:S,styles:m,classNames:u,animate:a,dimmedOpacity:v,customLayers:k}=e,Mt=H.useRef(null);let gt;t[0]!==a.amount||t[1]!==a.once?(gt={once:a.once,amount:a.amount},t[0]=a.amount,t[1]=a.once,t[2]=gt):gt=t[2];const w=ee.useInView(Mt,gt),[b,St]=H.useState(void 0),[W,Dt]=H.useState(void 0),[Et,Nt]=H.useState(void 0),[vt,It]=H.useState(void 0);let Ct;t[3]!==bt||t[4]!==y||t[5]!==dt||t[6]!==P?(Ct={top:P,bottom:bt,left:y,right:dt},t[3]=bt,t[4]=y,t[5]=dt,t[6]=P,t[7]=Ct):Ct=t[7];const c=Ct,r=G-c.left-c.right,C=h-c.top-c.bottom;let $t;t[8]!==o?($t=Math.min(...o.map(Ne)),t[8]=o,t[9]=$t):$t=t[9];let xt;t[10]!==o?(xt=Math.min(...o.map(De)),t[10]=o,t[11]=xt):xt=t[11];const Y=Math.min($t,xt);let jt;t[12]!==o?(jt=Math.max(...o.map(Se)),t[12]=o,t[13]=jt):jt=t[13];let ft;t[14]!==o?(ft=Math.max(...o.map(Me)),t[14]=o,t[15]=ft):ft=t[15];const U=Math.max(jt,ft);let B,X,R,F,z,J,D,N,I,K,Q,M,d;if(t[16]!==a.duration||t[17]!==g[0]||t[18]!==g[1]||t[19]!==u?.dataConnectors||t[20]!==u?.yAxis?.axis||t[21]!==u?.yAxis?.labels||t[22]!==u?.yAxis?.title||t[23]!==x||t[24]!==n||t[25]!==k||t[26]!==o||t[27]!==S||t[28]!==v||t[29]!==C||t[30]!==r||t[31]!==h||t[32]!==j||t[33]!==w||t[34]!==c.left||t[35]!==c.top||t[36]!==ut||t[37]!==U||t[38]!==ct||t[39]!==Y||t[40]!==W||t[41]!==b||t[42]!==ht||t[43]!==st||t[44]!==s||t[45]!==At||t[46]!==at||t[47]!==rt||t[48]!==m?.dataConnectors||t[49]!==m?.yAxis?.labels||t[50]!==m?.yAxis?.title||t[51]!==G){let mt;t[65]!==ct||t[66]!==Y?(mt=Yt.checkIfNullOrUndefined(ct)?Y>0?0:Y:ct,t[65]=ct,t[66]=Y,t[67]=mt):mt=t[67];let qt;t[68]!==ut||t[69]!==U?(qt=Yt.checkIfNullOrUndefined(ut)?U>0?U:0:ut,t[68]=ut,t[69]=U,t[70]=qt):qt=t[70];const p=te.linear().domain([mt,qt]).range([C,0]).nice();X=yt.motion.svg,F=`${G}px`,z=`${h}px`,J=`0 0 ${G} ${h}`,D="mx-auto",N="ltr",I=Mt,Q=`translate(${c.left},${c.top})`;const Pt=u?.yAxis?.axis;let et;t[71]!==Pt?(et=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",Pt),t[71]=Pt,t[72]=et):et=t[72];let pt;t[73]!==et?(pt={axis:et},t[73]=et,t[74]=pt):pt=t[74];let L;t[75]!==C||t[76]!==s||t[77]!==pt?(L=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:s,x2:s,classNames:pt}),t[75]=C,t[76]=s,t[77]=pt,t[78]=L):L=t[78];const wt=C+15,kt=m?.yAxis?.title,Rt=u?.yAxis?.title;let it;t[79]!==Rt?(it=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Rt),t[79]=Rt,t[80]=it):it=t[80];let A;t[81]!==g[0]||t[82]!==s||t[83]!==wt||t[84]!==kt||t[85]!==it?(A=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:s,y:wt,style:kt,className:it,text:g[0]}),t[81]=g[0],t[82]=s,t[83]=wt,t[84]=kt,t[85]=it,t[86]=A):A=t[86],t[87]!==L||t[88]!==A?(M=l.jsxRuntimeExports.jsxs("g",{children:[L,A]}),t[87]=L,t[88]=A,t[89]=M):M=t[89];const ot=r-s,nt=r-s,lt=u?.yAxis?.axis;let E;t[90]!==lt?(E=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",lt),t[90]=lt,t[91]=E):E=t[91];let $;t[92]!==E?($={axis:E},t[92]=E,t[93]=$):$=t[93];let T;t[94]!==C||t[95]!==ot||t[96]!==nt||t[97]!==$?(T=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:ot,x2:nt,classNames:$}),t[94]=C,t[95]=ot,t[96]=nt,t[97]=$,t[98]=T):T=t[98];const Lt=r-s,Tt=C+15,Ut=m?.yAxis?.title,Bt=u?.yAxis?.title;let Ht;t[99]!==Bt?(Ht=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Bt),t[99]=Bt,t[100]=Ht):Ht=t[100];let Gt;t[101]!==g[1]||t[102]!==Lt||t[103]!==Tt||t[104]!==Ut||t[105]!==Ht?(Gt=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:Lt,y:Tt,style:Ut,className:Ht,text:g[1]}),t[101]=g[1],t[102]=Lt,t[103]=Tt,t[104]=Ut,t[105]=Ht,t[106]=Gt):Gt=t[106],t[107]!==T||t[108]!==Gt?(d=l.jsxRuntimeExports.jsxs("g",{children:[T,Gt]}),t[107]=T,t[108]=Gt,t[109]=d):d=t[109],t[110]!==k?(R=k.filter(Re).map(ke),t[110]=k,t[111]=R):R=t[111],B=ie.AnimatePresence,K=o.map((i,Kt)=>l.jsxRuntimeExports.jsxs(yt.motion.g,{variants:{initial:{opacity:at?i.color&&n[x.indexOf(`${i.color}`)]===at?1:v:b?b.label===i.label?1:v:j?j.indexOf(i.label)!==-1?1:v:1},whileInView:{opacity:at?i.color&&n[x.indexOf(`${i.color}`)]===at?1:v:b?b.label===i.label?1:v:j?j.indexOf(i.label)!==-1?1:v:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:Wt=>{St(i),It(Wt.clientY),Nt(Wt.clientX),st?.(i)},onMouseMove:Wt=>{St(i),It(Wt.clientY),Nt(Wt.clientX)},onMouseLeave:()=>{St(void 0),Nt(void 0),It(void 0),st?.(void 0)},onClick:()=>{(ht||S)&&(Qt.isEqual(W,i)&&At?(Dt(void 0),ht?.(void 0)):(Dt(i),ht?.(i)))},children:[l.jsxRuntimeExports.jsx(yt.motion.circle,{variants:{initial:{cx:s,cy:p(i.y1),fill:o.filter($e).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(Ee).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{cx:s,cy:p(i.y1),fill:o.filter(Ae).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(Oe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},r:s,style:{fillOpacity:.6}}),rt?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y1),fill:o.filter(be).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y1),fill:o.filter(we).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"end",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",textAnchor:"end",dx:0-s-3,children:i.label}):j&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y1),fill:o.filter(je).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y1),fill:o.filter(Ce).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"end",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",dx:-3,children:i.label}):null,l.jsxRuntimeExports.jsx(yt.motion.circle,{variants:{initial:{cx:r-s,cy:p(i.y2),fill:o.filter(ve).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(ge).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{cx:r-s,cy:p(i.y2),fill:o.filter(he).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,stroke:o.filter(de).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},r:s,style:{fillOpacity:.6}}),rt?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y2),fill:o.filter(ye).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y2),fill:o.filter(pe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"start",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:s+3,children:i.label}):j&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(yt.motion.text,{variants:{initial:{y:p(i.y2),fill:o.filter(me).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:0},whileInView:{y:p(i.y2),fill:o.filter(fe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},style:{textAnchor:"start",...m?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:3,children:i.label}):null,l.jsxRuntimeExports.jsx(yt.motion.line,{variants:{initial:{x1:s,x2:r-s,y1:p(i.y1),y2:p(i.y1),stroke:o.filter(xe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray},whileInView:{x1:s,x2:r-s,y1:p(i.y1),y2:p(i.y2),stroke:o.filter(ue).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:f.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},className:u?.dataConnectors,style:{fill:"none",strokeWidth:1,...m?.dataConnectors}})]},Kt)),t[16]=a.duration,t[17]=g[0],t[18]=g[1],t[19]=u?.dataConnectors,t[20]=u?.yAxis?.axis,t[21]=u?.yAxis?.labels,t[22]=u?.yAxis?.title,t[23]=x,t[24]=n,t[25]=k,t[26]=o,t[27]=S,t[28]=v,t[29]=C,t[30]=r,t[31]=h,t[32]=j,t[33]=w,t[34]=c.left,t[35]=c.top,t[36]=ut,t[37]=U,t[38]=ct,t[39]=Y,t[40]=W,t[41]=b,t[42]=ht,t[43]=st,t[44]=s,t[45]=At,t[46]=at,t[47]=rt,t[48]=m?.dataConnectors,t[49]=m?.yAxis?.labels,t[50]=m?.yAxis?.title,t[51]=G,t[52]=B,t[53]=X,t[54]=R,t[55]=F,t[56]=z,t[57]=J,t[58]=D,t[59]=N,t[60]=I,t[61]=K,t[62]=Q,t[63]=M,t[64]=d}else B=t[52],X=t[53],R=t[54],F=t[55],z=t[56],J=t[57],D=t[58],N=t[59],I=t[60],K=t[61],Q=t[62],M=t[63],d=t[64];let Z;t[112]!==B||t[113]!==K?(Z=l.jsxRuntimeExports.jsx(B,{children:K}),t[112]=B,t[113]=K,t[114]=Z):Z=t[114];let V;t[115]!==k?(V=k.filter(ce).map(ae),t[115]=k,t[116]=V):V=t[116];let _;t[117]!==R||t[118]!==Z||t[119]!==V||t[120]!==Q||t[121]!==M||t[122]!==d?(_=l.jsxRuntimeExports.jsxs("g",{transform:Q,children:[M,d,R,Z,V]}),t[117]=R,t[118]=Z,t[119]=V,t[120]=Q,t[121]=M,t[122]=d,t[123]=_):_=t[123];let q;t[124]!==X||t[125]!==F||t[126]!==z||t[127]!==J||t[128]!==D||t[129]!==N||t[130]!==I||t[131]!==_?(q=l.jsxRuntimeExports.jsx(X,{width:F,height:z,viewBox:J,className:D,direction:N,ref:I,children:_}),t[124]=X,t[125]=F,t[126]=z,t[127]=J,t[128]=D,t[129]=N,t[130]=I,t[131]=_,t[132]=q):q=t[132];let tt;t[133]!==u?.tooltip||t[134]!==Et||t[135]!==vt||t[136]!==b||t[137]!==m?.tooltip||t[138]!==Ot?(tt=b&&Ot&&Et&&vt?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:b,body:Ot,xPos:Et,yPos:vt,backgroundStyle:m?.tooltip,className:u?.tooltip}):null,t[133]=u?.tooltip,t[134]=Et,t[135]=vt,t[136]=b,t[137]=m?.tooltip,t[138]=Ot,t[139]=tt):tt=t[139];let O;t[140]!==u?.modal||t[141]!==S||t[142]!==W?(O=S&&W!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:S,data:W,setData:Dt,className:u?.modal}):null,t[140]=u?.modal,t[141]=S,t[142]=W,t[143]=O):O=t[143];let Vt;return t[144]!==q||t[145]!==tt||t[146]!==O?(Vt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[q,tt,O]}),t[144]=q,t[145]=tt,t[146]=O,t[147]=Vt):Vt=t[147],Vt}function ae(e){return e.layer}function ce(e){return e.position==="after"}function ue(e){return e.color}function xe(e){return e.color}function fe(e){return e.color}function me(e){return e.color}function pe(e){return e.color}function ye(e){return e.color}function de(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ve(e){return e.color}function Ce(e){return e.color}function je(e){return e.color}function we(e){return e.color}function be(e){return e.color}function Oe(e){return e.color}function Ae(e){return e.color}function Ee(e){return e.color}function $e(e){return e.color}function ke(e){return e.layer}function Re(e){return e.position==="before"}function Me(e){return e.y2}function Se(e){return e.y1}function De(e){return e.y2}function Ne(e){return e.y1}function Ie(e){const t=l.compilerRuntimeExports.c(87),{data:o,graphTitle:G,colors:h,sources:rt,graphDescription:n,showLabels:x,height:s,width:y,footNote:dt,colorDomain:P,colorLegendTitle:bt,radius:Ot,axisTitles:st,padding:g,backgroundColor:j,leftMargin:at,rightMargin:ct,topMargin:ut,bottomMargin:ht,tooltip:At,relativeHeight:S,onSeriesMouseOver:m,showColorScale:u,highlightedDataPoints:a,graphID:v,minValue:k,maxValue:Mt,onSeriesMouseClick:gt,graphDownload:w,dataDownload:b,fillContainer:St,language:W,showNAColor:Dt,minHeight:Et,theme:Nt,ariaLabel:vt,resetSelectionOnDoubleClick:It,detailsOnClick:Ct,styles:c,classNames:r,animate:C,dimmedOpacity:$t,customLayers:xt}=e,Y=x===void 0?!1:x,jt=Ot===void 0?5:Ot;let ft;t[0]!==st?(ft=st===void 0?["",""]:st,t[0]=st,t[1]=ft):ft=t[1];const U=ft,B=j===void 0?!1:j,X=at===void 0?50:at,R=ct===void 0?50:ct,F=ut===void 0?20:ut,z=ht===void 0?20:ht,J=u===void 0?!0:u,D=w===void 0?!1:w,N=b===void 0?!1:b,I=St===void 0?!0:St,K=W===void 0?"en":W,Q=Dt===void 0?!0:Dt,M=Et===void 0?0:Et,d=Nt===void 0?"light":Nt,Z=It===void 0?!0:It,V=C===void 0?!1:C,_=$t===void 0?.3:$t;let q;t[2]!==xt?(q=xt===void 0?[]:xt,t[2]=xt,t[3]=q):q=t[3];const tt=q,[O,Vt]=H.useState(0),[mt,qt]=H.useState(0),[p,Pt]=H.useState(void 0),et=H.useRef(null),pt=H.useRef(null);let L,wt;t[4]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{const Lt=new ResizeObserver(Tt=>{Vt(Tt[0].target.clientWidth||620),qt(Tt[0].target.clientHeight||480)});return et.current&&Lt.observe(et.current),()=>Lt.disconnect()},wt=[],t[4]=L,t[5]=wt):(L=t[4],wt=t[5]),H.useEffect(L,wt);const kt=r?.graphContainer,Rt=c?.graphContainer,it=I?void 0:y;let A;t[6]!==r?.description||t[7]!==r?.title||t[8]!==o||t[9]!==N||t[10]!==n||t[11]!==D||t[12]!==G||t[13]!==c?.description||t[14]!==c?.title||t[15]!==y?(A=G||n||D||N?l.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:r?.title,description:r?.description},graphTitle:G,graphDescription:n,width:y,graphDownload:D?pt:void 0,dataDownload:N?o.map(Ye).filter(We).length>0?o.map(Pe).filter(Ge):o.filter(He):null}):null,t[6]=r?.description,t[7]=r?.title,t[8]=o,t[9]=N,t[10]=n,t[11]=D,t[12]=G,t[13]=c?.description,t[14]=c?.title,t[15]=y,t[16]=A):A=t[16];let ot;t[17]!==r?.colorLegend||t[18]!==P||t[19]!==bt||t[20]!==h||t[21]!==o||t[22]!==J||t[23]!==Q||t[24]!==d||t[25]!==y?(ot=J&&o.filter(Te).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(le.ColorLegendWithMouseOver,{width:y,colorLegendTitle:bt,colors:h||f.Colors[d].categoricalColors.colors,colorDomain:P||zt.uniqBy(o,"color",!0),setSelectedColor:Pt,showNAColor:Q,className:r?.colorLegend}):null,t[17]=r?.colorLegend,t[18]=P,t[19]=bt,t[20]=h,t[21]=o,t[22]=J,t[23]=Q,t[24]=d,t[25]=y,t[26]=ot):ot=t[26];let nt;t[27]!==o.length?(nt=o.length===0&&l.jsxRuntimeExports.jsx(re.EmptyState,{}),t[27]=o.length,t[28]=nt):nt=t[28];let lt;t[29]!==V||t[30]!==U||t[31]!==z||t[32]!==r||t[33]!==P||t[34]!==h||t[35]!==tt||t[36]!==o||t[37]!==Ct||t[38]!==_||t[39]!==I||t[40]!==a||t[41]!==X||t[42]!==Mt||t[43]!==k||t[44]!==gt||t[45]!==m||t[46]!==jt||t[47]!==Z||t[48]!==R||t[49]!==p||t[50]!==Y||t[51]!==c||t[52]!==mt||t[53]!==O||t[54]!==d||t[55]!==At||t[56]!==F||t[57]!==y?(lt=O&&mt&&o.length>0?l.jsxRuntimeExports.jsx(se,{data:o.filter(Le),width:I||!y||O<y?O:y,height:mt,colorDomain:o.filter(qe).length===0?[]:P||zt.uniqBy(o,"color",!0),colors:o.filter(Ve).length===0?h?[h]:[f.Colors.primaryColors["blue-600"]]:h||f.Colors[d].categoricalColors.colors,selectedColor:p,axisTitles:U,showLabels:Y,radius:jt,leftMargin:X,rightMargin:R,topMargin:F,bottomMargin:z,tooltip:At,onSeriesMouseOver:m,highlightedDataPoints:a,minValue:k,maxValue:Mt,onSeriesMouseClick:gt,resetSelectionOnDoubleClick:Z,detailsOnClick:Ct,styles:c,classNames:r,animate:V===!0?{duration:.5,once:!0,amount:.5}:V||{duration:0,once:!0,amount:0},dimmedOpacity:_,customLayers:tt}):null,t[29]=V,t[30]=U,t[31]=z,t[32]=r,t[33]=P,t[34]=h,t[35]=tt,t[36]=o,t[37]=Ct,t[38]=_,t[39]=I,t[40]=a,t[41]=X,t[42]=Mt,t[43]=k,t[44]=gt,t[45]=m,t[46]=jt,t[47]=Z,t[48]=R,t[49]=p,t[50]=Y,t[51]=c,t[52]=mt,t[53]=O,t[54]=d,t[55]=At,t[56]=F,t[57]=y,t[58]=lt):lt=t[58];let E;t[59]!==nt||t[60]!==lt?(E=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:et,children:[nt,lt]}),t[59]=nt,t[60]=lt,t[61]=E):E=t[61];let $;t[62]!==r?.footnote||t[63]!==r?.source||t[64]!==dt||t[65]!==rt||t[66]!==c?.footnote||t[67]!==c?.source||t[68]!==y?($=rt||dt?l.jsxRuntimeExports.jsx(oe.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:rt,footNote:dt,width:y}):null,t[62]=r?.footnote,t[63]=r?.source,t[64]=dt,t[65]=rt,t[66]=c?.footnote,t[67]=c?.source,t[68]=y,t[69]=$):$=t[69];let T;return t[70]!==vt||t[71]!==B||t[72]!==v||t[73]!==s||t[74]!==K||t[75]!==M||t[76]!==g||t[77]!==S||t[78]!==kt||t[79]!==Rt||t[80]!==it||t[81]!==A||t[82]!==ot||t[83]!==E||t[84]!==$||t[85]!==d?(T=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:kt,style:Rt,id:v,ref:pt,"aria-label":vt,backgroundColor:B,theme:d,language:K,minHeight:M,width:it,height:s,relativeHeight:S,padding:g,children:[A,ot,E,$]}),t[70]=vt,t[71]=B,t[72]=v,t[73]=s,t[74]=K,t[75]=M,t[76]=g,t[77]=S,t[78]=kt,t[79]=Rt,t[80]=it,t[81]=A,t[82]=ot,t[83]=E,t[84]=$,t[85]=d,t[86]=T):T=t[86],T}function Ve(e){return e.color}function qe(e){return e.color}function Le(e){return!Yt.checkIfNullOrUndefined(e.y1)&&!Yt.checkIfNullOrUndefined(e.y2)}function Te(e){return e.color}function He(e){return e!==void 0}function Ge(e){return e!==void 0}function Pe(e){return e.data}function We(e){return e!==void 0}function Ye(e){return e.data}exports.SlopeChart=Ie;
2
2
  //# sourceMappingURL=SlopeChart.cjs.map
@@ -44,7 +44,7 @@ declare interface CustomLayerDataType {
44
44
  layer: React.ReactNode;
45
45
  }
46
46
 
47
- declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
47
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'ja' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
48
48
 
49
49
  declare interface Props {
50
50
  /** Array of data objects */
@@ -1,12 +1,12 @@
1
1
  import { c as Qt, m as Ot, j as s } from "./index-CHPV5EwG-BzibaIRc.js";
2
2
  import { useRef as Ft, useState as Nt, useEffect as _t } from "react";
3
3
  import { i as te } from "./index-Bwrro8-q.js";
4
- import { T as ee } from "./Tooltip-Bj-s__cI.js";
4
+ import { T as ee } from "./Tooltip-3EYDVa3w.js";
5
5
  import { c as qt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
6
6
  import { Colors as m } from "./Colors.js";
7
7
  import { A as Ut } from "./Axis-CNZYWzH0.js";
8
8
  import { A as Jt } from "./AxisTitle-CyLCqpW6.js";
9
- import { D as ie } from "./DetailsModal-B2XBWR7w.js";
9
+ import { D as ie } from "./DetailsModal-GqEbGHY2.js";
10
10
  import { a as oe } from "./linear-DNXM5Pdl.js";
11
11
  import { m as xt } from "./proxy-BsxtcZKa.js";
12
12
  import { u as le } from "./use-in-view-KOXq5Kmc.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-D4pAp7u0.cjs"),M=require("react"),Rt=require("./parse-xYI9yrvL.cjs"),_t=require("./index-Cno4Q0YE.cjs"),Ct=require("./Tooltip-Hr46paWP.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),wt=require("./time-CkcKbhwe.cjs"),$t=require("./linear-CgUCbw9F.cjs"),Dt=require("./area-C1gxfNGD.cjs"),Mt=require("./line-DaEMhXmx.cjs"),vt=require("./step-BZ3C8QFW.cjs"),kt=require("./select-Bnfk0lJx.cjs"),Nt=require("./init-DU0ybBc_.cjs"),Ot=require("./pointer-Dkq5NV1q.cjs"),Gt=require("./GraphFooter.cjs"),At=require("./GraphHeader.cjs"),Ht=require("./Colors.cjs"),It=require("./generateRandomString-B5zBiJzS.cjs"),St=require("./GraphContainer-Cul9b74X.cjs");function Pt(e){const t=r.compilerRuntimeExports.c(71),{data:j,width:w,height:V,lineColor:a,dateFormat:l,areaId:S,leftMargin:c,rightMargin:$,topMargin:rt,bottomMargin:nt,tooltip:D,onSeriesMouseOver:W,minValue:Y,maxValue:B,curveType:X,styles:k,classNames:q,customLayers:R}=e,it=X==="linear"?Mt.curveLinear:X==="step"?vt.curveStep:X==="stepAfter"?vt.stepAfter:X==="stepBefore"?vt.stepBefore:vt.monotoneX,[f,st]=M.useState(void 0),[N,at]=M.useState(void 0),[U,ct]=M.useState(void 0);let z;t[0]!==nt||t[1]!==c||t[2]!==$||t[3]!==rt?(z={top:rt,bottom:nt,left:c,right:$},t[0]=nt,t[1]=c,t[2]=$,t[3]=rt,t[4]=z):z=t[4];const _=z,O=M.useRef(null);let J;t[5]!==l?(J=d=>({...d,date:Rt.parse(`${d.date}`,l,new Date)}),t[5]=l,t[6]=J):J=t[6];const o=_t.orderBy(j.map(J),["date"],["asc"]),n=w-_.left-_.right,i=V-_.top-_.bottom,ut=o[0].date,pt=o[o.length-1].date,K=Math.min(...o.map(te).filter(Zt))!==1/0?Math.min(...o.map(Qt).filter(Kt))>0?0:Math.min(...o.map(Jt).filter(zt)):0,G=Math.max(...o.map(Ut).filter(Xt))!==1/0?Math.max(...o.map(Bt).filter(Yt)):0,s=wt.time().domain([ut,pt]).range([0,n]);let A;t[7]!==K||t[8]!==Y?(A=bt.checkIfNullOrUndefined(Y)?K:Y,t[7]=K,t[8]=Y,t[9]=A):A=t[9];let H;t[10]!==G||t[11]!==B?(H=bt.checkIfNullOrUndefined(B)?G>0?G:0:B,t[10]=G,t[11]=B,t[12]=H):H=t[12];const I=$t.linear().domain([A,H]).range([i,0]).nice(),lt=Dt.area().x(d=>s(d.date)).y1(d=>I(d.y)).y0(i).curve(it),mt=Mt.line().x(d=>s(d.date)).y(d=>I(d.y)).curve(it);M.useEffect(()=>{const d=jt=>{const Et=o[Nt.bisectCenter(o.map(Wt),s.invert(Ot.pointer(jt)[0]),0)];st(Et||o[o.length-1]),W?.(Et||o[o.length-1]),ct(jt.clientY),at(jt.clientX)},qt=()=>{st(void 0),W?.(void 0),at(void 0),ct(void 0)};kt.select(O.current).on("mousemove",d).on("mouseout",qt),W?.(void 0)},[s,o,W]);let P;t[13]!==S||t[14]!==a?(P=S?r.jsxRuntimeExports.jsxs("linearGradient",{id:S,x1:"0",x2:"0",y1:"0",y2:"1",children:[r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0.1",offset:"0%"}),r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0",offset:"100%"})]}):null,t[13]=S,t[14]=a,t[15]=P):P=t[15];let F;t[16]!==R?(F=R.filter(Vt).map(Tt),t[16]=R,t[17]=F):F=t[17];const Q=q?.xAxis?.labels;let x;t[18]!==Q?(x=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",Q),t[18]=Q,t[19]=x):x=t[19];const Z=o[o.length-1];let h;t[20]!==Z.date||t[21]!==s?(h=s(Z.date),t[20]=Z.date,t[21]=s,t[22]=h):h=t[22];const dt=k?.xAxis?.labels;let g;t[23]!==dt?(g={textAnchor:"end",...dt},t[23]=dt,t[24]=g):g=t[24];const ft=o[o.length-1];let E;t[25]!==l||t[26]!==ft.date?(E=Rt.format(ft.date,l),t[25]=l,t[26]=ft.date,t[27]=E):E=t[27];let C;t[28]!==i||t[29]!==g||t[30]!==E||t[31]!==x||t[32]!==h?(C=r.jsxRuntimeExports.jsx("text",{className:x,y:i,x:h,style:g,dy:"1em",children:E}),t[28]=i,t[29]=g,t[30]=E,t[31]=x,t[32]=h,t[33]=C):C=t[33];let y;t[34]!==o||t[35]!==s?(y=s(o[0].date),t[34]=o,t[35]=s,t[36]=y):y=t[36];const L=k?.xAxis?.labels;let b;t[37]!==L?(b={textAnchor:"start",...L},t[37]=L,t[38]=b):b=t[38];const tt=q?.xAxis?.labels;let u;t[39]!==tt?(u=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",tt),t[39]=tt,t[40]=u):u=t[40];let p;t[41]!==o||t[42]!==l?(p=Rt.format(o[0].date,l),t[41]=o,t[42]=l,t[43]=p):p=t[43];let m;t[44]!==i||t[45]!==y||t[46]!==b||t[47]!==u||t[48]!==p?(m=r.jsxRuntimeExports.jsx("text",{y:i,x:y,style:b,className:u,dy:"1em",children:p}),t[44]=i,t[45]=y,t[46]=b,t[47]=u,t[48]=p,t[49]=m):m=t[49];let v;t[50]!==C||t[51]!==m?(v=r.jsxRuntimeExports.jsxs("g",{children:[C,m]}),t[50]=C,t[51]=m,t[52]=v):v=t[52];const T=`url(#${S})`;let et;t[53]!==T?(et={fill:T,clipPath:"url(#clip)"},t[53]=T,t[54]=et):et=t[54];let ot;t[55]!==a?(ot={stroke:a,fill:"none",strokeWidth:2},t[55]=a,t[56]=ot):ot=t[56];let xt;t[57]!==R?(xt=R.filter(Lt).map(Ft),t[57]=R,t[58]=xt):xt=t[58];let ht;t[59]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none",pointerEvents:"all"},t[59]=ht):ht=t[59];let gt;t[60]!==O||t[61]!==i||t[62]!==n?(gt=r.jsxRuntimeExports.jsx("rect",{ref:O,style:ht,width:n,height:i}),t[60]=O,t[61]=i,t[62]=n,t[63]=gt):gt=t[63];let yt;return t[64]!==q?.tooltip||t[65]!==N||t[66]!==U||t[67]!==f||t[68]!==k?.tooltip||t[69]!==D?(yt=f&&D&&N&&U?r.jsxRuntimeExports.jsx(Ct.Tooltip,{data:f,body:D,xPos:N,yPos:U,backgroundStyle:k?.tooltip,className:q?.tooltip}):null,t[64]=q?.tooltip,t[65]=N,t[66]=U,t[67]=f,t[68]=k?.tooltip,t[69]=D,t[70]=yt):yt=t[70],r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("svg",{width:`${w}px`,height:`${V}px`,viewBox:`0 0 ${w} ${V}`,direction:"ltr",children:[P,r.jsxRuntimeExports.jsxs("g",{transform:`translate(${_.left},${_.top})`,children:[F,v,r.jsxRuntimeExports.jsxs("g",{children:[r.jsxRuntimeExports.jsx("path",{d:lt(o)||"",style:et}),r.jsxRuntimeExports.jsx("path",{d:mt(o)||"",style:ot}),f?r.jsxRuntimeExports.jsx("circle",{y1:0,cy:I(f.y),cx:s(f.date),r:5,style:{fill:a}}):null]}),xt,gt]})]}),yt]})}function Ft(e){return e.layer}function Lt(e){return e.position==="after"}function Tt(e){return e.layer}function Vt(e){return e.position==="before"}function Wt(e){return e.date}function Yt(e){return e!=null}function Bt(e){return e.y}function Xt(e){return e!=null}function Ut(e){return e.y}function zt(e){return e!=null}function Jt(e){return e.y}function Kt(e){return e!=null}function Qt(e){return e.y}function Zt(e){return e!=null}function te(e){return e.y}function ee(e){const t=r.compilerRuntimeExports.c(60),{data:j,graphTitle:w,lineColor:V,sources:a,graphDescription:l,height:S,width:c,footNote:$,dateFormat:rt,area:nt,padding:D,backgroundColor:W,leftMargin:Y,rightMargin:B,topMargin:X,bottomMargin:k,tooltip:q,relativeHeight:R,onSeriesMouseOver:it,graphID:f,minValue:st,maxValue:N,graphDownload:at,dataDownload:U,language:ct,minHeight:z,theme:_,ariaLabel:O,curveType:J,styles:o,classNames:n,customLayers:i}=e,ut=rt===void 0?"yyyy":rt,pt=nt===void 0?!1:nt,K=W===void 0?!0:W,G=Y===void 0?5:Y,s=B===void 0?5:B,A=X===void 0?10:X,H=k===void 0?20:k,I=at===void 0?!1:at,lt=U===void 0?!1:U,mt=ct===void 0?"en":ct,P=z===void 0?0:z,F=_===void 0?"light":_,Q=J===void 0?"curve":J;let x;t[0]!==i?(x=i===void 0?[]:i,t[0]=i,t[1]=x):x=t[1];const Z=x,[h,dt]=M.useState(0),[g,ft]=M.useState(0),E=M.useRef(null),C=M.useRef(null);let y,L;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const et=new ResizeObserver(ot=>{dt(ot[0].target.clientWidth||620),ft(ot[0].target.clientHeight||480)});return E.current&&et.observe(E.current),()=>et.disconnect()},L=[],t[2]=y,t[3]=L):(y=t[2],L=t[3]),M.useEffect(y,L);const b=n?.graphContainer,tt=o?.graphContainer;let u;t[4]!==n?.description||t[5]!==n?.title||t[6]!==j||t[7]!==lt||t[8]!==l||t[9]!==I||t[10]!==w||t[11]!==o?.description||t[12]!==o?.title||t[13]!==c?(u=w||l||I||lt?r.jsxRuntimeExports.jsx(At.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:n?.title,description:n?.description},graphTitle:w,graphDescription:l,width:c,graphDownload:I?C:void 0,dataDownload:lt?j.map(se).filter(ie).length>0?j.map(ne).filter(re):j.filter(oe):null}):null,t[4]=n?.description,t[5]=n?.title,t[6]=j,t[7]=lt,t[8]=l,t[9]=I,t[10]=w,t[11]=o?.description,t[12]=o?.title,t[13]=c,t[14]=u):u=t[14];let p;t[15]!==pt||t[16]!==H||t[17]!==n||t[18]!==Q||t[19]!==Z||t[20]!==j||t[21]!==ut||t[22]!==G||t[23]!==V||t[24]!==N||t[25]!==st||t[26]!==it||t[27]!==s||t[28]!==o||t[29]!==g||t[30]!==h||t[31]!==q||t[32]!==A?(p=h&&g?r.jsxRuntimeExports.jsx(Pt,{data:j,lineColor:V||Ht.Colors.primaryColors["blue-600"],width:h,height:g,dateFormat:ut,areaId:pt?It.generateRandomString(8):void 0,leftMargin:G,rightMargin:s,topMargin:A,bottomMargin:H,tooltip:q,onSeriesMouseOver:it,minValue:st,maxValue:N,curveType:Q,styles:o,classNames:n,customLayers:Z}):null,t[15]=pt,t[16]=H,t[17]=n,t[18]=Q,t[19]=Z,t[20]=j,t[21]=ut,t[22]=G,t[23]=V,t[24]=N,t[25]=st,t[26]=it,t[27]=s,t[28]=o,t[29]=g,t[30]=h,t[31]=q,t[32]=A,t[33]=p):p=t[33];let m;t[34]!==p?(m=r.jsxRuntimeExports.jsx(St.GraphArea,{ref:E,children:p}),t[34]=p,t[35]=m):m=t[35];let v;t[36]!==n?.footnote||t[37]!==n?.source||t[38]!==$||t[39]!==a||t[40]!==o?.footnote||t[41]!==o?.source||t[42]!==c?(v=a||$?r.jsxRuntimeExports.jsx(Gt.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:n?.footnote,source:n?.source},sources:a,footNote:$,width:c}):null,t[36]=n?.footnote,t[37]=n?.source,t[38]=$,t[39]=a,t[40]=o?.footnote,t[41]=o?.source,t[42]=c,t[43]=v):v=t[43];let T;return t[44]!==O||t[45]!==K||t[46]!==f||t[47]!==S||t[48]!==mt||t[49]!==P||t[50]!==D||t[51]!==R||t[52]!==b||t[53]!==tt||t[54]!==u||t[55]!==m||t[56]!==v||t[57]!==F||t[58]!==c?(T=r.jsxRuntimeExports.jsxs(St.GraphContainer,{className:b,style:tt,id:f,ref:C,"aria-label":O,backgroundColor:K,theme:F,language:mt,minHeight:P,width:c,height:S,relativeHeight:R,padding:D,children:[u,m,v]}),t[44]=O,t[45]=K,t[46]=f,t[47]=S,t[48]=mt,t[49]=P,t[50]=D,t[51]=R,t[52]=b,t[53]=tt,t[54]=u,t[55]=m,t[56]=v,t[57]=F,t[58]=c,t[59]=T):T=t[59],T}function oe(e){return e!==void 0}function re(e){return e!==void 0}function ne(e){return e.data}function ie(e){return e!==void 0}function se(e){return e.data}exports.SparkLine=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-D4pAp7u0.cjs"),M=require("react"),Rt=require("./parse-xYI9yrvL.cjs"),_t=require("./index-Cno4Q0YE.cjs"),Ct=require("./Tooltip-C9F3uYG0.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),wt=require("./time-CkcKbhwe.cjs"),$t=require("./linear-CgUCbw9F.cjs"),Dt=require("./area-C1gxfNGD.cjs"),Mt=require("./line-DaEMhXmx.cjs"),vt=require("./step-BZ3C8QFW.cjs"),kt=require("./select-Bnfk0lJx.cjs"),Nt=require("./init-DU0ybBc_.cjs"),Ot=require("./pointer-Dkq5NV1q.cjs"),Gt=require("./GraphFooter.cjs"),At=require("./GraphHeader.cjs"),Ht=require("./Colors.cjs"),It=require("./generateRandomString-B5zBiJzS.cjs"),St=require("./GraphContainer-Cul9b74X.cjs");function Pt(e){const t=r.compilerRuntimeExports.c(71),{data:j,width:w,height:V,lineColor:a,dateFormat:l,areaId:S,leftMargin:c,rightMargin:$,topMargin:rt,bottomMargin:nt,tooltip:D,onSeriesMouseOver:W,minValue:Y,maxValue:B,curveType:X,styles:k,classNames:q,customLayers:R}=e,it=X==="linear"?Mt.curveLinear:X==="step"?vt.curveStep:X==="stepAfter"?vt.stepAfter:X==="stepBefore"?vt.stepBefore:vt.monotoneX,[f,st]=M.useState(void 0),[N,at]=M.useState(void 0),[U,ct]=M.useState(void 0);let z;t[0]!==nt||t[1]!==c||t[2]!==$||t[3]!==rt?(z={top:rt,bottom:nt,left:c,right:$},t[0]=nt,t[1]=c,t[2]=$,t[3]=rt,t[4]=z):z=t[4];const _=z,O=M.useRef(null);let J;t[5]!==l?(J=d=>({...d,date:Rt.parse(`${d.date}`,l,new Date)}),t[5]=l,t[6]=J):J=t[6];const o=_t.orderBy(j.map(J),["date"],["asc"]),n=w-_.left-_.right,i=V-_.top-_.bottom,ut=o[0].date,pt=o[o.length-1].date,K=Math.min(...o.map(te).filter(Zt))!==1/0?Math.min(...o.map(Qt).filter(Kt))>0?0:Math.min(...o.map(Jt).filter(zt)):0,G=Math.max(...o.map(Ut).filter(Xt))!==1/0?Math.max(...o.map(Bt).filter(Yt)):0,s=wt.time().domain([ut,pt]).range([0,n]);let A;t[7]!==K||t[8]!==Y?(A=bt.checkIfNullOrUndefined(Y)?K:Y,t[7]=K,t[8]=Y,t[9]=A):A=t[9];let H;t[10]!==G||t[11]!==B?(H=bt.checkIfNullOrUndefined(B)?G>0?G:0:B,t[10]=G,t[11]=B,t[12]=H):H=t[12];const I=$t.linear().domain([A,H]).range([i,0]).nice(),lt=Dt.area().x(d=>s(d.date)).y1(d=>I(d.y)).y0(i).curve(it),mt=Mt.line().x(d=>s(d.date)).y(d=>I(d.y)).curve(it);M.useEffect(()=>{const d=jt=>{const Et=o[Nt.bisectCenter(o.map(Wt),s.invert(Ot.pointer(jt)[0]),0)];st(Et||o[o.length-1]),W?.(Et||o[o.length-1]),ct(jt.clientY),at(jt.clientX)},qt=()=>{st(void 0),W?.(void 0),at(void 0),ct(void 0)};kt.select(O.current).on("mousemove",d).on("mouseout",qt),W?.(void 0)},[s,o,W]);let P;t[13]!==S||t[14]!==a?(P=S?r.jsxRuntimeExports.jsxs("linearGradient",{id:S,x1:"0",x2:"0",y1:"0",y2:"1",children:[r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0.1",offset:"0%"}),r.jsxRuntimeExports.jsx("stop",{style:{stopColor:a},stopOpacity:"0",offset:"100%"})]}):null,t[13]=S,t[14]=a,t[15]=P):P=t[15];let F;t[16]!==R?(F=R.filter(Vt).map(Tt),t[16]=R,t[17]=F):F=t[17];const Q=q?.xAxis?.labels;let x;t[18]!==Q?(x=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",Q),t[18]=Q,t[19]=x):x=t[19];const Z=o[o.length-1];let h;t[20]!==Z.date||t[21]!==s?(h=s(Z.date),t[20]=Z.date,t[21]=s,t[22]=h):h=t[22];const dt=k?.xAxis?.labels;let g;t[23]!==dt?(g={textAnchor:"end",...dt},t[23]=dt,t[24]=g):g=t[24];const ft=o[o.length-1];let E;t[25]!==l||t[26]!==ft.date?(E=Rt.format(ft.date,l),t[25]=l,t[26]=ft.date,t[27]=E):E=t[27];let C;t[28]!==i||t[29]!==g||t[30]!==E||t[31]!==x||t[32]!==h?(C=r.jsxRuntimeExports.jsx("text",{className:x,y:i,x:h,style:g,dy:"1em",children:E}),t[28]=i,t[29]=g,t[30]=E,t[31]=x,t[32]=h,t[33]=C):C=t[33];let y;t[34]!==o||t[35]!==s?(y=s(o[0].date),t[34]=o,t[35]=s,t[36]=y):y=t[36];const L=k?.xAxis?.labels;let b;t[37]!==L?(b={textAnchor:"start",...L},t[37]=L,t[38]=b):b=t[38];const tt=q?.xAxis?.labels;let u;t[39]!==tt?(u=r.mo("xs:max-[360px]:hidden fill-primary-gray-700 dark:fill-primary-gray-300 text-[9px] md:text-[10px] lg:text-xs",tt),t[39]=tt,t[40]=u):u=t[40];let p;t[41]!==o||t[42]!==l?(p=Rt.format(o[0].date,l),t[41]=o,t[42]=l,t[43]=p):p=t[43];let m;t[44]!==i||t[45]!==y||t[46]!==b||t[47]!==u||t[48]!==p?(m=r.jsxRuntimeExports.jsx("text",{y:i,x:y,style:b,className:u,dy:"1em",children:p}),t[44]=i,t[45]=y,t[46]=b,t[47]=u,t[48]=p,t[49]=m):m=t[49];let v;t[50]!==C||t[51]!==m?(v=r.jsxRuntimeExports.jsxs("g",{children:[C,m]}),t[50]=C,t[51]=m,t[52]=v):v=t[52];const T=`url(#${S})`;let et;t[53]!==T?(et={fill:T,clipPath:"url(#clip)"},t[53]=T,t[54]=et):et=t[54];let ot;t[55]!==a?(ot={stroke:a,fill:"none",strokeWidth:2},t[55]=a,t[56]=ot):ot=t[56];let xt;t[57]!==R?(xt=R.filter(Lt).map(Ft),t[57]=R,t[58]=xt):xt=t[58];let ht;t[59]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none",pointerEvents:"all"},t[59]=ht):ht=t[59];let gt;t[60]!==O||t[61]!==i||t[62]!==n?(gt=r.jsxRuntimeExports.jsx("rect",{ref:O,style:ht,width:n,height:i}),t[60]=O,t[61]=i,t[62]=n,t[63]=gt):gt=t[63];let yt;return t[64]!==q?.tooltip||t[65]!==N||t[66]!==U||t[67]!==f||t[68]!==k?.tooltip||t[69]!==D?(yt=f&&D&&N&&U?r.jsxRuntimeExports.jsx(Ct.Tooltip,{data:f,body:D,xPos:N,yPos:U,backgroundStyle:k?.tooltip,className:q?.tooltip}):null,t[64]=q?.tooltip,t[65]=N,t[66]=U,t[67]=f,t[68]=k?.tooltip,t[69]=D,t[70]=yt):yt=t[70],r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("svg",{width:`${w}px`,height:`${V}px`,viewBox:`0 0 ${w} ${V}`,direction:"ltr",children:[P,r.jsxRuntimeExports.jsxs("g",{transform:`translate(${_.left},${_.top})`,children:[F,v,r.jsxRuntimeExports.jsxs("g",{children:[r.jsxRuntimeExports.jsx("path",{d:lt(o)||"",style:et}),r.jsxRuntimeExports.jsx("path",{d:mt(o)||"",style:ot}),f?r.jsxRuntimeExports.jsx("circle",{y1:0,cy:I(f.y),cx:s(f.date),r:5,style:{fill:a}}):null]}),xt,gt]})]}),yt]})}function Ft(e){return e.layer}function Lt(e){return e.position==="after"}function Tt(e){return e.layer}function Vt(e){return e.position==="before"}function Wt(e){return e.date}function Yt(e){return e!=null}function Bt(e){return e.y}function Xt(e){return e!=null}function Ut(e){return e.y}function zt(e){return e!=null}function Jt(e){return e.y}function Kt(e){return e!=null}function Qt(e){return e.y}function Zt(e){return e!=null}function te(e){return e.y}function ee(e){const t=r.compilerRuntimeExports.c(60),{data:j,graphTitle:w,lineColor:V,sources:a,graphDescription:l,height:S,width:c,footNote:$,dateFormat:rt,area:nt,padding:D,backgroundColor:W,leftMargin:Y,rightMargin:B,topMargin:X,bottomMargin:k,tooltip:q,relativeHeight:R,onSeriesMouseOver:it,graphID:f,minValue:st,maxValue:N,graphDownload:at,dataDownload:U,language:ct,minHeight:z,theme:_,ariaLabel:O,curveType:J,styles:o,classNames:n,customLayers:i}=e,ut=rt===void 0?"yyyy":rt,pt=nt===void 0?!1:nt,K=W===void 0?!0:W,G=Y===void 0?5:Y,s=B===void 0?5:B,A=X===void 0?10:X,H=k===void 0?20:k,I=at===void 0?!1:at,lt=U===void 0?!1:U,mt=ct===void 0?"en":ct,P=z===void 0?0:z,F=_===void 0?"light":_,Q=J===void 0?"curve":J;let x;t[0]!==i?(x=i===void 0?[]:i,t[0]=i,t[1]=x):x=t[1];const Z=x,[h,dt]=M.useState(0),[g,ft]=M.useState(0),E=M.useRef(null),C=M.useRef(null);let y,L;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const et=new ResizeObserver(ot=>{dt(ot[0].target.clientWidth||620),ft(ot[0].target.clientHeight||480)});return E.current&&et.observe(E.current),()=>et.disconnect()},L=[],t[2]=y,t[3]=L):(y=t[2],L=t[3]),M.useEffect(y,L);const b=n?.graphContainer,tt=o?.graphContainer;let u;t[4]!==n?.description||t[5]!==n?.title||t[6]!==j||t[7]!==lt||t[8]!==l||t[9]!==I||t[10]!==w||t[11]!==o?.description||t[12]!==o?.title||t[13]!==c?(u=w||l||I||lt?r.jsxRuntimeExports.jsx(At.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:n?.title,description:n?.description},graphTitle:w,graphDescription:l,width:c,graphDownload:I?C:void 0,dataDownload:lt?j.map(se).filter(ie).length>0?j.map(ne).filter(re):j.filter(oe):null}):null,t[4]=n?.description,t[5]=n?.title,t[6]=j,t[7]=lt,t[8]=l,t[9]=I,t[10]=w,t[11]=o?.description,t[12]=o?.title,t[13]=c,t[14]=u):u=t[14];let p;t[15]!==pt||t[16]!==H||t[17]!==n||t[18]!==Q||t[19]!==Z||t[20]!==j||t[21]!==ut||t[22]!==G||t[23]!==V||t[24]!==N||t[25]!==st||t[26]!==it||t[27]!==s||t[28]!==o||t[29]!==g||t[30]!==h||t[31]!==q||t[32]!==A?(p=h&&g?r.jsxRuntimeExports.jsx(Pt,{data:j,lineColor:V||Ht.Colors.primaryColors["blue-600"],width:h,height:g,dateFormat:ut,areaId:pt?It.generateRandomString(8):void 0,leftMargin:G,rightMargin:s,topMargin:A,bottomMargin:H,tooltip:q,onSeriesMouseOver:it,minValue:st,maxValue:N,curveType:Q,styles:o,classNames:n,customLayers:Z}):null,t[15]=pt,t[16]=H,t[17]=n,t[18]=Q,t[19]=Z,t[20]=j,t[21]=ut,t[22]=G,t[23]=V,t[24]=N,t[25]=st,t[26]=it,t[27]=s,t[28]=o,t[29]=g,t[30]=h,t[31]=q,t[32]=A,t[33]=p):p=t[33];let m;t[34]!==p?(m=r.jsxRuntimeExports.jsx(St.GraphArea,{ref:E,children:p}),t[34]=p,t[35]=m):m=t[35];let v;t[36]!==n?.footnote||t[37]!==n?.source||t[38]!==$||t[39]!==a||t[40]!==o?.footnote||t[41]!==o?.source||t[42]!==c?(v=a||$?r.jsxRuntimeExports.jsx(Gt.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:n?.footnote,source:n?.source},sources:a,footNote:$,width:c}):null,t[36]=n?.footnote,t[37]=n?.source,t[38]=$,t[39]=a,t[40]=o?.footnote,t[41]=o?.source,t[42]=c,t[43]=v):v=t[43];let T;return t[44]!==O||t[45]!==K||t[46]!==f||t[47]!==S||t[48]!==mt||t[49]!==P||t[50]!==D||t[51]!==R||t[52]!==b||t[53]!==tt||t[54]!==u||t[55]!==m||t[56]!==v||t[57]!==F||t[58]!==c?(T=r.jsxRuntimeExports.jsxs(St.GraphContainer,{className:b,style:tt,id:f,ref:C,"aria-label":O,backgroundColor:K,theme:F,language:mt,minHeight:P,width:c,height:S,relativeHeight:R,padding:D,children:[u,m,v]}),t[44]=O,t[45]=K,t[46]=f,t[47]=S,t[48]=mt,t[49]=P,t[50]=D,t[51]=R,t[52]=b,t[53]=tt,t[54]=u,t[55]=m,t[56]=v,t[57]=F,t[58]=c,t[59]=T):T=t[59],T}function oe(e){return e!==void 0}function re(e){return e!==void 0}function ne(e){return e.data}function ie(e){return e!==void 0}function se(e){return e.data}exports.SparkLine=ee;
2
2
  //# sourceMappingURL=SparkLine.cjs.map
@@ -40,7 +40,7 @@ declare interface CustomLayerDataType {
40
40
  layer: React.ReactNode;
41
41
  }
42
42
 
43
- declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
43
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'ja' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
44
44
 
45
45
  declare interface LineChartDataType {
46
46
  date: number | string;
package/dist/SparkLine.js CHANGED
@@ -2,7 +2,7 @@ import { c as wt, m as Mt, j as i } from "./index-CHPV5EwG-BzibaIRc.js";
2
2
  import { useState as ut, useRef as bt, useEffect as Dt } from "react";
3
3
  import { f as _t, p as St } from "./parse-Dv4of-PN.js";
4
4
  import { o as At } from "./index-BZQYSqar.js";
5
- import { T as Nt } from "./Tooltip-Bj-s__cI.js";
5
+ import { T as Nt } from "./Tooltip-3EYDVa3w.js";
6
6
  import { c as $t } from "./checkIfNullOrUndefined-DmfiKkNw.js";
7
7
  import { t as kt } from "./time-vyz6Y89P.js";
8
8
  import { a as Ot } from "./linear-DNXM5Pdl.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-D4pAp7u0.cjs"),T=require("./index-CSNtgibC.cjs"),st=require("./Typography-BqmyF1gP.cjs"),at=require("./GraphFooter.cjs"),lt=require("./GraphHeader.cjs"),h=require("./numberFormattingFunction-Cn9R7CM9.cjs");function ut(e){const t=o.compilerRuntimeExports.c(52),{year:y,data:r,graphTitle:x,suffix:P,sources:v,prefix:I,graphDescription:d,footNote:j,padding:V,backgroundColor:J,graphID:q,aggregationMethod:K,language:Q,countOnly:g,theme:U,ariaLabel:ct,textBackground:X,headingFontSize:Y,centerAlign:Z,verticalAlign:tt,layout:et,styles:n,classNames:i,precision:nt,locale:rt,naLabel:ot}=e,s=P===void 0?"":P,a=I===void 0?"":I,f=J===void 0?!1:J,l=K===void 0?"count":K,p=Q===void 0?"en":Q,it=U===void 0?"light":U,_=X===void 0?!1:X,w=Y===void 0?"4.375rem":Y,C=Z===void 0?!1:Z,G=tt===void 0?"center":tt,S=et===void 0?"primary":et,c=nt===void 0?2:nt,u=rt===void 0?"en":rt,m=ot===void 0?"NA":ot,H=`${it||"light"} w-full`,A=p==="he"||p==="ar"?"rtl":void 0,L=`${it||"light"} flex flex-col w-full box-border h-full ${f?f===!0?"bg-primary-gray-200 dark:bg-primary-gray-650":"":"bg-transparent"} ${p||"en"}`,z=i?.graphContainer;let b;t[0]!==L||t[1]!==z?(b=o.mo(L,z),t[0]=L,t[1]=z,t[2]=b):b=t[2];let F;t[3]!==n?.graphContainer?(F=n?.graphContainer||{},t[3]=n?.graphContainer,t[4]=F):F=t[4];let R;t[5]!==f?(R=f&&f!==!0?{backgroundColor:f}:{},t[5]=f,t[6]=R):R=t[6];const B=f?V||"1rem":V||0;let E;t[7]!==F||t[8]!==R||t[9]!==B?(E={...F,...R,padding:B},t[7]=F,t[8]=R,t[9]=B,t[10]=E):E=t[10];const D=ct||`${x?`The graph shows ${x}. `:""}This is a statistic card.${d?` ${d}`:""}`,O=`flex flex-col w-full grow ${S!=="secondary"?"gap-12 justify-between":"gap-4 justify-center"}`;let k;t[11]!==l||t[12]!==C||t[13]!==i?.description||t[14]!==i?.footnote||t[15]!==i?.source||t[16]!==i?.title||t[17]!==g||t[18]!==r||t[19]!==j||t[20]!==d||t[21]!==x||t[22]!==w||t[23]!==p||t[24]!==S||t[25]!==u||t[26]!==m||t[27]!==c||t[28]!==a||t[29]!==v||t[30]!==n?.description||t[31]!==n?.footnote||t[32]!==n?.source||t[33]!==n?.title||t[34]!==s||t[35]!==_||t[36]!==G||t[37]!==y?(k=S!=="secondary"?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[x||d?o.jsxRuntimeExports.jsx(lt.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:x,graphDescription:d}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-col justify-between grow ${G==="top"?"justify-start":G==="bottom"?"justify-end":"justify-center"}`,children:o.jsxRuntimeExports.jsxs(st.R,{marginBottom:"base",className:`leading-none text-outline font-heading ${C?"text-center":p==="he"||p==="ar"?"text-right":"text-left"} ${_?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:w,letterSpacing:"0.05rem"},children:[r.filter(Et).length>0||l==="count"?g&&g?.length!==0?r.filter(W=>g.indexOf(W.value)!==-1).length:r.length:l==="sum"?h.numberFormattingFunction(T.sum(r.map(Rt)),m,c,a,s,u):l==="average"?h.numberFormattingFunction(parseFloat((T.sum(r.map(Ft))/r.length).toFixed(2)),m,c,a,s,u):l==="max"?h.numberFormattingFunction(Math.max(...r.map(bt).filter(jt)),m,c,a,s,u):h.numberFormattingFunction(Math.min(...r.map(vt).filter(yt)),m,c,a,s,u)," ",y?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",y,")"]}):null]})}),v||j?o.jsxRuntimeExports.jsx(at.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:v,footNote:j}):null]}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(st.R,{marginBottom:S==="secondary"?"none":"base",className:`leading-none text-outline font-heading ${C?"text-center":p==="he"||p==="ar"?"text-right":"text-left"} ${_?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:w,letterSpacing:"0.05rem"},children:[r.filter(ht).length>0||l==="count"?g&&g?.length!==0?r.filter(W=>g.indexOf(W.value)!==-1).length:r.length:l==="sum"?h.numberFormattingFunction(T.sum(r.map(ft)),m,c,a,s,u):l==="average"?h.numberFormattingFunction(parseFloat((T.sum(r.map(gt))/r.length).toFixed(2)),m,c,a,s,u):l==="max"?h.numberFormattingFunction(Math.max(...r.map(dt).filter(xt)),m,c,a,s,u):h.numberFormattingFunction(Math.min(...r.map(pt).filter(mt)),m,c,a,s,u)," ",y?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",y,")"]}):null]}),x||d?o.jsxRuntimeExports.jsx(lt.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:i?.title,description:i?.description},graphTitle:x,graphDescription:d}):null,v||j?o.jsxRuntimeExports.jsx(at.GraphFooter,{styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:i?.footnote,source:i?.source},sources:v,footNote:j}):null]}),t[11]=l,t[12]=C,t[13]=i?.description,t[14]=i?.footnote,t[15]=i?.source,t[16]=i?.title,t[17]=g,t[18]=r,t[19]=j,t[20]=d,t[21]=x,t[22]=w,t[23]=p,t[24]=S,t[25]=u,t[26]=m,t[27]=c,t[28]=a,t[29]=v,t[30]=n?.description,t[31]=n?.footnote,t[32]=n?.source,t[33]=n?.title,t[34]=s,t[35]=_,t[36]=G,t[37]=y,t[38]=k):k=t[38];let N;t[39]!==O||t[40]!==k?(N=o.jsxRuntimeExports.jsx("div",{className:O,children:k}),t[39]=O,t[40]=k,t[41]=N):N=t[41];let $;t[42]!==q||t[43]!==A||t[44]!==b||t[45]!==E||t[46]!==D||t[47]!==N?($=o.jsxRuntimeExports.jsx("div",{id:q,dir:A,className:b,style:E,"aria-label":D,children:N}),t[42]=q,t[43]=A,t[44]=b,t[45]=E,t[46]=D,t[47]=N,t[48]=$):$=t[48];let M;return t[49]!==H||t[50]!==$?(M=o.jsxRuntimeExports.jsx("div",{className:H,children:$}),t[49]=H,t[50]=$,t[51]=M):M=t[51],M}function mt(e){return e!==void 0}function pt(e){return e.value}function xt(e){return e!==void 0}function dt(e){return e.value}function gt(e){return e.value}function ft(e){return e.value}function ht(e){return typeof e.value=="string"}function yt(e){return e!==void 0}function vt(e){return e.value}function jt(e){return e!==void 0}function bt(e){return e.value}function Ft(e){return e.value}function Rt(e){return e.value}function Et(e){return typeof e.value=="string"}exports.StatCardFromData=ut;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-D4pAp7u0.cjs"),Z=require("./index-CSNtgibC.cjs"),Y=require("./Typography-BqmyF1gP.cjs"),tt=require("./GraphFooter.cjs"),et=require("./GraphHeader.cjs"),f=require("./numberFormattingFunction-u2iNHL_c.cjs");function rt(n){const t=o.compilerRuntimeExports.c(53),{year:d,data:i,graphTitle:u,sources:g,graphDescription:p,footNote:h,padding:O,backgroundColor:z,graphID:C,aggregationMethod:B,language:W,countOnly:m,theme:P,ariaLabel:nt,textBackground:I,headingFontSize:V,centerAlign:J,verticalAlign:K,layout:Q,styles:r,classNames:s,naLabel:U,numberDisplayOptions:e}=n,x=z===void 0?!1:z,a=B===void 0?"count":B,c=W===void 0?"en":W,X=P===void 0?"light":P,N=I===void 0?!1:I,$=V===void 0?"4.375rem":V,S=J===void 0?!1:J,_=K===void 0?"center":K,k=Q===void 0?"primary":Q,l=U===void 0?"NA":U,G=`${X||"light"} w-full`,M=c==="he"||c==="ar"?"rtl":void 0,T=`${X||"light"} flex flex-col w-full box-border h-full ${x?x===!0?"bg-primary-gray-200 dark:bg-primary-gray-650":"":"bg-transparent"} ${c||"en"}`,q=s?.graphContainer;let y;t[0]!==T||t[1]!==q?(y=o.mo(T,q),t[0]=T,t[1]=q,t[2]=y):y=t[2];let j;t[3]!==r?.graphContainer?(j=r?.graphContainer||{},t[3]=r?.graphContainer,t[4]=j):j=t[4];let v;t[5]!==x?(v=x&&x!==!0?{backgroundColor:x}:{},t[5]=x,t[6]=v):v=t[6];const H=x?O||"1rem":O||0;let b;t[7]!==j||t[8]!==v||t[9]!==H?(b={...j,...v,padding:H},t[7]=j,t[8]=v,t[9]=H,t[10]=b):b=t[10];const A=nt||`${u?`The graph shows ${u}. `:""}This is a statistic card.${p?` ${p}`:""}`,D=`flex flex-col w-full grow ${k!=="secondary"?"gap-12 justify-between":"gap-4 justify-center"}`;let F;t[11]!==a||t[12]!==S||t[13]!==s?.description||t[14]!==s?.footnote||t[15]!==s?.source||t[16]!==s?.title||t[17]!==m||t[18]!==i||t[19]!==h||t[20]!==p||t[21]!==u||t[22]!==$||t[23]!==c||t[24]!==k||t[25]!==l||t[26]!==e?.locale||t[27]!==e?.padZeros||t[28]!==e?.precision||t[29]!==e?.prefix||t[30]!==e?.suffix||t[31]!==g||t[32]!==r?.description||t[33]!==r?.footnote||t[34]!==r?.source||t[35]!==r?.title||t[36]!==N||t[37]!==_||t[38]!==d?(F=k!=="secondary"?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[u||p?o.jsxRuntimeExports.jsx(et.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:s?.title,description:s?.description},graphTitle:u,graphDescription:p}):null,o.jsxRuntimeExports.jsx("div",{className:`flex flex-col justify-between grow ${_==="top"?"justify-start":_==="bottom"?"justify-end":"justify-center"}`,children:o.jsxRuntimeExports.jsxs(Y.R,{marginBottom:"base",className:`leading-none text-outline font-heading ${S?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${N?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:$,letterSpacing:"0.05rem"},children:[i.filter(ht).length>0||a==="count"?m&&m?.length!==0?i.filter(L=>m.indexOf(L.value)!==-1).length:i.length:a==="sum"?f.numberFormattingFunction(Z.sum(i.map(gt)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros):a==="average"?f.numberFormattingFunction(parseFloat((Z.sum(i.map(dt))/i.length).toFixed(2)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros):a==="max"?f.numberFormattingFunction(Math.max(...i.map(ft).filter(xt)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros):f.numberFormattingFunction(Math.min(...i.map(mt).filter(pt)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros)," ",d?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",d,")"]}):null]})}),g||h?o.jsxRuntimeExports.jsx(tt.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:g,footNote:h}):null]}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(Y.R,{marginBottom:k==="secondary"?"none":"base",className:`leading-none text-outline font-heading ${S?"text-center":c==="he"||c==="ar"?"text-right":"text-left"} ${N?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:$,letterSpacing:"0.05rem"},children:[i.filter(ut).length>0||a==="count"?m&&m?.length!==0?i.filter(L=>m.indexOf(L.value)!==-1).length:i.length:a==="sum"?f.numberFormattingFunction(Z.sum(i.map(ct)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros):a==="average"?f.numberFormattingFunction(parseFloat((Z.sum(i.map(lt))/i.length).toFixed(2)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros):a==="max"?f.numberFormattingFunction(Math.max(...i.map(at).filter(st)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros):f.numberFormattingFunction(Math.min(...i.map(ot).filter(it)),l,e?.precision??2,e?.prefix,e?.suffix,e?.locale,e?.padZeros)," ",d?o.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",d,")"]}):null]}),u||p?o.jsxRuntimeExports.jsx(et.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:s?.title,description:s?.description},graphTitle:u,graphDescription:p}):null,g||h?o.jsxRuntimeExports.jsx(tt.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:g,footNote:h}):null]}),t[11]=a,t[12]=S,t[13]=s?.description,t[14]=s?.footnote,t[15]=s?.source,t[16]=s?.title,t[17]=m,t[18]=i,t[19]=h,t[20]=p,t[21]=u,t[22]=$,t[23]=c,t[24]=k,t[25]=l,t[26]=e?.locale,t[27]=e?.padZeros,t[28]=e?.precision,t[29]=e?.prefix,t[30]=e?.suffix,t[31]=g,t[32]=r?.description,t[33]=r?.footnote,t[34]=r?.source,t[35]=r?.title,t[36]=N,t[37]=_,t[38]=d,t[39]=F):F=t[39];let R;t[40]!==D||t[41]!==F?(R=o.jsxRuntimeExports.jsx("div",{className:D,children:F}),t[40]=D,t[41]=F,t[42]=R):R=t[42];let E;t[43]!==C||t[44]!==M||t[45]!==y||t[46]!==b||t[47]!==A||t[48]!==R?(E=o.jsxRuntimeExports.jsx("div",{id:C,dir:M,className:y,style:b,"aria-label":A,children:R}),t[43]=C,t[44]=M,t[45]=y,t[46]=b,t[47]=A,t[48]=R,t[49]=E):E=t[49];let w;return t[50]!==G||t[51]!==E?(w=o.jsxRuntimeExports.jsx("div",{className:G,children:E}),t[50]=G,t[51]=E,t[52]=w):w=t[52],w}function it(n){return n!==void 0}function ot(n){return n.value}function st(n){return n!==void 0}function at(n){return n.value}function lt(n){return n.value}function ct(n){return n.value}function ut(n){return typeof n.value=="string"}function pt(n){return n!==void 0}function mt(n){return n.value}function xt(n){return n!==void 0}function ft(n){return n.value}function dt(n){return n.value}function gt(n){return n.value}function ht(n){return typeof n.value=="string"}exports.StatCardFromData=rt;
2
2
  //# sourceMappingURL=StatCardFromData.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatCardFromData.cjs","sources":["../src/Components/Graphs/StatCard/StatCardFromData.tsx"],"sourcesContent":["import sum from 'lodash.sum';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { H3 } from '@undp/design-system-react/Typography';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport {\r\n Languages,\r\n SourcesDataType,\r\n StatCardsFromDataSheetDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: StatCardsFromDataSheetDataType[];\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 /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Defines the layout for the cards */\r\n layout?: 'primary' | 'secondary';\r\n /** Font size of the main text */\r\n headingFontSize?: string;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Toggle the fill color of the main text. */\r\n textBackground?: boolean;\r\n /** Toggle is the text is center aligned. */\r\n centerAlign?: boolean;\r\n /** Vertical alignment of the main text */\r\n verticalAlign?: 'center' | 'top' | 'bottom';\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 // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Sub text next to main text */\r\n year?: number | string;\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\r\n // Graph Parameters\r\n /** Data points that need to counted for aggregation. */\r\n countOnly?: (string | number)[];\r\n /** Method for aggregating the data to show as a single number in the card. If the data type of value in data object is string then only count is applicable. */\r\n aggregationMethod?: 'count' | 'max' | 'min' | 'average' | 'sum';\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\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 StatCardFromData(props: Props) {\r\n const {\r\n year,\r\n data,\r\n graphTitle,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n graphID,\r\n aggregationMethod = 'count',\r\n language = 'en',\r\n countOnly,\r\n theme = 'light',\r\n ariaLabel,\r\n textBackground = false,\r\n headingFontSize = '4.375rem',\r\n centerAlign = false,\r\n verticalAlign = 'center',\r\n layout = 'primary',\r\n styles,\r\n classNames,\r\n precision = 2,\r\n locale = 'en',\r\n naLabel = 'NA',\r\n } = props;\r\n\r\n return (\r\n <div className={`${theme || 'light'} w-full`}>\r\n <div\r\n id={graphID}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n className={cn(\r\n `${theme || 'light'} flex flex-col w-full box-border h-full ${\r\n !backgroundColor\r\n ? 'bg-transparent'\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650'\r\n : ''\r\n } ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n padding: backgroundColor ? padding || '1rem' : padding || 0,\r\n }}\r\n aria-label={\r\n ariaLabel ||\r\n `${graphTitle ? `The graph shows ${graphTitle}. ` : ''}This is a statistic card.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className={`flex flex-col w-full grow ${layout !== 'secondary' ? 'gap-12 justify-between' : 'gap-4 justify-center'}`}\r\n >\r\n {layout !== 'secondary' ? (\r\n <>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\r\n <div\r\n className={`flex flex-col justify-between grow ${\r\n verticalAlign === 'top'\r\n ? 'justify-start'\r\n : verticalAlign === 'bottom'\r\n ? 'justify-end'\r\n : 'justify-center'\r\n }`}\r\n >\r\n <H3\r\n marginBottom='base'\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {data.filter(d => typeof d.value === 'string').length > 0 ||\r\n aggregationMethod === 'count'\r\n ? countOnly && countOnly?.length !== 0\r\n ? data.filter(d => countOnly.indexOf(d.value) !== -1).length\r\n : data.length\r\n : aggregationMethod === 'sum'\r\n ? numberFormattingFunction(\r\n sum(data.map(d => d.value)),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )\r\n : aggregationMethod === 'average'\r\n ? numberFormattingFunction(\r\n parseFloat((sum(data.map(d => d.value)) / data.length).toFixed(2)),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )\r\n : aggregationMethod === 'max'\r\n ? numberFormattingFunction(\r\n Math.max(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )\r\n : numberFormattingFunction(\r\n Math.min(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n />\r\n ) : null}\r\n </>\r\n ) : (\r\n <>\r\n <H3\r\n marginBottom={layout === 'secondary' ? 'none' : 'base'}\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {data.filter(d => typeof d.value === 'string').length > 0 ||\r\n aggregationMethod === 'count'\r\n ? countOnly && countOnly?.length !== 0\r\n ? data.filter(d => countOnly.indexOf(d.value) !== -1).length\r\n : data.length\r\n : aggregationMethod === 'sum'\r\n ? numberFormattingFunction(\r\n sum(data.map(d => d.value)),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )\r\n : aggregationMethod === 'average'\r\n ? numberFormattingFunction(\r\n parseFloat((sum(data.map(d => d.value)) / data.length).toFixed(2)),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )\r\n : aggregationMethod === 'max'\r\n ? numberFormattingFunction(\r\n Math.max(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )\r\n : numberFormattingFunction(\r\n Math.min(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\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 />\r\n ) : null}\r\n </>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["StatCardFromData","props","$","_c","year","data","graphTitle","suffix","t0","sources","prefix","t1","graphDescription","footNote","padding","backgroundColor","t2","graphID","aggregationMethod","t3","language","t4","countOnly","theme","t5","ariaLabel","textBackground","t6","headingFontSize","t7","centerAlign","t8","verticalAlign","t9","layout","t10","styles","classNames","precision","t11","locale","t12","naLabel","t13","undefined","t14","t15","t16","t17","graphContainer","t18","cn","t19","t20","t21","t22","t23","t24","t25","description","footnote","source","title","jsxs","Fragment","jsx","GraphHeader","H3","fontSize","letterSpacing","filter","_temp","length","indexOf","d","value","numberFormattingFunction","sum","map","_temp2","parseFloat","_temp3","toFixed","Math","max","_temp4","_temp5","min","_temp6","_temp7","marginLeft","lineHeight","textShadow","WebkitTextStrokeWidth","GraphFooter","_temp8","_temp9","_temp0","_temp1","_temp10","_temp11","_temp12","t26","t27","t28","d_13","d_12","d_11","d_10","d_9","d_8","d_14","d_5","d_4","d_3","d_2","d_1","d_0","d_6"],"mappings":"gUAiFO,SAAAA,GAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,KAAAA,EAAAC,KAAAA,EAAAC,WAAAA,EAAAC,OAAAC,EAAAC,QAAAA,EAAAC,OAAAC,EAAAC,iBAAAA,EAAAC,SAAAA,EAAAC,QAAAA,EAAAC,gBAAAC,EAAAC,QAAAA,EAAAC,kBAAAC,EAAAC,SAAAC,EAAAC,UAAAA,EAAAC,MAAAC,EAAAC,UAAAA,GAAAC,eAAAC,EAAAC,gBAAAC,EAAAC,YAAAC,EAAAC,cAAAC,GAAAC,OAAAC,GAAAC,OAAAA,EAAAC,WAAAA,EAAAC,UAAAC,GAAAC,OAAAC,GAAAC,QAAAC,EAAAA,EA2BI1C,EAvBFM,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AAtG,EAAA,EAAA,IAAA2C,GAAA3C,QAAAqG,GAzPRC,EAAAvC,EAAAA,kBAAAA,IAAA,MAAA,CAAgB,UAAApB,EACd0D,SAAAA,EAyPF,EAAMrG,MAAA2C,EAAA3C,MAAAqG,EAAArG,MAAAsG,GAAAA,EAAAtG,EAAA,EAAA,EA1PNsG,CA0PM,CAzRH,SAAAH,GAAAI,EAAA,CAAA,OAsOsC/B,IAAM9B,MAAS,CAtOrD,SAAAwD,GAAAM,EAAA,CAAA,OAqOmChC,EAACC,KAA4B,CArOhE,SAAAwB,GAAAQ,EAAA,CAAA,OA0NsCjC,IAAM9B,MAAS,CA1NrD,SAAAsD,GAAAU,EAAA,CAAA,OAyNmClC,EAACC,KAA4B,CAzNhE,SAAAsB,GAAAY,EAAA,CAAA,OA8MiDnC,EAACC,KAAM,CA9MxD,SAAAqB,GAAAc,EAAA,CAAA,OAqMmCpC,EAACC,KAAM,CArM1C,SAAAoB,GAAAgB,EAAA,CAAA,OA8L2B,OAAOrC,EAACC,OAAW,QAAQ,CA9LtD,SAAAc,GAAAuB,EAAA,CAAA,OA2IwCtC,IAAM9B,MAAS,CA3IvD,SAAA4C,GAAAyB,EAAA,CAAA,OA0IqCvC,EAACC,KAA4B,CA1IlE,SAAAW,GAAA4B,EAAA,CAAA,OA+HwCxC,IAAM9B,MAAS,CA/HvD,SAAAyC,GAAA8B,EAAA,CAAA,OA8HqCzC,EAACC,KAA4B,CA9HlE,SAAAM,GAAAmC,EAAA,CAAA,OAmHmD1C,EAACC,KAAM,CAnH1D,SAAAI,GAAAsC,EAAA,CAAA,OA0GqC3C,EAACC,KAAM,CA1G5C,SAAAJ,GAAA+C,EAAA,CAAA,OAmG6B,OAAO5C,EAACC,OAAW,QAAQ"}
1
+ {"version":3,"file":"StatCardFromData.cjs","sources":["../src/Components/Graphs/StatCard/StatCardFromData.tsx"],"sourcesContent":["import sum from 'lodash.sum';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { H3 } from '@undp/design-system-react/Typography';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport {\r\n Languages,\r\n SourcesDataType,\r\n StatCardsFromDataSheetDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: StatCardsFromDataSheetDataType[];\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 /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Defines the layout for the cards */\r\n layout?: 'primary' | 'secondary';\r\n /** Font size of the main text */\r\n headingFontSize?: string;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Toggle the fill color of the main text. */\r\n textBackground?: boolean;\r\n /** Toggle is the text is center aligned. */\r\n centerAlign?: boolean;\r\n /** Vertical alignment of the main text */\r\n verticalAlign?: 'center' | 'top' | 'bottom';\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 // Values and Ticks\r\n /** Sub text next to main text */\r\n year?: 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\r\n // Graph Parameters\r\n /** Data points that need to counted for aggregation. */\r\n countOnly?: (string | number)[];\r\n /** Method for aggregating the data to show as a single number in the card. If the data type of value in data object is string then only count is applicable. */\r\n aggregationMethod?: 'count' | 'max' | 'min' | 'average' | 'sum';\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 StatCardFromData(props: Props) {\r\n const {\r\n year,\r\n data,\r\n graphTitle,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n graphID,\r\n aggregationMethod = 'count',\r\n language = 'en',\r\n countOnly,\r\n theme = 'light',\r\n ariaLabel,\r\n textBackground = false,\r\n headingFontSize = '4.375rem',\r\n centerAlign = false,\r\n verticalAlign = 'center',\r\n layout = 'primary',\r\n styles,\r\n classNames,\r\n naLabel = 'NA',\r\n numberDisplayOptions,\r\n } = props;\r\n\r\n return (\r\n <div className={`${theme || 'light'} w-full`}>\r\n <div\r\n id={graphID}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n className={cn(\r\n `${theme || 'light'} flex flex-col w-full box-border h-full ${\r\n !backgroundColor\r\n ? 'bg-transparent'\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650'\r\n : ''\r\n } ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n padding: backgroundColor ? padding || '1rem' : padding || 0,\r\n }}\r\n aria-label={\r\n ariaLabel ||\r\n `${graphTitle ? `The graph shows ${graphTitle}. ` : ''}This is a statistic card.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className={`flex flex-col w-full grow ${layout !== 'secondary' ? 'gap-12 justify-between' : 'gap-4 justify-center'}`}\r\n >\r\n {layout !== 'secondary' ? (\r\n <>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\r\n <div\r\n className={`flex flex-col justify-between grow ${\r\n verticalAlign === 'top'\r\n ? 'justify-start'\r\n : verticalAlign === 'bottom'\r\n ? 'justify-end'\r\n : 'justify-center'\r\n }`}\r\n >\r\n <H3\r\n marginBottom='base'\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {data.filter(d => typeof d.value === 'string').length > 0 ||\r\n aggregationMethod === 'count'\r\n ? countOnly && countOnly?.length !== 0\r\n ? data.filter(d => countOnly.indexOf(d.value) !== -1).length\r\n : data.length\r\n : aggregationMethod === 'sum'\r\n ? numberFormattingFunction(\r\n sum(data.map(d => d.value)),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )\r\n : aggregationMethod === 'average'\r\n ? numberFormattingFunction(\r\n parseFloat((sum(data.map(d => d.value)) / data.length).toFixed(2)),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )\r\n : aggregationMethod === 'max'\r\n ? numberFormattingFunction(\r\n Math.max(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )\r\n : numberFormattingFunction(\r\n Math.min(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n />\r\n ) : null}\r\n </>\r\n ) : (\r\n <>\r\n <H3\r\n marginBottom={layout === 'secondary' ? 'none' : 'base'}\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {data.filter(d => typeof d.value === 'string').length > 0 ||\r\n aggregationMethod === 'count'\r\n ? countOnly && countOnly?.length !== 0\r\n ? data.filter(d => countOnly.indexOf(d.value) !== -1).length\r\n : data.length\r\n : aggregationMethod === 'sum'\r\n ? numberFormattingFunction(\r\n sum(data.map(d => d.value)),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )\r\n : aggregationMethod === 'average'\r\n ? numberFormattingFunction(\r\n parseFloat((sum(data.map(d => d.value)) / data.length).toFixed(2)),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )\r\n : aggregationMethod === 'max'\r\n ? numberFormattingFunction(\r\n Math.max(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )\r\n : numberFormattingFunction(\r\n Math.min(\r\n ...data\r\n .map(d => d.value as number | undefined)\r\n .filter(d => d !== undefined),\r\n ),\r\n naLabel,\r\n numberDisplayOptions?.precision ?? 2,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\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 />\r\n ) : null}\r\n </>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["StatCardFromData","props","$","_c","year","data","graphTitle","sources","graphDescription","footNote","padding","backgroundColor","t0","graphID","aggregationMethod","t1","language","t2","countOnly","theme","t3","ariaLabel","textBackground","t4","headingFontSize","t5","centerAlign","t6","verticalAlign","t7","layout","t8","styles","classNames","naLabel","t9","numberDisplayOptions","undefined","t10","t11","t12","t13","graphContainer","t14","cn","t15","t16","t17","t18","t19","t20","t21","description","footnote","source","title","locale","padZeros","precision","prefix","suffix","jsxs","Fragment","jsx","GraphHeader","H3","fontSize","letterSpacing","filter","_temp","length","d","indexOf","value","numberFormattingFunction","sum","map","_temp2","parseFloat","_temp3","toFixed","Math","max","_temp4","_temp5","min","_temp6","_temp7","marginLeft","lineHeight","textShadow","WebkitTextStrokeWidth","GraphFooter","_temp8","d_7","_temp9","_temp0","_temp1","_temp10","_temp11","_temp12","t22","t23","t24","d_13","d_12","d_11","d_10","d_9","d_8","d_14","d_5","d_4","d_3","d_2","d_1","d_0","d_6"],"mappings":"+TA4EO,SAAAA,GAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,KAAAA,EAAAC,KAAAA,EAAAC,WAAAA,EAAAC,QAAAA,EAAAC,iBAAAA,EAAAC,SAAAA,EAAAC,QAAAA,EAAAC,gBAAAC,EAAAC,QAAAA,EAAAC,kBAAAC,EAAAC,SAAAC,EAAAC,UAAAA,EAAAC,MAAAC,EAAAC,UAAAA,GAAAC,eAAAC,EAAAC,gBAAAC,EAAAC,YAAAC,EAAAC,cAAAC,EAAAC,OAAAC,EAAAC,OAAAA,EAAAC,WAAAA,EAAAC,QAAAC,EAAAC,qBAAAA,CAAAA,EAwBInC,EAhBFU,EAAAC,IAAAyB,OAAA,GAA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A3IvD,SAAAiD,GAAA0B,EAAA,CAAA,OA0IqCzC,EAACE,KAA4B,CA1IlE,SAAAW,GAAA6B,EAAA,CAAA,OA8HwC1C,IAAMlC,MAAS,CA9HvD,SAAA8C,GAAA+B,EAAA,CAAA,OA6HqC3C,EAACE,KAA4B,CA7HlE,SAAAM,GAAAoC,EAAA,CAAA,OAiHmD5C,EAACE,KAAM,CAjH1D,SAAAI,GAAAuC,EAAA,CAAA,OAuGqC7C,EAACE,KAAM,CAvG5C,SAAAJ,GAAAgD,EAAA,CAAA,OAgG6B,OAAO9C,EAACE,OAAW,QAAQ"}
@@ -33,7 +33,15 @@ declare interface ClassNameObject {
33
33
  modal?: string;
34
34
  }
35
35
 
36
- declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
36
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'ja' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
37
+
38
+ declare interface NumberFormatOptions {
39
+ locale?: string;
40
+ precision?: number;
41
+ prefix?: string;
42
+ suffix?: string;
43
+ padZeros?: boolean;
44
+ }
37
45
 
38
46
  declare interface Props {
39
47
  /** Array of data objects */
@@ -66,22 +74,16 @@ declare interface Props {
66
74
  styles?: StyleObject;
67
75
  /** Custom class names */
68
76
  classNames?: ClassNameObject;
69
- /** Prefix for values */
70
- prefix?: string;
71
- /** Suffix for values */
72
- suffix?: string;
73
77
  /** Sub text next to main text */
74
78
  year?: number | string;
75
- /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */
76
- locale?: string;
79
+ /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */
80
+ numberDisplayOptions?: NumberFormatOptions;
77
81
  /** Defines how “NA” values should be displayed/labelled in the graph */
78
82
  naLabel?: string;
79
83
  /** Data points that need to counted for aggregation. */
80
84
  countOnly?: (string | number)[];
81
85
  /** Method for aggregating the data to show as a single number in the card. If the data type of value in data object is string then only count is applicable. */
82
86
  aggregationMethod?: 'count' | 'max' | 'min' | 'average' | 'sum';
83
- /** Specifies the number of decimal places to display in the value. */
84
- precision?: number;
85
87
  /** Language setting */
86
88
  language?: Languages;
87
89
  /** Color theme */