@undp/data-viz 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.d.ts +11 -9
- package/dist/AreaChart.js +320 -322
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +15 -25
- package/dist/BarGraph.js +1694 -1694
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +13 -9
- package/dist/BasicStatCard.js +79 -81
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +11 -9
- package/dist/BeeSwarmChart.js +335 -336
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +13 -3
- package/dist/BiVariateChoroplethMap.js +247 -245
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +11 -5
- package/dist/BulletChart.js +560 -559
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +11 -9
- package/dist/ButterflyChart.js +348 -350
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +11 -3
- package/dist/ChoroplethMap.js +213 -213
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +11 -9
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.d.ts +1 -1
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +4 -5
- package/dist/DataTable.js +114 -116
- package/dist/DataTable.js.map +1 -1
- package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
- package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
- package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
- package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +11 -9
- package/dist/DifferenceLineChart.js +502 -504
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +14 -9
- package/dist/DonutChart.js +174 -179
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.d.ts +1 -1
- package/dist/DotDensityMap.js +2 -2
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +13 -9
- package/dist/DualAxisLineChart.js +341 -351
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +11 -9
- package/dist/DumbbellChart.js +592 -593
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.d.ts +1 -1
- package/dist/GeoHubCompareMaps.js +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.d.ts +1 -1
- package/dist/GeoHubMap.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/GraphEl-B7x5ku_y.cjs +2 -0
- package/dist/GraphEl-B7x5ku_y.cjs.map +1 -0
- package/dist/GraphEl-B8tGXqWk.js +1829 -0
- package/dist/GraphEl-B8tGXqWk.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +28 -16
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +28 -16
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +11 -9
- package/dist/HeatMap.js +203 -205
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +11 -5
- package/dist/Histogram.js +88 -89
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +11 -3
- package/dist/HybridMap.js +279 -279
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
- package/dist/LineChartWithConfidenceInterval.js +393 -395
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +28 -16
- package/dist/MultiGraphDashboardFromConfig.d.ts +28 -16
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +11 -9
- package/dist/MultiLineAltChart.js +411 -413
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +11 -9
- package/dist/MultiLineChart.js +438 -440
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +13 -13
- package/dist/ParetoChart.js +347 -355
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +28 -16
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +28 -16
- package/dist/PerformanceIntensiveScrollStory.d.ts +28 -16
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +11 -5
- package/dist/RadarChart.js +213 -213
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +11 -9
- package/dist/SankeyChart.js +448 -450
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +13 -13
- package/dist/ScatterPlot.js +490 -498
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +28 -16
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +11 -9
- package/dist/SimpleLineChart.js +362 -364
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +28 -16
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +28 -16
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +28 -16
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +28 -16
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +28 -16
- package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +28 -16
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.d.ts +1 -1
- package/dist/SlopeChart.js +2 -2
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +1 -1
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +11 -9
- package/dist/StatCardFromData.js +113 -116
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +11 -9
- package/dist/StripChart.js +434 -435
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +11 -3
- package/dist/ThreeDGlobe.js +143 -143
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
- package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
- package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
- package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
- package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +11 -9
- package/dist/TreeMapGraph.js +369 -371
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +28 -16
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +11 -5
- package/dist/UnitChart.js +118 -119
- package/dist/UnitChart.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +11 -9
- package/dist/WaterfallChart.js +306 -308
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
- package/dist/index-BPyj_6hG.js +375 -0
- package/dist/index-BPyj_6hG.js.map +1 -0
- package/dist/index-DuLvdHo2.cjs +2 -0
- package/dist/index-DuLvdHo2.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +105 -245
- package/dist/index.js +2 -2
- package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
- package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
- package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
- package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
- package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
- package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -2
- package/dist/GraphEl-B73N4RIA.js +0 -1906
- package/dist/GraphEl-B73N4RIA.js.map +0 -1
- package/dist/GraphEl-Lt1og0C-.cjs +0 -2
- package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
- package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
- package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
- package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
- package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
- package/dist/index-B0Awa_de.js +0 -377
- package/dist/index-B0Awa_de.js.map +0 -1
- package/dist/index-CP8cmNzt.cjs +0 -2
- package/dist/index-CP8cmNzt.cjs.map +0 -1
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
- package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
- package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
package/dist/DonutChart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonutChart.js","sources":["../node_modules/d3-shape/src/math.js","../node_modules/d3-shape/src/descending.js","../node_modules/d3-shape/src/identity.js","../node_modules/d3-shape/src/pie.js","../src/Utils/getArc.ts","../src/Components/Graphs/DonutChart/Graph.tsx","../src/Components/Graphs/DonutChart/index.tsx"],"sourcesContent":["export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","const polarToCartesian = (\r\n centerX: number,\r\n centerY: number,\r\n radius: number,\r\n angleInRadians: number,\r\n) => {\r\n return {\r\n x: centerX + radius * Math.cos(angleInRadians),\r\n y: centerY + radius * Math.sin(angleInRadians),\r\n };\r\n};\r\n\r\nexport function getArc(\r\n x: number,\r\n y: number,\r\n radius: number,\r\n startAngleInRadians: number,\r\n endAngleInRadians: number,\r\n) {\r\n const start = polarToCartesian(x, y, radius, startAngleInRadians);\r\n const end = polarToCartesian(\r\n x,\r\n y,\r\n radius,\r\n Math.abs(endAngleInRadians - startAngleInRadians) === 2 * Math.PI\r\n ? 0.999999 * endAngleInRadians\r\n : endAngleInRadians,\r\n );\r\n const largeArcFlag = endAngleInRadians - startAngleInRadians <= Math.PI ? '0' : '1';\r\n const d = ['M', start.x, start.y, 'A', radius, radius, 0, largeArcFlag, 1, end.x, end.y].join(\r\n ' ',\r\n );\r\n return d;\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport isEqual from 'fast-deep-equal';\r\nimport { pie } from 'd3-shape';\r\nimport { isValidElement, ReactElement, useRef, useState } from 'react';\r\nimport { H2, P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport { AnimateDataType, ClassNameObject, DonutChartDataType, StyleObject } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { getArc } from '@/Utils/getArc';\r\n\r\ninterface Props {\r\n mainText?: string | { label: string; suffix?: string; prefix?: string } | ReactElement;\r\n radius: number;\r\n colors: string[];\r\n subNote?: string;\r\n strokeWidth: number;\r\n data: DonutChartDataType[];\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n colorDomain: string[];\r\n resetSelectionOnDoubleClick: boolean;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n precision: number;\r\n animate: AnimateDataType;\r\n trackColor: string;\r\n locale: string;\r\n naLabel: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n mainText,\r\n data,\r\n radius,\r\n colors,\r\n subNote,\r\n strokeWidth,\r\n tooltip,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n colorDomain,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision,\r\n animate,\r\n trackColor,\r\n locale,\r\n naLabel,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const pieData = pie()\r\n .sort(null)\r\n .startAngle(0)\r\n .value((d: any) => d.size);\r\n\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n return (\r\n <>\r\n <motion.svg\r\n ref={svgRef}\r\n width={`${radius * 2}px`}\r\n height={`${radius * 2}px`}\r\n viewBox={`0 0 ${radius * 2} ${radius * 2}`}\r\n direction='ltr'\r\n className='mx-auto'\r\n >\r\n <motion.g transform={`translate(${radius} ${radius})`}>\r\n {mainText || subNote ? (\r\n <foreignObject\r\n y={0 - (radius - strokeWidth)}\r\n x={0 - (radius - strokeWidth)}\r\n width={2 * (radius - strokeWidth)}\r\n height={2 * (radius - strokeWidth)}\r\n >\r\n <div className='flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4'>\r\n {mainText ? (\r\n isValidElement(mainText) ? (\r\n mainText\r\n ) : (\r\n <H2\r\n marginBottom='none'\r\n className='donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center'\r\n >\r\n {typeof mainText === 'string'\r\n ? mainText\r\n : data.findIndex(d => d.label === mainText.label) !== -1\r\n ? numberFormattingFunction(\r\n data[data.findIndex(d => d.label === mainText.label)].size,\r\n naLabel,\r\n precision,\r\n mainText.prefix,\r\n mainText.suffix,\r\n locale,\r\n )\r\n : naLabel}\r\n </H2>\r\n )\r\n ) : null}\r\n {subNote ? (\r\n <P\r\n marginBottom='none'\r\n size='base'\r\n leading='none'\r\n className='donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {subNote}\r\n </P>\r\n ) : typeof mainText === 'string' || !mainText || isValidElement(mainText) ? null : (\r\n <P\r\n size='base'\r\n marginBottom='none'\r\n leading='none'\r\n className='donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {mainText.label}\r\n </P>\r\n )}\r\n </div>\r\n </foreignObject>\r\n ) : null}\r\n <circle\r\n cx={0}\r\n cy={0}\r\n r={radius - strokeWidth / 2}\r\n fill='none'\r\n stroke={trackColor}\r\n strokeWidth={strokeWidth}\r\n />\r\n <AnimatePresence>\r\n {pieData(data as any).map((d, i) => (\r\n <motion.path\r\n key={i}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\r\n : 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n stroke:\r\n colorDomain.indexOf((d.data as any).label) !== -1\r\n ? colors[colorDomain.indexOf((d.data as any).label) % colors.length]\r\n : Colors.gray,\r\n strokeWidth,\r\n fill: 'none',\r\n }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d.data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d.data) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d.data);\r\n if (onSeriesMouseClick) onSeriesMouseClick(d.data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d.data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n />\r\n ))}\r\n </AnimatePresence>\r\n </motion.g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { ReactElement, useEffect, useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport orderBy from 'lodash.orderby';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n DonutChartDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DonutChartDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Array of colors for each segment */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: 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 /** Radius of the donut chart */\r\n radius?: 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\r\n // Graph Parameters\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Max width of the color scale as a css property */\r\n colorScaleMaxWidth?: string;\r\n /** Stroke width of the arcs and circle of the donut */\r\n strokeWidth?: number;\r\n /** Sorting order for data. This is overwritten by labelOrder prop */\r\n sortData?: 'asc' | 'desc';\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Large text at the center of the donut chart. If the type is an object then the text is the value in the data for the label mentioned in the object */\r\n mainText?: string | { label: string; suffix?: string; prefix?: string } | ReactElement;\r\n /** Small text at the center of the donut chart */\r\n subNote?: string;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Track color (i.e. the color of the donut chart's background) of the donut chart */\r\n trackColor?: string;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\r\n /** Defines how “NA” values should be displayed/labelled in the graph */\r\n naLabel?: string;\r\n\r\n // 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 DonutChart(props: Props) {\r\n const {\r\n mainText,\r\n graphTitle,\r\n colors = Colors.light.categoricalColors.colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n strokeWidth = 50,\r\n graphDescription,\r\n subNote,\r\n footNote,\r\n radius,\r\n data,\r\n showColorScale = true,\r\n padding,\r\n backgroundColor = false,\r\n tooltip,\r\n onSeriesMouseOver,\r\n graphID,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n colorDomain,\r\n sortData,\r\n language = 'en',\r\n theme = 'light',\r\n width,\r\n height,\r\n minHeight = 0,\r\n relativeHeight,\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n colorScaleMaxWidth,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision = 2,\r\n animate = false,\r\n trackColor = Colors.light.grays['gray-200'],\r\n locale = 'en',\r\n naLabel = 'NA',\r\n } = props;\r\n\r\n const [graphRadius, setGraphRadius] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setGraphRadius(\r\n (Math.min(\r\n ...[entries[0].target.clientWidth || 620, entries[0].target.clientHeight || 480],\r\n ) || 420) / 2,\r\n );\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const sortedData = sortData ? orderBy(data, ['size'], [sortData]) : data;\r\n\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {showColorScale && data.length > 0 ? (\r\n <>\r\n <div\r\n className={cn(\r\n 'leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap',\r\n classNames?.colorLegend,\r\n )}\r\n style={{ maxWidth: colorScaleMaxWidth }}\r\n aria-label='Color legend'\r\n >\r\n {sortedData.map((d, i) => (\r\n <div className='flex gap-2 items-center pb-3' key={i}>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{\r\n backgroundColor:\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) !== -1\r\n ? (colors || Colors[theme].categoricalColors.colors)[\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) %\r\n (colors || Colors[theme].categoricalColors.colors).length\r\n ]\r\n : Colors.gray,\r\n }}\r\n />\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n className='text-primary-gray-700 dark:text-primary-gray-100'\r\n >\r\n {d.label}:{' '}\r\n <span className='font-bold' style={{ fontSize: 'inherit' }}>\r\n {numberFormattingFunction(d.size, naLabel, precision, prefix, suffix, locale)}\r\n </span>\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n <Spacer size='lg' />\r\n </>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {graphRadius && data.length > 0 ? (\r\n <Graph\r\n mainText={mainText}\r\n data={sortedData}\r\n colors={colors}\r\n radius={radius || graphRadius}\r\n subNote={subNote}\r\n strokeWidth={strokeWidth}\r\n tooltip={tooltip}\r\n colorDomain={colorDomain || sortedData.map(d => d.label)}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n detailsOnClick={detailsOnClick}\r\n precision={precision}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n locale={locale}\r\n trackColor={trackColor}\r\n naLabel={naLabel}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["pi","tau","descending","a","b","identity","d","pie","value","sortValues","sort","startAngle","constant","endAngle","padAngle","data","i","n","array","j","k","sum","index","arcs","a0","da","a1","p","pa","v","_","polarToCartesian","centerX","centerY","radius","angleInRadians","x","Math","cos","y","sin","getArc","startAngleInRadians","endAngleInRadians","start","end","abs","PI","largeArcFlag","join","Graph","props","$","_c","mainText","colors","subNote","strokeWidth","tooltip","onSeriesMouseOver","onSeriesMouseClick","colorDomain","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","precision","animate","trackColor","locale","naLabel","svgRef","useRef","t0","amount","once","isInView","useInView","pieData","_temp","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","motion","t2","t3","t4","t5","t6","t7","t8","t9","jsx","jsxs","isValidElement","H2","findIndex","d_1","label","numberFormattingFunction","d_0","size","prefix","suffix","P","t10","t11","T0","AnimatePresence","t12","duration","d_2","initial","pathLength","opacity","whileInView","transition","stroke","indexOf","length","Colors","gray","fill","event","clientY","clientX","isEqual","event_0","t13","map","t14","t15","g","t16","svg","t17","Tooltip","t18","modal","DetailsModal","t19","Fragment","DonutChart","graphTitle","light","categoricalColors","sources","graphDescription","footNote","showColorScale","padding","backgroundColor","graphID","graphDownload","dataDownload","sortData","language","theme","width","height","minHeight","relativeHeight","ariaLabel","colorScaleMaxWidth","grays","graphRadius","setGraphRadius","graphDiv","graphParentDiv","useEffect","resizeObserver","ResizeObserver","entries","min","target","clientWidth","clientHeight","current","observe","disconnect","sortedData","orderBy","GraphContainer","graphContainer","GraphHeader","title","description","filter","cn","colorLegend","maxWidth","el","fontSize","Spacer","GraphArea","EmptyState","GraphFooter","footnote","source"],"mappings":";;;;;;;;;;;;;;;;;;AASO,MAAMA,KAAK,KAAK,IAEVC,KAAM,IAAID;ACXR,SAAAE,GAASC,GAAGC,GAAG;AAC5B,SAAOA,IAAID,IAAI,KAAKC,IAAID,IAAI,IAA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AU;AAAA,QAAK3C,MAAM;AAAA,QAAMD,QAAQ;AAAA,MAAA,IACrCP,MAAW;AAAA,QAAEmD,UAAU;AAAA,QAAG3C,MAAM;AAAA,QAAMD,QAAQ;AAAA,MAAA,GAEpD,QAAAL,GACA,YAAAD,IACA,SAAAE,EAAA,CAAiB,IAEjB;AAAA,IAAA,GACN;AAAA,IACCoF,KAAWE,IACVxD,gBAAAA,EAAAA,IAACwG,IAAA,EACC,QAAQ;AAAA,MAAEC,UAAU7I,GAAQ6I;AAAAA,MAAUC,QAAQ9I,GAAQ8I;AAAAA,IAAAA,GACtD,YAAY;AAAA,MACVD,UAAU5I,GAAY4I;AAAAA,MACtBC,QAAQ7I,GAAY6I;AAAAA,IAAAA,GAEtB,SAAApD,GACA,UAAAE,GACA,OAAAU,EAAA,CAAa,IAEb;AAAA,EAAA,GACN;AAEJ;","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"DonutChart.js","sources":["../node_modules/d3-shape/src/math.js","../node_modules/d3-shape/src/descending.js","../node_modules/d3-shape/src/identity.js","../node_modules/d3-shape/src/pie.js","../src/Utils/getArc.ts","../src/Components/Graphs/DonutChart/Graph.tsx","../src/Components/Graphs/DonutChart/index.tsx"],"sourcesContent":["export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","const polarToCartesian = (\r\n centerX: number,\r\n centerY: number,\r\n radius: number,\r\n angleInRadians: number,\r\n) => {\r\n return {\r\n x: centerX + radius * Math.cos(angleInRadians),\r\n y: centerY + radius * Math.sin(angleInRadians),\r\n };\r\n};\r\n\r\nexport function getArc(\r\n x: number,\r\n y: number,\r\n radius: number,\r\n startAngleInRadians: number,\r\n endAngleInRadians: number,\r\n) {\r\n const start = polarToCartesian(x, y, radius, startAngleInRadians);\r\n const end = polarToCartesian(\r\n x,\r\n y,\r\n radius,\r\n Math.abs(endAngleInRadians - startAngleInRadians) === 2 * Math.PI\r\n ? 0.999999 * endAngleInRadians\r\n : endAngleInRadians,\r\n );\r\n const largeArcFlag = endAngleInRadians - startAngleInRadians <= Math.PI ? '0' : '1';\r\n const d = ['M', start.x, start.y, 'A', radius, radius, 0, largeArcFlag, 1, end.x, end.y].join(\r\n ' ',\r\n );\r\n return d;\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport isEqual from 'fast-deep-equal';\r\nimport { pie } from 'd3-shape';\r\nimport { isValidElement, ReactElement, useRef, useState } from 'react';\r\nimport { H2, P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport { AnimateDataType, ClassNameObject, DonutChartDataType, StyleObject } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { getArc } from '@/Utils/getArc';\r\n\r\ninterface Props {\r\n mainText?:\r\n | string\r\n | {\r\n label: string;\r\n suffix?: string;\r\n prefix?: string;\r\n locale?: string;\r\n padZeros?: boolean;\r\n precision?: number;\r\n }\r\n | ReactElement;\r\n radius: number;\r\n colors: string[];\r\n subNote?: string;\r\n strokeWidth: number;\r\n data: DonutChartDataType[];\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n colorDomain: string[];\r\n resetSelectionOnDoubleClick: boolean;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n trackColor: string;\r\n naLabel: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n mainText,\r\n data,\r\n radius,\r\n colors,\r\n subNote,\r\n strokeWidth,\r\n tooltip,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n colorDomain,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate,\r\n trackColor,\r\n naLabel,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const pieData = pie()\r\n .sort(null)\r\n .startAngle(0)\r\n .value((d: any) => d.size);\r\n\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n return (\r\n <>\r\n <motion.svg\r\n ref={svgRef}\r\n width={`${radius * 2}px`}\r\n height={`${radius * 2}px`}\r\n viewBox={`0 0 ${radius * 2} ${radius * 2}`}\r\n direction='ltr'\r\n className='mx-auto'\r\n >\r\n <motion.g transform={`translate(${radius} ${radius})`}>\r\n {mainText || subNote ? (\r\n <foreignObject\r\n y={0 - (radius - strokeWidth)}\r\n x={0 - (radius - strokeWidth)}\r\n width={2 * (radius - strokeWidth)}\r\n height={2 * (radius - strokeWidth)}\r\n >\r\n <div className='flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-4'>\r\n {mainText ? (\r\n isValidElement(mainText) ? (\r\n mainText\r\n ) : (\r\n <H2\r\n marginBottom='none'\r\n className='donut-main-text text-primary-gray-700 dark:text-primary-gray-100 leading-none text-center'\r\n >\r\n {typeof mainText === 'string'\r\n ? mainText\r\n : data.findIndex(d => d.label === mainText.label) !== -1\r\n ? numberFormattingFunction(\r\n data[data.findIndex(d => d.label === mainText.label)].size,\r\n naLabel,\r\n mainText.precision,\r\n mainText.prefix,\r\n mainText.suffix,\r\n mainText.locale,\r\n mainText.padZeros,\r\n )\r\n : naLabel}\r\n </H2>\r\n )\r\n ) : null}\r\n {subNote ? (\r\n <P\r\n marginBottom='none'\r\n size='base'\r\n leading='none'\r\n className='donut-sub-note text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {subNote}\r\n </P>\r\n ) : typeof mainText === 'string' || !mainText || isValidElement(mainText) ? null : (\r\n <P\r\n size='base'\r\n marginBottom='none'\r\n leading='none'\r\n className='donut-label text-primary-gray-700 dark:text-primary-gray-100 text-center font-bold'\r\n >\r\n {mainText.label}\r\n </P>\r\n )}\r\n </div>\r\n </foreignObject>\r\n ) : null}\r\n <circle\r\n cx={0}\r\n cy={0}\r\n r={radius - strokeWidth / 2}\r\n fill='none'\r\n stroke={trackColor}\r\n strokeWidth={strokeWidth}\r\n />\r\n <AnimatePresence>\r\n {pieData(data as any).map((d, i) => (\r\n <motion.path\r\n key={i}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\r\n : 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: getArc(\r\n 0,\r\n 0,\r\n radius - strokeWidth / 2,\r\n d.startAngle - Math.PI / 2,\r\n d.endAngle - Math.PI / 2,\r\n ),\r\n opacity: mouseOverData\r\n ? mouseOverData.label === (d.data as any).label\r\n ? 1\r\n : 0.3\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n stroke:\r\n colorDomain.indexOf((d.data as any).label) !== -1\r\n ? colors[colorDomain.indexOf((d.data as any).label) % colors.length]\r\n : Colors.gray,\r\n strokeWidth,\r\n fill: 'none',\r\n }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d.data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d.data) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d.data);\r\n if (onSeriesMouseClick) onSeriesMouseClick(d.data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d.data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n />\r\n ))}\r\n </AnimatePresence>\r\n </motion.g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { ReactElement, useEffect, useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport orderBy from 'lodash.orderby';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n DonutChartDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DonutChartDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Array of colors for each segment */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: 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 /** Radius of the donut chart */\r\n radius?: number;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Max width of the color scale as a css property */\r\n colorScaleMaxWidth?: string;\r\n /** Stroke width of the arcs and circle of the donut */\r\n strokeWidth?: number;\r\n /** Sorting order for data. This is overwritten by labelOrder prop */\r\n sortData?: 'asc' | 'desc';\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Large text at the center of the donut chart. If the type is an object then the text is the value in the data for the label mentioned in the object */\r\n mainText?:\r\n | string\r\n | {\r\n label: string;\r\n suffix?: string;\r\n prefix?: string;\r\n locale?: string;\r\n padZeros?: boolean;\r\n precision?: number;\r\n }\r\n | ReactElement;\r\n /** Small text at the center of the donut chart */\r\n subNote?: string;\r\n /** Track color (i.e. the color of the donut chart's background) of the donut chart */\r\n trackColor?: string;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n numberDisplayOptions?: NumberFormatOptions;\r\n /** Defines how “NA” values should be displayed/labelled in the graph */\r\n naLabel?: string;\r\n\r\n // 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 DonutChart(props: Props) {\r\n const {\r\n mainText,\r\n graphTitle,\r\n colors = Colors.light.categoricalColors.colors,\r\n sources,\r\n strokeWidth = 50,\r\n graphDescription,\r\n subNote,\r\n footNote,\r\n radius,\r\n data,\r\n showColorScale = true,\r\n padding,\r\n backgroundColor = false,\r\n tooltip,\r\n onSeriesMouseOver,\r\n graphID,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n colorDomain,\r\n sortData,\r\n language = 'en',\r\n theme = 'light',\r\n width,\r\n height,\r\n minHeight = 0,\r\n relativeHeight,\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n colorScaleMaxWidth,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate = false,\r\n trackColor = Colors.light.grays['gray-200'],\r\n naLabel = 'NA',\r\n numberDisplayOptions,\r\n } = props;\r\n\r\n const [graphRadius, setGraphRadius] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setGraphRadius(\r\n (Math.min(\r\n ...[entries[0].target.clientWidth || 620, entries[0].target.clientHeight || 480],\r\n ) || 420) / 2,\r\n );\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const sortedData = sortData ? orderBy(data, ['size'], [sortData]) : data;\r\n\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {showColorScale && data.length > 0 ? (\r\n <>\r\n <div\r\n className={cn(\r\n 'leading-0 flex mb-0 ml-auto mr-auto justify-center gap-x-3 gap-y-0 flex-wrap',\r\n classNames?.colorLegend,\r\n )}\r\n style={{ maxWidth: colorScaleMaxWidth }}\r\n aria-label='Color legend'\r\n >\r\n {sortedData.map((d, i) => (\r\n <div className='flex gap-2 items-center pb-3' key={i}>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{\r\n backgroundColor:\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) !== -1\r\n ? (colors || Colors[theme].categoricalColors.colors)[\r\n (colorDomain || sortedData.map(el => el.label)).indexOf(d.label) %\r\n (colors || Colors[theme].categoricalColors.colors).length\r\n ]\r\n : Colors.gray,\r\n }}\r\n />\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n className='text-primary-gray-700 dark:text-primary-gray-100'\r\n >\r\n {d.label}:{' '}\r\n <span className='font-bold' style={{ fontSize: 'inherit' }}>\r\n {numberFormattingFunction(\r\n d.size,\r\n naLabel,\r\n numberDisplayOptions?.precision,\r\n numberDisplayOptions?.prefix,\r\n numberDisplayOptions?.suffix,\r\n numberDisplayOptions?.locale,\r\n numberDisplayOptions?.padZeros,\r\n )}\r\n </span>\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n <Spacer size='lg' />\r\n </>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {graphRadius && data.length > 0 ? (\r\n <Graph\r\n mainText={mainText}\r\n data={sortedData}\r\n colors={colors}\r\n radius={radius || graphRadius}\r\n subNote={subNote}\r\n strokeWidth={strokeWidth}\r\n tooltip={tooltip}\r\n colorDomain={colorDomain || sortedData.map(d => d.label)}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n detailsOnClick={detailsOnClick}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n trackColor={trackColor}\r\n naLabel={naLabel}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["pi","tau","descending","a","b","identity","d","pie","value","sortValues","sort","startAngle","constant","endAngle","padAngle","data","i","n","array","j","sum","index","arcs","a0","da","a1","p","pa","v","_","polarToCartesian","centerX","centerY","radius","angleInRadians","x","Math","cos","y","sin","getArc","startAngleInRadians","endAngleInRadians","start","end","abs","PI","largeArcFlag","join","Graph","props","$","_c","mainText","colors","subNote","strokeWidth","tooltip","onSeriesMouseOver","onSeriesMouseClick","colorDomain","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","animate","trackColor","naLabel","svgRef","useRef","t0","amount","once","isInView","useInView","pieData","_temp","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","motion","t2","t3","t4","t5","t6","t7","t8","t9","jsx","jsxs","isValidElement","H2","findIndex","d_1","label","numberFormattingFunction","d_0","size","precision","prefix","suffix","locale","padZeros","P","t10","t11","T0","AnimatePresence","t12","duration","d_2","initial","pathLength","opacity","whileInView","transition","stroke","indexOf","length","Colors","gray","fill","event","clientY","clientX","isEqual","event_0","t13","map","t14","t15","g","t16","svg","t17","Tooltip","t18","modal","DetailsModal","t19","Fragment","DonutChart","graphTitle","light","categoricalColors","sources","graphDescription","footNote","showColorScale","padding","backgroundColor","graphID","graphDownload","dataDownload","sortData","language","theme","width","height","minHeight","relativeHeight","ariaLabel","colorScaleMaxWidth","grays","numberDisplayOptions","graphRadius","setGraphRadius","graphDiv","graphParentDiv","useEffect","resizeObserver","ResizeObserver","entries","min","target","clientWidth","clientHeight","current","observe","disconnect","sortedData","orderBy","GraphContainer","graphContainer","GraphHeader","title","description","filter","cn","colorLegend","maxWidth","el","fontSize","Spacer","GraphArea","EmptyState","GraphFooter","footnote","source"],"mappings":";;;;;;;;;;;;;;;;;;AASO,MAAMA,KAAK,KAAK,IAEVC,KAAM,IAAID;ACXR,SAAAE,GAASC,GAAGC,GAAG;AAC5B,SAAOA,IAAID,IAAI,KAAKC,IAAID,IAAI,IAAIC,KAAKD,IAAI,IAAI;AAC/C;ACFe,SAAAE,GAASC,GAAG;AACzB,SAAOA;AACT;ACIe,SAAAC,KAAW;AACxB,MAAIC,IAAQH,IACRI,IAAaP,IACbQ,IAAO,MACPC,IAAaC,EAAS,CAAC,GACvBC,IAAWD,EAASX,EAAG,GACvBa,IAAWF,EAAS,CAAC;AAEzB,WAASL,EAAIQ,GAAM;AACjB,QAAIC,GACAC,KAAKF,IAAOG,GAAMH,CAAI,GAAG,QACzBI,GACA,GACAC,IAAM,GACNC,IAAQ,IAAI,MAAMJ,CAAC,GACnBK,IAAO,IAAI,MAAML,CAAC,GAClBM,IAAK,CAACZ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List":[0,1,2,3]}
|
package/dist/DotDensityMap.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-D4pAp7u0.cjs"),i=require("react"),jt=require("./parse-xYI9yrvL.cjs"),bt=require("./getSliderMarks-BzrpHrHS.cjs"),Mt=require("./Spinner-WHzzloYQ.cjs"),Ot=require("./index-DQA8q5sC.cjs"),S=require("./index-DLFt97gy.cjs"),Nt=require("./Typography-BqmyF1gP.cjs"),qt=require("./index-C5K--w8d.cjs"),Bt=require("./Tooltip-Hr46paWP.cjs"),D=require("./Colors.cjs"),nt=require("./index-BhI7mBJx.cjs"),$t=require("./DetailsModal-jmmKRMRM.cjs"),It=require("./pow-BnyPO-NX.cjs"),yt=require("./select-Bnfk0lJx.cjs"),at=require("./proxy-CqH8m8IQ.cjs"),Pt=require("./use-in-view-dnRv_qqF.cjs"),_t=require("./index-FXfr51ZM.cjs"),Wt=require("./GraphFooter.cjs"),zt=require("./GraphHeader.cjs"),Et=require("./fetchAndParseData-QTF6tjij.cjs"),Vt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Lt=require("./uniqBy-O05lp2S5.cjs"),Dt=require("./GraphContainer-Cul9b74X.cjs");function At(n){const{data:e,colors:r,mapData:K,colorLegendTitle:q,colorDomain:y,radius:k,height:g,width:m,scale:x,centerPoint:B,tooltip:Z,showLabels:xe,mapBorderWidth:ge,mapBorderColor:ye,mapNoDataColor:ve,onSeriesMouseOver:Q,showColorScale:$e,zoomScaleExtend:Ie,zoomTranslateExtend:Pe,highlightedDataPoints:je,onSeriesMouseClick:ee,resetSelectionOnDoubleClick:be,detailsOnClick:v,styles:te,classNames:W,mapProjection:z,zoomInteraction:C,animate:j,dimmedOpacity:oe,customLayers:re,maxRadiusValue:Ee,collapseColorScaleByDefault:De,projectionRotate:$,rewindCoordinatesInMapData:V,overlayMapData:L,overlayMapBorderColor:_e,overlayMapBorderWidth:We}=n,A=i.useMemo(()=>V?S.index_default(K,{reverse:!0}):K,[K,V]),ze=i.useMemo(()=>!V||!L?L:S.index_default(L,{reverse:!0}),[L,V]),[ae,d]=i.useState(void 0),[f,Ce]=i.useState(De===void 0?!(m<680):!De),ne=i.useRef(null),[ie,se]=i.useState(void 0),[F,I]=i.useState(void 0),[T,G]=i.useState(void 0),[H,le]=i.useState(void 0),p=i.useRef(null),b=Pt.useInView(p,{once:j.once,amount:j.amount}),U=i.useRef(null),w=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?It.sqrt().domain([0,Ee]).range([.25,k]).nice():void 0;i.useEffect(()=>{const t=yt.select(U.current),h=yt.select(p.current),a=u=>{if(C==="noZoom")return!1;if(C==="button")return!u.type.includes("wheel");const _=u.type==="wheel",Me=u.type.startsWith("touch"),Oe=u.type==="mousedown"||u.type==="mousemove";return Me?!0:_?C==="scroll"?!0:u.ctrlKey:Oe&&!u.button&&!u.ctrlKey},ue=S.zoom().scaleExtent(Ie).translateExtent(Pe||[[-20,-20],[m+20,g+20]]).filter(a).on("zoom",({transform:u})=>{t.attr("transform",u)});h.call(ue),ne.current=ue},[g,m,C]);const P=S.index_default$1(A),M=qt.index_default(A),we=(P[2]-P[0])*1.15,Re=(P[3]-P[1])*1.15,Se=m*190/960*360/we,ke=g*190/678*180/Re,R=x*Math.min(Se,ke),X=z==="mercator"?S.geoMercator().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):z==="equalEarth"?S.geoEqualEarth().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):z==="naturalEarth"?S.geoNaturalEarth1().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):z==="orthographic"?S.geoOrthographic().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):S.geoAlbersUsa().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R),Y=S.geoPath().projection(X),ce=t=>{if(!p.current||!ne.current)return;yt.select(p.current).call(ne.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(at.motion.svg,{width:`${m}px`,height:`${g}px`,viewBox:`0 0 ${m} ${g}`,ref:p,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:U,children:[re.filter(t=>t.position==="before").map(t=>t.layer),A.features.map((t,h)=>{const a=Y(t);return a?o.jsxRuntimeExports.jsx("path",{d:a,style:{stroke:ye,strokeWidth:ge,fill:ve,vectorEffect:"non-scaling-stroke"}},h):null}),ze?.features.map((t,h)=>{const a=Y(t);return a?o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx("path",{d:a,style:{stroke:_e||ye,strokeWidth:We||ge+1,fill:"none",pointerEvents:"none",vectorEffect:"non-scaling-stroke"}})},h):null}),o.jsxRuntimeExports.jsx(_t.AnimatePresence,{children:e.map(t=>{const h=e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray;return o.jsxRuntimeExports.jsxs(at.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:ae?ae===h?1:oe:je?je.indexOf(t.label||"")!==-1?1:oe:1,transition:{duration:j.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},onMouseEnter:a=>{I(t),le(a.clientY),G(a.clientX),Q?.(t)},onMouseMove:a=>{I(t),le(a.clientY),G(a.clientX)},onMouseLeave:()=>{I(void 0),G(void 0),le(void 0),Q?.(void 0)},onClick:()=>{(ee||v)&&(Ot.isEqual(ie,t)&&be?(se(void 0),ee?.(void 0)):(se(t),ee?.(t)))},transform:`translate(${X([t.long,t.lat])[0]},${X([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(at.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray},whileInView:{r:w?w(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray,transition:{duration:j.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{r:0,transition:{duration:j.duration}},style:{fillOpacity:.8,vectorEffect:"non-scaling-stroke"}}),xe&&t.label?o.jsxRuntimeExports.jsx(at.motion.text,{variants:{initial:{opacity:0,x:w?w(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray},whileInView:{opacity:1,x:w?w(t.radius||0):k,transition:{duration:j.duration},fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},y:0,className:o.mo("graph-value text-sm",W?.graphObjectValues),style:{textAnchor:"start",vectorEffect:"non-scaling-stroke",...te?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),re.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",W?.colorLegend),children:f?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{Ce(!1)},children:o.jsxRuntimeExports.jsx(nt.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[q&&q!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:q}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:y.map((t,h)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{d(r[h%r.length])},onMouseLeave:()=>{d(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[h%r.length]}}),o.jsxRuntimeExports.jsx(Nt._,{size:"sm",marginBottom:"none",leading:"none",children:t})]},h))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{Ce(!0)},children:o.jsxRuntimeExports.jsx(nt.ExpandIcon,{})})}),C==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>ce("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>ce("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),v&&ie!==void 0?o.jsxRuntimeExports.jsx($t.DetailsModal,{body:v,data:ie,setData:se,className:W?.modal}):null,F&&Z&&T&&H?o.jsxRuntimeExports.jsx(Bt.Tooltip,{data:F,body:Z,xPos:T,yPos:H,backgroundStyle:te?.tooltip,className:W?.tooltip}):null]})}function Ft(n){const e=o.compilerRuntimeExports.c(128),{data:r,mapData:K,graphTitle:q,colors:y,sources:k,graphDescription:g,height:m,width:x,footNote:B,colorLegendTitle:Z,colorDomain:xe,radius:ge,scale:ye,centerPoint:ve,padding:Q,mapBorderWidth:$e,mapNoDataColor:Ie,backgroundColor:Pe,showLabels:je,mapBorderColor:ee,tooltip:be,relativeHeight:v,onSeriesMouseOver:te,isWorldMap:W,showColorScale:z,zoomScaleExtend:C,zoomTranslateExtend:j,graphID:oe,highlightedDataPoints:re,onSeriesMouseClick:Ee,graphDownload:De,dataDownload:$,showAntarctica:V,language:L,minHeight:_e,theme:We,ariaLabel:A,resetSelectionOnDoubleClick:ze,detailsOnClick:ae,styles:d,classNames:f,mapProjection:Ce,zoomInteraction:ne,animate:ie,dimmedOpacity:se,customLayers:F,maxRadiusValue:I,timeline:T,collapseColorScaleByDefault:G,projectionRotate:H,rewindCoordinatesInMapData:le,mapOverlay:p}=n,b=K===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":K,U=B===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":B,w=ge===void 0?5:ge,P=ye===void 0?.95:ye,M=$e===void 0?.5:$e,we=Ie===void 0?D.Colors.light.graphNoData:Ie,Re=Pe===void 0?!1:Pe,Se=je===void 0?!1:je,ke=ee===void 0?D.Colors.light.grays["gray-500"]:ee,R=W===void 0?!0:W,X=z===void 0?!0:z;let Y;e[0]!==C?(Y=C===void 0?[.8,6]:C,e[0]=C,e[1]=Y):Y=e[1];const ce=Y,t=De===void 0?!1:De,h=$===void 0?!1:$,a=V===void 0?!1:V,ue=L===void 0?"en":L,u=_e===void 0?0:_e,_=We===void 0?"light":We,Me=ze===void 0?!0:ze,Oe=Ce===void 0?"naturalEarth":Ce,it=ne===void 0?"button":ne,Ve=ie===void 0?!1:ie,st=se===void 0?.3:se;let Le;e[2]!==F?(Le=F===void 0?[]:F,e[2]=F,e[3]=Le):Le=e[3];const lt=Le;let Ae;e[4]!==T?(Ae=T===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:T,e[4]=T,e[5]=Ae):Ae=e[5];const s=Ae;let Fe;e[6]!==H?(Fe=H===void 0?[0,0]:H,e[6]=H,e[7]=Fe):Fe=e[7];const ct=Fe,ut=le===void 0?!0:le,[J,Ct]=i.useState(0),[Ne,wt]=i.useState(0),[O,Rt]=i.useState(s.autoplay);let qe;if(e[8]!==r||e[9]!==s.dateFormat){let l;e[11]!==s.dateFormat?(l=E=>jt.parse(`${E.date}`,s.dateFormat||"yyyy",new Date).getTime(),e[11]=s.dateFormat,e[12]=l):l=e[12],qe=[...new Set(r.filter(to).map(l))],qe.sort(eo),e[8]=r,e[9]=s.dateFormat,e[10]=qe}else qe=e[10];const c=qe,[N,dt]=i.useState(s.autoplay?0:c.length-1),[de,St]=i.useState(void 0),[pt,kt]=i.useState(void 0),mt=i.useRef(null),vt=i.useRef(null);let Te,Ge;e[13]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{const l=new ResizeObserver(E=>{Ct(E[0].target.clientWidth||620),wt(E[0].target.clientHeight||480)});return mt.current&&l.observe(mt.current),()=>l.disconnect()},Ge=[],e[13]=Te,e[14]=Ge):(Te=e[13],Ge=e[14]),i.useEffect(Te,Ge);let He;e[15]===Symbol.for("react.memo_cache_sentinel")?(He=l=>{St(l)},e[15]=He):He=e[15];const Ue=i.useEffectEvent(He);let Xe;e[16]===Symbol.for("react.memo_cache_sentinel")?(Xe=l=>{kt(l)},e[16]=Xe):Xe=e[16];const Be=i.useEffectEvent(Xe);let Ye;e[17]!==b||e[18]!==Ue?(Ye=()=>{typeof b=="string"?Et.fetchAndParseJSON(b).then(E=>{Ue(E)}):Ue(b)},e[17]=b,e[18]=Ue,e[19]=Ye):Ye=e[19];let Je;e[20]!==b?(Je=[b],e[20]=b,e[21]=Je):Je=e[21],i.useEffect(Ye,Je);let Ke;e[22]!==p?.mapData||e[23]!==Be?(Ke=()=>{p?.mapData||Be(void 0),typeof p?.mapData=="string"?Et.fetchAndParseJSON(p?.mapData).then(E=>{Be(E)}):Be(p?.mapData)},e[22]=p?.mapData,e[23]=Be,e[24]=Ke):Ke=e[24];const ft=p?.mapData;let Ze;e[25]!==ft?(Ze=[ft],e[25]=ft,e[26]=Ze):Ze=e[26],i.useEffect(Ke,Ze);let Qe,et;e[27]!==O||e[28]!==s.speed||e[29]!==c?(Qe=()=>{const l=setInterval(()=>{dt(E=>E<c.length-1?E+1:0)},(s.speed||2)*1e3);return O||clearInterval(l),()=>clearInterval(l)},et=[c,O,s.speed],e[27]=O,e[28]=s.speed,e[29]=c,e[30]=Qe,e[31]=et):(Qe=e[30],et=e[31]),i.useEffect(Qe,et);const ht=s.dateFormat||"yyyy";let tt;e[32]!==N||e[33]!==ht||e[34]!==s.showOnlyActiveDate||e[35]!==c?(tt=bt.getSliderMarks(c,N,s.showOnlyActiveDate,ht),e[32]=N,e[33]=ht,e[34]=s.showOnlyActiveDate,e[35]=c,e[36]=tt):tt=e[36];const ot=tt,xt=f?.graphContainer,gt=d?.graphContainer;let pe;e[37]!==f?.description||e[38]!==f?.title||e[39]!==r||e[40]!==h||e[41]!==g||e[42]!==t||e[43]!==q||e[44]!==d?.description||e[45]!==d?.title||e[46]!==x?(pe=q||g||t||h?o.jsxRuntimeExports.jsx(zt.GraphHeader,{styles:{title:d?.title,description:d?.description},classNames:{title:f?.title,description:f?.description},graphTitle:q,graphDescription:g,width:x,graphDownload:t?vt:void 0,dataDownload:h?r.map(Qt).filter(Zt).length>0?r.map(Kt).filter(Jt):r.filter(Yt):null}):null,e[37]=f?.description,e[38]=f?.title,e[39]=r,e[40]=h,e[41]=g,e[42]=t,e[43]=q,e[44]=d?.description,e[45]=d?.title,e[46]=x,e[47]=pe):pe=e[47];let me;e[48]!==N||e[49]!==ot||e[50]!==O||e[51]!==s.enabled||e[52]!==c?(me=s.enabled&&c.length>0&&ot?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Rt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(nt.Pause,{}):o.jsxRuntimeExports.jsx(nt.Play,{})}),o.jsxRuntimeExports.jsx(bt.Nr,{min:c[0],max:c[c.length-1],marks:ot,step:null,defaultValue:c[c.length-1],value:c[N],onChangeComplete:l=>{dt(c.indexOf(l))},onChange:l=>{dt(c.indexOf(l))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[48]=N,e[49]=ot,e[50]=O,e[51]=s.enabled,e[52]=c,e[53]=me):me=e[53];let fe;e[54]!==Ve||e[55]!==ve||e[56]!==f||e[57]!==G||e[58]!==xe||e[59]!==Z||e[60]!==y||e[61]!==lt||e[62]!==r||e[63]!==ae||e[64]!==st||e[65]!==m||e[66]!==re||e[67]!==N||e[68]!==R||e[69]!==ke||e[70]!==M||e[71]!==we||e[72]!==p?.mapBorderColor||e[73]!==p?.mapBorderWidth||e[74]!==Oe||e[75]!==de||e[76]!==I||e[77]!==u||e[78]!==Ee||e[79]!==te||e[80]!==pt||e[81]!==ct||e[82]!==w||e[83]!==v||e[84]!==Me||e[85]!==ut||e[86]!==P||e[87]!==a||e[88]!==X||e[89]!==Se||e[90]!==d||e[91]!==Ne||e[92]!==J||e[93]!==_||e[94]!==s.dateFormat||e[95]!==s.enabled||e[96]!==be||e[97]!==c||e[98]!==x||e[99]!==it||e[100]!==ce||e[101]!==j?(fe=o.jsxRuntimeExports.jsx(Dt.GraphArea,{ref:mt,children:J&&Ne&&de?o.jsxRuntimeExports.jsx(At,{data:r.filter(l=>s.enabled?`${l.date}`===jt.format(new Date(c[N]),s.dateFormat||"yyyy"):l),mapData:a?de:{...de,features:de.features.filter(Xt)},colorDomain:r.filter(Ut).length===0?[]:xe||Lt.uniqBy(r,"color",!0),width:J,height:Ne,scale:P,centerPoint:ve,colors:r.filter(Ht).length===0?y?[y]:[D.Colors.primaryColors["blue-600"]]:y||D.Colors[_].categoricalColors.colors,colorLegendTitle:Z,radius:w,overlayMapData:pt,overlayMapBorderColor:p?.mapBorderColor,overlayMapBorderWidth:p?.mapBorderWidth,mapBorderWidth:M,mapNoDataColor:we,mapBorderColor:ke,tooltip:be,onSeriesMouseOver:te,showLabels:Se,isWorldMap:R,showColorScale:X,zoomScaleExtend:ce,zoomTranslateExtend:j,onSeriesMouseClick:Ee,highlightedDataPoints:re,resetSelectionOnDoubleClick:Me,styles:d,classNames:f,zoomInteraction:it,detailsOnClick:ae,mapProjection:Oe||(R?"naturalEarth":"mercator"),animate:Ve===!0?{duration:.5,once:!0,amount:.5}:Ve||{duration:0,once:!0,amount:0},dimmedOpacity:st,customLayers:lt,maxRadiusValue:Vt.checkIfNullOrUndefined(I)?Math.max(...r.map(Gt).filter(Tt)):I,collapseColorScaleByDefault:G,projectionRotate:ct,rewindCoordinatesInMapData:ut}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(u,m||(v?u?(x||J)*v>u?(x||J)*v:u:(x||J)*v:Ne))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Mt.w,{"aria-label":"Loading graph"})})}),e[54]=Ve,e[55]=ve,e[56]=f,e[57]=G,e[58]=xe,e[59]=Z,e[60]=y,e[61]=lt,e[62]=r,e[63]=ae,e[64]=st,e[65]=m,e[66]=re,e[67]=N,e[68]=R,e[69]=ke,e[70]=M,e[71]=we,e[72]=p?.mapBorderColor,e[73]=p?.mapBorderWidth,e[74]=Oe,e[75]=de,e[76]=I,e[77]=u,e[78]=Ee,e[79]=te,e[80]=pt,e[81]=ct,e[82]=w,e[83]=v,e[84]=Me,e[85]=ut,e[86]=P,e[87]=a,e[88]=X,e[89]=Se,e[90]=d,e[91]=Ne,e[92]=J,e[93]=_,e[94]=s.dateFormat,e[95]=s.enabled,e[96]=be,e[97]=c,e[98]=x,e[99]=it,e[100]=ce,e[101]=j,e[102]=fe):fe=e[102];let he;e[103]!==f?.footnote||e[104]!==f?.source||e[105]!==U||e[106]!==k||e[107]!==d?.footnote||e[108]!==d?.source||e[109]!==x?(he=k||U?o.jsxRuntimeExports.jsx(Wt.GraphFooter,{styles:{footnote:d?.footnote,source:d?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:k,footNote:U,width:x}):null,e[103]=f?.footnote,e[104]=f?.source,e[105]=U,e[106]=k,e[107]=d?.footnote,e[108]=d?.source,e[109]=x,e[110]=he):he=e[110];let rt;return e[111]!==A||e[112]!==Re||e[113]!==oe||e[114]!==m||e[115]!==ue||e[116]!==u||e[117]!==Q||e[118]!==v||e[119]!==xt||e[120]!==gt||e[121]!==pe||e[122]!==me||e[123]!==fe||e[124]!==he||e[125]!==_||e[126]!==x?(rt=o.jsxRuntimeExports.jsxs(Dt.GraphContainer,{className:xt,style:gt,id:oe,ref:vt,"aria-label":A,backgroundColor:Re,theme:_,language:ue,minHeight:u,width:x,height:m,relativeHeight:v,padding:Q,children:[pe,me,fe,he]}),e[111]=A,e[112]=Re,e[113]=oe,e[114]=m,e[115]=ue,e[116]=u,e[117]=Q,e[118]=v,e[119]=xt,e[120]=gt,e[121]=pe,e[122]=me,e[123]=fe,e[124]=he,e[125]=_,e[126]=x,e[127]=rt):rt=e[127],rt}function Tt(n){return n!=null}function Gt(n){return n.radius}function Ht(n){return n.color}function Ut(n){return n.color}function Xt(n){return n.properties?.NAME!=="Antarctica"}function Yt(n){return n!==void 0}function Jt(n){return n!==void 0}function Kt(n){return n.data}function Zt(n){return n!==void 0}function Qt(n){return n.data}function eo(n,e){return n-e}function to(n){return n.date}exports.DotDensityMap=Ft;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-D4pAp7u0.cjs"),i=require("react"),jt=require("./parse-xYI9yrvL.cjs"),bt=require("./getSliderMarks-BzrpHrHS.cjs"),Mt=require("./Spinner-WHzzloYQ.cjs"),Ot=require("./index-DQA8q5sC.cjs"),S=require("./index-DLFt97gy.cjs"),Nt=require("./Typography-BqmyF1gP.cjs"),qt=require("./index-C5K--w8d.cjs"),Bt=require("./Tooltip-C9F3uYG0.cjs"),D=require("./Colors.cjs"),nt=require("./index-BhI7mBJx.cjs"),$t=require("./DetailsModal-Du8Fr1QD.cjs"),It=require("./pow-BnyPO-NX.cjs"),yt=require("./select-Bnfk0lJx.cjs"),at=require("./proxy-CqH8m8IQ.cjs"),Pt=require("./use-in-view-dnRv_qqF.cjs"),_t=require("./index-FXfr51ZM.cjs"),Wt=require("./GraphFooter.cjs"),zt=require("./GraphHeader.cjs"),Et=require("./fetchAndParseData-QTF6tjij.cjs"),Vt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Lt=require("./uniqBy-O05lp2S5.cjs"),Dt=require("./GraphContainer-Cul9b74X.cjs");function At(n){const{data:e,colors:r,mapData:K,colorLegendTitle:q,colorDomain:y,radius:k,height:g,width:m,scale:x,centerPoint:B,tooltip:Z,showLabels:xe,mapBorderWidth:ge,mapBorderColor:ye,mapNoDataColor:ve,onSeriesMouseOver:Q,showColorScale:$e,zoomScaleExtend:Ie,zoomTranslateExtend:Pe,highlightedDataPoints:je,onSeriesMouseClick:ee,resetSelectionOnDoubleClick:be,detailsOnClick:v,styles:te,classNames:W,mapProjection:z,zoomInteraction:C,animate:j,dimmedOpacity:oe,customLayers:re,maxRadiusValue:Ee,collapseColorScaleByDefault:De,projectionRotate:$,rewindCoordinatesInMapData:V,overlayMapData:L,overlayMapBorderColor:_e,overlayMapBorderWidth:We}=n,A=i.useMemo(()=>V?S.index_default(K,{reverse:!0}):K,[K,V]),ze=i.useMemo(()=>!V||!L?L:S.index_default(L,{reverse:!0}),[L,V]),[ae,d]=i.useState(void 0),[f,Ce]=i.useState(De===void 0?!(m<680):!De),ne=i.useRef(null),[ie,se]=i.useState(void 0),[F,I]=i.useState(void 0),[T,G]=i.useState(void 0),[H,le]=i.useState(void 0),p=i.useRef(null),b=Pt.useInView(p,{once:j.once,amount:j.amount}),U=i.useRef(null),w=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?It.sqrt().domain([0,Ee]).range([.25,k]).nice():void 0;i.useEffect(()=>{const t=yt.select(U.current),h=yt.select(p.current),a=u=>{if(C==="noZoom")return!1;if(C==="button")return!u.type.includes("wheel");const _=u.type==="wheel",Me=u.type.startsWith("touch"),Oe=u.type==="mousedown"||u.type==="mousemove";return Me?!0:_?C==="scroll"?!0:u.ctrlKey:Oe&&!u.button&&!u.ctrlKey},ue=S.zoom().scaleExtent(Ie).translateExtent(Pe||[[-20,-20],[m+20,g+20]]).filter(a).on("zoom",({transform:u})=>{t.attr("transform",u)});h.call(ue),ne.current=ue},[g,m,C]);const P=S.index_default$1(A),M=qt.index_default(A),we=(P[2]-P[0])*1.15,Re=(P[3]-P[1])*1.15,Se=m*190/960*360/we,ke=g*190/678*180/Re,R=x*Math.min(Se,ke),X=z==="mercator"?S.geoMercator().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):z==="equalEarth"?S.geoEqualEarth().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):z==="naturalEarth"?S.geoNaturalEarth1().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):z==="orthographic"?S.geoOrthographic().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R):S.geoAlbersUsa().rotate($).center(B||M.geometry.coordinates).translate([m/2,g/2]).scale(R),Y=S.geoPath().projection(X),ce=t=>{if(!p.current||!ne.current)return;yt.select(p.current).call(ne.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(at.motion.svg,{width:`${m}px`,height:`${g}px`,viewBox:`0 0 ${m} ${g}`,ref:p,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:U,children:[re.filter(t=>t.position==="before").map(t=>t.layer),A.features.map((t,h)=>{const a=Y(t);return a?o.jsxRuntimeExports.jsx("path",{d:a,style:{stroke:ye,strokeWidth:ge,fill:ve,vectorEffect:"non-scaling-stroke"}},h):null}),ze?.features.map((t,h)=>{const a=Y(t);return a?o.jsxRuntimeExports.jsx("g",{children:o.jsxRuntimeExports.jsx("path",{d:a,style:{stroke:_e||ye,strokeWidth:We||ge+1,fill:"none",pointerEvents:"none",vectorEffect:"non-scaling-stroke"}})},h):null}),o.jsxRuntimeExports.jsx(_t.AnimatePresence,{children:e.map(t=>{const h=e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray;return o.jsxRuntimeExports.jsxs(at.motion.g,{className:"undp-map-dots",variants:{initial:{opacity:0},whileInView:{opacity:ae?ae===h?1:oe:je?je.indexOf(t.label||"")!==-1?1:oe:1,transition:{duration:j.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},onMouseEnter:a=>{I(t),le(a.clientY),G(a.clientX),Q?.(t)},onMouseMove:a=>{I(t),le(a.clientY),G(a.clientX)},onMouseLeave:()=>{I(void 0),G(void 0),le(void 0),Q?.(void 0)},onClick:()=>{(ee||v)&&(Ot.isEqual(ie,t)&&be?(se(void 0),ee?.(void 0)):(se(t),ee?.(t)))},transform:`translate(${X([t.long,t.lat])[0]},${X([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(at.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray},whileInView:{r:w?w(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray,transition:{duration:j.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{r:0,transition:{duration:j.duration}},style:{fillOpacity:.8,vectorEffect:"non-scaling-stroke"}}),xe&&t.label?o.jsxRuntimeExports.jsx(at.motion.text,{variants:{initial:{opacity:0,x:w?w(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray},whileInView:{opacity:1,x:w?w(t.radius||0):k,transition:{duration:j.duration},fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[y.indexOf(`${t.color}`)]:D.Colors.gray}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},y:0,className:o.mo("graph-value text-sm",W?.graphObjectValues),style:{textAnchor:"start",vectorEffect:"non-scaling-stroke",...te?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),re.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",W?.colorLegend),children:f?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{Ce(!1)},children:o.jsxRuntimeExports.jsx(nt.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[q&&q!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:q}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:y.map((t,h)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{d(r[h%r.length])},onMouseLeave:()=>{d(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[h%r.length]}}),o.jsxRuntimeExports.jsx(Nt._,{size:"sm",marginBottom:"none",leading:"none",children:t})]},h))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{Ce(!0)},children:o.jsxRuntimeExports.jsx(nt.ExpandIcon,{})})}),C==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>ce("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>ce("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),v&&ie!==void 0?o.jsxRuntimeExports.jsx($t.DetailsModal,{body:v,data:ie,setData:se,className:W?.modal}):null,F&&Z&&T&&H?o.jsxRuntimeExports.jsx(Bt.Tooltip,{data:F,body:Z,xPos:T,yPos:H,backgroundStyle:te?.tooltip,className:W?.tooltip}):null]})}function Ft(n){const e=o.compilerRuntimeExports.c(128),{data:r,mapData:K,graphTitle:q,colors:y,sources:k,graphDescription:g,height:m,width:x,footNote:B,colorLegendTitle:Z,colorDomain:xe,radius:ge,scale:ye,centerPoint:ve,padding:Q,mapBorderWidth:$e,mapNoDataColor:Ie,backgroundColor:Pe,showLabels:je,mapBorderColor:ee,tooltip:be,relativeHeight:v,onSeriesMouseOver:te,isWorldMap:W,showColorScale:z,zoomScaleExtend:C,zoomTranslateExtend:j,graphID:oe,highlightedDataPoints:re,onSeriesMouseClick:Ee,graphDownload:De,dataDownload:$,showAntarctica:V,language:L,minHeight:_e,theme:We,ariaLabel:A,resetSelectionOnDoubleClick:ze,detailsOnClick:ae,styles:d,classNames:f,mapProjection:Ce,zoomInteraction:ne,animate:ie,dimmedOpacity:se,customLayers:F,maxRadiusValue:I,timeline:T,collapseColorScaleByDefault:G,projectionRotate:H,rewindCoordinatesInMapData:le,mapOverlay:p}=n,b=K===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":K,U=B===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":B,w=ge===void 0?5:ge,P=ye===void 0?.95:ye,M=$e===void 0?.5:$e,we=Ie===void 0?D.Colors.light.graphNoData:Ie,Re=Pe===void 0?!1:Pe,Se=je===void 0?!1:je,ke=ee===void 0?D.Colors.light.grays["gray-500"]:ee,R=W===void 0?!0:W,X=z===void 0?!0:z;let Y;e[0]!==C?(Y=C===void 0?[.8,6]:C,e[0]=C,e[1]=Y):Y=e[1];const ce=Y,t=De===void 0?!1:De,h=$===void 0?!1:$,a=V===void 0?!1:V,ue=L===void 0?"en":L,u=_e===void 0?0:_e,_=We===void 0?"light":We,Me=ze===void 0?!0:ze,Oe=Ce===void 0?"naturalEarth":Ce,it=ne===void 0?"button":ne,Ve=ie===void 0?!1:ie,st=se===void 0?.3:se;let Le;e[2]!==F?(Le=F===void 0?[]:F,e[2]=F,e[3]=Le):Le=e[3];const lt=Le;let Ae;e[4]!==T?(Ae=T===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:T,e[4]=T,e[5]=Ae):Ae=e[5];const s=Ae;let Fe;e[6]!==H?(Fe=H===void 0?[0,0]:H,e[6]=H,e[7]=Fe):Fe=e[7];const ct=Fe,ut=le===void 0?!0:le,[J,Ct]=i.useState(0),[Ne,wt]=i.useState(0),[O,Rt]=i.useState(s.autoplay);let qe;if(e[8]!==r||e[9]!==s.dateFormat){let l;e[11]!==s.dateFormat?(l=E=>jt.parse(`${E.date}`,s.dateFormat||"yyyy",new Date).getTime(),e[11]=s.dateFormat,e[12]=l):l=e[12],qe=[...new Set(r.filter(to).map(l))],qe.sort(eo),e[8]=r,e[9]=s.dateFormat,e[10]=qe}else qe=e[10];const c=qe,[N,dt]=i.useState(s.autoplay?0:c.length-1),[de,St]=i.useState(void 0),[pt,kt]=i.useState(void 0),mt=i.useRef(null),vt=i.useRef(null);let Te,Ge;e[13]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{const l=new ResizeObserver(E=>{Ct(E[0].target.clientWidth||620),wt(E[0].target.clientHeight||480)});return mt.current&&l.observe(mt.current),()=>l.disconnect()},Ge=[],e[13]=Te,e[14]=Ge):(Te=e[13],Ge=e[14]),i.useEffect(Te,Ge);let He;e[15]===Symbol.for("react.memo_cache_sentinel")?(He=l=>{St(l)},e[15]=He):He=e[15];const Ue=i.useEffectEvent(He);let Xe;e[16]===Symbol.for("react.memo_cache_sentinel")?(Xe=l=>{kt(l)},e[16]=Xe):Xe=e[16];const Be=i.useEffectEvent(Xe);let Ye;e[17]!==b||e[18]!==Ue?(Ye=()=>{typeof b=="string"?Et.fetchAndParseJSON(b).then(E=>{Ue(E)}):Ue(b)},e[17]=b,e[18]=Ue,e[19]=Ye):Ye=e[19];let Je;e[20]!==b?(Je=[b],e[20]=b,e[21]=Je):Je=e[21],i.useEffect(Ye,Je);let Ke;e[22]!==p?.mapData||e[23]!==Be?(Ke=()=>{p?.mapData||Be(void 0),typeof p?.mapData=="string"?Et.fetchAndParseJSON(p?.mapData).then(E=>{Be(E)}):Be(p?.mapData)},e[22]=p?.mapData,e[23]=Be,e[24]=Ke):Ke=e[24];const ft=p?.mapData;let Ze;e[25]!==ft?(Ze=[ft],e[25]=ft,e[26]=Ze):Ze=e[26],i.useEffect(Ke,Ze);let Qe,et;e[27]!==O||e[28]!==s.speed||e[29]!==c?(Qe=()=>{const l=setInterval(()=>{dt(E=>E<c.length-1?E+1:0)},(s.speed||2)*1e3);return O||clearInterval(l),()=>clearInterval(l)},et=[c,O,s.speed],e[27]=O,e[28]=s.speed,e[29]=c,e[30]=Qe,e[31]=et):(Qe=e[30],et=e[31]),i.useEffect(Qe,et);const ht=s.dateFormat||"yyyy";let tt;e[32]!==N||e[33]!==ht||e[34]!==s.showOnlyActiveDate||e[35]!==c?(tt=bt.getSliderMarks(c,N,s.showOnlyActiveDate,ht),e[32]=N,e[33]=ht,e[34]=s.showOnlyActiveDate,e[35]=c,e[36]=tt):tt=e[36];const ot=tt,xt=f?.graphContainer,gt=d?.graphContainer;let pe;e[37]!==f?.description||e[38]!==f?.title||e[39]!==r||e[40]!==h||e[41]!==g||e[42]!==t||e[43]!==q||e[44]!==d?.description||e[45]!==d?.title||e[46]!==x?(pe=q||g||t||h?o.jsxRuntimeExports.jsx(zt.GraphHeader,{styles:{title:d?.title,description:d?.description},classNames:{title:f?.title,description:f?.description},graphTitle:q,graphDescription:g,width:x,graphDownload:t?vt:void 0,dataDownload:h?r.map(Qt).filter(Zt).length>0?r.map(Kt).filter(Jt):r.filter(Yt):null}):null,e[37]=f?.description,e[38]=f?.title,e[39]=r,e[40]=h,e[41]=g,e[42]=t,e[43]=q,e[44]=d?.description,e[45]=d?.title,e[46]=x,e[47]=pe):pe=e[47];let me;e[48]!==N||e[49]!==ot||e[50]!==O||e[51]!==s.enabled||e[52]!==c?(me=s.enabled&&c.length>0&&ot?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Rt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(nt.Pause,{}):o.jsxRuntimeExports.jsx(nt.Play,{})}),o.jsxRuntimeExports.jsx(bt.Nr,{min:c[0],max:c[c.length-1],marks:ot,step:null,defaultValue:c[c.length-1],value:c[N],onChangeComplete:l=>{dt(c.indexOf(l))},onChange:l=>{dt(c.indexOf(l))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[48]=N,e[49]=ot,e[50]=O,e[51]=s.enabled,e[52]=c,e[53]=me):me=e[53];let fe;e[54]!==Ve||e[55]!==ve||e[56]!==f||e[57]!==G||e[58]!==xe||e[59]!==Z||e[60]!==y||e[61]!==lt||e[62]!==r||e[63]!==ae||e[64]!==st||e[65]!==m||e[66]!==re||e[67]!==N||e[68]!==R||e[69]!==ke||e[70]!==M||e[71]!==we||e[72]!==p?.mapBorderColor||e[73]!==p?.mapBorderWidth||e[74]!==Oe||e[75]!==de||e[76]!==I||e[77]!==u||e[78]!==Ee||e[79]!==te||e[80]!==pt||e[81]!==ct||e[82]!==w||e[83]!==v||e[84]!==Me||e[85]!==ut||e[86]!==P||e[87]!==a||e[88]!==X||e[89]!==Se||e[90]!==d||e[91]!==Ne||e[92]!==J||e[93]!==_||e[94]!==s.dateFormat||e[95]!==s.enabled||e[96]!==be||e[97]!==c||e[98]!==x||e[99]!==it||e[100]!==ce||e[101]!==j?(fe=o.jsxRuntimeExports.jsx(Dt.GraphArea,{ref:mt,children:J&&Ne&&de?o.jsxRuntimeExports.jsx(At,{data:r.filter(l=>s.enabled?`${l.date}`===jt.format(new Date(c[N]),s.dateFormat||"yyyy"):l),mapData:a?de:{...de,features:de.features.filter(Xt)},colorDomain:r.filter(Ut).length===0?[]:xe||Lt.uniqBy(r,"color",!0),width:J,height:Ne,scale:P,centerPoint:ve,colors:r.filter(Ht).length===0?y?[y]:[D.Colors.primaryColors["blue-600"]]:y||D.Colors[_].categoricalColors.colors,colorLegendTitle:Z,radius:w,overlayMapData:pt,overlayMapBorderColor:p?.mapBorderColor,overlayMapBorderWidth:p?.mapBorderWidth,mapBorderWidth:M,mapNoDataColor:we,mapBorderColor:ke,tooltip:be,onSeriesMouseOver:te,showLabels:Se,isWorldMap:R,showColorScale:X,zoomScaleExtend:ce,zoomTranslateExtend:j,onSeriesMouseClick:Ee,highlightedDataPoints:re,resetSelectionOnDoubleClick:Me,styles:d,classNames:f,zoomInteraction:it,detailsOnClick:ae,mapProjection:Oe||(R?"naturalEarth":"mercator"),animate:Ve===!0?{duration:.5,once:!0,amount:.5}:Ve||{duration:0,once:!0,amount:0},dimmedOpacity:st,customLayers:lt,maxRadiusValue:Vt.checkIfNullOrUndefined(I)?Math.max(...r.map(Gt).filter(Tt)):I,collapseColorScaleByDefault:G,projectionRotate:ct,rewindCoordinatesInMapData:ut}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(u,m||(v?u?(x||J)*v>u?(x||J)*v:u:(x||J)*v:Ne))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Mt.w,{"aria-label":"Loading graph"})})}),e[54]=Ve,e[55]=ve,e[56]=f,e[57]=G,e[58]=xe,e[59]=Z,e[60]=y,e[61]=lt,e[62]=r,e[63]=ae,e[64]=st,e[65]=m,e[66]=re,e[67]=N,e[68]=R,e[69]=ke,e[70]=M,e[71]=we,e[72]=p?.mapBorderColor,e[73]=p?.mapBorderWidth,e[74]=Oe,e[75]=de,e[76]=I,e[77]=u,e[78]=Ee,e[79]=te,e[80]=pt,e[81]=ct,e[82]=w,e[83]=v,e[84]=Me,e[85]=ut,e[86]=P,e[87]=a,e[88]=X,e[89]=Se,e[90]=d,e[91]=Ne,e[92]=J,e[93]=_,e[94]=s.dateFormat,e[95]=s.enabled,e[96]=be,e[97]=c,e[98]=x,e[99]=it,e[100]=ce,e[101]=j,e[102]=fe):fe=e[102];let he;e[103]!==f?.footnote||e[104]!==f?.source||e[105]!==U||e[106]!==k||e[107]!==d?.footnote||e[108]!==d?.source||e[109]!==x?(he=k||U?o.jsxRuntimeExports.jsx(Wt.GraphFooter,{styles:{footnote:d?.footnote,source:d?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:k,footNote:U,width:x}):null,e[103]=f?.footnote,e[104]=f?.source,e[105]=U,e[106]=k,e[107]=d?.footnote,e[108]=d?.source,e[109]=x,e[110]=he):he=e[110];let rt;return e[111]!==A||e[112]!==Re||e[113]!==oe||e[114]!==m||e[115]!==ue||e[116]!==u||e[117]!==Q||e[118]!==v||e[119]!==xt||e[120]!==gt||e[121]!==pe||e[122]!==me||e[123]!==fe||e[124]!==he||e[125]!==_||e[126]!==x?(rt=o.jsxRuntimeExports.jsxs(Dt.GraphContainer,{className:xt,style:gt,id:oe,ref:vt,"aria-label":A,backgroundColor:Re,theme:_,language:ue,minHeight:u,width:x,height:m,relativeHeight:v,padding:Q,children:[pe,me,fe,he]}),e[111]=A,e[112]=Re,e[113]=oe,e[114]=m,e[115]=ue,e[116]=u,e[117]=Q,e[118]=v,e[119]=xt,e[120]=gt,e[121]=pe,e[122]=me,e[123]=fe,e[124]=he,e[125]=_,e[126]=x,e[127]=rt):rt=e[127],rt}function Tt(n){return n!=null}function Gt(n){return n.radius}function Ht(n){return n.color}function Ut(n){return n.color}function Xt(n){return n.properties?.NAME!=="Antarctica"}function Yt(n){return n!==void 0}function Jt(n){return n!==void 0}function Kt(n){return n.data}function Zt(n){return n!==void 0}function Qt(n){return n.data}function eo(n,e){return n-e}function to(n){return n.date}exports.DotDensityMap=Ft;
|
|
2
2
|
//# sourceMappingURL=DotDensityMap.cjs.map
|
package/dist/DotDensityMap.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ declare interface DotDensityMapDataType {
|
|
|
57
57
|
data?: object;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | '
|
|
60
|
+
declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'ja' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
|
|
61
61
|
|
|
62
62
|
declare interface MapOverlayDataType {
|
|
63
63
|
mapData: FeatureCollection | string;
|
package/dist/DotDensityMap.js
CHANGED
|
@@ -7,10 +7,10 @@ import { i as zt } from "./index-Bwrro8-q.js";
|
|
|
7
7
|
import { i as wt, z as Wt, a as Lt, g as Vt, b as At, c as Ft, d as Rt, e as Tt, f as Gt } from "./index-CKpKc9DR.js";
|
|
8
8
|
import { _ as Ut } from "./Typography-BO0gQDIT.js";
|
|
9
9
|
import { i as Ht } from "./index-DCsFBfJ_.js";
|
|
10
|
-
import { T as qt } from "./Tooltip-
|
|
10
|
+
import { T as qt } from "./Tooltip-3EYDVa3w.js";
|
|
11
11
|
import { Colors as w } from "./Colors.js";
|
|
12
12
|
import { X as Xt, E as Yt, P as Kt, e as Zt } from "./index-ApTBN0kp.js";
|
|
13
|
-
import { D as Jt } from "./DetailsModal-
|
|
13
|
+
import { D as Jt } from "./DetailsModal-GqEbGHY2.js";
|
|
14
14
|
import { s as Qt } from "./pow-BXYLJHCq.js";
|
|
15
15
|
import { s as vt } from "./select-DKy99ogv.js";
|
|
16
16
|
import { m as nt } from "./proxy-BsxtcZKa.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-D4pAp7u0.cjs"),R=require("react"),Wt=require("./parse-xYI9yrvL.cjs"),Ne=require("./index-Cno4Q0YE.cjs"),pe=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Le=require("./Tooltip-Hr46paWP.cjs"),S=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Oe=require("./XTicksAndGridLines-C5DuC5oY.cjs"),je=require("./Axis-BTaS9oPQ.cjs"),Ee=require("./AxisTitle-DP_evhbe.cjs"),Ie=require("./index-BuhBhuCq.cjs"),Se=require("./time-CkcKbhwe.cjs"),Re=require("./linear-CgUCbw9F.cjs"),Ae=require("./line-DaEMhXmx.cjs"),de=require("./step-BZ3C8QFW.cjs"),De=require("./select-Bnfk0lJx.cjs"),dt=require("./proxy-CqH8m8IQ.cjs"),qe=require("./init-DU0ybBc_.cjs"),Me=require("./pointer-Dkq5NV1q.cjs"),Te=require("./use-in-view-dnRv_qqF.cjs"),Ce=require("./GraphFooter.cjs"),Ve=require("./GraphHeader.cjs"),$e=require("./ColorLegend.cjs"),be=require("./Colors.cjs"),Fe=require("./EmptyState-CFmiFPHz.cjs"),ke=require("./GraphContainer-Cul9b74X.cjs"),Pe=require("./getNoOfTicks-C_1CFXv_.cjs");function Ge(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:J,height:K,lineColors:o,labels:j,sameAxes:A,dateFormat:f,showValues:Ot,noOfXTicks:ee,rightMargin:ie,leftMargin:Xt,topMargin:Q,bottomMargin:It,tooltip:ht,highlightAreaSettings:St,onSeriesMouseOver:Dt,animate:s,strokeWidth:F,showDots:D,noOfYTicks:yt,lineSuffixes:P,linePrefixes:Z,minDate:gt,maxDate:qt,curveType:_,styles:a,classNames:c,precision:tt,customLayers:G,showAxisLabels:H,locale:et,naLabel:Yt}=e,Bt=R.useRef(null);let vt;t[0]!==s.amount||t[1]!==s.once?(vt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=vt):vt=t[2];const d=Te.useInView(Bt,vt),[y,zt]=R.useState(!1);let jt,it;t[3]!==s.duration||t[4]!==y||t[5]!==d?(jt=()=>{if(d&&!y){const i=setTimeout(()=>{zt(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},it=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=jt,t[7]=it):(jt=t[6],it=t[7]),R.useEffect(jt,it);const Mt=_==="linear"?Ae.curveLinear:_==="step"?de.curveStep:_==="stepAfter"?de.stepAfter:_==="stepBefore"?de.stepBefore:de.monotoneX,[q,p]=R.useState(void 0),[u,Jt]=R.useState(void 0),[U,Kt]=R.useState(void 0),Tt=Xt+50,Ct=ie+65;let nt;t[8]!==It||t[9]!==Tt||t[10]!==Ct||t[11]!==Q?(nt={top:Q,bottom:It,left:Tt,right:Ct},t[8]=It,t[9]=Tt,t[10]=Ct,t[11]=Q,t[12]=nt):nt=t[12];const h=nt,W=R.useRef(null);let k;t[13]!==f?(k=i=>({...i,date:Wt.parse(`${i.date}`,f,new Date)}),t[13]=f,t[14]=k):k=t[14];const r=Ne.orderBy(v.map(k),["date"],["asc"]);let st;if(t[15]!==f||t[16]!==St){let i;t[18]!==f?(i=E=>({...E,coordinates:[E.coordinates[0]===null?null:Wt.parse(`${E.coordinates[0]}`,f,new Date),E.coordinates[1]===null?null:Wt.parse(`${E.coordinates[1]}`,f,new Date)]}),t[18]=f,t[19]=i):i=t[19],st=St.map(i),t[15]=f,t[16]=St,t[17]=st}else st=t[17];const At=st,x=J-h.left-h.right,l=K-h.top-h.bottom,Qt=gt?Wt.parse(`${gt}`,f,new Date):r[0].date,Vt=qt?Wt.parse(`${qt}`,f,new Date):r[r.length-1].date,wt=Math.min(...r.map(vi).filter(gi))!==1/0?Math.min(...r.map(yi).filter(hi))>0?0:Math.min(...r.map(di).filter(pi)):0,ot=Math.min(...r.map(fi).filter(mi))!==1/0?Math.min(...r.map(xi).filter(ui))>0?0:Math.min(...r.map(ci).filter(ai)):0,rt=Math.max(...r.map(li).filter(ri))!==1/0?Math.max(...r.map(oi).filter(si)):0,X=Math.max(...r.map(ni).filter(ii))!==1/0?Math.max(...r.map(ei).filter(ti)):0,$t=wt<ot?wt:ot,Y=rt>X?rt:X,m=Se.time().domain([Qt,Vt]).range([0,x]),b=Re.linear().domain([A?$t:wt,A?Y>0?Y:0:rt>0?rt:0]).range([l,0]).nice(),g=Re.linear().domain([A?$t:ot,A?Y>0?Y:0:X>0?X:0]).range([l,0]).nice(),Ft=Ae.line().defined(_e).x(i=>m(i.date)).y(i=>b(i.y1)).curve(Mt),Et=Ae.line().defined(Ze).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Mt),Zt=b.ticks(yt),_t=g.ticks(yt),Pt=m.ticks(ee);R.useEffect(()=>{const i=ve=>{const we=r[qe.bisectCenter(r.map(Qe),m.invert(Me.pointer(ve)[0]),0)];p(we||r[r.length-1]),Dt?.(we||r[r.length-1]),Kt(ve.clientY),Jt(ve.clientX)},E=()=>{p(void 0),Jt(void 0),Kt(void 0),Dt?.(void 0)};De.select(W.current).on("mousemove",i).on("mouseout",E)},[m,r,Dt]);let lt;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==At||t[24]!==d||t[25]!==m?(lt=n.jsxRuntimeExports.jsx(Ie.HighlightArea,{areaSettings:At,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=At,t[24]=d,t[25]=m,t[26]=lt):lt=t[26];const Rt=c?.xAxis?.axis;let M;t[27]!==Rt?(M={axis:Rt},t[27]=Rt,t[28]=M):M=t[28];let N;t[29]!==a?.xAxis?.axis?(N=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=N):N=t[30];let T;t[31]!==o[0]||t[32]!==N?(T={axis:{stroke:o[0],...N}},t[31]=o[0],t[32]=N,t[33]=T):T=t[33];let at;t[34]!==l||t[35]!==M||t[36]!==T?(at=n.jsxRuntimeExports.jsx(je.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:M,styles:T}),t[34]=l,t[35]=M,t[36]=T,t[37]=at):at=t[37];let ct;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==H||t[44]!==a?.yAxis?.title?(ct=H?n.jsxRuntimeExports.jsx(Ee.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=H,t[44]=a?.yAxis?.title,t[45]=ct):ct=t[45];const bt=x+15,B=x+15,te=c?.xAxis?.axis;let L;t[46]!==te?(L={axis:te},t[46]=te,t[47]=L):L=t[47];let ut;t[48]!==a?.xAxis?.axis?(ut=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=ut):ut=t[49];let C;t[50]!==o[1]||t[51]!==ut?(C={axis:{stroke:o[1],...ut}},t[50]=o[1],t[51]=ut,t[52]=C):C=t[52];let kt;t[53]!==l||t[54]!==bt||t[55]!==B||t[56]!==L||t[57]!==C?(kt=n.jsxRuntimeExports.jsx(je.Axis,{y1:0,y2:l,x1:bt,x2:B,classNames:L,styles:C}),t[53]=l,t[54]=bt,t[55]=B,t[56]=L,t[57]=C,t[58]=kt):kt=t[58];let z;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==H||t[66]!==a?.yAxis?.title?(z=H?n.jsxRuntimeExports.jsx(Ee.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=H,t[66]=a?.yAxis?.title,t[67]=z):z=t[67];const xt=x+15,Nt=c?.xAxis?.axis;let V;t[68]!==Nt?(V={axis:Nt},t[68]=Nt,t[69]=V):V=t[69];const $=a?.xAxis?.axis;let w;t[70]!==$?(w={axis:$},t[70]=$,t[71]=w):w=t[71];let O;t[72]!==l||t[73]!==xt||t[74]!==V||t[75]!==w?(O=n.jsxRuntimeExports.jsx(je.Axis,{y1:l,y2:l,x1:-15,x2:xt,classNames:V,styles:w}),t[72]=l,t[73]=xt,t[74]=V,t[75]=w,t[76]=O):O=t[76];let I;t[77]!==f?(I=i=>Wt.format(i,f),t[77]=f,t[78]=I):I=t[78];const mt=Pt.map(I),ft=Pt.map(i=>m(i)),pt=a?.xAxis?.gridLines,Gt=a?.xAxis?.labels;let Lt;t[79]!==pt||t[80]!==Gt?(Lt={gridLines:pt,labels:Gt},t[79]=pt,t[80]=Gt,t[81]=Lt):Lt=t[81];const he=c?.xAxis?.gridLines;let Ht;t[82]!==he?(Ht=n.mo("opacity-0",he),t[82]=he,t[83]=Ht):Ht=t[83];const ye=c?.xAxis?.labels;let Ut;t[84]!==ye?(Ut=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",ye),t[84]=ye,t[85]=Ut):Ut=t[85];let ne;t[86]!==Ht||t[87]!==Ut?(ne={gridLines:Ht,labels:Ut},t[86]=Ht,t[87]=Ut,t[88]=ne):ne=t[88];let se;t[89]!==G?(se=G.filter(Ke).map(Je),t[89]=G,t[90]=se):se=t[90];let oe;t[91]!==o[0]||t[92]!==F?(oe={stroke:o[0],strokeWidth:F,fill:"none"},t[91]=o[0],t[92]=F,t[93]=oe):oe=t[93];let re;t[94]!==s.duration?(re={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=re):re=t[95];let le;t[96]!==o[1]||t[97]!==F?(le={stroke:o[1],strokeWidth:F,fill:"none"},t[96]=o[1],t[97]=F,t[98]=le):le=t[98];let ae;t[99]!==s.duration?(ae={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=ae):ae=t[100];const ge=r.map((i,E)=>n.jsxRuntimeExports.jsxs(dt.motion.g,{children:[S.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[D?n.jsxRuntimeExports.jsx(dt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:b(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:b(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Ot?n.jsxRuntimeExports.jsx(dt.motion.text,{dy:S.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:pe.numberFormattingFunction(i.y1,Yt,tt,Z[0],P[0],et)}):null]}),S.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[D?n.jsxRuntimeExports.jsx(dt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Ot?n.jsxRuntimeExports.jsx(dt.motion.text,{dy:S.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:pe.numberFormattingFunction(i.y2,Yt,tt,Z[1],P[1],et)}):null]})]},E));let ce;t[101]!==ge?(ce=n.jsxRuntimeExports.jsx("g",{children:ge}),t[101]=ge,t[102]=ce):ce=t[102];let ue;t[103]!==G?(ue=G.filter(Ue).map(He),t[103]=G,t[104]=ue):ue=t[104];let xe;t[105]===Symbol.for("react.memo_cache_sentinel")?(xe={fill:"none",pointerEvents:"all"},t[105]=xe):xe=t[105];let me;t[106]!==W||t[107]!==l||t[108]!==x?(me=n.jsxRuntimeExports.jsx("rect",{ref:W,style:xe,width:x,height:l}),t[106]=W,t[107]=l,t[108]=x,t[109]=me):me=t[109];let fe;return t[110]!==c?.tooltip||t[111]!==u||t[112]!==U||t[113]!==q||t[114]!==a?.tooltip||t[115]!==ht?(fe=q&&ht&&u&&U?n.jsxRuntimeExports.jsx(Le.Tooltip,{data:q,body:ht,xPos:u,yPos:U,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=u,t[112]=U,t[113]=q,t[114]=a?.tooltip,t[115]=ht,t[116]=fe):fe=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(dt.motion.svg,{width:`${J}px`,height:`${K}px`,viewBox:`0 0 ${J} ${K}`,direction:"ltr",ref:Bt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[lt,n.jsxRuntimeExports.jsxs("g",{children:[Zt.map((i,E)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:b(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:pe.numberFormattingFunction(i,void 0,tt,Z[0],P[0],et)})]},E)),at,ct]}),n.jsxRuntimeExports.jsxs("g",{children:[_t.map((i,E)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:pe.numberFormattingFunction(i,void 0,tt,Z[1],P[1],et)})]},E)),kt,z]}),n.jsxRuntimeExports.jsxs("g",{children:[O,n.jsxRuntimeExports.jsx(Oe.XTicksAndGridLines,{values:mt,x:ft,y1:0,y2:l,styles:Lt,classNames:ne,labelType:"primary",showGridLines:!0,precision:tt,locale:et})]}),se,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(dt.motion.path,{style:oe,exit:re,variants:{initial:{pathLength:0,d:Ft(r.filter(ze))||"",opacity:1},whileInView:{pathLength:1,d:Ft(r.filter(Be))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(dt.motion.path,{d:Et(r.filter(Ye))||"",style:le,exit:ae,variants:{initial:{pathLength:0,d:Et(r.filter(Xe))||"",opacity:1},whileInView:{pathLength:1,d:Et(r.filter(We))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),q?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(q.date),x2:m(q.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),ce,ue,me]})}),fe]})}function He(e){return e.layer}function Ue(e){return e.position==="after"}function We(e){return!S.checkIfNullOrUndefined(e.y2)}function Xe(e){return!S.checkIfNullOrUndefined(e.y2)}function Ye(e){return!S.checkIfNullOrUndefined(e.y2)}function Be(e){return!S.checkIfNullOrUndefined(e.y1)}function ze(e){return!S.checkIfNullOrUndefined(e.y1)}function Je(e){return e.layer}function Ke(e){return e.position==="before"}function Qe(e){return e.date}function Ze(e){return!S.checkIfNullOrUndefined(e.y2)}function _e(e){return!S.checkIfNullOrUndefined(e.y1)}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y2}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y1}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function fi(e){return e.y2}function pi(e){return e!=null}function di(e){return e.y1}function hi(e){return e!=null}function yi(e){return e.y2}function gi(e){return e!=null}function vi(e){return e.y1}function ji(e){const t=n.compilerRuntimeExports.c(92),{data:v,graphTitle:J,sources:K,graphDescription:o,height:j,width:A,footNote:f,noOfXTicks:Ot,dateFormat:ee,showValues:ie,padding:Xt,lineColors:Q,sameAxes:It,backgroundColor:ht,leftMargin:St,rightMargin:Dt,topMargin:s,bottomMargin:F,labels:D,lineSuffixes:yt,linePrefixes:P,tooltip:Z,highlightAreaSettings:gt,relativeHeight:qt,onSeriesMouseOver:_,graphID:a,graphDownload:c,dataDownload:tt,animate:G,strokeWidth:H,showDots:et,language:Yt,showColorScale:Bt,minHeight:vt,colorLegendTitle:d,theme:y,ariaLabel:zt,noOfYTicks:jt,maxDate:it,minDate:Mt,curveType:q,styles:p,classNames:u,precision:Jt,customLayers:U,showAxisLabels:Kt,locale:Tt,naLabel:Ct}=e,nt=ee===void 0?"yyyy":ee,h=ie===void 0?!1:ie;let W;t[0]!==Q?(W=Q===void 0?[be.Colors.light.categoricalColors.colors[0],be.Colors.light.categoricalColors.colors[1]]:Q,t[0]=Q,t[1]=W):W=t[1];const k=W,r=It===void 0?!1:It,st=ht===void 0?!1:ht,At=St===void 0?80:St,x=Dt===void 0?80:Dt,l=s===void 0?20:s,Qt=F===void 0?25:F;let Vt;t[2]!==yt?(Vt=yt===void 0?["",""]:yt,t[2]=yt,t[3]=Vt):Vt=t[3];const wt=Vt;let ot;t[4]!==P?(ot=P===void 0?["",""]:P,t[4]=P,t[5]=ot):ot=t[5];const rt=ot;let X;t[6]!==gt?(X=gt===void 0?[]:gt,t[6]=gt,t[7]=X):X=t[7];const $t=X,Y=c===void 0?!1:c,m=tt===void 0?!1:tt,b=G===void 0?!1:G,g=H===void 0?2:H,Ft=et===void 0?!0:et,Et=Yt===void 0?"en":Yt,Zt=Bt===void 0?!0:Bt,_t=vt===void 0?0:vt,Pt=y===void 0?"light":y,lt=jt===void 0?5:jt,Rt=q===void 0?"curve":q,M=Jt===void 0?2:Jt;let N;t[8]!==U?(N=U===void 0?[]:U,t[8]=U,t[9]=N):N=t[9];const T=N,at=Kt===void 0?!0:Kt,ct=Tt===void 0?"en":Tt,bt=Ct===void 0?"NA":Ct,[B,te]=R.useState(0),[L,ut]=R.useState(0),C=R.useRef(null),kt=R.useRef(null);let z,xt;t[10]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{const Gt=new ResizeObserver(Lt=>{te(Lt[0].target.clientWidth||620),ut(Lt[0].target.clientHeight||480)});return C.current&&Gt.observe(C.current),()=>Gt.disconnect()},xt=[],t[10]=z,t[11]=xt):(z=t[10],xt=t[11]),R.useEffect(z,xt);const Nt=u?.graphContainer,V=p?.graphContainer;let $;t[12]!==u?.description||t[13]!==u?.title||t[14]!==v||t[15]!==m||t[16]!==o||t[17]!==Y||t[18]!==J||t[19]!==p?.description||t[20]!==p?.title||t[21]!==A?($=J||o||Y||m?n.jsxRuntimeExports.jsx(Ve.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:u?.title,description:u?.description},graphTitle:J,graphDescription:o,width:A,graphDownload:Y?kt:void 0,dataDownload:m?v.map(bi).filter(Ri).length>0?v.map(Ei).filter(wi):v.filter(Ai):null}):null,t[12]=u?.description,t[13]=u?.title,t[14]=v,t[15]=m,t[16]=o,t[17]=Y,t[18]=J,t[19]=p?.description,t[20]=p?.title,t[21]=A,t[22]=$):$=t[22];let w;t[23]!==u?.colorLegend||t[24]!==d||t[25]!==D||t[26]!==k||t[27]!==Zt?(w=Zt&&D.length>0?n.jsxRuntimeExports.jsx($e.ColorLegend,{colorDomain:D,colorLegendTitle:d,colors:k,showNAColor:!1,className:u?.colorLegend}):null,t[23]=u?.colorLegend,t[24]=d,t[25]=D,t[26]=k,t[27]=Zt,t[28]=w):w=t[28];let O;t[29]!==v.length?(O=v.length===0&&n.jsxRuntimeExports.jsx(Fe.EmptyState,{}),t[29]=v.length,t[30]=O):O=t[30];let I;t[31]!==b||t[32]!==Qt||t[33]!==u||t[34]!==Rt||t[35]!==T||t[36]!==v||t[37]!==nt||t[38]!==$t||t[39]!==D||t[40]!==At||t[41]!==k||t[42]!==rt||t[43]!==wt||t[44]!==ct||t[45]!==it||t[46]!==Mt||t[47]!==bt||t[48]!==Ot||t[49]!==lt||t[50]!==_||t[51]!==M||t[52]!==x||t[53]!==r||t[54]!==at||t[55]!==Ft||t[56]!==h||t[57]!==g||t[58]!==p||t[59]!==L||t[60]!==B||t[61]!==Z||t[62]!==l?(I=B&&L&&v.length>0?n.jsxRuntimeExports.jsx(Ge,{data:v,sameAxes:r,lineColors:k,width:B,height:L,dateFormat:nt,showValues:h,noOfXTicks:Ot??Pe.getNoOfTicks(B),leftMargin:At,rightMargin:x,topMargin:l,bottomMargin:Qt,labels:D,highlightAreaSettings:$t,tooltip:Z,onSeriesMouseOver:_,animate:b===!0?{duration:.5,once:!0,amount:.5}:b||{duration:0,once:!0,amount:0},strokeWidth:g,showDots:Ft,noOfYTicks:lt,lineSuffixes:wt,linePrefixes:rt,minDate:Mt,maxDate:it,curveType:Rt,styles:p,classNames:u,precision:M,customLayers:T,showAxisLabels:at,locale:ct,naLabel:bt}):null,t[31]=b,t[32]=Qt,t[33]=u,t[34]=Rt,t[35]=T,t[36]=v,t[37]=nt,t[38]=$t,t[39]=D,t[40]=At,t[41]=k,t[42]=rt,t[43]=wt,t[44]=ct,t[45]=it,t[46]=Mt,t[47]=bt,t[48]=Ot,t[49]=lt,t[50]=_,t[51]=M,t[52]=x,t[53]=r,t[54]=at,t[55]=Ft,t[56]=h,t[57]=g,t[58]=p,t[59]=L,t[60]=B,t[61]=Z,t[62]=l,t[63]=I):I=t[63];let mt;t[64]!==O||t[65]!==I?(mt=n.jsxRuntimeExports.jsxs(ke.GraphArea,{ref:C,children:[O,I]}),t[64]=O,t[65]=I,t[66]=mt):mt=t[66];let ft;t[67]!==u?.footnote||t[68]!==u?.source||t[69]!==f||t[70]!==K||t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==A?(ft=K||f?n.jsxRuntimeExports.jsx(Ce.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:K,footNote:f,width:A}):null,t[67]=u?.footnote,t[68]=u?.source,t[69]=f,t[70]=K,t[71]=p?.footnote,t[72]=p?.source,t[73]=A,t[74]=ft):ft=t[74];let pt;return t[75]!==zt||t[76]!==st||t[77]!==a||t[78]!==j||t[79]!==Et||t[80]!==_t||t[81]!==Xt||t[82]!==qt||t[83]!==Nt||t[84]!==V||t[85]!==$||t[86]!==w||t[87]!==mt||t[88]!==ft||t[89]!==Pt||t[90]!==A?(pt=n.jsxRuntimeExports.jsxs(ke.GraphContainer,{className:Nt,style:V,id:a,ref:kt,"aria-label":zt,backgroundColor:st,theme:Pt,language:Et,minHeight:_t,width:A,height:j,relativeHeight:qt,padding:Xt,children:[$,w,mt,ft]}),t[75]=zt,t[76]=st,t[77]=a,t[78]=j,t[79]=Et,t[80]=_t,t[81]=Xt,t[82]=qt,t[83]=Nt,t[84]=V,t[85]=$,t[86]=w,t[87]=mt,t[88]=ft,t[89]=Pt,t[90]=A,t[91]=pt):pt=t[91],pt}function Ai(e){return e!==void 0}function wi(e){return e!==void 0}function Ei(e){return e.data}function Ri(e){return e!==void 0}function bi(e){return e.data}exports.DualAxisLineChart=ji;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-D4pAp7u0.cjs"),N=require("react"),Ft=require("./parse-xYI9yrvL.cjs"),Re=require("./index-Cno4Q0YE.cjs"),ae=require("./numberFormattingFunction-u2iNHL_c.cjs"),ke=require("./Tooltip-C9F3uYG0.cjs"),T=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-B4UhDVyU.cjs"),he=require("./Axis-BTaS9oPQ.cjs"),ve=require("./AxisTitle-DP_evhbe.cjs"),Le=require("./index-BuhBhuCq.cjs"),Oe=require("./time-CkcKbhwe.cjs"),je=require("./linear-CgUCbw9F.cjs"),ye=require("./line-DaEMhXmx.cjs"),ce=require("./step-BZ3C8QFW.cjs"),De=require("./select-Bnfk0lJx.cjs"),ct=require("./proxy-CqH8m8IQ.cjs"),Ie=require("./init-DU0ybBc_.cjs"),qe=require("./pointer-Dkq5NV1q.cjs"),Me=require("./use-in-view-dnRv_qqF.cjs"),Se=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ae=require("./Colors.cjs"),Ve=require("./EmptyState-CFmiFPHz.cjs"),we=require("./GraphContainer-Cul9b74X.cjs"),$e=require("./getNoOfTicks-C_1CFXv_.cjs");function Fe(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:B,height:z,lineColors:o,labels:j,sameAxes:A,dateFormat:p,showValues:At,noOfXTicks:Zt,rightMargin:Bt,leftMargin:Gt,topMargin:J,bottomMargin:wt,tooltip:ut,highlightAreaSettings:bt,onSeriesMouseOver:Et,animate:s,strokeWidth:H,showDots:C,noOfYTicks:Rt,leftLineNumberDisplayOptions:w,rightLineNumberDisplayOptions:b,minDate:xt,maxDate:kt,curveType:K,styles:a,classNames:c,customLayers:U,showAxisLabels:P,naLabel:Ht}=e,Ut=N.useRef(null);let mt;t[0]!==s.amount||t[1]!==s.once?(mt={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=mt):mt=t[2];const d=Me.useInView(Ut,mt),[y,Pt]=N.useState(!1);let pt,Q;t[3]!==s.duration||t[4]!==y||t[5]!==d?(pt=()=>{if(d&&!y){const i=setTimeout(()=>{Pt(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},Q=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=pt,t[7]=Q):(pt=t[6],Q=t[7]),N.useEffect(pt,Q);const Wt=K==="linear"?ye.curveLinear:K==="step"?ce.curveStep:K==="stepAfter"?ce.stepAfter:K==="stepBefore"?ce.stepBefore:ce.monotoneX,[O,Nt]=N.useState(void 0),[ft,f]=N.useState(void 0),[u,dt]=N.useState(void 0),Lt=Gt+50,Ot=Bt+65;let _;t[8]!==wt||t[9]!==Lt||t[10]!==Ot||t[11]!==J?(_={top:J,bottom:wt,left:Lt,right:Ot},t[8]=wt,t[9]=Lt,t[10]=Ot,t[11]=J,t[12]=_):_=t[12];const h=_,W=N.useRef(null);let D;t[13]!==p?(D=i=>({...i,date:Ft.parse(`${i.date}`,p,new Date)}),t[13]=p,t[14]=D):D=t[14];const r=Re.orderBy(v.map(D),["date"],["asc"]);let tt;if(t[15]!==p||t[16]!==bt){let i;t[18]!==p?(i=k=>({...k,coordinates:[k.coordinates[0]===null?null:Ft.parse(`${k.coordinates[0]}`,p,new Date),k.coordinates[1]===null?null:Ft.parse(`${k.coordinates[1]}`,p,new Date)]}),t[18]=p,t[19]=i):i=t[19],tt=bt.map(i),t[15]=p,t[16]=bt,t[17]=tt}else tt=t[17];const ht=tt,x=B-h.left-h.right,l=z-h.top-h.bottom,Xt=xt?Ft.parse(`${xt}`,p,new Date):r[0].date,Dt=kt?Ft.parse(`${kt}`,p,new Date):r[r.length-1].date,yt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(fi))>0?0:Math.min(...r.map(pi).filter(mi)):0,et=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,X=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,Y=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Qe)):0,It=yt<et?yt:et,it=X>Y?X:Y,m=Oe.time().domain([Xt,Dt]).range([0,x]),I=je.linear().domain([A?It:yt,A?it>0?it:0:X>0?X:0]).range([l,0]).nice(),g=je.linear().domain([A?It:et,A?it>0?it:0:Y>0?Y:0]).range([l,0]).nice(),qt=ye.line().defined(Ke).x(i=>m(i.date)).y(i=>I(i.y1)).curve(Wt),gt=ye.line().defined(Je).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Wt),Yt=I.ticks(Rt),Mt=g.ticks(Rt),St=m.ticks(Zt);N.useEffect(()=>{const i=de=>{const ge=r[Ie.bisectCenter(r.map(ze),m.invert(qe.pointer(de)[0]),0)];Nt(ge||r[r.length-1]),Et?.(ge||r[r.length-1]),dt(de.clientY),f(de.clientX)},k=()=>{Nt(void 0),f(void 0),dt(void 0),Et?.(void 0)};De.select(W.current).on("mousemove",i).on("mouseout",k)},[m,r,Et]);let nt;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==ht||t[24]!==d||t[25]!==m?(nt=n.jsxRuntimeExports.jsx(Le.HighlightArea,{areaSettings:ht,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=ht,t[24]=d,t[25]=m,t[26]=nt):nt=t[26];const vt=c?.xAxis?.axis;let L;t[27]!==vt?(L={axis:vt},t[27]=vt,t[28]=L):L=t[28];let st;t[29]!==a?.xAxis?.axis?(st=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=st):st=t[30];let q;t[31]!==o[0]||t[32]!==st?(q={axis:{stroke:o[0],...st}},t[31]=o[0],t[32]=st,t[33]=q):q=t[33];let Tt;t[34]!==l||t[35]!==L||t[36]!==q?(Tt=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:L,styles:q}),t[34]=l,t[35]=L,t[36]=q,t[37]=Tt):Tt=t[37];let ot;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==P||t[44]!==a?.yAxis?.title?(ot=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=P,t[44]=a?.yAxis?.title,t[45]=ot):ot=t[45];const Ct=x+15,rt=x+15,lt=c?.xAxis?.axis;let V;t[46]!==lt?(V={axis:lt},t[46]=lt,t[47]=V):V=t[47];let $;t[48]!==a?.xAxis?.axis?($=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=$):$=t[49];let E;t[50]!==o[1]||t[51]!==$?(E={axis:{stroke:o[1],...$}},t[50]=o[1],t[51]=$,t[52]=E):E=t[52];let M;t[53]!==l||t[54]!==Ct||t[55]!==rt||t[56]!==V||t[57]!==E?(M=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:Ct,x2:rt,classNames:V,styles:E}),t[53]=l,t[54]=Ct,t[55]=rt,t[56]=V,t[57]=E,t[58]=M):M=t[58];let S;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==P||t[66]!==a?.yAxis?.title?(S=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=P,t[66]=a?.yAxis?.title,t[67]=S):S=t[67];const F=x+15,G=c?.xAxis?.axis;let R;t[68]!==G?(R={axis:G},t[68]=G,t[69]=R):R=t[69];const at=a?.xAxis?.axis;let Z;t[70]!==at?(Z={axis:at},t[70]=at,t[71]=Z):Z=t[71];let jt;t[72]!==l||t[73]!==F||t[74]!==R||t[75]!==Z?(jt=n.jsxRuntimeExports.jsx(he.Axis,{y1:l,y2:l,x1:-15,x2:F,classNames:R,styles:Z}),t[72]=l,t[73]=F,t[74]=R,t[75]=Z,t[76]=jt):jt=t[76];let zt;t[77]!==p?(zt=i=>Ft.format(i,p),t[77]=p,t[78]=zt):zt=t[78];const be=St.map(zt),Ee=St.map(i=>m(i)),ue=a?.xAxis?.gridLines,xe=a?.xAxis?.labels;let Jt;t[79]!==ue||t[80]!==xe?(Jt={gridLines:ue,labels:xe},t[79]=ue,t[80]=xe,t[81]=Jt):Jt=t[81];const me=c?.xAxis?.gridLines;let Vt;t[82]!==me?(Vt=n.mo("opacity-0",me),t[82]=me,t[83]=Vt):Vt=t[83];const pe=c?.xAxis?.labels;let $t;t[84]!==pe?($t=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",pe),t[84]=pe,t[85]=$t):$t=t[85];let Kt;t[86]!==Vt||t[87]!==$t?(Kt={gridLines:Vt,labels:$t},t[86]=Vt,t[87]=$t,t[88]=Kt):Kt=t[88];let Qt;t[89]!==U?(Qt=U.filter(Be).map(Ze),t[89]=U,t[90]=Qt):Qt=t[90];let _t;t[91]!==o[0]||t[92]!==H?(_t={stroke:o[0],strokeWidth:H,fill:"none"},t[91]=o[0],t[92]=H,t[93]=_t):_t=t[93];let te;t[94]!==s.duration?(te={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=te):te=t[95];let ee;t[96]!==o[1]||t[97]!==H?(ee={stroke:o[1],strokeWidth:H,fill:"none"},t[96]=o[1],t[97]=H,t[98]=ee):ee=t[98];let ie;t[99]!==s.duration?(ie={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=ie):ie=t[100];const fe=r.map((i,k)=>n.jsxRuntimeExports.jsxs(ct.motion.g,{children:[T.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[C?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:I(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:I(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,At?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:T.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y1,Ht,w?.precision??2,w?.prefix,w?.suffix,w?.locale,w?.padZeros)}):null]}),T.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[C?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,At?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:T.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y2,Ht,b?.precision??2,b?.prefix,b?.suffix,b?.locale,b?.padZeros)}):null]})]},k));let ne;t[101]!==fe?(ne=n.jsxRuntimeExports.jsx("g",{children:fe}),t[101]=fe,t[102]=ne):ne=t[102];let se;t[103]!==U?(se=U.filter(He).map(Ge),t[103]=U,t[104]=se):se=t[104];let oe;t[105]===Symbol.for("react.memo_cache_sentinel")?(oe={fill:"none",pointerEvents:"all"},t[105]=oe):oe=t[105];let re;t[106]!==W||t[107]!==l||t[108]!==x?(re=n.jsxRuntimeExports.jsx("rect",{ref:W,style:oe,width:x,height:l}),t[106]=W,t[107]=l,t[108]=x,t[109]=re):re=t[109];let le;return t[110]!==c?.tooltip||t[111]!==ft||t[112]!==u||t[113]!==O||t[114]!==a?.tooltip||t[115]!==ut?(le=O&&ut&&ft&&u?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:O,body:ut,xPos:ft,yPos:u,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=ft,t[112]=u,t[113]=O,t[114]=a?.tooltip,t[115]=ut,t[116]=le):le=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ct.motion.svg,{width:`${B}px`,height:`${z}px`,viewBox:`0 0 ${B} ${z}`,direction:"ltr",ref:Ut,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[nt,n.jsxRuntimeExports.jsxs("g",{children:[Yt.map((i,k)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:I(i),y2:I(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:I(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:ae.numberFormattingFunction(i,void 0,w?.precision,w?.prefix,w?.suffix,w?.locale,w?.padZeros)})]},k)),Tt,ot]}),n.jsxRuntimeExports.jsxs("g",{children:[Mt.map((i,k)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:ae.numberFormattingFunction(i,void 0,b?.precision,b?.prefix,b?.suffix,b?.locale,b?.padZeros)})]},k)),M,S]}),n.jsxRuntimeExports.jsxs("g",{children:[jt,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:be,x:Ee,y1:0,y2:l,styles:Jt,classNames:Kt,labelType:"primary",showGridLines:!0,padZeros:!1})]}),Qt,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ct.motion.path,{style:_t,exit:te,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(ct.motion.path,{d:gt(r.filter(We))||"",style:ee,exit:ie,variants:{initial:{pathLength:0,d:gt(r.filter(Pe))||"",opacity:1},whileInView:{pathLength:1,d:gt(r.filter(Ue))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),O?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(O.date),x2:m(O.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),ne,se,re]})}),le]})}function Ge(e){return e.layer}function He(e){return e.position==="after"}function Ue(e){return!T.checkIfNullOrUndefined(e.y2)}function Pe(e){return!T.checkIfNullOrUndefined(e.y2)}function We(e){return!T.checkIfNullOrUndefined(e.y2)}function Xe(e){return!T.checkIfNullOrUndefined(e.y1)}function Ye(e){return!T.checkIfNullOrUndefined(e.y1)}function Ze(e){return e.layer}function Be(e){return e.position==="before"}function ze(e){return e.date}function Je(e){return!T.checkIfNullOrUndefined(e.y2)}function Ke(e){return!T.checkIfNullOrUndefined(e.y1)}function Qe(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function pi(e){return e.y1}function fi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(86),{data:v,graphTitle:B,sources:z,graphDescription:o,height:j,width:A,footNote:p,noOfXTicks:At,dateFormat:Zt,showValues:Bt,padding:Gt,lineColors:J,sameAxes:wt,backgroundColor:ut,leftMargin:bt,rightMargin:Et,topMargin:s,bottomMargin:H,labels:C,rightLineNumberDisplayOptions:Rt,leftLineNumberDisplayOptions:w,tooltip:b,highlightAreaSettings:xt,relativeHeight:kt,onSeriesMouseOver:K,graphID:a,graphDownload:c,dataDownload:U,animate:P,strokeWidth:Ht,showDots:Ut,language:mt,showColorScale:d,minHeight:y,colorLegendTitle:Pt,theme:pt,ariaLabel:Q,noOfYTicks:Wt,maxDate:O,minDate:Nt,curveType:ft,styles:f,classNames:u,customLayers:dt,showAxisLabels:Lt,naLabel:Ot}=e,_=Zt===void 0?"yyyy":Zt,h=Bt===void 0?!1:Bt;let W;t[0]!==J?(W=J===void 0?[Ae.Colors.light.categoricalColors.colors[0],Ae.Colors.light.categoricalColors.colors[1]]:J,t[0]=J,t[1]=W):W=t[1];const D=W,r=wt===void 0?!1:wt,tt=ut===void 0?!1:ut,ht=bt===void 0?80:bt,x=Et===void 0?80:Et,l=s===void 0?20:s,Xt=H===void 0?25:H;let Dt;t[2]!==xt?(Dt=xt===void 0?[]:xt,t[2]=xt,t[3]=Dt):Dt=t[3];const yt=Dt,et=c===void 0?!1:c,X=U===void 0?!1:U,Y=P===void 0?!1:P,It=Ht===void 0?2:Ht,it=Ut===void 0?!0:Ut,m=mt===void 0?"en":mt,I=d===void 0?!0:d,g=y===void 0?0:y,qt=pt===void 0?"light":pt,gt=Wt===void 0?5:Wt,Yt=ft===void 0?"curve":ft;let Mt;t[4]!==dt?(Mt=dt===void 0?[]:dt,t[4]=dt,t[5]=Mt):Mt=t[5];const St=Mt,nt=Lt===void 0?!0:Lt,vt=Ot===void 0?"NA":Ot,[L,st]=N.useState(0),[q,Tt]=N.useState(0),ot=N.useRef(null),Ct=N.useRef(null);let rt,lt;t[6]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const Z=new ResizeObserver(jt=>{st(jt[0].target.clientWidth||620),Tt(jt[0].target.clientHeight||480)});return ot.current&&Z.observe(ot.current),()=>Z.disconnect()},lt=[],t[6]=rt,t[7]=lt):(rt=t[6],lt=t[7]),N.useEffect(rt,lt);const V=u?.graphContainer,$=f?.graphContainer;let E;t[8]!==u?.description||t[9]!==u?.title||t[10]!==v||t[11]!==X||t[12]!==o||t[13]!==et||t[14]!==B||t[15]!==f?.description||t[16]!==f?.title||t[17]!==A?(E=B||o||et||X?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:u?.title,description:u?.description},graphTitle:B,graphDescription:o,width:A,graphDownload:et?Ct:void 0,dataDownload:X?v.map(bi).filter(wi).length>0?v.map(Ai).filter(ji):v.filter(vi):null}):null,t[8]=u?.description,t[9]=u?.title,t[10]=v,t[11]=X,t[12]=o,t[13]=et,t[14]=B,t[15]=f?.description,t[16]=f?.title,t[17]=A,t[18]=E):E=t[18];let M;t[19]!==u?.colorLegend||t[20]!==Pt||t[21]!==C||t[22]!==D||t[23]!==I?(M=I&&C.length>0?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:C,colorLegendTitle:Pt,colors:D,showNAColor:!1,className:u?.colorLegend}):null,t[19]=u?.colorLegend,t[20]=Pt,t[21]=C,t[22]=D,t[23]=I,t[24]=M):M=t[24];let S;t[25]!==v.length?(S=v.length===0&&n.jsxRuntimeExports.jsx(Ve.EmptyState,{}),t[25]=v.length,t[26]=S):S=t[26];let F;t[27]!==Y||t[28]!==Xt||t[29]!==u||t[30]!==Yt||t[31]!==St||t[32]!==v||t[33]!==_||t[34]!==yt||t[35]!==C||t[36]!==w||t[37]!==ht||t[38]!==D||t[39]!==O||t[40]!==Nt||t[41]!==vt||t[42]!==At||t[43]!==gt||t[44]!==K||t[45]!==Rt||t[46]!==x||t[47]!==r||t[48]!==nt||t[49]!==it||t[50]!==h||t[51]!==It||t[52]!==f||t[53]!==q||t[54]!==L||t[55]!==b||t[56]!==l?(F=L&&q&&v.length>0?n.jsxRuntimeExports.jsx(Fe,{data:v,sameAxes:r,lineColors:D,width:L,height:q,dateFormat:_,showValues:h,noOfXTicks:At??$e.getNoOfTicks(L),leftMargin:ht,rightMargin:x,topMargin:l,bottomMargin:Xt,labels:C,highlightAreaSettings:yt,tooltip:b,onSeriesMouseOver:K,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},strokeWidth:It,showDots:it,noOfYTicks:gt,leftLineNumberDisplayOptions:w,rightLineNumberDisplayOptions:Rt,minDate:Nt,maxDate:O,curveType:Yt,styles:f,classNames:u,customLayers:St,showAxisLabels:nt,naLabel:vt}):null,t[27]=Y,t[28]=Xt,t[29]=u,t[30]=Yt,t[31]=St,t[32]=v,t[33]=_,t[34]=yt,t[35]=C,t[36]=w,t[37]=ht,t[38]=D,t[39]=O,t[40]=Nt,t[41]=vt,t[42]=At,t[43]=gt,t[44]=K,t[45]=Rt,t[46]=x,t[47]=r,t[48]=nt,t[49]=it,t[50]=h,t[51]=It,t[52]=f,t[53]=q,t[54]=L,t[55]=b,t[56]=l,t[57]=F):F=t[57];let G;t[58]!==S||t[59]!==F?(G=n.jsxRuntimeExports.jsxs(we.GraphArea,{ref:ot,children:[S,F]}),t[58]=S,t[59]=F,t[60]=G):G=t[60];let R;t[61]!==u?.footnote||t[62]!==u?.source||t[63]!==p||t[64]!==z||t[65]!==f?.footnote||t[66]!==f?.source||t[67]!==A?(R=z||p?n.jsxRuntimeExports.jsx(Se.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:z,footNote:p,width:A}):null,t[61]=u?.footnote,t[62]=u?.source,t[63]=p,t[64]=z,t[65]=f?.footnote,t[66]=f?.source,t[67]=A,t[68]=R):R=t[68];let at;return t[69]!==Q||t[70]!==tt||t[71]!==a||t[72]!==j||t[73]!==m||t[74]!==g||t[75]!==Gt||t[76]!==kt||t[77]!==V||t[78]!==$||t[79]!==E||t[80]!==M||t[81]!==G||t[82]!==R||t[83]!==qt||t[84]!==A?(at=n.jsxRuntimeExports.jsxs(we.GraphContainer,{className:V,style:$,id:a,ref:Ct,"aria-label":Q,backgroundColor:tt,theme:qt,language:m,minHeight:g,width:A,height:j,relativeHeight:kt,padding:Gt,children:[E,M,G,R]}),t[69]=Q,t[70]=tt,t[71]=a,t[72]=j,t[73]=m,t[74]=g,t[75]=Gt,t[76]=kt,t[77]=V,t[78]=$,t[79]=E,t[80]=M,t[81]=G,t[82]=R,t[83]=qt,t[84]=A,t[85]=at):at=t[85],at}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function bi(e){return e.data}exports.DualAxisLineChart=gi;
|
|
2
2
|
//# sourceMappingURL=DualAxisLineChart.cjs.map
|