@undp/data-viz 1.4.0 → 1.4.2

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 (189) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +21 -21
  3. package/dist/BarGraph.cjs +1 -1
  4. package/dist/BarGraph.js +7 -7
  5. package/dist/BeeSwarmChart.cjs +1 -1
  6. package/dist/BeeSwarmChart.js +2 -2
  7. package/dist/BiVariateChoroplethMap.cjs +1 -1
  8. package/dist/BiVariateChoroplethMap.js +5 -5
  9. package/dist/BulletChart.cjs +1 -1
  10. package/dist/BulletChart.js +14 -14
  11. package/dist/ButterflyChart.cjs +1 -1
  12. package/dist/ButterflyChart.js +9 -9
  13. package/dist/ChoroplethMap.cjs +1 -1
  14. package/dist/ChoroplethMap.js +9 -9
  15. package/dist/CirclePackingGraph.cjs +1 -1
  16. package/dist/CirclePackingGraph.js +1 -1
  17. package/dist/CopyTextButton.cjs +7 -7
  18. package/dist/CopyTextButton.cjs.map +1 -1
  19. package/dist/CopyTextButton.js +4 -4
  20. package/dist/CopyTextButton.js.map +1 -1
  21. package/dist/DataCards.cjs +9 -9
  22. package/dist/DataCards.cjs.map +1 -1
  23. package/dist/DataCards.js +93 -93
  24. package/dist/DataCards.js.map +1 -1
  25. package/dist/DifferenceLineChart.cjs +1 -1
  26. package/dist/DifferenceLineChart.js +18 -18
  27. package/dist/DonutChart.cjs +1 -1
  28. package/dist/DonutChart.js +1 -1
  29. package/dist/DotDensityMap.cjs +1 -1
  30. package/dist/DotDensityMap.js +8 -8
  31. package/dist/{DropdownSelect-0I2QxaVy.cjs → DropdownSelect-BmE5JaeE.cjs} +6 -6
  32. package/dist/{DropdownSelect-0I2QxaVy.cjs.map → DropdownSelect-BmE5JaeE.cjs.map} +1 -1
  33. package/dist/{DropdownSelect-CDC9lEqU.js → DropdownSelect-CeHog_ih.js} +4 -4
  34. package/dist/{DropdownSelect-CDC9lEqU.js.map → DropdownSelect-CeHog_ih.js.map} +1 -1
  35. package/dist/DualAxisLineChart.cjs +1 -1
  36. package/dist/DualAxisLineChart.js +15 -15
  37. package/dist/DumbbellChart.cjs +1 -1
  38. package/dist/DumbbellChart.js +13 -13
  39. package/dist/GeoHubMap.cjs +1 -1
  40. package/dist/GeoHubMap.js +2 -2
  41. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  42. package/dist/GeoHubMapWithLayerSelection.js +2 -2
  43. package/dist/{GraphEl-B6SoGRFW.cjs → GraphEl-B5gAX1IQ.cjs} +2 -2
  44. package/dist/{GraphEl-B6SoGRFW.cjs.map → GraphEl-B5gAX1IQ.cjs.map} +1 -1
  45. package/dist/{GraphEl-Cw2tDUb3.js → GraphEl-BdIyscdt.js} +3 -3
  46. package/dist/{GraphEl-Cw2tDUb3.js.map → GraphEl-BdIyscdt.js.map} +1 -1
  47. package/dist/GriddedGraphs.cjs +1 -1
  48. package/dist/GriddedGraphs.js +4 -4
  49. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  50. package/dist/GriddedGraphsFromConfig.js +1 -1
  51. package/dist/HeatMap.cjs +1 -1
  52. package/dist/HeatMap.js +10 -10
  53. package/dist/Histogram.cjs +1 -1
  54. package/dist/Histogram.js +1 -1
  55. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  56. package/dist/LineChartWithConfidenceInterval.js +21 -21
  57. package/dist/{Modal-CUU6ZK3U.js → Modal-DVVwpKhP.js} +2 -2
  58. package/dist/{Modal-CUU6ZK3U.js.map → Modal-DVVwpKhP.js.map} +1 -1
  59. package/dist/{Modal-C_dl0EtQ.cjs → Modal-tXZlLE5s.cjs} +4 -4
  60. package/dist/{Modal-C_dl0EtQ.cjs.map → Modal-tXZlLE5s.cjs.map} +1 -1
  61. package/dist/MultiGraphDashboard.cjs +1 -1
  62. package/dist/MultiGraphDashboard.js +3 -3
  63. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  64. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  65. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  66. package/dist/MultiGraphDashboardWideToLongFormat.js +3 -3
  67. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  68. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  69. package/dist/MultiLineAltChart.cjs +1 -1
  70. package/dist/MultiLineAltChart.js +21 -21
  71. package/dist/MultiLineChart.cjs +1 -1
  72. package/dist/MultiLineChart.js +19 -19
  73. package/dist/ParetoChart.cjs +1 -1
  74. package/dist/ParetoChart.js +12 -12
  75. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  76. package/dist/PerformanceIntensiveMultiGraphDashboard.js +3 -3
  77. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  78. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  79. package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
  80. package/dist/PerformanceIntensiveScrollStory.js +2 -2
  81. package/dist/RadarChart.cjs +1 -1
  82. package/dist/RadarChart.js +8 -8
  83. package/dist/{ReferenceLine-CuFMk0cI.cjs → ReferenceLine-CFVBBN__.cjs} +2 -2
  84. package/dist/{ReferenceLine-CuFMk0cI.cjs.map → ReferenceLine-CFVBBN__.cjs.map} +1 -1
  85. package/dist/{ReferenceLine-C1GpoG9d.js → ReferenceLine-CfAW3vKJ.js} +2 -2
  86. package/dist/{ReferenceLine-C1GpoG9d.js.map → ReferenceLine-CfAW3vKJ.js.map} +1 -1
  87. package/dist/{RegressionLine-BFwDCTUU.js → RegressionLine-mH7UKOPi.js} +3 -3
  88. package/dist/{RegressionLine-BFwDCTUU.js.map → RegressionLine-mH7UKOPi.js.map} +1 -1
  89. package/dist/{RegressionLine-7_rKTHN_.cjs → RegressionLine-xKdiJ8sw.cjs} +2 -2
  90. package/dist/{RegressionLine-7_rKTHN_.cjs.map → RegressionLine-xKdiJ8sw.cjs.map} +1 -1
  91. package/dist/SankeyChart.cjs +1 -1
  92. package/dist/SankeyChart.js +4 -4
  93. package/dist/ScatterPlot.cjs +1 -1
  94. package/dist/ScatterPlot.js +13 -13
  95. package/dist/ScrollStory.cjs +1 -1
  96. package/dist/ScrollStory.js +2 -2
  97. package/dist/SimpleLineChart.cjs +1 -1
  98. package/dist/SimpleLineChart.js +20 -20
  99. package/dist/SingleGraphDashboard.cjs +1 -1
  100. package/dist/SingleGraphDashboard.js +4 -4
  101. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  102. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  103. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  104. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  105. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  106. package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
  107. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  108. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  109. package/dist/SlopeChart.cjs +1 -1
  110. package/dist/SlopeChart.js +7 -7
  111. package/dist/StripChart.cjs +1 -1
  112. package/dist/StripChart.js +9 -9
  113. package/dist/ThreeDGlobe.cjs +1 -1
  114. package/dist/ThreeDGlobe.js +2 -2
  115. package/dist/TreeMapGraph.cjs +1 -1
  116. package/dist/TreeMapGraph.js +4 -4
  117. package/dist/UnitChart.cjs +1 -1
  118. package/dist/UnitChart.js +3 -3
  119. package/dist/{XAxesLabels-DQFo_z2R.js → XAxesLabels-CaV2q-6H.js} +2 -2
  120. package/dist/{XAxesLabels-DQFo_z2R.js.map → XAxesLabels-CaV2q-6H.js.map} +1 -1
  121. package/dist/{XAxesLabels-CJMQbfVy.cjs → XAxesLabels-OjBNl_lS.cjs} +2 -2
  122. package/dist/{XAxesLabels-CJMQbfVy.cjs.map → XAxesLabels-OjBNl_lS.cjs.map} +1 -1
  123. package/dist/{YAxesLabels-H5-002X5.js → YAxesLabels-CPGZjmZJ.js} +2 -2
  124. package/dist/{YAxesLabels-H5-002X5.js.map → YAxesLabels-CPGZjmZJ.js.map} +1 -1
  125. package/dist/{YAxesLabels-BXLTX7AI.cjs → YAxesLabels-D8IydyZj.cjs} +2 -2
  126. package/dist/{YAxesLabels-BXLTX7AI.cjs.map → YAxesLabels-D8IydyZj.cjs.map} +1 -1
  127. package/dist/{checkIfMultiple-Do4kADNr.cjs → checkIfMultiple-BXbHUCWM.cjs} +6 -6
  128. package/dist/{checkIfMultiple-Do4kADNr.cjs.map → checkIfMultiple-BXbHUCWM.cjs.map} +1 -1
  129. package/dist/{checkIfMultiple-CYp3vADF.js → checkIfMultiple-ChTJk2Tk.js} +5 -5
  130. package/dist/{checkIfMultiple-CYp3vADF.js.map → checkIfMultiple-ChTJk2Tk.js.map} +1 -1
  131. package/dist/{customArea-CaxScFmW.js → customArea-B-dWU0zZ.js} +2 -2
  132. package/dist/{customArea-CaxScFmW.js.map → customArea-B-dWU0zZ.js.map} +1 -1
  133. package/dist/{customArea-BYNyxAkm.cjs → customArea-CK768gCn.cjs} +2 -2
  134. package/dist/{customArea-BYNyxAkm.cjs.map → customArea-CK768gCn.cjs.map} +1 -1
  135. package/dist/{fetchAndParseData-Bcmr659B.js → fetchAndParseData-4gsYTy6_.js} +3 -3
  136. package/dist/fetchAndParseData-4gsYTy6_.js.map +1 -0
  137. package/dist/{fetchAndParseData-DmgQtB9n.cjs → fetchAndParseData-CQyVGCul.cjs} +6 -6
  138. package/dist/fetchAndParseData-CQyVGCul.cjs.map +1 -0
  139. package/dist/fetchAndParseData.cjs +1 -1
  140. package/dist/fetchAndParseData.js +1 -1
  141. package/dist/index-BW8iNx7E.cjs +10 -0
  142. package/dist/index-BW8iNx7E.cjs.map +1 -0
  143. package/dist/index-CNvov0eg.js +122 -0
  144. package/dist/index-CNvov0eg.js.map +1 -0
  145. package/dist/{index-D_n8aamX.cjs → index-CZLvTu6p.cjs} +2 -2
  146. package/dist/{index-D_n8aamX.cjs.map → index-CZLvTu6p.cjs.map} +1 -1
  147. package/dist/{index-n_RI8T0n.js → index-Cdcfp4nk.js} +2 -2
  148. package/dist/{index-n_RI8T0n.js.map → index-Cdcfp4nk.js.map} +1 -1
  149. package/dist/{index-BVnYktl4.js → index-DGAaLNu9.js} +2 -2
  150. package/dist/{index-BVnYktl4.js.map → index-DGAaLNu9.js.map} +1 -1
  151. package/dist/{index-CylX-pWB.cjs → index-DNj994Pv.cjs} +2 -2
  152. package/dist/{index-CylX-pWB.cjs.map → index-DNj994Pv.cjs.map} +1 -1
  153. package/dist/index.cjs +1 -1
  154. package/dist/index.js +3 -3
  155. package/dist/proxy-BHRoeZgd.cjs +2 -0
  156. package/dist/proxy-BHRoeZgd.cjs.map +1 -0
  157. package/dist/{proxy-DJxJg1kD.js → proxy-CkpFesk1.js} +4123 -4075
  158. package/dist/proxy-CkpFesk1.js.map +1 -0
  159. package/dist/style.css +1 -1
  160. package/dist/transformData.cjs +1 -1
  161. package/dist/transformData.js +2 -2
  162. package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs → transformDataForGraphFromFile-B1A0AS-Z.cjs} +2 -2
  163. package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs.map → transformDataForGraphFromFile-B1A0AS-Z.cjs.map} +1 -1
  164. package/dist/{transformDataForGraphFromFile-CA0rw80A.js → transformDataForGraphFromFile-BCjsizvb.js} +2 -2
  165. package/dist/{transformDataForGraphFromFile-CA0rw80A.js.map → transformDataForGraphFromFile-BCjsizvb.js.map} +1 -1
  166. package/dist/{use-in-view-BCmzDU2O.cjs → use-in-view-sQJZ_xDO.cjs} +2 -2
  167. package/dist/use-in-view-sQJZ_xDO.cjs.map +1 -0
  168. package/dist/{use-in-view-BAHrBy6b.js → use-in-view-yS6jzJAp.js} +2 -2
  169. package/dist/use-in-view-yS6jzJAp.js.map +1 -0
  170. package/dist/x-BBpi7a_7-Dz2vKSfu.cjs +27 -0
  171. package/dist/x-BBpi7a_7-Dz2vKSfu.cjs.map +1 -0
  172. package/dist/x-BBpi7a_7-WVdj1j6r.js +106 -0
  173. package/dist/x-BBpi7a_7-WVdj1j6r.js.map +1 -0
  174. package/package.json +50 -51
  175. package/dist/fetchAndParseData-Bcmr659B.js.map +0 -1
  176. package/dist/fetchAndParseData-DmgQtB9n.cjs.map +0 -1
  177. package/dist/index-BxAUvrua.js +0 -120
  178. package/dist/index-BxAUvrua.js.map +0 -1
  179. package/dist/index-DVOJ7vxH.cjs +0 -10
  180. package/dist/index-DVOJ7vxH.cjs.map +0 -1
  181. package/dist/proxy-DJxJg1kD.js.map +0 -1
  182. package/dist/proxy-PQd2AItT.cjs +0 -2
  183. package/dist/proxy-PQd2AItT.cjs.map +0 -1
  184. package/dist/use-in-view-BAHrBy6b.js.map +0 -1
  185. package/dist/use-in-view-BCmzDU2O.cjs.map +0 -1
  186. package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +0 -27
  187. package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +0 -1
  188. package/dist/x-CnsEH4Ox-DDvAJndW.js +0 -101
  189. package/dist/x-CnsEH4Ox-DDvAJndW.js.map +0 -1
@@ -3,7 +3,7 @@ import { u as me } from "./index-CaAIPGZo.js";
3
3
  import { memo as ve, useRef as he, useState as y, useMemo as ce, useEffect as pe, useCallback as T } from "react";
4
4
  import { s as ye } from "./index-D7ltPi18.js";
5
5
  import { o as be } from "./index-BLizQDlg.js";
6
- import { X as Me } from "./Modal-CUU6ZK3U.js";
6
+ import { X as Me } from "./Modal-DVVwpKhP.js";
7
7
  import { y as we } from "./Spinner-C85UF28E.js";
8
8
  import { T as je } from "./Tooltip-DyM5snqx.js";
9
9
  import { n as Ce } from "./numberFormattingFunction-14YCbkN2.js";
@@ -432,4 +432,4 @@ export {
432
432
  tt as C,
433
433
  ie as e
434
434
  };
435
- //# sourceMappingURL=index-BVnYktl4.js.map
435
+ //# sourceMappingURL=index-DGAaLNu9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BVnYktl4.js","sources":["../node_modules/d3-array/src/extent.js","../src/Components/Graphs/CirclePackingGraph/Graph.tsx","../src/Components/Graphs/CirclePackingGraph/index.tsx"],"sourcesContent":["export default function extent(values, valueof) {\n let min;\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n return [min, max];\n}\n","import { memo, useCallback, useMemo, useEffect, useState, useRef } from 'react';\r\nimport { forceCollide, forceManyBody, forceSimulation, forceX, forceY } from 'd3-force';\r\nimport orderBy from 'lodash.orderby';\r\nimport { scaleSqrt } from 'd3-scale';\r\nimport { extent } from 'd3-array';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { ClassNameObject, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n theme: 'light' | 'dark';\r\n maxRadiusValue?: number;\r\n radius: number;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n dimmedOpacity: number;\r\n precision: number;\r\n}\r\n\r\ninterface TreeMapDataTypeForBubbleChart extends TreeMapDataType {\r\n x: number;\r\n y: number;\r\n vx: number;\r\n vy: number;\r\n}\r\n\r\nexport const Graph = memo((props: Props) => {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n selectedColor,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n maxRadiusValue,\r\n radius,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n dimmedOpacity,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [viewPortDimensions, setViewPortDimensions] = useState<\r\n [number, number, number, number] | undefined\r\n >(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const [finalData, setFinalData] = useState<TreeMapDataTypeForBubbleChart[] | null>(null);\r\n\r\n // Memoize expensive calculations\r\n const margin = useMemo(\r\n () => ({\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n }),\r\n [topMargin, bottomMargin, leftMargin, rightMargin],\r\n );\r\n\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n // Memoize data ordering and radius scale\r\n const dataOrdered = useMemo(\r\n () =>\r\n data.filter(d => !checkIfNullOrUndefined(d.size)).length === 0\r\n ? data\r\n : orderBy(\r\n data.filter(d => !checkIfNullOrUndefined(d.size)),\r\n 'radius',\r\n 'asc',\r\n ),\r\n [data],\r\n );\r\n\r\n const radiusScale = useMemo(() => {\r\n return data.filter(d => d.size === undefined || d.size === null).length !== data.length\r\n ? scaleSqrt()\r\n .domain([\r\n 0,\r\n checkIfNullOrUndefined(maxRadiusValue)\r\n ? Math.max(...data.map(d => d.size).filter(d => d !== undefined && d !== null))\r\n : (maxRadiusValue as number),\r\n ])\r\n .range([0.25, radius])\r\n .nice()\r\n : undefined;\r\n }, [data, maxRadiusValue, radius]);\r\n\r\n // Memoize simulation setup\r\n useEffect(() => {\r\n const setupSimulation = () => {\r\n const dataTemp = [...dataOrdered];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const simulation = forceSimulation(dataTemp as any)\r\n .force('y', forceY(_d => graphHeight / 2).strength(1))\r\n .force('x', forceX(_d => graphWidth / 2).strength(1))\r\n .force(\r\n 'collide',\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n forceCollide((d: any) => (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1)),\r\n )\r\n .force('charge', forceManyBody().strength(-15))\r\n .alphaDecay(0.05)\r\n .tick(10000);\r\n\r\n simulation\r\n .on('tick', () => {\r\n setFinalData(dataTemp as TreeMapDataTypeForBubbleChart[]);\r\n })\r\n .on('end', () => {\r\n setFinalData(dataTemp as TreeMapDataTypeForBubbleChart[]);\r\n const xMinExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.x - (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[0] || 0;\r\n const yMinExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.y - (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[0] || 0;\r\n const xMaxExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.x + (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[1] || 0;\r\n const yMaxExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.y + (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[1] || 0;\r\n setViewPortDimensions([\r\n xMinExtent,\r\n yMinExtent,\r\n xMinExtent < 0 ? xMaxExtent - xMinExtent : xMaxExtent,\r\n yMinExtent < 0 ? yMaxExtent - yMinExtent : yMaxExtent,\r\n ]);\r\n });\r\n };\r\n\r\n setupSimulation();\r\n }, [data, radius, graphHeight, graphWidth, maxRadiusValue, dataOrdered, radiusScale]);\r\n\r\n // Memoize event handlers to prevent unnecessary re-renders\r\n const handleMouseEnter = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (event: any, d: any) => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n },\r\n [onSeriesMouseOver],\r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const handleMouseMove = useCallback((event: any, d: any) => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }, []);\r\n\r\n const handleClick = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (mouseClickData === d.label && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d.label);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n },\r\n [onSeriesMouseClick, detailsOnClick, mouseClickData, resetSelectionOnDoubleClick],\r\n );\r\n\r\n const handleMouseLeave = useCallback(() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }, [onSeriesMouseOver]);\r\n\r\n // Memoize color and opacity calculations\r\n const getCircleColor = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n [data, colors, colorDomain],\r\n );\r\n\r\n const getOpacity = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n [selectedColor, dimmedOpacity, colors, colorDomain, highlightedDataPoints],\r\n );\r\n\r\n // Render loading state\r\n if (!finalData) {\r\n return (\r\n <div style={{ width: `${width}px`, height: `${height}px` }}>\r\n <div className='flex m-auto items-center justify-center p-0 leading-none text-base h-40'>\r\n <Spinner />\r\n </div>\r\n </div>\r\n );\r\n }\r\n if (viewPortDimensions) {\r\n return (\r\n <>\r\n <svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`${viewPortDimensions[0] > 0 ? 0 : viewPortDimensions[0]} ${\r\n viewPortDimensions[1] > 0 ? 0 : viewPortDimensions[1]\r\n } ${width < viewPortDimensions[2] ? viewPortDimensions[2] : width} ${\r\n height < viewPortDimensions[3] ? viewPortDimensions[3] : height\r\n }`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {finalData.map(d => {\r\n const circleColor = getCircleColor(d);\r\n const opacity = getOpacity(d);\r\n const bubbleRadius = radiusScale ? radiusScale(d.size || 0) : radius;\r\n const showLabel = bubbleRadius > 20 && (showLabels || showValues);\r\n return (\r\n <g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n opacity={opacity}\r\n transform={`translate(${d.x},${d.y})`}\r\n onMouseEnter={event => handleMouseEnter(event, d)}\r\n onMouseMove={event => handleMouseMove(event, d)}\r\n onClick={() => handleClick(d)}\r\n onMouseLeave={handleMouseLeave}\r\n >\r\n <circle cx={0} cy={0} r={bubbleRadius} fill={circleColor} />\r\n {(showLabel || showValues) && d.size !== undefined && d.size !== null && (\r\n <g>\r\n <foreignObject\r\n y={0 - bubbleRadius}\r\n x={0 - bubbleRadius}\r\n width={2 * bubbleRadius}\r\n height={2 * bubbleRadius}\r\n >\r\n <div className='flex flex-col justify-center items-center h-full py-0 px-3'>\r\n {showLabels && (\r\n <p\r\n className={cn(\r\n 'text-center leading-[1.25] overflow-hidden m-0 circle-packing-label',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n fontSize: `${Math.min(\r\n Math.max(Math.round(bubbleRadius / 4), 12),\r\n Math.max(\r\n Math.round((bubbleRadius * 12) / `${d.label}`.length),\r\n 12,\r\n ),\r\n 14,\r\n )}px`,\r\n WebkitLineClamp:\r\n bubbleRadius * 2 < 60\r\n ? 1\r\n : bubbleRadius * 2 < 75\r\n ? 2\r\n : bubbleRadius * 2 < 100\r\n ? 3\r\n : undefined,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n color: getTextColorBasedOnBgColor(circleColor),\r\n hyphens: 'auto',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {d.label}\r\n </p>\r\n )}\r\n {showValues && (\r\n <p\r\n className='text-center font-bold leading-[1.25] w-full m-0 circle-packing-value'\r\n style={{\r\n fontSize: `${Math.min(\r\n Math.max(Math.round(bubbleRadius / 4), 14),\r\n 14,\r\n )}px`,\r\n color: getTextColorBasedOnBgColor(circleColor),\r\n }}\r\n >\r\n {numberFormattingFunction(d.size, 'NA', precision, prefix, suffix)}\r\n </p>\r\n )}\r\n </div>\r\n </foreignObject>\r\n </g>\r\n )}\r\n </g>\r\n );\r\n })}\r\n </g>\r\n </svg>\r\n {mouseOverData && tooltip && eventX && eventY && (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n )}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n }\r\n return null;\r\n});\r\n\r\nGraph.displayName = 'BubbleChart';\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport sum from 'lodash.sum';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { Languages, SourcesDataType, StyleObject, ClassNameObject, TreeMapDataType } from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function CirclePackingGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n radius,\r\n maxRadiusValue,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a chart where data points are represented by circles, and their sizes reflect their values.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={\r\n showNAColor === undefined || showNAColor === null ? true : showNAColor\r\n }\r\n isCenter\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={\r\n showValues !== false\r\n ? data.filter(el => el.size).length !== 0\r\n : (showValues as boolean)\r\n }\r\n selectedColor={selectedColor}\r\n suffix={suffix}\r\n prefix={prefix}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n theme={theme}\r\n radius={\r\n !radius\r\n ? (Math.min(\r\n width || svgWidth,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n ) *\r\n (data.filter(d => !checkIfNullOrUndefined(d.size)).length === 0\r\n ? 1\r\n : Math.max(\r\n ...data\r\n .map(d => d.size)\r\n .filter(d => d !== undefined && d !== null),\r\n ))) /\r\n (data.filter(d => !checkIfNullOrUndefined(d.size)).length === 0\r\n ? data.length\r\n : sum(data.filter(d => d.size).map(d => d.size)) * 1.25)\r\n : radius\r\n }\r\n maxRadiusValue={maxRadiusValue}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["extent","values","valueof","min","max","value","index","Graph","memo","props","data","colors","leftMargin","width","height","colorDomain","selectedColor","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","maxRadiusValue","radius","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","dimmedOpacity","precision","svgRef","useRef","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","viewPortDimensions","setViewPortDimensions","eventX","setEventX","eventY","setEventY","finalData","setFinalData","margin","useMemo","graphWidth","graphHeight","dataOrdered","d","checkIfNullOrUndefined","orderBy","radiusScale","scaleSqrt","useEffect","dataTemp","forceSimulation","forceY","_d","forceX","forceCollide","forceManyBody","xMinExtent","yMinExtent","xMaxExtent","yMaxExtent","handleMouseEnter","useCallback","event","handleMouseMove","handleClick","handleMouseLeave","getCircleColor","el","Colors","getOpacity","jsxs","Fragment","jsx","circleColor","opacity","bubbleRadius","showLabel","cn","getTextColorBasedOnBgColor","Tooltip","Modal","string2HTML","Spinner","CirclePackingGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","language","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","resizeObserver","entries","GraphHeader","EmptyState","ColorLegendWithMouseOver","uniqBy","sum","GraphFooter"],"mappings":";;;;;;;;;;;;;;;;;;;AAAe,SAASA,GAAOC,GAAQC,GAAS;AAC9C,MAAIC,GACAC;AACJ,MAAIF,MAAY;AACd,eAAWG,KAASJ;AAClB,MAAII,KAAS,SACPF,MAAQ,SACNE,KAASA,MAAOF,IAAMC,IAAMC,MAE5BF,IAAME,MAAOF,IAAME,IACnBD,IAAMC,MAAOD,IAAMC;AAAA,OAIxB;AACL,QAAIC,IAAQ;AACZ,aAASD,KAASJ;AAChB,OAAKI,IAAQH,EAAQG,GAAO,EAAEC,GAAOL,CAAM,MAAM,SAC3CE,MAAQ,SACNE,KAASA,MAAOF,IAAMC,IAAMC,MAE5BF,IAAME,MAAOF,IAAME,IACnBD,IAAMC,MAAOD,IAAMC;AAAA,EAI/B;AACA,SAAO,CAACF,GAAKC,CAAG;AAClB;AC8BO,MAAMG,KAAQC,GAAK,CAACC,MAAiB;AAC1C,QAAM;AAAA,IACJ,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,IACE1B,GACE2B,KAASC,GAAO,IAAI,GAGpB,CAACC,GAAeC,CAAgB,IAAIC,EAAc,MAAS,GAE3D,CAACC,GAAgBC,CAAiB,IA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,gBAAAA,EAAAA;AAAAA,kBAAC2C;AAAA,kBAAA;AAAA,oBACC,QAAQ,EAAE,UAAUhG,GAAQ,UAAU,QAAQA,GAAQ,OAAA;AAAA,oBACtD,YAAY;AAAA,sBACV,UAAUC,GAAY;AAAA,sBACtB,QAAQA,GAAY;AAAA,oBAAA;AAAA,oBAEtB,SAAAiE;AAAA,oBACA,UAAAE;AAAA,oBACA,OAAAvF;AAAA,kBAAA;AAAA,gBAAA,IAEA;AAAA,cAAA,EAAA,CACN;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-DGAaLNu9.js","sources":["../node_modules/d3-array/src/extent.js","../src/Components/Graphs/CirclePackingGraph/Graph.tsx","../src/Components/Graphs/CirclePackingGraph/index.tsx"],"sourcesContent":["export default function extent(values, valueof) {\n let min;\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n return [min, max];\n}\n","import { memo, useCallback, useMemo, useEffect, useState, useRef } from 'react';\r\nimport { forceCollide, forceManyBody, forceSimulation, forceX, forceY } from 'd3-force';\r\nimport orderBy from 'lodash.orderby';\r\nimport { scaleSqrt } from 'd3-scale';\r\nimport { extent } from 'd3-array';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { ClassNameObject, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n theme: 'light' | 'dark';\r\n maxRadiusValue?: number;\r\n radius: number;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n dimmedOpacity: number;\r\n precision: number;\r\n}\r\n\r\ninterface TreeMapDataTypeForBubbleChart extends TreeMapDataType {\r\n x: number;\r\n y: number;\r\n vx: number;\r\n vy: number;\r\n}\r\n\r\nexport const Graph = memo((props: Props) => {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n selectedColor,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n maxRadiusValue,\r\n radius,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n dimmedOpacity,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [viewPortDimensions, setViewPortDimensions] = useState<\r\n [number, number, number, number] | undefined\r\n >(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const [finalData, setFinalData] = useState<TreeMapDataTypeForBubbleChart[] | null>(null);\r\n\r\n // Memoize expensive calculations\r\n const margin = useMemo(\r\n () => ({\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n }),\r\n [topMargin, bottomMargin, leftMargin, rightMargin],\r\n );\r\n\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n // Memoize data ordering and radius scale\r\n const dataOrdered = useMemo(\r\n () =>\r\n data.filter(d => !checkIfNullOrUndefined(d.size)).length === 0\r\n ? data\r\n : orderBy(\r\n data.filter(d => !checkIfNullOrUndefined(d.size)),\r\n 'radius',\r\n 'asc',\r\n ),\r\n [data],\r\n );\r\n\r\n const radiusScale = useMemo(() => {\r\n return data.filter(d => d.size === undefined || d.size === null).length !== data.length\r\n ? scaleSqrt()\r\n .domain([\r\n 0,\r\n checkIfNullOrUndefined(maxRadiusValue)\r\n ? Math.max(...data.map(d => d.size).filter(d => d !== undefined && d !== null))\r\n : (maxRadiusValue as number),\r\n ])\r\n .range([0.25, radius])\r\n .nice()\r\n : undefined;\r\n }, [data, maxRadiusValue, radius]);\r\n\r\n // Memoize simulation setup\r\n useEffect(() => {\r\n const setupSimulation = () => {\r\n const dataTemp = [...dataOrdered];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const simulation = forceSimulation(dataTemp as any)\r\n .force('y', forceY(_d => graphHeight / 2).strength(1))\r\n .force('x', forceX(_d => graphWidth / 2).strength(1))\r\n .force(\r\n 'collide',\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n forceCollide((d: any) => (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1)),\r\n )\r\n .force('charge', forceManyBody().strength(-15))\r\n .alphaDecay(0.05)\r\n .tick(10000);\r\n\r\n simulation\r\n .on('tick', () => {\r\n setFinalData(dataTemp as TreeMapDataTypeForBubbleChart[]);\r\n })\r\n .on('end', () => {\r\n setFinalData(dataTemp as TreeMapDataTypeForBubbleChart[]);\r\n const xMinExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.x - (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[0] || 0;\r\n const yMinExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.y - (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[0] || 0;\r\n const xMaxExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.x + (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[1] || 0;\r\n const yMaxExtent =\r\n extent(\r\n dataTemp as TreeMapDataTypeForBubbleChart[],\r\n d => d.y + (radiusScale ? radiusScale(d.size || 0) + 1 : radius + 1),\r\n )[1] || 0;\r\n setViewPortDimensions([\r\n xMinExtent,\r\n yMinExtent,\r\n xMinExtent < 0 ? xMaxExtent - xMinExtent : xMaxExtent,\r\n yMinExtent < 0 ? yMaxExtent - yMinExtent : yMaxExtent,\r\n ]);\r\n });\r\n };\r\n\r\n setupSimulation();\r\n }, [data, radius, graphHeight, graphWidth, maxRadiusValue, dataOrdered, radiusScale]);\r\n\r\n // Memoize event handlers to prevent unnecessary re-renders\r\n const handleMouseEnter = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (event: any, d: any) => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n },\r\n [onSeriesMouseOver],\r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const handleMouseMove = useCallback((event: any, d: any) => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }, []);\r\n\r\n const handleClick = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (mouseClickData === d.label && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d.label);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n },\r\n [onSeriesMouseClick, detailsOnClick, mouseClickData, resetSelectionOnDoubleClick],\r\n );\r\n\r\n const handleMouseLeave = useCallback(() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }, [onSeriesMouseOver]);\r\n\r\n // Memoize color and opacity calculations\r\n const getCircleColor = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n [data, colors, colorDomain],\r\n );\r\n\r\n const getOpacity = useCallback(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n [selectedColor, dimmedOpacity, colors, colorDomain, highlightedDataPoints],\r\n );\r\n\r\n // Render loading state\r\n if (!finalData) {\r\n return (\r\n <div style={{ width: `${width}px`, height: `${height}px` }}>\r\n <div className='flex m-auto items-center justify-center p-0 leading-none text-base h-40'>\r\n <Spinner />\r\n </div>\r\n </div>\r\n );\r\n }\r\n if (viewPortDimensions) {\r\n return (\r\n <>\r\n <svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`${viewPortDimensions[0] > 0 ? 0 : viewPortDimensions[0]} ${\r\n viewPortDimensions[1] > 0 ? 0 : viewPortDimensions[1]\r\n } ${width < viewPortDimensions[2] ? viewPortDimensions[2] : width} ${\r\n height < viewPortDimensions[3] ? viewPortDimensions[3] : height\r\n }`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {finalData.map(d => {\r\n const circleColor = getCircleColor(d);\r\n const opacity = getOpacity(d);\r\n const bubbleRadius = radiusScale ? radiusScale(d.size || 0) : radius;\r\n const showLabel = bubbleRadius > 20 && (showLabels || showValues);\r\n return (\r\n <g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n opacity={opacity}\r\n transform={`translate(${d.x},${d.y})`}\r\n onMouseEnter={event => handleMouseEnter(event, d)}\r\n onMouseMove={event => handleMouseMove(event, d)}\r\n onClick={() => handleClick(d)}\r\n onMouseLeave={handleMouseLeave}\r\n >\r\n <circle cx={0} cy={0} r={bubbleRadius} fill={circleColor} />\r\n {(showLabel || showValues) && d.size !== undefined && d.size !== null && (\r\n <g>\r\n <foreignObject\r\n y={0 - bubbleRadius}\r\n x={0 - bubbleRadius}\r\n width={2 * bubbleRadius}\r\n height={2 * bubbleRadius}\r\n >\r\n <div className='flex flex-col justify-center items-center h-full py-0 px-3'>\r\n {showLabels && (\r\n <p\r\n className={cn(\r\n 'text-center leading-[1.25] overflow-hidden m-0 circle-packing-label',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n fontSize: `${Math.min(\r\n Math.max(Math.round(bubbleRadius / 4), 12),\r\n Math.max(\r\n Math.round((bubbleRadius * 12) / `${d.label}`.length),\r\n 12,\r\n ),\r\n 14,\r\n )}px`,\r\n WebkitLineClamp:\r\n bubbleRadius * 2 < 60\r\n ? 1\r\n : bubbleRadius * 2 < 75\r\n ? 2\r\n : bubbleRadius * 2 < 100\r\n ? 3\r\n : undefined,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n color: getTextColorBasedOnBgColor(circleColor),\r\n hyphens: 'auto',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {d.label}\r\n </p>\r\n )}\r\n {showValues && (\r\n <p\r\n className='text-center font-bold leading-[1.25] w-full m-0 circle-packing-value'\r\n style={{\r\n fontSize: `${Math.min(\r\n Math.max(Math.round(bubbleRadius / 4), 14),\r\n 14,\r\n )}px`,\r\n color: getTextColorBasedOnBgColor(circleColor),\r\n }}\r\n >\r\n {numberFormattingFunction(d.size, 'NA', precision, prefix, suffix)}\r\n </p>\r\n )}\r\n </div>\r\n </foreignObject>\r\n </g>\r\n )}\r\n </g>\r\n );\r\n })}\r\n </g>\r\n </svg>\r\n {mouseOverData && tooltip && eventX && eventY && (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n )}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n }\r\n return null;\r\n});\r\n\r\nGraph.displayName = 'BubbleChart';\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport sum from 'lodash.sum';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { Languages, SourcesDataType, StyleObject, ClassNameObject, TreeMapDataType } from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function CirclePackingGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n radius,\r\n maxRadiusValue,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a chart where data points are represented by circles, and their sizes reflect their values.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={\r\n showNAColor === undefined || showNAColor === null ? true : showNAColor\r\n }\r\n isCenter\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={\r\n showValues !== false\r\n ? data.filter(el => el.size).length !== 0\r\n : (showValues as boolean)\r\n }\r\n selectedColor={selectedColor}\r\n suffix={suffix}\r\n prefix={prefix}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n theme={theme}\r\n radius={\r\n !radius\r\n ? (Math.min(\r\n width || svgWidth,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n ) *\r\n (data.filter(d => !checkIfNullOrUndefined(d.size)).length === 0\r\n ? 1\r\n : Math.max(\r\n ...data\r\n .map(d => d.size)\r\n .filter(d => d !== undefined && d !== null),\r\n ))) /\r\n (data.filter(d => !checkIfNullOrUndefined(d.size)).length === 0\r\n ? data.length\r\n : sum(data.filter(d => d.size).map(d => d.size)) * 1.25)\r\n : radius\r\n }\r\n maxRadiusValue={maxRadiusValue}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["extent","values","valueof","min","max","value","index","Graph","memo","props","data","colors","leftMargin","width","height","colorDomain","selectedColor","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","maxRadiusValue","radius","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","dimmedOpacity","precision","svgRef","useRef","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","viewPortDimensions","setViewPortDimensions","eventX","setEventX","eventY","setEventY","finalData","setFinalData","margin","useMemo","graphWidth","graphHeight","dataOrdered","d","checkIfNullOrUndefined","orderBy","radiusScale","scaleSqrt","useEffect","dataTemp","forceSimulation","forceY","_d","forceX","forceCollide","forceManyBody","xMinExtent","yMinExtent","xMaxExtent","yMaxExtent","handleMouseEnter","useCallback","event","handleMouseMove","handleClick","handleMouseLeave","getCircleColor","el","Colors","getOpacity","jsxs","Fragment","jsx","circleColor","opacity","bubbleRadius","showLabel","cn","getTextColorBasedOnBgColor","Tooltip","Modal","string2HTML","Spinner","CirclePackingGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","language","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","resizeObserver","entries","GraphHeader","EmptyState","ColorLegendWithMouseOver","uniqBy","sum","GraphFooter"],"mappings":";;;;;;;;;;;;;;;;;;;AAAe,SAASA,GAAOC,GAAQC,GAAS;AAC9C,MAAIC,GACAC;AACJ,MAAIF,MAAY;AACd,eAAWG,KAASJ;AAClB,MAAII,KAAS,SACPF,MAAQ,SACNE,KAASA,MAAOF,IAAMC,IAAMC,MAE5BF,IAAME,MAAOF,IAAME,IACnBD,IAAMC,MAAOD,IAAMC;AAAA,OAIxB;AACL,QAAIC,IAAQ;AACZ,aAASD,KAASJ;AAChB,OAAKI,IAAQH,EAAQG,GAAO,EAAEC,GAAOL,CAAM,MAAM,SAC3CE,MAAQ,SACNE,KAASA,MAAOF,IAAMC,IAAMC,MAE5BF,IAAME,MAAOF,IAAME,IACnBD,IAAMC,MAAOD,IAAMC;AAAA,EAI/B;AACA,SAAO,CAACF,GAAKC,CAAG;AAClB;AC8BO,MAAMG,KAAQC,GAAK,CAACC,MAAiB;AAC1C,QAAM;AAAA,IACJ,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA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K,CAACC,EAAuBD,EAAE,IAAI,CAAC,EAAE,WAAW,IAC1D9C,EAAK,SACLqH,GAAIrH,EAAK,OAAO,CAAA8C,MAAKA,EAAE,IAAI,EAAE,IAAI,CAAAA,MAAKA,EAAE,IAAI,CAAC,IAAI;AAAA,0BAG3D,gBAAA5B;AAAA,0BACA,6BAAAE;AAAA,0BACA,gBAAAC;AAAA,0BACA,QAAAC;AAAA,0BACA,YAAAC;AAAA,0BACA,eAAAC;AAAA,0BACA,WAAAC;AAAA,wBAAA;AAAA,sBAAA,IAEA;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACN,EAAA,CACF,EAAA,CAEJ;AAAA,gBACC+D,KAAWE,IACVf,gBAAAA,EAAAA;AAAAA,kBAAC2C;AAAA,kBAAA;AAAA,oBACC,QAAQ,EAAE,UAAUhG,GAAQ,UAAU,QAAQA,GAAQ,OAAA;AAAA,oBACtD,YAAY;AAAA,sBACV,UAAUC,GAAY;AAAA,sBACtB,QAAQA,GAAY;AAAA,oBAAA;AAAA,oBAEtB,SAAAiE;AAAA,oBACA,UAAAE;AAAA,oBACA,OAAAvF;AAAA,kBAAA;AAAA,gBAAA,IAEA;AAAA,cAAA,EAAA,CACN;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index-CHPV5EwG-DDoeWRVt.cjs"),x=require("./Colors.cjs"),r=require("./proxy-PQd2AItT.cjs");function m(c){const{areaSettings:l,width:h,height:s,scale:o,animate:e,isInView:a}=c;return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:l.map((t,i)=>n.jsxRuntimeExports.jsx(r.motion.g,{children:t.coordinates[0]===null&&t.coordinates[1]===null?null:n.jsxRuntimeExports.jsx(r.motion.g,{children:n.jsxRuntimeExports.jsx(r.motion.rect,{style:{fill:t.color||x.Colors.light.grays["gray-300"],strokeWidth:t.strokeWidth,...t.style||{}},className:t.className,y:0,height:s,variants:{initial:{width:0,x:t.coordinates[0]?o(t.coordinates[0]):0,opacity:1},whileInView:{width:t.coordinates[1]?o(t.coordinates[1])-(t.coordinates[0]?o(t.coordinates[0]):0):h-(t.coordinates[0]?o(t.coordinates[0]):0),x:t.coordinates[0]?o(t.coordinates[0]):0,opacity:1,transition:{duration:e.duration}}},initial:"initial",animate:a?"whileInView":"initial",exit:{opacity:0,width:0,transition:{duration:e.duration}}})})},i))})}function d(c){const{areaSettings:l,width:h,height:s,scaleX:o,scaleY:e,animate:a,isInView:t}=c;return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:l.map((i,u)=>n.jsxRuntimeExports.jsx(r.motion.g,{children:i.coordinates.filter(g=>g===null).length===4?null:n.jsxRuntimeExports.jsx(r.motion.g,{children:n.jsxRuntimeExports.jsx(r.motion.rect,{style:{fill:i.color||x.Colors.light.grays["gray-300"],strokeWidth:i.strokeWidth,...i.style||{}},className:i.className,variants:{initial:{x:i.coordinates[0]?o(i.coordinates[0]):0,width:0,y:i.coordinates[3]?e(i.coordinates[3]):0,height:0},whileInView:{x:i.coordinates[0]?o(i.coordinates[0]):0,width:i.coordinates[1]?o(i.coordinates[1])-(i.coordinates[0]?o(i.coordinates[0]):0):h-(i.coordinates[0]?o(i.coordinates[0]):0),y:i.coordinates[3]?e(i.coordinates[3]):0,height:i.coordinates[2]!==null?e(i.coordinates[2])-(i.coordinates[3]?e(i.coordinates[3]):0):s-(i.coordinates[3]?s-e(i.coordinates[3]):0),transition:{duration:a.duration}}},initial:"initial",animate:t?"whileInView":"initial",exit:{opacity:0,width:0,height:0,transition:{duration:a.duration}}})})},`${u}`))})}exports.HighlightArea=m;exports.HighlightAreaForScatterPlot=d;
2
- //# sourceMappingURL=index-CylX-pWB.cjs.map
1
+ "use strict";const n=require("./index-CHPV5EwG-DDoeWRVt.cjs"),x=require("./Colors.cjs"),r=require("./proxy-BHRoeZgd.cjs");function m(c){const{areaSettings:l,width:h,height:s,scale:o,animate:e,isInView:a}=c;return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:l.map((t,i)=>n.jsxRuntimeExports.jsx(r.motion.g,{children:t.coordinates[0]===null&&t.coordinates[1]===null?null:n.jsxRuntimeExports.jsx(r.motion.g,{children:n.jsxRuntimeExports.jsx(r.motion.rect,{style:{fill:t.color||x.Colors.light.grays["gray-300"],strokeWidth:t.strokeWidth,...t.style||{}},className:t.className,y:0,height:s,variants:{initial:{width:0,x:t.coordinates[0]?o(t.coordinates[0]):0,opacity:1},whileInView:{width:t.coordinates[1]?o(t.coordinates[1])-(t.coordinates[0]?o(t.coordinates[0]):0):h-(t.coordinates[0]?o(t.coordinates[0]):0),x:t.coordinates[0]?o(t.coordinates[0]):0,opacity:1,transition:{duration:e.duration}}},initial:"initial",animate:a?"whileInView":"initial",exit:{opacity:0,width:0,transition:{duration:e.duration}}})})},i))})}function d(c){const{areaSettings:l,width:h,height:s,scaleX:o,scaleY:e,animate:a,isInView:t}=c;return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:l.map((i,u)=>n.jsxRuntimeExports.jsx(r.motion.g,{children:i.coordinates.filter(g=>g===null).length===4?null:n.jsxRuntimeExports.jsx(r.motion.g,{children:n.jsxRuntimeExports.jsx(r.motion.rect,{style:{fill:i.color||x.Colors.light.grays["gray-300"],strokeWidth:i.strokeWidth,...i.style||{}},className:i.className,variants:{initial:{x:i.coordinates[0]?o(i.coordinates[0]):0,width:0,y:i.coordinates[3]?e(i.coordinates[3]):0,height:0},whileInView:{x:i.coordinates[0]?o(i.coordinates[0]):0,width:i.coordinates[1]?o(i.coordinates[1])-(i.coordinates[0]?o(i.coordinates[0]):0):h-(i.coordinates[0]?o(i.coordinates[0]):0),y:i.coordinates[3]?e(i.coordinates[3]):0,height:i.coordinates[2]!==null?e(i.coordinates[2])-(i.coordinates[3]?e(i.coordinates[3]):0):s-(i.coordinates[3]?s-e(i.coordinates[3]):0),transition:{duration:a.duration}}},initial:"initial",animate:t?"whileInView":"initial",exit:{opacity:0,width:0,height:0,transition:{duration:a.duration}}})})},`${u}`))})}exports.HighlightArea=m;exports.HighlightAreaForScatterPlot=d;
2
+ //# sourceMappingURL=index-DNj994Pv.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CylX-pWB.cjs","sources":["../src/Components/Elements/HighlightArea/index.tsx"],"sourcesContent":["import { NumberValue } from 'd3-scale';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n areaSettings: {\r\n coordinates: (Date | null | number)[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n color?: string;\r\n strokeWidth?: number;\r\n }[];\r\n width: number;\r\n height: number;\r\n scale: (value: Date | NumberValue) => number;\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function HighlightArea(props: Props) {\r\n const { areaSettings, width, height, scale, animate, isInView } = props;\r\n return (\r\n <>\r\n {areaSettings.map((d, i) => (\r\n <motion.g key={i}>\r\n {d.coordinates[0] === null && d.coordinates[1] === null ? null : (\r\n <motion.g>\r\n <motion.rect\r\n style={{\r\n fill: d.color || Colors.light.grays['gray-300'],\r\n strokeWidth: d.strokeWidth,\r\n ...(d.style || {}),\r\n }}\r\n className={d.className}\r\n y={0}\r\n height={height}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n x: d.coordinates[0] ? scale(d.coordinates[0]) : 0,\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n width: d.coordinates[1]\r\n ? scale(d.coordinates[1]) - (d.coordinates[0] ? scale(d.coordinates[0]) : 0)\r\n : width - (d.coordinates[0] ? scale(d.coordinates[0]) : 0),\r\n x: d.coordinates[0] ? scale(d.coordinates[0]) : 0,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, width: 0, transition: { duration: animate.duration } }}\r\n />\r\n </motion.g>\r\n )}\r\n </motion.g>\r\n ))}\r\n </>\r\n );\r\n}\r\n\r\ninterface ScatterPlotProps {\r\n areaSettings: {\r\n coordinates: (Date | null | number)[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n color?: string;\r\n strokeWidth?: number;\r\n }[];\r\n width: number;\r\n height: number;\r\n scaleX: (value: Date | NumberValue) => number;\r\n scaleY: (value: Date | NumberValue) => number;\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function HighlightAreaForScatterPlot(props: ScatterPlotProps) {\r\n const { areaSettings, width, height, scaleX, scaleY, animate, isInView } = props;\r\n return (\r\n <>\r\n {areaSettings.map((d, i) => (\r\n <motion.g key={`${i}`}>\r\n {d.coordinates.filter(el => el === null).length === 4 ? null : (\r\n <motion.g>\r\n <motion.rect\r\n style={{\r\n fill: d.color || Colors.light.grays['gray-300'],\r\n strokeWidth: d.strokeWidth,\r\n ...(d.style || {}),\r\n }}\r\n className={d.className}\r\n variants={{\r\n initial: {\r\n x: d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0,\r\n width: 0,\r\n y: d.coordinates[3] ? scaleY(d.coordinates[3] as number) : 0,\r\n height: 0,\r\n },\r\n whileInView: {\r\n x: d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0,\r\n width: d.coordinates[1]\r\n ? scaleX(d.coordinates[1] as number) -\r\n (d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0)\r\n : width - (d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0),\r\n y: d.coordinates[3] ? scaleY(d.coordinates[3] as number) : 0,\r\n height:\r\n d.coordinates[2] !== null\r\n ? scaleY(d.coordinates[2] as number) -\r\n (d.coordinates[3] ? scaleY(d.coordinates[3] as number) : 0)\r\n : height -\r\n (d.coordinates[3] ? height - scaleY(d.coordinates[3] as number) : 0),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n width: 0,\r\n height: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n />\r\n </motion.g>\r\n )}\r\n </motion.g>\r\n ))}\r\n </>\r\n );\r\n}\r\n"],"names":["HighlightArea","props","areaSettings","width","height","scale","animate","isInView","jsx","Fragment","d","motion","Colors","HighlightAreaForScatterPlot","scaleX","scaleY","i","el"],"mappings":"0HAqBO,SAASA,EAAcC,EAAc,CAC1C,KAAM,CAAE,aAAAC,EAAc,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,QAAAC,EAAS,SAAAC,GAAaN,EAClE,OACEO,EAAAA,kBAAAA,IAAAC,EAAAA,kBAAAA,SAAA,CACG,SAAAP,EAAa,IAAI,CAACQ,EAAG,IACpBF,EAAAA,kBAAAA,IAACG,EAAAA,OAAO,EAAP,CACE,SAAAD,EAAE,YAAY,CAAC,IAAM,MAAQA,EAAE,YAAY,CAAC,IAAM,KAAO,KACxDF,EAAAA,kBAAAA,IAACG,EAAAA,OAAO,EAAP,CACC,SAAAH,EAAAA,kBAAAA,IAACG,EAAAA,OAAO,KAAP,CACC,MAAO,CACL,KAAMD,EAAE,OAASE,EAAAA,OAAO,MAAM,MAAM,UAAU,EAC9C,YAAaF,EAAE,YACf,GAAIA,EAAE,OAAS,CAAA,CAAC,EAElB,UAAWA,EAAE,UACb,EAAG,EACH,OAAAN,EACA,SAAU,CACR,QAAS,CACP,MAAO,EACP,EAAGM,EAAE,YAAY,CAAC,EAAIL,EAAMK,EAAE,YAAY,CAAC,CAAC,EAAI,EAChD,QAAS,CAAA,EAEX,YAAa,CACX,MAAOA,EAAE,YAAY,CAAC,EAClBL,EAAMK,EAAE,YAAY,CAAC,CAAC,GAAKA,EAAE,YAAY,CAAC,EAAIL,EAAMK,EAAE,YAAY,CAAC,CAAC,EAAI,GACxEP,GAASO,EAAE,YAAY,CAAC,EAAIL,EAAMK,EAAE,YAAY,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AOA,EAAE,YAAY,CAAC,EAClBI,EAAOJ,EAAE,YAAY,CAAC,CAAW,GAChCA,EAAE,YAAY,CAAC,EAAII,EAAOJ,EAAE,YAAY,CAAC,CAAW,EAAI,GACzDP,GAASO,EAAE,YAAY,CAAC,EAAII,EAAOJ,EAAE,YAAY,CAAC,CAAW,EAAI,GACrE,EAAGA,EAAE,YAAY,CAAC,EAAIK,EAAOL,EAAE,YAAY,CAAC,CAAW,EAAI,EAC3D,OACEA,EAAE,YAAY,CAAC,IAAM,KACjBK,EAAOL,EAAE,YAAY,CAAC,CAAW,GAChCA,EAAE,YAAY,CAAC,EAAIK,EAAOL,EAAE,YAAY,CAAC,CAAW,EAAI,GACzDN,GACCM,EAAE,YAAY,CAAC,EAAIN,EAASW,EAAOL,EAAE,YAAY,CAAC,CAAW,EAAI,GACxE,WAAY,CAAE,SAAUJ,EAAQ,QAAA,CAAS,CAC3C,EAEF,QAAQ,UACR,QAASC,EAAW,cAAgB,UACpC,KAAM,CACJ,QAAS,EACT,MAAO,EACP,OAAQ,EACR,WAAY,CAAE,SAAUD,EAAQ,QAAA,CAAS,CAC3C,CAAA,EAEJ,CAAA,EA1CW,GAAGU,CAAC,EA4CnB,CACD,CAAA,CACH,CAEJ"}
1
+ {"version":3,"file":"index-DNj994Pv.cjs","sources":["../src/Components/Elements/HighlightArea/index.tsx"],"sourcesContent":["import { NumberValue } from 'd3-scale';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n areaSettings: {\r\n coordinates: (Date | null | number)[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n color?: string;\r\n strokeWidth?: number;\r\n }[];\r\n width: number;\r\n height: number;\r\n scale: (value: Date | NumberValue) => number;\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function HighlightArea(props: Props) {\r\n const { areaSettings, width, height, scale, animate, isInView } = props;\r\n return (\r\n <>\r\n {areaSettings.map((d, i) => (\r\n <motion.g key={i}>\r\n {d.coordinates[0] === null && d.coordinates[1] === null ? null : (\r\n <motion.g>\r\n <motion.rect\r\n style={{\r\n fill: d.color || Colors.light.grays['gray-300'],\r\n strokeWidth: d.strokeWidth,\r\n ...(d.style || {}),\r\n }}\r\n className={d.className}\r\n y={0}\r\n height={height}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n x: d.coordinates[0] ? scale(d.coordinates[0]) : 0,\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n width: d.coordinates[1]\r\n ? scale(d.coordinates[1]) - (d.coordinates[0] ? scale(d.coordinates[0]) : 0)\r\n : width - (d.coordinates[0] ? scale(d.coordinates[0]) : 0),\r\n x: d.coordinates[0] ? scale(d.coordinates[0]) : 0,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, width: 0, transition: { duration: animate.duration } }}\r\n />\r\n </motion.g>\r\n )}\r\n </motion.g>\r\n ))}\r\n </>\r\n );\r\n}\r\n\r\ninterface ScatterPlotProps {\r\n areaSettings: {\r\n coordinates: (Date | null | number)[];\r\n style?: React.CSSProperties;\r\n className?: string;\r\n color?: string;\r\n strokeWidth?: number;\r\n }[];\r\n width: number;\r\n height: number;\r\n scaleX: (value: Date | NumberValue) => number;\r\n scaleY: (value: Date | NumberValue) => number;\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function HighlightAreaForScatterPlot(props: ScatterPlotProps) {\r\n const { areaSettings, width, height, scaleX, scaleY, animate, isInView } = props;\r\n return (\r\n <>\r\n {areaSettings.map((d, i) => (\r\n <motion.g key={`${i}`}>\r\n {d.coordinates.filter(el => el === null).length === 4 ? null : (\r\n <motion.g>\r\n <motion.rect\r\n style={{\r\n fill: d.color || Colors.light.grays['gray-300'],\r\n strokeWidth: d.strokeWidth,\r\n ...(d.style || {}),\r\n }}\r\n className={d.className}\r\n variants={{\r\n initial: {\r\n x: d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0,\r\n width: 0,\r\n y: d.coordinates[3] ? scaleY(d.coordinates[3] as number) : 0,\r\n height: 0,\r\n },\r\n whileInView: {\r\n x: d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0,\r\n width: d.coordinates[1]\r\n ? scaleX(d.coordinates[1] as number) -\r\n (d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0)\r\n : width - (d.coordinates[0] ? scaleX(d.coordinates[0] as number) : 0),\r\n y: d.coordinates[3] ? scaleY(d.coordinates[3] as number) : 0,\r\n height:\r\n d.coordinates[2] !== null\r\n ? scaleY(d.coordinates[2] as number) -\r\n (d.coordinates[3] ? scaleY(d.coordinates[3] as number) : 0)\r\n : height -\r\n (d.coordinates[3] ? height - scaleY(d.coordinates[3] as number) : 0),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n width: 0,\r\n height: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n />\r\n </motion.g>\r\n )}\r\n </motion.g>\r\n ))}\r\n </>\r\n );\r\n}\r\n"],"names":["HighlightArea","props","areaSettings","width","height","scale","animate","isInView","jsx","Fragment","d","motion","Colors","HighlightAreaForScatterPlot","scaleX","scaleY","i","el"],"mappings":"0HAqBO,SAASA,EAAcC,EAAc,CAC1C,KAAM,CAAE,aAAAC,EAAc,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,QAAAC,EAAS,SAAAC,GAAaN,EAClE,OACEO,EAAAA,kBAAAA,IAAAC,EAAAA,kBAAAA,SAAA,CACG,SAAAP,EAAa,IAAI,CAACQ,EAAG,IACpBF,EAAAA,kBAAAA,IAACG,EAAAA,OAAO,EAAP,CACE,SAAAD,EAAE,YAAY,CAAC,IAAM,MAAQA,EAAE,YAAY,CAAC,IAAM,KAAO,KACxDF,EAAAA,k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EACR,WAAY,CAAE,SAAUD,EAAQ,QAAA,CAAS,CAC3C,CAAA,EAEJ,CAAA,EA1CW,GAAGU,CAAC,EA4CnB,CACD,CAAA,CACH,CAEJ"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./BarGraph.cjs"),i=require("./index-D_n8aamX.cjs"),h=require("./DonutChart.cjs"),s=require("./DumbbellChart.cjs"),l=require("./BeeSwarmChart.cjs"),c=require("./DualAxisLineChart.cjs"),u=require("./LineChartWithConfidenceInterval.cjs"),d=require("./SimpleLineChart.cjs"),p=require("./MultiLineChart.cjs"),g=require("./MultiLineAltChart.cjs"),m=require("./DifferenceLineChart.cjs"),C=require("./SparkLine.cjs"),S=require("./BiVariateChoroplethMap.cjs"),D=require("./ChoroplethMap.cjs"),G=require("./DotDensityMap.cjs"),q=require("./ThreeDGlobe.cjs"),f=require("./GeoHubMap.cjs"),b=require("./GeoHubCompareMaps.cjs"),F=require("./GeoHubMapWithLayerSelection.cjs"),M=require("./ScatterPlot.cjs"),L=require("./SlopeChart.cjs"),B=require("./BulletChart.cjs"),T=require("./AreaChart.cjs"),v=require("./BasicStatCard.cjs"),P=require("./StatCardFromData.cjs"),y=require("./TreeMapGraph.cjs"),A=require("./UnitChart.cjs"),H=require("./HeatMap.cjs"),O=require("./DataTable.cjs"),w=require("./DataCards.cjs"),I=require("./StripChart.cjs"),k=require("./ParetoChart.cjs"),W=require("./ButterflyChart.cjs"),x=require("./Histogram.cjs"),N=require("./SankeyChart.cjs"),V=require("./RadarChart.cjs"),J=require("./MultiGraphDashboard.cjs"),U=require("./PerformanceIntensiveMultiGraphDashboard.cjs"),E=require("./MultiGraphDashboardWideToLongFormat.cjs"),R=require("./SingleGraphDashboard.cjs"),Q=require("./SingleGraphDashboardGeoHubMaps.cjs"),j=require("./SingleGraphDashboardThreeDGraphs.cjs"),z=require("./GriddedGraphs.cjs"),K=require("./ScrollStory.cjs"),X=require("./PerformanceIntensiveScrollStory.cjs"),Y=require("./MultiGraphDashboardFromConfig.cjs"),Z=require("./PerformanceIntensiveMultiGraphDashboardFromConfig.cjs"),_=require("./MultiGraphDashboardWideToLongFormatFromConfig.cjs"),$=require("./SingleGraphDashboardFromConfig.cjs"),ee=require("./SingleGraphDashboardGeoHubMapsFromConfig.cjs"),re=require("./SingleGraphDashboardThreeDGraphsFromConfig.cjs"),ae=require("./GriddedGraphsFromConfig.cjs"),te=require("./ExcelDownloadButton.cjs"),oe=require("./ImageDownloadButton.cjs"),ne=require("./SVGDownloadButton.cjs"),ie=require("./CsvDownloadButton.cjs"),he=require("./CopyTextButton.cjs"),se=require("./Colors.cjs"),le=require("./ColorLegend.cjs"),ce=require("./ColorLegendWithMouseOver.cjs"),ue=require("./LinearColorLegend.cjs"),de=require("./ThresholdColorLegendWithMouseOver.cjs"),pe=require("./GraphFooter.cjs"),ge=require("./GraphHeader.cjs"),me=require("./FootNote.cjs"),Ce=require("./GraphDescription.cjs"),Se=require("./GraphTitle.cjs"),De=require("./Source.cjs"),Ge=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),a=require("./removeOutliers-WELHHqiI.cjs"),qe=require("./numberFormattingFunction-02t-wJta.cjs"),fe=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),be=require("./getJenks-TWQvbuOz.cjs"),Fe=require("./imageDownload-CgDcm1Sj.cjs"),Me=require("./svgDownload-D9zEGjTF.cjs"),Le=require("./excelDownload-BQpsCa62.cjs"),Be=require("./getUniqValue-CHqgSss5.cjs"),r=require("./fetchAndParseData-DmgQtB9n.cjs"),n=require("./transformDataForAggregation-Du-Hei-W.cjs"),Te=require("./transformDataForGraphFromFile-D9G3ToQf.cjs"),o=require("./validateSchema.cjs"),e=require("./getSchema.cjs"),ve=require("./getGraphList-gf02xgT2.cjs");exports.GroupedBarGraph=t.GroupedBarGraph;exports.SimpleBarGraph=t.SimpleBarGraph;exports.StackedBarGraph=t.StackedBarGraph;exports.CirclePackingGraph=i.CirclePackingGraph;exports.DonutChart=h.DonutChart;exports.DumbbellChart=s.DumbbellChart;exports.BeeSwarmChart=l.BeeSwarmChart;exports.DualAxisLineChart=c.DualAxisLineChart;exports.LineChartWithConfidenceInterval=u.LineChartWithConfidenceInterval;exports.SimpleLineChart=d.SimpleLineChart;exports.MultiLineChart=p.MultiLineChart;exports.MultiLineAltChart=g.MultiLineAltChart;exports.DifferenceLineChart=m.DifferenceLineChart;exports.SparkLine=C.SparkLine;exports.BiVariateChoroplethMap=S.BiVariateChoroplethMap;exports.ChoroplethMap=D.ChoroplethMap;exports.DotDensityMap=G.DotDensityMap;exports.ThreeDGlobe=q.ThreeDGlobe;exports.GeoHubMap=f.GeoHubMap;exports.GeoHubCompareMaps=b.GeoHubCompareMaps;exports.GeoHubMapWithLayerSelection=F.GeoHubMapWithLayerSelection;exports.ScatterPlot=M.ScatterPlot;exports.SlopeChart=L.SlopeChart;exports.BulletChart=B.BulletChart;exports.AreaChart=T.AreaChart;exports.BasicStatCard=v.BasicStatCard;exports.StatCardFromData=P.StatCardFromData;exports.TreeMapGraph=y.TreeMapGraph;exports.UnitChart=A.UnitChart;exports.HeatMap=H.HeatMap;exports.DataTable=O.DataTable;exports.DataCards=w.DataCards;exports.StripChart=I.StripChart;exports.ParetoChart=k.ParetoChart;exports.ButterflyChart=W.ButterflyChart;exports.Histogram=x.Histogram;exports.SankeyChart=N.SankeyChart;exports.RadarChart=V.RadarChart;exports.MultiGraphDashboard=J.MultiGraphDashboard;exports.PerformanceIntensiveMultiGraphDashboard=U.PerformanceIntensiveMultiGraphDashboard;exports.MultiGraphDashboardWideToLongFormat=E.MultiGraphDashboardWideToLongFormat;exports.SingleGraphDashboard=R.SingleGraphDashboard;exports.SingleGraphDashboardGeoHubMaps=Q.SingleGraphDashboardGeoHubMaps;exports.SingleGraphDashboardThreeDGraphs=j.SingleGraphDashboardThreeDGraphs;exports.GriddedGraphs=z.GriddedGraphs;exports.ScrollStory=K.ScrollStory;exports.PerformanceIntensiveScrollStory=X.PerformanceIntensiveScrollStory;exports.MultiGraphDashboardFromConfig=Y.MultiGraphDashboardFromConfig;exports.PerformanceIntensiveMultiGraphDashboardFromConfig=Z.PerformanceIntensiveMultiGraphDashboardFromConfig;exports.MultiGraphDashboardWideToLongFormatFromConfig=_.MultiGraphDashboardWideToLongFormatFromConfig;exports.SingleGraphDashboardFromConfig=$.SingleGraphDashboardFromConfig;exports.SingleGraphDashboardGeoHubMapsFromConfig=ee.SingleGraphDashboardGeoHubMapsFromConfig;exports.SingleGraphDashboardThreeDGraphsFromConfig=re.SingleGraphDashboardThreeDGraphsFromConfig;exports.GriddedGraphsFromConfig=ae.GriddedGraphsFromConfig;exports.ExcelDownloadButton=te.ExcelDownloadButton;exports.ImageDownloadButton=oe.ImageDownloadButton;exports.SVGDownloadButton=ne.SVGDownloadButton;exports.CsvDownloadButton=ie.CsvDownloadButton;exports.CopyTextButton=he.CopyTextButton;exports.Colors=se.Colors;exports.ColorLegend=le.ColorLegend;exports.ColorLegendWithMouseOver=ce.ColorLegendWithMouseOver;exports.LinearColorLegend=ue.LinearColorLegend;exports.ThresholdColorLegendWithMouseOver=de.ThresholdColorLegendWithMouseOver;exports.GraphFooter=pe.GraphFooter;exports.GraphHeader=ge.GraphHeader;exports.FootNote=me.FootNote;exports.GraphDescription=Ce.GraphDescription;exports.GraphTitle=Se.GraphTitle;exports.Source=De.Source;exports.checkIfNullOrUndefined=Ge.checkIfNullOrUndefined;exports.generateEmbedLink=a.generateEmbedLink;exports.generateIframeCode=a.generateIframeCode;exports.getPercentileValue=a.getPercentileValue;exports.getQueryParamsFromLink=a.getQueryParamsFromLink;exports.removeOutliers=a.removeOutliers;exports.numberFormattingFunction=qe.numberFormattingFunction;exports.getTextColorBasedOnBgColor=fe.getTextColorBasedOnBgColor;exports.getJenks=be.getJenks;exports.imageDownload=Fe.imageDownload;exports.svgDownload=Me.svgDownload;exports.excelDownload=Le.excelDownload;exports.getUniqValue=Be.getUniqValue;exports.fetchAndParseCSV=r.fetchAndParseCSV;exports.fetchAndParseCSVFromTextBlob=r.fetchAndParseCSVFromTextBlob;exports.fetchAndParseJSON=r.fetchAndParseJSON;exports.fetchAndParseMultipleDataSources=r.fetchAndParseMultipleDataSources;exports.fetchAndTransformDataFromAPI=r.fetchAndTransformDataFromAPI;exports.transformColumnsToArray=r.transformColumnsToArray;exports.transformDataForAggregation=n.transformDataForAggregation;exports.transformDataForGraph=n.transformDataForGraph;exports.transformDataForGraphFromFile=Te.transformDataForGraphFromFile;exports.validateConfigSchema=o.validateConfigSchema;exports.validateDataSchema=o.validateDataSchema;exports.validateSettingsSchema=o.validateSettingsSchema;exports.getDashboardJSONSchema=e.getDashboardJSONSchema;exports.getDashboardWideToLongFormatJSONSchema=e.getDashboardWideToLongFormatJSONSchema;exports.getDataFiltersSchema=e.getDataFiltersSchema;exports.getDataSchema=e.getDataSchema;exports.getDataSelectionSchema=e.getDataSelectionSchema;exports.getDataSettingsSchema=e.getDataSettingsSchema;exports.getDataTransformSchema=e.getDataTransformSchema;exports.getFiltersSchema=e.getFiltersSchema;exports.getGraphDataConfigurationSchema=e.getGraphDataConfigurationSchema;exports.getGriddedGraphJSONSchema=e.getGriddedGraphJSONSchema;exports.getReadableHeaderSchema=e.getReadableHeaderSchema;exports.getSettingsSchema=e.getSettingsSchema;exports.getSingleGraphJSONSchema=e.getSingleGraphJSONSchema;exports.graphList=ve.graphList;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./BarGraph.cjs"),i=require("./index-CZLvTu6p.cjs"),h=require("./DonutChart.cjs"),s=require("./DumbbellChart.cjs"),l=require("./BeeSwarmChart.cjs"),c=require("./DualAxisLineChart.cjs"),u=require("./LineChartWithConfidenceInterval.cjs"),d=require("./SimpleLineChart.cjs"),p=require("./MultiLineChart.cjs"),g=require("./MultiLineAltChart.cjs"),m=require("./DifferenceLineChart.cjs"),C=require("./SparkLine.cjs"),S=require("./BiVariateChoroplethMap.cjs"),D=require("./ChoroplethMap.cjs"),G=require("./DotDensityMap.cjs"),q=require("./ThreeDGlobe.cjs"),f=require("./GeoHubMap.cjs"),b=require("./GeoHubCompareMaps.cjs"),F=require("./GeoHubMapWithLayerSelection.cjs"),M=require("./ScatterPlot.cjs"),L=require("./SlopeChart.cjs"),B=require("./BulletChart.cjs"),T=require("./AreaChart.cjs"),v=require("./BasicStatCard.cjs"),P=require("./StatCardFromData.cjs"),y=require("./TreeMapGraph.cjs"),A=require("./UnitChart.cjs"),H=require("./HeatMap.cjs"),O=require("./DataTable.cjs"),w=require("./DataCards.cjs"),I=require("./StripChart.cjs"),k=require("./ParetoChart.cjs"),W=require("./ButterflyChart.cjs"),x=require("./Histogram.cjs"),N=require("./SankeyChart.cjs"),V=require("./RadarChart.cjs"),J=require("./MultiGraphDashboard.cjs"),U=require("./PerformanceIntensiveMultiGraphDashboard.cjs"),E=require("./MultiGraphDashboardWideToLongFormat.cjs"),R=require("./SingleGraphDashboard.cjs"),Q=require("./SingleGraphDashboardGeoHubMaps.cjs"),j=require("./SingleGraphDashboardThreeDGraphs.cjs"),z=require("./GriddedGraphs.cjs"),K=require("./ScrollStory.cjs"),X=require("./PerformanceIntensiveScrollStory.cjs"),Y=require("./MultiGraphDashboardFromConfig.cjs"),Z=require("./PerformanceIntensiveMultiGraphDashboardFromConfig.cjs"),_=require("./MultiGraphDashboardWideToLongFormatFromConfig.cjs"),$=require("./SingleGraphDashboardFromConfig.cjs"),ee=require("./SingleGraphDashboardGeoHubMapsFromConfig.cjs"),re=require("./SingleGraphDashboardThreeDGraphsFromConfig.cjs"),ae=require("./GriddedGraphsFromConfig.cjs"),te=require("./ExcelDownloadButton.cjs"),oe=require("./ImageDownloadButton.cjs"),ne=require("./SVGDownloadButton.cjs"),ie=require("./CsvDownloadButton.cjs"),he=require("./CopyTextButton.cjs"),se=require("./Colors.cjs"),le=require("./ColorLegend.cjs"),ce=require("./ColorLegendWithMouseOver.cjs"),ue=require("./LinearColorLegend.cjs"),de=require("./ThresholdColorLegendWithMouseOver.cjs"),pe=require("./GraphFooter.cjs"),ge=require("./GraphHeader.cjs"),me=require("./FootNote.cjs"),Ce=require("./GraphDescription.cjs"),Se=require("./GraphTitle.cjs"),De=require("./Source.cjs"),Ge=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),a=require("./removeOutliers-WELHHqiI.cjs"),qe=require("./numberFormattingFunction-02t-wJta.cjs"),fe=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),be=require("./getJenks-TWQvbuOz.cjs"),Fe=require("./imageDownload-CgDcm1Sj.cjs"),Me=require("./svgDownload-D9zEGjTF.cjs"),Le=require("./excelDownload-BQpsCa62.cjs"),Be=require("./getUniqValue-CHqgSss5.cjs"),r=require("./fetchAndParseData-CQyVGCul.cjs"),n=require("./transformDataForAggregation-Du-Hei-W.cjs"),Te=require("./transformDataForGraphFromFile-B1A0AS-Z.cjs"),o=require("./validateSchema.cjs"),e=require("./getSchema.cjs"),ve=require("./getGraphList-gf02xgT2.cjs");exports.GroupedBarGraph=t.GroupedBarGraph;exports.SimpleBarGraph=t.SimpleBarGraph;exports.StackedBarGraph=t.StackedBarGraph;exports.CirclePackingGraph=i.CirclePackingGraph;exports.DonutChart=h.DonutChart;exports.DumbbellChart=s.DumbbellChart;exports.BeeSwarmChart=l.BeeSwarmChart;exports.DualAxisLineChart=c.DualAxisLineChart;exports.LineChartWithConfidenceInterval=u.LineChartWithConfidenceInterval;exports.SimpleLineChart=d.SimpleLineChart;exports.MultiLineChart=p.MultiLineChart;exports.MultiLineAltChart=g.MultiLineAltChart;exports.DifferenceLineChart=m.DifferenceLineChart;exports.SparkLine=C.SparkLine;exports.BiVariateChoroplethMap=S.BiVariateChoroplethMap;exports.ChoroplethMap=D.ChoroplethMap;exports.DotDensityMap=G.DotDensityMap;exports.ThreeDGlobe=q.ThreeDGlobe;exports.GeoHubMap=f.GeoHubMap;exports.GeoHubCompareMaps=b.GeoHubCompareMaps;exports.GeoHubMapWithLayerSelection=F.GeoHubMapWithLayerSelection;exports.ScatterPlot=M.ScatterPlot;exports.SlopeChart=L.SlopeChart;exports.BulletChart=B.BulletChart;exports.AreaChart=T.AreaChart;exports.BasicStatCard=v.BasicStatCard;exports.StatCardFromData=P.StatCardFromData;exports.TreeMapGraph=y.TreeMapGraph;exports.UnitChart=A.UnitChart;exports.HeatMap=H.HeatMap;exports.DataTable=O.DataTable;exports.DataCards=w.DataCards;exports.StripChart=I.StripChart;exports.ParetoChart=k.ParetoChart;exports.ButterflyChart=W.ButterflyChart;exports.Histogram=x.Histogram;exports.SankeyChart=N.SankeyChart;exports.RadarChart=V.RadarChart;exports.MultiGraphDashboard=J.MultiGraphDashboard;exports.PerformanceIntensiveMultiGraphDashboard=U.PerformanceIntensiveMultiGraphDashboard;exports.MultiGraphDashboardWideToLongFormat=E.MultiGraphDashboardWideToLongFormat;exports.SingleGraphDashboard=R.SingleGraphDashboard;exports.SingleGraphDashboardGeoHubMaps=Q.SingleGraphDashboardGeoHubMaps;exports.SingleGraphDashboardThreeDGraphs=j.SingleGraphDashboardThreeDGraphs;exports.GriddedGraphs=z.GriddedGraphs;exports.ScrollStory=K.ScrollStory;exports.PerformanceIntensiveScrollStory=X.PerformanceIntensiveScrollStory;exports.MultiGraphDashboardFromConfig=Y.MultiGraphDashboardFromConfig;exports.PerformanceIntensiveMultiGraphDashboardFromConfig=Z.PerformanceIntensiveMultiGraphDashboardFromConfig;exports.MultiGraphDashboardWideToLongFormatFromConfig=_.MultiGraphDashboardWideToLongFormatFromConfig;exports.SingleGraphDashboardFromConfig=$.SingleGraphDashboardFromConfig;exports.SingleGraphDashboardGeoHubMapsFromConfig=ee.SingleGraphDashboardGeoHubMapsFromConfig;exports.SingleGraphDashboardThreeDGraphsFromConfig=re.SingleGraphDashboardThreeDGraphsFromConfig;exports.GriddedGraphsFromConfig=ae.GriddedGraphsFromConfig;exports.ExcelDownloadButton=te.ExcelDownloadButton;exports.ImageDownloadButton=oe.ImageDownloadButton;exports.SVGDownloadButton=ne.SVGDownloadButton;exports.CsvDownloadButton=ie.CsvDownloadButton;exports.CopyTextButton=he.CopyTextButton;exports.Colors=se.Colors;exports.ColorLegend=le.ColorLegend;exports.ColorLegendWithMouseOver=ce.ColorLegendWithMouseOver;exports.LinearColorLegend=ue.LinearColorLegend;exports.ThresholdColorLegendWithMouseOver=de.ThresholdColorLegendWithMouseOver;exports.GraphFooter=pe.GraphFooter;exports.GraphHeader=ge.GraphHeader;exports.FootNote=me.FootNote;exports.GraphDescription=Ce.GraphDescription;exports.GraphTitle=Se.GraphTitle;exports.Source=De.Source;exports.checkIfNullOrUndefined=Ge.checkIfNullOrUndefined;exports.generateEmbedLink=a.generateEmbedLink;exports.generateIframeCode=a.generateIframeCode;exports.getPercentileValue=a.getPercentileValue;exports.getQueryParamsFromLink=a.getQueryParamsFromLink;exports.removeOutliers=a.removeOutliers;exports.numberFormattingFunction=qe.numberFormattingFunction;exports.getTextColorBasedOnBgColor=fe.getTextColorBasedOnBgColor;exports.getJenks=be.getJenks;exports.imageDownload=Fe.imageDownload;exports.svgDownload=Me.svgDownload;exports.excelDownload=Le.excelDownload;exports.getUniqValue=Be.getUniqValue;exports.fetchAndParseCSV=r.fetchAndParseCSV;exports.fetchAndParseCSVFromTextBlob=r.fetchAndParseCSVFromTextBlob;exports.fetchAndParseJSON=r.fetchAndParseJSON;exports.fetchAndParseMultipleDataSources=r.fetchAndParseMultipleDataSources;exports.fetchAndTransformDataFromAPI=r.fetchAndTransformDataFromAPI;exports.transformColumnsToArray=r.transformColumnsToArray;exports.transformDataForAggregation=n.transformDataForAggregation;exports.transformDataForGraph=n.transformDataForGraph;exports.transformDataForGraphFromFile=Te.transformDataForGraphFromFile;exports.validateConfigSchema=o.validateConfigSchema;exports.validateDataSchema=o.validateDataSchema;exports.validateSettingsSchema=o.validateSettingsSchema;exports.getDashboardJSONSchema=e.getDashboardJSONSchema;exports.getDashboardWideToLongFormatJSONSchema=e.getDashboardWideToLongFormatJSONSchema;exports.getDataFiltersSchema=e.getDataFiltersSchema;exports.getDataSchema=e.getDataSchema;exports.getDataSelectionSchema=e.getDataSelectionSchema;exports.getDataSettingsSchema=e.getDataSettingsSchema;exports.getDataTransformSchema=e.getDataTransformSchema;exports.getFiltersSchema=e.getFiltersSchema;exports.getGraphDataConfigurationSchema=e.getGraphDataConfigurationSchema;exports.getGriddedGraphJSONSchema=e.getGriddedGraphJSONSchema;exports.getReadableHeaderSchema=e.getReadableHeaderSchema;exports.getSettingsSchema=e.getSettingsSchema;exports.getSingleGraphJSONSchema=e.getSingleGraphJSONSchema;exports.graphList=ve.graphList;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { GroupedBarGraph as e, SimpleBarGraph as a, StackedBarGraph as t } from "./BarGraph.js";
2
- import { C as p } from "./index-BVnYktl4.js";
2
+ import { C as p } from "./index-DGAaLNu9.js";
3
3
  import { DonutChart as h } from "./DonutChart.js";
4
4
  import { DumbbellChart as x } from "./DumbbellChart.js";
5
5
  import { BeeSwarmChart as s } from "./BeeSwarmChart.js";
@@ -75,9 +75,9 @@ import { i as zo } from "./imageDownload-Dcci2LEy.js";
75
75
  import { s as Xo } from "./svgDownload-C2-E3yf2.js";
76
76
  import { e as Zo } from "./excelDownload-BOA-lskf.js";
77
77
  import { g as $o } from "./getUniqValue-BtUENB2H.js";
78
- import { b as oe, d as ee, f as ae, c as te, a as me, t as pe } from "./fetchAndParseData-Bcmr659B.js";
78
+ import { b as oe, d as ee, f as ae, c as te, a as me, t as pe } from "./fetchAndParseData-4gsYTy6_.js";
79
79
  import { t as he, a as ne } from "./transformDataForAggregation-CdcwlnNe.js";
80
- import { t as ie } from "./transformDataForGraphFromFile-CA0rw80A.js";
80
+ import { t as ie } from "./transformDataForGraphFromFile-BCjsizvb.js";
81
81
  import { validateConfigSchema as le, validateDataSchema as de, validateSettingsSchema as ge } from "./validateSchema.js";
82
82
  import { getDashboardJSONSchema as Ce, getDashboardWideToLongFormatJSONSchema as ce, getDataFiltersSchema as De, getDataSchema as Ge, getDataSelectionSchema as ue, getDataSettingsSchema as be, getDataTransformSchema as Fe, getFiltersSchema as Me, getGraphDataConfigurationSchema as Le, getGriddedGraphJSONSchema as Be, getReadableHeaderSchema as Te, getSettingsSchema as Pe, getSingleGraphJSONSchema as ve } from "./getSchema.js";
83
83
  import { g as Oe } from "./getGraphList-DuColTJM.js";