@undp/data-viz 2.0.9 → 2.1.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.d.ts +2 -0
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1188 -1213
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +258 -267
- 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 +2 -0
- package/dist/BiVariateChoroplethMap.js +126 -131
- 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 +2 -0
- package/dist/BulletChart.js +404 -413
- 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 +2 -0
- package/dist/ButterflyChart.js +179 -184
- 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 +2 -0
- package/dist/ChoroplethMap.js +268 -273
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.d.ts +2 -0
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.d.ts +2 -0
- package/dist/DetailsModal-0Ry5nXiC.js +32 -0
- package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
- package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
- package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.d.ts +2 -0
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +2 -0
- package/dist/DonutChart.js +185 -190
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +2 -0
- package/dist/DotDensityMap.js +198 -203
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.d.ts +2 -0
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +364 -373
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +2 -0
- package/dist/GeoHubMap.d.ts +2 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
- package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
- package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
- package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
- package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +2 -0
- package/dist/GriddedGraphs.js +19 -19
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +2 -0
- package/dist/HeatMap.js +111 -116
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +202 -207
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
- package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +2 -0
- package/dist/MultiGraphDashboard.js +10 -10
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.d.ts +2 -0
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +187 -192
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +158 -163
- 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 +2 -0
- package/dist/SankeyChart.js +172 -177
- 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 +2 -0
- package/dist/ScatterPlot.js +222 -227
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -0
- package/dist/SingleGraphDashboard.js +24 -24
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +2 -0
- package/dist/SlopeChart.js +182 -187
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +2 -0
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.d.ts +2 -0
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +249 -258
- 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 +2 -0
- package/dist/ThreeDGlobe.js +142 -147
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/Tooltip-Dj5eVppQ.js +45 -0
- package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
- package/dist/Tooltip-uUdw6wJL.cjs +2 -0
- package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +159 -164
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +2 -0
- package/dist/UnitChart.d.ts +2 -0
- package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
- package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
- package/dist/index-BBV4tAeA.js +330 -0
- package/dist/index-BBV4tAeA.js.map +1 -0
- package/dist/index-CF5hnGvG.cjs +2 -0
- package/dist/index-CF5hnGvG.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Tooltip-4dJo4_AF.cjs +0 -2
- package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
- package/dist/Tooltip-CwWUegPB.js +0 -43
- package/dist/Tooltip-CwWUegPB.js.map +0 -1
- package/dist/index-B2LQV7Tk.js +0 -335
- package/dist/index-B2LQV7Tk.js.map +0 -1
- package/dist/index-xRHRLDIp.cjs +0 -2
- package/dist/index-xRHRLDIp.cjs.map +0 -1
package/dist/ThreeDGlobe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreeDGlobe.js","sources":["../node_modules/hex-to-rgba/build/index.js","../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["\"use strict\";\n\nvar removeHash = function removeHash(hex) {\n return hex.charAt(0) === '#' ? hex.slice(1) : hex;\n};\n\nvar parseHex = function parseHex(nakedHex) {\n var isShort = nakedHex.length === 3 || nakedHex.length === 4;\n var twoDigitHexR = isShort ? \"\".concat(nakedHex.slice(0, 1)).concat(nakedHex.slice(0, 1)) : nakedHex.slice(0, 2);\n var twoDigitHexG = isShort ? \"\".concat(nakedHex.slice(1, 2)).concat(nakedHex.slice(1, 2)) : nakedHex.slice(2, 4);\n var twoDigitHexB = isShort ? \"\".concat(nakedHex.slice(2, 3)).concat(nakedHex.slice(2, 3)) : nakedHex.slice(4, 6);\n var twoDigitHexA = (isShort ? \"\".concat(nakedHex.slice(3, 4)).concat(nakedHex.slice(3, 4)) : nakedHex.slice(6, 8)) || 'ff'; // const numericA = +((parseInt(a, 16) / 255).toFixed(2));\n\n return {\n r: twoDigitHexR,\n g: twoDigitHexG,\n b: twoDigitHexB,\n a: twoDigitHexA\n };\n};\n\nvar hexToDecimal = function hexToDecimal(hex) {\n return parseInt(hex, 16);\n};\n\nvar hexesToDecimals = function hexesToDecimals(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b,\n a = _ref.a;\n return {\n r: hexToDecimal(r),\n g: hexToDecimal(g),\n b: hexToDecimal(b),\n a: +(hexToDecimal(a) / 255).toFixed(2)\n };\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}; // eslint-disable-line no-restricted-globals, max-len\n\n\nvar formatRgb = function formatRgb(decimalObject, parameterA) {\n var r = decimalObject.r,\n g = decimalObject.g,\n b = decimalObject.b,\n parsedA = decimalObject.a;\n var a = isNumeric(parameterA) ? parameterA : parsedA;\n return \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(a, \")\");\n};\n/**\n * Turns an old-fashioned css hex color value into a rgb color value.\n *\n * If you specify an alpha value, you'll get a rgba() value instead.\n *\n * @param The hex value to convert. ('123456'. '#123456', ''123', '#123')\n * @param An alpha value to apply. (optional) ('0.5', '0.25')\n * @return An rgb or rgba value. ('rgb(11, 22, 33)'. 'rgba(11, 22, 33, 0.5)')\n */\n\n\nvar hexToRgba = function hexToRgba(hex, a) {\n var hashlessHex = removeHash(hex);\n var hexObject = parseHex(hashlessHex);\n var decimalObject = hexesToDecimals(hexObject);\n return formatRgb(decimalObject, a);\n};\n\nmodule.exports = hexToRgba;","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport hexToRgba from 'hex-to-rgba';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n LightConfig,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { getCentroidCoordinates } from '@/Utils/getCentroidCoordinates';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: (number | string)[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.Material;\r\n lights: LightConfig[];\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n atmosphereAltitude: number;\r\n globeCurvatureResolution: number;\r\n fogSettings?: FogDataType;\r\n highlightedAltitude: number;\r\n selectedId?: string;\r\n collapseColorScaleByDefault?: boolean;\r\n dimmedOpacity: number;\r\n}\r\n\r\nfunction createLightFromConfig(config: LightConfig): THREE.Light {\r\n let light: THREE.Light;\r\n\r\n switch (config.type) {\r\n case 'ambient':\r\n light = new THREE.AmbientLight(config.color, config.intensity);\r\n break;\r\n case 'directional':\r\n light = new THREE.DirectionalLight(config.color, config.intensity);\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z === undefined ? -1 : config.target.z,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.DirectionalLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.DirectionalLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.DirectionalLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.DirectionalLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.DirectionalLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n case 'point':\r\n light = new THREE.PointLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n break;\r\n case 'spot':\r\n light = new THREE.SpotLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.angle || Math.PI / 3,\r\n config.penumbra || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z || 0,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.SpotLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.SpotLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.SpotLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.SpotLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.SpotLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error('Unknown light type');\r\n }\r\n\r\n return light;\r\n}\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n atmosphereAltitude,\r\n globeCurvatureResolution,\r\n fogSettings,\r\n lights,\r\n highlightedAltitude,\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n dimmedOpacity,\r\n } = props;\r\n const [globeReady, setGlobeReady] = useState(false);\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n }\r\n }, [enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData || selectedId) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }\r\n }, [mouseOverData, selectedId, autoRotate]);\r\n useEffect(() => {\r\n if (globeEl.current && selectedId) {\r\n const selectedPolygon = polygonData.find(\r\n (d: any) => d.properties[mapProperty] === selectedId,\r\n );\r\n const [lng, lat] = getCentroidCoordinates(selectedPolygon);\r\n globeEl.current.pointOfView({ lat, lng, altitude: scale }, 1000);\r\n }\r\n }, [selectedId, scale, polygonData, mapProperty]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials =\r\n globeMaterial ||\r\n new THREE.MeshBasicMaterial({\r\n color: '#FFF',\r\n });\r\n const setupCustomLighting = useCallback(() => {\r\n if (!globeEl.current) return;\r\n\r\n const scene = globeEl.current.scene();\r\n const camera = globeEl.current.camera();\r\n\r\n let lightsAndObjToRemove: THREE.Object3D[] = [];\r\n scene.traverse(obj => {\r\n if (obj instanceof THREE.Light) {\r\n lightsAndObjToRemove.push(obj);\r\n }\r\n });\r\n lightsAndObjToRemove = [...lightsAndObjToRemove, ...camera.children];\r\n lightsAndObjToRemove.forEach(light => light.parent?.remove(light));\r\n\r\n const lightConfig = lights.map(config => createLightFromConfig(config));\r\n lightConfig.forEach((light, i) => {\r\n if (lights[i].type !== 'ambient' && lights[i].position === 'camera') {\r\n camera.add(light);\r\n if (lights[i].type !== 'point') {\r\n camera.add((light as THREE.DirectionalLight | THREE.SpotLight).target);\r\n }\r\n } else {\r\n scene.add(light);\r\n }\r\n });\r\n\r\n if (fogSettings) {\r\n scene.fog = new THREE.Fog(fogSettings.color, fogSettings.near, fogSettings.far);\r\n }\r\n }, [lights, fogSettings]);\r\n\r\n const handleGlobeReady = () => {\r\n setGlobeReady(true);\r\n setupCustomLighting();\r\n };\r\n useEffect(() => {\r\n if (globeReady) {\r\n setupCustomLighting();\r\n }\r\n }, [globeReady, setupCustomLighting]);\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n height={height}\r\n width={width}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds.includes(polygon?.properties?.[mapProperty]) ||\r\n polygon?.properties?.[mapProperty] === selectedId\r\n ? highlightedAltitude\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id ||\r\n polygon?.properties?.[mapProperty] === mouseClickData?.id\r\n ? highlightedAltitude\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onGlobeClick={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerLat,\r\n lng: centerLng,\r\n });\r\n const scene = globeEl.current.scene();\r\n setTimeout(() => {\r\n const polygons = scene.children[3]?.children[0]?.children[4]?.children || [];\r\n polygons.forEach(d => {\r\n const line = d.children[1];\r\n line.renderOrder = 2;\r\n });\r\n }, 300);\r\n const camera = globeEl.current.camera();\r\n scene.add(camera);\r\n handleGlobeReady();\r\n }\r\n }}\r\n />\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g key={i} className='cursor-pointer'>\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[i],\r\n stroke: colors[i],\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n stroke: colors[colorDomain.length],\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div key={i} className='flex gap-2 items-center'>\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useEffectEvent, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n Languages,\r\n LightConfig,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\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: ChoroplethMapDataType[];\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 /** Colors for the choropleth map. Make sure the the colors are in hex code, any other format can cause issues. */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.Material;\r\n /** Defines the lights for the 3D scene */\r\n lights?: LightConfig[];\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** The max altitude of the atmosphere, in terms of globe radius units. */\r\n atmosphereAltitude?: number;\r\n /** Resolution in angular degrees of the sphere curvature. The finer the resolution, the more the globe is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. */\r\n globeCurvatureResolution?: number;\r\n /** Defines fog settings for the scene. */\r\n fogSettings?: FogDataType;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Countries or regions to be highlighted */\r\n selectedId?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the altitude of the highlighted countries or the countries on mouseover. */\r\n highlightedAltitude?: number;\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds = [],\r\n highlightedAltitude = 0.1,\r\n dimmedOpacity = 0.3,\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n globeCurvatureResolution = 4,\r\n atmosphereAltitude = 0.15,\r\n fogSettings,\r\n lights = [\r\n {\r\n type: 'ambient',\r\n color: 0x404040,\r\n intensity: 0.4,\r\n },\r\n {\r\n type: 'directional',\r\n color: 0xffffff,\r\n intensity: 1,\r\n position: { x: 5, y: 10, z: 5 },\r\n },\r\n ],\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = 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 setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n onUpdateShape(features);\r\n } else onUpdateShape(d.features);\r\n });\r\n } else {\r\n onUpdateShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\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 || 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={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 <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light' ? Colors.light.grays['gray-700'] : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n fogSettings={fogSettings}\r\n lights={lights}\r\n highlightedAltitude={highlightedAltitude}\r\n selectedId={selectedId}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n dimmedOpacity={dimmedOpacity}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\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":["removeHash","hex","parseHex","nakedHex","isShort","twoDigitHexR","twoDigitHexG","twoDigitHexB","twoDigitHexA","hexToDecimal","hexesToDecimals","_ref","r","g","b","a","isNumeric","n","formatRgb","decimalObject","parameterA","parsedA","hexToRgba","hashlessHex","hexObject","build","createLightFromConfig","config","light","type","THREE","AmbientLight","color","intensity","DirectionalLight","position","set","x","y","z","target","undefined","castShadow","shadow","mapSize","width","height","camera","near","far","PointLight","distance","decay","SpotLight","angle","Math","PI","penumbra","Error","Graph","props","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","atmosphereAltitude","globeCurvatureResolution","fogSettings","lights","highlightedAltitude","selectedId","collapseColorScaleByDefault","dimmedOpacity","globeReady","setGlobeReady","useState","globeEl","useRef","mouseClickData","setMouseClickData","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","current","controls","autoRotateSpeed","selectedPolygon","find","d","properties","lng","lat","getCentroidCoordinates","pointOfView","altitude","canvas","renderer","domElement","handleMouseMove","e","clientX","clientY","addEventListener","removeEventListener","materials","MeshBasicMaterial","setupCustomLighting","useCallback","scene","lightsAndObjToRemove","traverse","obj","Light","push","children","forEach","parent","remove","map","i","add","fog","Fog","handleGlobeReady","jsxs","jsx","Globe","polygon","includes","id","opacity","length","val","el","clickedData","isEqual","hoverData","setTimeout","polygons","line","renderOrder","cn","colorLegend","Fragment","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","fill","stroke","textAnchor","numberFormattingFunction","Tooltip","Modal","__html","string2HTML","ThreeDGlobe","$","_c","mapData","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","padding","t3","t4","t5","relativeHeight","graphID","t6","dataDownload","t7","language","t8","minHeight","t9","theme","t10","ariaLabel","t11","t12","centerPoint","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","t25","Colors","graphNoData","grays","t26","t27","t28","t29","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","t30","t31","Symbol","for","resizeObserver","ResizeObserver","entries","clientWidth","clientHeight","observe","disconnect","t32","shape","onUpdateShape","useEffectEvent","t33","fetchAndParseJSON","then","features","_temp","t34","t35","getUniqValue","getJenks","_temp2","t36","graphContainer","t37","t38","description","title","GraphHeader","_temp3","filter","_temp4","_temp5","_temp6","_temp7","t39","GraphArea","sequentialColors","max","Spinner","t40","footnote","source","GraphFooter","t41","GraphContainer","d_3","d_2","d_1","d_5","d_4","d_0","geometry","reversed","coordinates","reverse","coord","c","reversed_0","geometry_0"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAIA,IAAa,SAAoBC,GAAK;AACxC,WAAOA,EAAI,OAAO,CAAC,MAAM,MAAMA,EAAI,MAAM,CAAC,IAAIA;AAAA,EAChD,GAEIC,IAAW,SAAkBC,GAAU;AACzC,QAAIC,IAAUD,EAAS,WAAW,KAAKA,EAAS,WAAW,GACvDE,IAAeD,IAAU,GAAG,OAAOD,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAS,MAAM,GAAG,CAAC,GAC3GG,IAAeF,IAAU,GAAG,OAAOD,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,OAAOA,E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e,CAACD,CAAQ;AAAA,IAAA;AAAI,WACtD;AAAA,MAAA,GAAK5I;AAAAA,MAAE2I,UAAAA;AAAAA,IAAAA;AAAAA,EAAY;AAG5B,QAAAI,IAAmB,CAAA;AAEnB/I,EAAAA,EAAE2I,SAASE,YAAY/J,QAASkK,CAAAA,MAAA;AAC9B,UAAAC,IAAiB,CAAA,GAAID,IAAI,EAACF,QAAAA;AAC1BC,IAAAA,EAAKnK,KAAM,CAACgK,CAAQ,CAAC;AAAA,EAAC,CACvB;AACD,QAAAM,IAAiB;AAAA,IAAA,GAAKlJ,EAAE2I;AAAAA,IAASE,aAAeE;AAAAA,EAAAA;AAAQ,SACjD;AAAA,IAAA,GAAK/I;AAAAA,IAAE2I,UAAEA;AAAAA,EAAAA;AAAU;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ThreeDGlobe.js","sources":["../node_modules/hex-to-rgba/build/index.js","../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["\"use strict\";\n\nvar removeHash = function removeHash(hex) {\n return hex.charAt(0) === '#' ? hex.slice(1) : hex;\n};\n\nvar parseHex = function parseHex(nakedHex) {\n var isShort = nakedHex.length === 3 || nakedHex.length === 4;\n var twoDigitHexR = isShort ? \"\".concat(nakedHex.slice(0, 1)).concat(nakedHex.slice(0, 1)) : nakedHex.slice(0, 2);\n var twoDigitHexG = isShort ? \"\".concat(nakedHex.slice(1, 2)).concat(nakedHex.slice(1, 2)) : nakedHex.slice(2, 4);\n var twoDigitHexB = isShort ? \"\".concat(nakedHex.slice(2, 3)).concat(nakedHex.slice(2, 3)) : nakedHex.slice(4, 6);\n var twoDigitHexA = (isShort ? \"\".concat(nakedHex.slice(3, 4)).concat(nakedHex.slice(3, 4)) : nakedHex.slice(6, 8)) || 'ff'; // const numericA = +((parseInt(a, 16) / 255).toFixed(2));\n\n return {\n r: twoDigitHexR,\n g: twoDigitHexG,\n b: twoDigitHexB,\n a: twoDigitHexA\n };\n};\n\nvar hexToDecimal = function hexToDecimal(hex) {\n return parseInt(hex, 16);\n};\n\nvar hexesToDecimals = function hexesToDecimals(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b,\n a = _ref.a;\n return {\n r: hexToDecimal(r),\n g: hexToDecimal(g),\n b: hexToDecimal(b),\n a: +(hexToDecimal(a) / 255).toFixed(2)\n };\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}; // eslint-disable-line no-restricted-globals, max-len\n\n\nvar formatRgb = function formatRgb(decimalObject, parameterA) {\n var r = decimalObject.r,\n g = decimalObject.g,\n b = decimalObject.b,\n parsedA = decimalObject.a;\n var a = isNumeric(parameterA) ? parameterA : parsedA;\n return \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(a, \")\");\n};\n/**\n * Turns an old-fashioned css hex color value into a rgb color value.\n *\n * If you specify an alpha value, you'll get a rgba() value instead.\n *\n * @param The hex value to convert. ('123456'. '#123456', ''123', '#123')\n * @param An alpha value to apply. (optional) ('0.5', '0.25')\n * @return An rgb or rgba value. ('rgb(11, 22, 33)'. 'rgba(11, 22, 33, 0.5)')\n */\n\n\nvar hexToRgba = function hexToRgba(hex, a) {\n var hashlessHex = removeHash(hex);\n var hexObject = parseHex(hashlessHex);\n var decimalObject = hexesToDecimals(hexObject);\n return formatRgb(decimalObject, a);\n};\n\nmodule.exports = hexToRgba;","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport hexToRgba from 'hex-to-rgba';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n LightConfig,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { X } from '@/Components/Icons';\r\nimport { getCentroidCoordinates } from '@/Utils/getCentroidCoordinates';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: (number | string)[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.Material;\r\n lights: LightConfig[];\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n atmosphereAltitude: number;\r\n globeCurvatureResolution: number;\r\n fogSettings?: FogDataType;\r\n highlightedAltitude: number;\r\n selectedId?: string;\r\n collapseColorScaleByDefault?: boolean;\r\n dimmedOpacity: number;\r\n}\r\n\r\nfunction createLightFromConfig(config: LightConfig): THREE.Light {\r\n let light: THREE.Light;\r\n\r\n switch (config.type) {\r\n case 'ambient':\r\n light = new THREE.AmbientLight(config.color, config.intensity);\r\n break;\r\n case 'directional':\r\n light = new THREE.DirectionalLight(config.color, config.intensity);\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z === undefined ? -1 : config.target.z,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.DirectionalLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.DirectionalLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.DirectionalLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.DirectionalLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.DirectionalLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n case 'point':\r\n light = new THREE.PointLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n break;\r\n case 'spot':\r\n light = new THREE.SpotLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.angle || Math.PI / 3,\r\n config.penumbra || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z || 0,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.SpotLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.SpotLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.SpotLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.SpotLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.SpotLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error('Unknown light type');\r\n }\r\n\r\n return light;\r\n}\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n atmosphereAltitude,\r\n globeCurvatureResolution,\r\n fogSettings,\r\n lights,\r\n highlightedAltitude,\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n dimmedOpacity,\r\n } = props;\r\n const [globeReady, setGlobeReady] = useState(false);\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n }\r\n }, [enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData || selectedId) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }\r\n }, [mouseOverData, selectedId, autoRotate]);\r\n useEffect(() => {\r\n if (globeEl.current && selectedId) {\r\n const selectedPolygon = polygonData.find(\r\n (d: any) => d.properties[mapProperty] === selectedId,\r\n );\r\n const [lng, lat] = getCentroidCoordinates(selectedPolygon);\r\n globeEl.current.pointOfView({ lat, lng, altitude: scale }, 1000);\r\n }\r\n }, [selectedId, scale, polygonData, mapProperty]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials =\r\n globeMaterial ||\r\n new THREE.MeshBasicMaterial({\r\n color: '#FFF',\r\n });\r\n const setupCustomLighting = useCallback(() => {\r\n if (!globeEl.current) return;\r\n\r\n const scene = globeEl.current.scene();\r\n const camera = globeEl.current.camera();\r\n\r\n let lightsAndObjToRemove: THREE.Object3D[] = [];\r\n scene.traverse(obj => {\r\n if (obj instanceof THREE.Light) {\r\n lightsAndObjToRemove.push(obj);\r\n }\r\n });\r\n lightsAndObjToRemove = [...lightsAndObjToRemove, ...camera.children];\r\n lightsAndObjToRemove.forEach(light => light.parent?.remove(light));\r\n\r\n const lightConfig = lights.map(config => createLightFromConfig(config));\r\n lightConfig.forEach((light, i) => {\r\n if (lights[i].type !== 'ambient' && lights[i].position === 'camera') {\r\n camera.add(light);\r\n if (lights[i].type !== 'point') {\r\n camera.add((light as THREE.DirectionalLight | THREE.SpotLight).target);\r\n }\r\n } else {\r\n scene.add(light);\r\n }\r\n });\r\n\r\n if (fogSettings) {\r\n scene.fog = new THREE.Fog(fogSettings.color, fogSettings.near, fogSettings.far);\r\n }\r\n }, [lights, fogSettings]);\r\n\r\n const handleGlobeReady = () => {\r\n setGlobeReady(true);\r\n setupCustomLighting();\r\n };\r\n useEffect(() => {\r\n if (globeReady) {\r\n setupCustomLighting();\r\n }\r\n }, [globeReady, setupCustomLighting]);\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n height={height}\r\n width={width}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds.includes(polygon?.properties?.[mapProperty]) ||\r\n polygon?.properties?.[mapProperty] === selectedId\r\n ? highlightedAltitude\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id ||\r\n polygon?.properties?.[mapProperty] === mouseClickData?.id\r\n ? highlightedAltitude\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onGlobeClick={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerLat,\r\n lng: centerLng,\r\n });\r\n const scene = globeEl.current.scene();\r\n setTimeout(() => {\r\n const polygons = scene.children[3]?.children[0]?.children[4]?.children || [];\r\n polygons.forEach(d => {\r\n const line = d.children[1];\r\n line.renderOrder = 2;\r\n });\r\n }, 300);\r\n const camera = globeEl.current.camera();\r\n scene.add(camera);\r\n handleGlobeReady();\r\n }\r\n }}\r\n />\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g key={i} className='cursor-pointer'>\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[i],\r\n stroke: colors[i],\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n stroke: colors[colorDomain.length],\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div key={i} className='flex gap-2 items-center'>\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\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 </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useEffectEvent, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n Languages,\r\n LightConfig,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\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: ChoroplethMapDataType[];\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 /** Colors for the choropleth map. Make sure the the colors are in hex code, any other format can cause issues. */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.Material;\r\n /** Defines the lights for the 3D scene */\r\n lights?: LightConfig[];\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** The max altitude of the atmosphere, in terms of globe radius units. */\r\n atmosphereAltitude?: number;\r\n /** Resolution in angular degrees of the sphere curvature. The finer the resolution, the more the globe is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. */\r\n globeCurvatureResolution?: number;\r\n /** Defines fog settings for the scene. */\r\n fogSettings?: FogDataType;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Countries or regions to be highlighted */\r\n selectedId?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the altitude of the highlighted countries or the countries on mouseover. */\r\n highlightedAltitude?: number;\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds = [],\r\n highlightedAltitude = 0.1,\r\n dimmedOpacity = 0.3,\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n globeCurvatureResolution = 4,\r\n atmosphereAltitude = 0.15,\r\n fogSettings,\r\n lights = [\r\n {\r\n type: 'ambient',\r\n color: 0x404040,\r\n intensity: 0.4,\r\n },\r\n {\r\n type: 'directional',\r\n color: 0xffffff,\r\n intensity: 1,\r\n position: { x: 5, y: 10, z: 5 },\r\n },\r\n ],\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = 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 setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n onUpdateShape(features);\r\n } else onUpdateShape(d.features);\r\n });\r\n } else {\r\n onUpdateShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\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 || 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={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 <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light' ? Colors.light.grays['gray-700'] : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n fogSettings={fogSettings}\r\n lights={lights}\r\n highlightedAltitude={highlightedAltitude}\r\n selectedId={selectedId}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n dimmedOpacity={dimmedOpacity}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\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":["removeHash","hex","parseHex","nakedHex","isShort","twoDigitHexR","twoDigitHexG","twoDigitHexB","twoDigitHexA","hexToDecimal","hexesToDecimals","_ref","r","g","b","a","isNumeric","n","formatRgb","decimalObject","parameterA","parsedA","hexToRgba","hashlessHex","hexObject","build","createLightFromConfig","config","light","type","THREE","AmbientLight","color","intensity","DirectionalLight","position","set","x","y","z","target","undefined","castShadow","shadow","mapSize","width","height","camera","near","far","PointLight","distance","decay","SpotLight","angle","Math","PI","penumbra","Error","Graph","props","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","atmosphereAltitude","globeCurvatureResolution","fogSettings","lights","highlightedAltitude","selectedId","collapseColorScaleByDefault","dimmedOpacity","globeReady","setGlobeReady","useState","globeEl","useRef","mouseClickData","setMouseClickData","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","current","controls","autoRotateSpeed","selectedPolygon","find","d","properties","lng","lat","getCentroidCoordinates","pointOfView","altitude","canvas","renderer","domElement","handleMouseMove","e","clientX","clientY","addEventListener","removeEventListener","materials","MeshBasicMaterial","setupCustomLighting","useCallback","scene","lightsAndObjToRemove","traverse","obj","Light","push","children","forEach","parent","remove","map","i","add","fog","Fog","handleGlobeReady","jsxs","jsx","Globe","polygon","includes","id","opacity","length","val","el","clickedData","isEqual","hoverData","setTimeout","polygons","line","renderOrder","cn","colorLegend","Fragment","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","fill","stroke","textAnchor","numberFormattingFunction","Tooltip","DetailsModal","modal","ThreeDGlobe","$","_c","mapData","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","padding","t3","t4","t5","relativeHeight","graphID","t6","dataDownload","t7","language","t8","minHeight","t9","theme","t10","ariaLabel","t11","t12","centerPoint","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","t25","Colors","graphNoData","grays","t26","t27","t28","t29","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","t30","t31","Symbol","for","resizeObserver","ResizeObserver","entries","clientWidth","clientHeight","observe","disconnect","t32","shape","onUpdateShape","useEffectEvent","t33","fetchAndParseJSON","then","features","_temp","t34","t35","getUniqValue","getJenks","_temp2","t36","graphContainer","t37","t38","description","title","GraphHeader","_temp3","filter","_temp4","_temp5","_temp6","_temp7","t39","GraphArea","sequentialColors","max","Spinner","t40","footnote","source","GraphFooter","t41","GraphContainer","d_3","d_2","d_1","d_5","d_4","d_0","geometry","reversed","coordinates","reverse","coord","c","reversed_0","geometry_0"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAIA,IAAa,SAAoBC,GAAK;AACxC,WAAOA,EAAI,OAAO,CAAC,MAAM,MAAMA,EAAI,MAAM,CAAC,IAAIA;AAAA,EAChD,GAEIC,IAAW,SAAkBC,GAAU;AACzC,QAAIC,IAAUD,EAAS,WAAW,KAAKA,EAAS,WAAW,GACvDE,IAAeD,IAAU,GAAG,OAAOD,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAS,MAAM,GAAG,CAAC,GAC3GG,IAAeF,IAAU,GAAG,OAAOD,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAS,MAAM,GAAG,CAAC,GAC3GI,IAAeH,IAAU,GAAG,OAAOD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B;AACD,QAAAM,IAAiB;AAAA,IAAA,GAAKjJ,EAAE0I;AAAAA,IAASE,aAAeE;AAAAA,EAAAA;AAAQ,SACjD;AAAA,IAAA,GAAK9I;AAAAA,IAAE0I,UAAEA;AAAAA,EAAAA;AAAU;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { c as w, m as k, j as b } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
+
import { createPortal as v } from "react-dom";
|
|
3
|
+
import { s as j } from "./string2HTML-DhG75NqA.js";
|
|
4
|
+
function T(h) {
|
|
5
|
+
const t = w.c(22), {
|
|
6
|
+
body: r,
|
|
7
|
+
xPos: s,
|
|
8
|
+
yPos: d,
|
|
9
|
+
data: e,
|
|
10
|
+
backgroundStyle: m,
|
|
11
|
+
className: y
|
|
12
|
+
} = h;
|
|
13
|
+
let c;
|
|
14
|
+
t[0] !== m ? (c = m === void 0 ? {
|
|
15
|
+
maxWidth: "24rem",
|
|
16
|
+
wordWrap: "break-word"
|
|
17
|
+
} : m, t[0] = m, t[1] = c) : c = t[1];
|
|
18
|
+
const f = c;
|
|
19
|
+
if (typeof r == "function" && (r(e) === null || r(e) === void 0) || r === "")
|
|
20
|
+
return null;
|
|
21
|
+
let o;
|
|
22
|
+
t[2] !== y ? (o = k("graph-tooltip block p-2 fixed z-[1000] bg-primary-gray-200 dark:bg-primary-gray-600 border border-primary-gray-300 dark:border-primary-gray-500", y), t[2] = y, t[3] = o) : o = t[3];
|
|
23
|
+
const g = `${d < window.innerHeight / 2 ? d - 10 : d + 10}px`, u = `${s > window.innerWidth / 2 ? s - 10 : s + 10}px`, x = `translate(${s > window.innerWidth / 2 ? "-100%" : "0%"},${d > window.innerHeight / 2 ? "-100%" : "0%"})`;
|
|
24
|
+
let i;
|
|
25
|
+
t[4] !== f || t[5] !== g || t[6] !== u || t[7] !== x ? (i = {
|
|
26
|
+
...f,
|
|
27
|
+
top: g,
|
|
28
|
+
left: u,
|
|
29
|
+
transform: x
|
|
30
|
+
}, t[4] = f, t[5] = g, t[6] = u, t[7] = x, t[8] = i) : i = t[8];
|
|
31
|
+
let n;
|
|
32
|
+
t[9] !== r || t[10] !== e ? (n = typeof r == "string" ? {
|
|
33
|
+
__html: j(r, e)
|
|
34
|
+
} : void 0, t[9] = r, t[10] = e, t[11] = n) : n = t[11];
|
|
35
|
+
let a;
|
|
36
|
+
t[12] !== r || t[13] !== e ? (a = typeof r == "function" ? r(e) : null, t[12] = r, t[13] = e, t[14] = a) : a = t[14];
|
|
37
|
+
let l;
|
|
38
|
+
t[15] !== n || t[16] !== a ? (l = /* @__PURE__ */ b.jsx("div", { className: "text-sm leading-normal text-primary-black dark:text-primary-gray-100 m-0", dangerouslySetInnerHTML: n, children: a }), t[15] = n, t[16] = a, t[17] = l) : l = t[17];
|
|
39
|
+
let p;
|
|
40
|
+
return t[18] !== o || t[19] !== i || t[20] !== l ? (p = v(/* @__PURE__ */ b.jsx("div", { className: "undp-container", children: /* @__PURE__ */ b.jsx("div", { className: o, style: i, children: l }) }), document.body), t[18] = o, t[19] = i, t[20] = l, t[21] = p) : p = t[21], p;
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
T
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=Tooltip-Dj5eVppQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip-Dj5eVppQ.js","sources":["../src/Components/Elements/Tooltip.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { createPortal } from 'react-dom';\r\n\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n body: string | ((_d: any) => React.ReactNode);\r\n xPos: number;\r\n yPos: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any;\r\n backgroundStyle?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Tooltip(props: Props) {\r\n const {\r\n body,\r\n xPos,\r\n yPos,\r\n data,\r\n backgroundStyle = {\r\n maxWidth: '24rem',\r\n wordWrap: 'break-word',\r\n },\r\n className,\r\n } = props;\r\n if (\r\n (typeof body === 'function' && (body(data) === null || body(data) === undefined)) ||\r\n body === ''\r\n ) {\r\n return null;\r\n }\r\n return createPortal(\r\n <div className='undp-container'>\r\n <div\r\n className={cn(\r\n 'graph-tooltip block p-2 fixed z-[1000] bg-primary-gray-200 dark:bg-primary-gray-600 border border-primary-gray-300 dark:border-primary-gray-500',\r\n className,\r\n )}\r\n style={{\r\n ...backgroundStyle,\r\n top: `${yPos < window.innerHeight / 2 ? yPos - 10 : yPos + 10}px`,\r\n left: `${xPos > window.innerWidth / 2 ? xPos - 10 : xPos + 10}px`,\r\n transform: `translate(${\r\n xPos > window.innerWidth / 2 ? '-100%' : '0%'\r\n },${yPos > window.innerHeight / 2 ? '-100%' : '0%'})`,\r\n }}\r\n >\r\n <div\r\n className='text-sm leading-normal text-primary-black dark:text-primary-gray-100 m-0'\r\n dangerouslySetInnerHTML={\r\n typeof body === 'string' ? { __html: string2HTML(body, data) } : undefined\r\n }\r\n >\r\n {typeof body === 'function' ? body(data) : null}\r\n </div>\r\n </div>\r\n </div>,\r\n document.body,\r\n );\r\n}\r\n"],"names":["Tooltip","props","$","_c","body","xPos","yPos","data","backgroundStyle","t0","className","t1","undefined","maxWidth","wordWrap","t2","cn","t3","window","innerHeight","t4","innerWidth","t5","t6","top","left","transform","t7","__html","string2HTML","t8","t9","t10","createPortal","jsx","document"],"mappings":";;;AAgBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,MAAAA;AAAAA,IAAAC,MAAAA;AAAAA,IAAAC,MAAAA;AAAAA,IAAAC,MAAAA;AAAAA,IAAAC,iBAAAC;AAAAA,IAAAC,WAAAA;AAAAA,EAAAA,IAUIT;AAAM,MAAAU;AAAA,EAAAT,SAAAO,KALRE,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AAAA,EAAA5B,EAAA,EAAA,MAAAE,KAAAF,UAAAK,KAG3EuB,IAAA,OAAO1B,KAAS,aAAaA,EAAKG,CAAW,IAA7C,MAA8CL,QAAAE,GAAAF,QAAAK,GAAAL,QAAA4B,KAAAA,IAAA5B,EAAA,EAAA;AAAA,MAAA6B;AAAA,EAAA7B,EAAA,EAAA,MAAAyB,KAAAzB,UAAA4B,KANjDC,mCACY,WAAA,4EAER,yBAAAJ,GAGDG,UAAAA,GACH,GAAM5B,QAAAyB,GAAAzB,QAAA4B,GAAA5B,QAAA6B,KAAAA,IAAA7B,EAAA,EAAA;AAAA,MAAA8B;AAAA,SAAA9B,EAAA,EAAA,MAAAa,KAAAb,UAAAqB,KAAArB,EAAA,EAAA,MAAA6B,KAvBLC,IAAAC,EACLC,gBAAAA,EAAAA,IAAA,OAAA,EAAe,WAAA,kBACb,UAAAA,gBAAAA,EAAAA,aACa,WAAAnB,GAIJ,OAAAQ,GASPQ,UAAAA,EAAAA,CAQF,EAAA,CACF,GACAI,SAAQ/B,IACV,GAACF,QAAAa,GAAAb,QAAAqB,GAAArB,QAAA6B,GAAA7B,QAAA8B,KAAAA,IAAA9B,EAAA,EAAA,GA3BM8B;AA2BN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const a=require("./index-CHPV5EwG-CTPQjnHt.cjs"),w=require("react-dom"),k=require("./string2HTML-CPGr_I5E.cjs");function j(h){const t=a.compilerRuntimeExports.c(22),{body:e,xPos:d,yPos:c,data:r,backgroundStyle:m,className:y}=h;let p;t[0]!==m?(p=m===void 0?{maxWidth:"24rem",wordWrap:"break-word"}:m,t[0]=m,t[1]=p):p=t[1];const x=p;if(typeof e=="function"&&(e(r)===null||e(r)===void 0)||e==="")return null;let i;t[2]!==y?(i=a.mo("graph-tooltip block p-2 fixed z-[1000] bg-primary-gray-200 dark:bg-primary-gray-600 border border-primary-gray-300 dark:border-primary-gray-500",y),t[2]=y,t[3]=i):i=t[3];const f=`${c<window.innerHeight/2?c-10:c+10}px`,g=`${d>window.innerWidth/2?d-10:d+10}px`,b=`translate(${d>window.innerWidth/2?"-100%":"0%"},${c>window.innerHeight/2?"-100%":"0%"})`;let n;t[4]!==x||t[5]!==f||t[6]!==g||t[7]!==b?(n={...x,top:f,left:g,transform:b},t[4]=x,t[5]=f,t[6]=g,t[7]=b,t[8]=n):n=t[8];let o;t[9]!==e||t[10]!==r?(o=typeof e=="string"?{__html:k.string2HTML(e,r)}:void 0,t[9]=e,t[10]=r,t[11]=o):o=t[11];let s;t[12]!==e||t[13]!==r?(s=typeof e=="function"?e(r):null,t[12]=e,t[13]=r,t[14]=s):s=t[14];let l;t[15]!==o||t[16]!==s?(l=a.jsxRuntimeExports.jsx("div",{className:"text-sm leading-normal text-primary-black dark:text-primary-gray-100 m-0",dangerouslySetInnerHTML:o,children:s}),t[15]=o,t[16]=s,t[17]=l):l=t[17];let u;return t[18]!==i||t[19]!==n||t[20]!==l?(u=w.createPortal(a.jsxRuntimeExports.jsx("div",{className:"undp-container",children:a.jsxRuntimeExports.jsx("div",{className:i,style:n,children:l})}),document.body),t[18]=i,t[19]=n,t[20]=l,t[21]=u):u=t[21],u}exports.Tooltip=j;
|
|
2
|
+
//# sourceMappingURL=Tooltip-uUdw6wJL.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip-uUdw6wJL.cjs","sources":["../src/Components/Elements/Tooltip.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { createPortal } from 'react-dom';\r\n\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n body: string | ((_d: any) => React.ReactNode);\r\n xPos: number;\r\n yPos: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any;\r\n backgroundStyle?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Tooltip(props: Props) {\r\n const {\r\n body,\r\n xPos,\r\n yPos,\r\n data,\r\n backgroundStyle = {\r\n maxWidth: '24rem',\r\n wordWrap: 'break-word',\r\n },\r\n className,\r\n } = props;\r\n if (\r\n (typeof body === 'function' && (body(data) === null || body(data) === undefined)) ||\r\n body === ''\r\n ) {\r\n return null;\r\n }\r\n return createPortal(\r\n <div className='undp-container'>\r\n <div\r\n className={cn(\r\n 'graph-tooltip block p-2 fixed z-[1000] bg-primary-gray-200 dark:bg-primary-gray-600 border border-primary-gray-300 dark:border-primary-gray-500',\r\n className,\r\n )}\r\n style={{\r\n ...backgroundStyle,\r\n top: `${yPos < window.innerHeight / 2 ? yPos - 10 : yPos + 10}px`,\r\n left: `${xPos > window.innerWidth / 2 ? xPos - 10 : xPos + 10}px`,\r\n transform: `translate(${\r\n xPos > window.innerWidth / 2 ? '-100%' : '0%'\r\n },${yPos > window.innerHeight / 2 ? '-100%' : '0%'})`,\r\n }}\r\n >\r\n <div\r\n className='text-sm leading-normal text-primary-black dark:text-primary-gray-100 m-0'\r\n dangerouslySetInnerHTML={\r\n typeof body === 'string' ? { __html: string2HTML(body, data) } : undefined\r\n }\r\n >\r\n {typeof body === 'function' ? body(data) : null}\r\n </div>\r\n </div>\r\n </div>,\r\n document.body,\r\n );\r\n}\r\n"],"names":["Tooltip","props","$","_c","body","xPos","yPos","data","backgroundStyle","t0","className","t1","undefined","maxWidth","wordWrap","t2","cn","t3","window","innerHeight","t4","innerWidth","t5","t6","top","left","transform","t7","__html","string2HTML","t8","t9","t10","createPortal","jsx","document"],"mappings":"6HAgBO,SAAAA,EAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,KAAAA,EAAAC,KAAAA,EAAAC,KAAAA,EAAAC,KAAAA,EAAAC,gBAAAC,EAAAC,UAAAA,CAAAA,EAUIT,EAAM,IAAAU,EAAAT,OAAAO,GALRE,EAAAF,IAAAG,OAAA,CAAAC,SACY,QAAOC,SACP,YAAA,EAFZL,EAGCP,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AL,MAAA4B,GAAAA,EAAA5B,EAAA,EAAA,EAAA,IAAA6B,EAAA7B,EAAA,EAAA,IAAAyB,GAAAzB,QAAA4B,GANjDC,iCACY,UAAA,2EAER,wBAAAJ,EAGDG,SAAAA,EACH,EAAM5B,MAAAyB,EAAAzB,MAAA4B,EAAA5B,MAAA6B,GAAAA,EAAA7B,EAAA,EAAA,EAAA,IAAA8B,EAAA,OAAA9B,EAAA,EAAA,IAAAa,GAAAb,QAAAqB,GAAArB,EAAA,EAAA,IAAA6B,GAvBLC,EAAAC,EAAAA,aACLC,EAAAA,kBAAAA,IAAA,MAAA,CAAe,UAAA,iBACb,SAAAA,EAAAA,kBAAAA,WACa,UAAAnB,EAIJ,MAAAQ,EASPQ,SAAAA,CAAAA,CAQF,CAAA,CACF,EACAI,SAAQ/B,IACV,EAACF,MAAAa,EAAAb,MAAAqB,EAAArB,MAAA6B,EAAA7B,MAAA8B,GAAAA,EAAA9B,EAAA,EAAA,EA3BM8B,CA2BN"}
|
package/dist/TreeMapGraph.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./index-CHPV5EwG-CTPQjnHt.cjs"),N=require("react"),$t=require("./Typography-DX7PlgQU.cjs"),Kt=require("./Modal-JW_IExO3.cjs"),Ut=require("./Tooltip-4dJo4_AF.cjs"),Zt=require("./numberFormattingFunction-02t-wJta.cjs"),Bt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),et=require("./Colors.cjs"),Jt=require("./string2HTML-CPGr_I5E.cjs"),Qt=require("./use-in-view-QcfiW0w3.cjs"),bt=require("./proxy-BxvUI_9l.cjs"),_t=require("./index-DG2bgAva.cjs"),te=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ee=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs"),ie=require("./ColorLegendWithMouseOver.cjs"),oe=require("./EmptyState-sAEZ_5rU.cjs"),Lt=require("./uniqBy-O05lp2S5.cjs"),At=require("./GraphContainer-d8A46BK2.cjs");function re(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function ae(){return this.eachAfter(re)}function le(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function se(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function ue(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function ce(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function de(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function he(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function fe(e){for(var t=this,n=pe(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function pe(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ge(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function me(){return Array.from(this)}function ve(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function xe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ye(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function zt(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Ce)):t===void 0&&(t=je);for(var n=new vt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new vt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Gt)}function we(){return zt(this).eachBefore(be)}function je(e){return e.children}function Ce(e){return Array.isArray(e)?e[1]:null}function be(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Gt(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function vt(e){this.data=e,this.depth=this.height=0,this.parent=null}vt.prototype=zt.prototype={constructor:vt,count:ae,each:le,eachAfter:ue,eachBefore:se,find:ce,sum:de,sort:he,path:fe,ancestors:ge,descendants:me,leaves:ve,links:xe,copy:we,[Symbol.iterator]:ye};function Dt(e){return e==null?null:Ft(e)}function Ft(e){if(typeof e!="function")throw new Error;return e}function gt(){return 0}function mt(e){return function(){return e}}function Me(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Oe(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,y=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*y}var Ee={depth:-1},Ht={},qt={};function Re(e){return e.id}function Se(e){return e.parentId}function ke(){var e=Re,t=Se,n;function i(r){var l=Array.from(r),a=e,d=t,g,y,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,w)=>Be(n(b,w,r))),M=p.map(Pt),R=new Set(p).add("");for(const b of M)R.has(b)||(R.add(b),p.push(b),M.push(Pt(b)),l.push(qt));a=(b,w)=>p[w],d=(b,w)=>M[w]}for(u=0,g=l.length;u<g;++u)y=l[u],h=l[u]=new vt(y),(c=a(y,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Ht:h)),(c=d(y,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Ht)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===qt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===qt);--p)h.data=null}if(v.parent=Ee,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Gt),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=Dt(r),i):e},i.parentId=function(r){return arguments.length?(t=Dt(r),i):t},i.path=function(r){return arguments.length?(n=Dt(r),i):n},i}function Be(e){e=`${e}`;let t=e.length;return It(e,t-1)&&!It(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Pt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!It(e,t););return e.slice(0,t)}function It(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function De(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,y=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*y}var qe=(1+Math.sqrt(5))/2;function Ie(e,t,n,i,r,l){for(var a=[],d=t.children,g,y,u=0,v=0,o=d.length,h,c,m=t.value,f,p,M,R,b,w,O;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=M=f,w=Math.max(c/h,h/c)/(m*e),O=f*f*w,b=Math.max(M/O,O/p);v<o;++v){if(f+=y=d[v].value,y<p&&(p=y),y>M&&(M=y),O=f*f*w,R=Math.max(M/O,O/p),R>b){f-=y;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Oe(g,n,i,r,m?i+=c*f/m:l):De(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const Ve=(function e(t){function n(i,r,l,a,d){Ie(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})(qe);function Ne(){var e=Ve,t=!1,n=1,i=1,r=[0],l=gt,a=gt,d=gt,g=gt,y=gt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(Me),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=y(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Ft(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:mt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:mt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:mt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:mt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(y=typeof o=="function"?o:mt(+o),u):y},u}function Te(e){const t=x.compilerRuntimeExports.c(72),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:y,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:M,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:w,language:O,styles:B,classNames:T,animate:E,dimmedOpacity:U,precision:J}=e,ot=N.useRef(null);let nt;t[0]!==E.amount||t[1]!==E.once?(nt={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=nt):nt=t[2];const Q=Qt.useInView(ot,nt),[it,rt]=N.useState(void 0),[k,at]=N.useState(void 0),[_,lt]=N.useState(void 0),[tt,C]=N.useState(void 0);let j;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==y?(j={top:y,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=y,t[7]=j):j=t[7];const S=j,st=l-S.left-S.right,ut=a-S.top-S.bottom;let $,L,A,H,P,z,G,F,W;if(t[8]!==E.duration||t[9]!==T?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==w||t[14]!==U||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==M||t[19]!==Q||t[20]!==O||t[21]!==S.left||t[22]!==S.top||t[23]!==k||t[24]!==R||t[25]!==h||t[26]!==J||t[27]!==p||t[28]!==b||t[29]!==c||t[30]!==v||t[31]!==m||t[32]!==B?.graphObjectValues||t[33]!==f||t[34]!==l){const pt=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(We)],ct=ke().id(Fe).parentId(Ge)(pt);ct.sum(ze);const Z=Ne().size([st,ut]).padding(2)(ct);L=bt.motion.svg,P=`${l}px`,z=`${a}px`,G=`0 0 ${l} ${a}`,F="ltr",W=ot,H=`translate(${S.left},${S.top})`,$=_t.AnimatePresence,A=Z.children?.map(s=>x.jsxRuntimeExports.jsxs(bt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:U:M.length!==0?M.indexOf(s.data.id)!==-1?.85:U:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:K=>{rt(s.data.data),C(K.clientY),lt(K.clientX),h?.(s.data.data)},onClick:()=>{(R||w)&&(k===s.data.id&&b?(at(void 0),R?.(void 0)):(at(s.data.id),R?.(s.data.data)))},onMouseMove:K=>{rt(s.data.data),C(K.clientY),lt(K.clientX)},onMouseLeave:()=>{rt(void 0),lt(void 0),C(void 0),h?.(void 0)},children:[x.jsxRuntimeExports.jsx(bt.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(Pe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(He).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?x.jsxRuntimeExports.jsx(bt.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:x.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:x.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:Bt.getTextColorBasedOnBgColor(n.filter(Ae).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray)},children:[v?x.jsxRuntimeExports.jsx($t.j,{marginBottom:"none",size:"sm",leading:"none",className:x.mo("w-full treemap-label",O==="ar"||O==="he"?"text-right":"text-left",T?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:Bt.getTextColorBasedOnBgColor(n.filter(Le).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...B?.graphObjectValues||{}},children:s.data.id}):null,m?x.jsxRuntimeExports.jsx($t.j,{marginBottom:"none",size:"sm",leading:"none",className:x.mo("w-full font-bold treemap-value",O==="ar"||O==="he"?"text-right":"text-left",T?.graphObjectValues),style:{color:Bt.getTextColorBasedOnBgColor(n.filter($e).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...B?.graphObjectValues||{}},children:Zt.numberFormattingFunction(s.data.value,"NA",J,p,f)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=T?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=w,t[14]=U,t[15]=ut,t[16]=st,t[17]=a,t[18]=M,t[19]=Q,t[20]=O,t[21]=S.left,t[22]=S.top,t[23]=k,t[24]=R,t[25]=h,t[26]=J,t[27]=p,t[28]=b,t[29]=c,t[30]=v,t[31]=m,t[32]=B?.graphObjectValues,t[33]=f,t[34]=l,t[35]=$,t[36]=L,t[37]=A,t[38]=H,t[39]=P,t[40]=z,t[41]=G,t[42]=F,t[43]=W}else $=t[35],L=t[36],A=t[37],H=t[38],P=t[39],z=t[40],G=t[41],F=t[42],W=t[43];let X;t[44]!==$||t[45]!==A?(X=x.jsxRuntimeExports.jsx($,{children:A}),t[44]=$,t[45]=A,t[46]=X):X=t[46];let D;t[47]!==H||t[48]!==X?(D=x.jsxRuntimeExports.jsx("g",{transform:H,children:X}),t[47]=H,t[48]=X,t[49]=D):D=t[49];let Y;t[50]!==L||t[51]!==D||t[52]!==P||t[53]!==z||t[54]!==G||t[55]!==F||t[56]!==W?(Y=x.jsxRuntimeExports.jsx(L,{width:P,height:z,viewBox:G,direction:F,ref:W,children:D}),t[50]=L,t[51]=D,t[52]=P,t[53]=z,t[54]=G,t[55]=F,t[56]=W,t[57]=Y):Y=t[57];let q;t[58]!==T?.tooltip||t[59]!==_||t[60]!==tt||t[61]!==it||t[62]!==B?.tooltip||t[63]!==o?(q=it&&o&&_&&tt?x.jsxRuntimeExports.jsx(Ut.Tooltip,{data:it,body:o,xPos:_,yPos:tt,backgroundStyle:B?.tooltip,className:T?.tooltip}):null,t[58]=T?.tooltip,t[59]=_,t[60]=tt,t[61]=it,t[62]=B?.tooltip,t[63]=o,t[64]=q):q=t[64];let I;t[65]!==w||t[66]!==k?(I=w&&k!==void 0?x.jsxRuntimeExports.jsx(Kt.le,{open:k!==void 0,onClose:()=>{at(void 0)},children:x.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof w=="string"?{__html:Jt.string2HTML(w,k)}:void 0,children:typeof w=="function"?w(k):null})}):null,t[65]=w,t[66]=k,t[67]=I):I=t[67];let V;return t[68]!==Y||t[69]!==q||t[70]!==I?(V=x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[Y,q,I]}),t[68]=Y,t[69]=q,t[70]=I,t[71]=V):V=t[71],V}function $e(e){return e.color}function Le(e){return e.color}function Ae(e){return e.color}function He(e){return e.color}function Pe(e){return e.color}function ze(e){return e.value}function Ge(e){return e.parent}function Fe(e){return e.id}function We(e){return{id:e.label,value:e.size,parent:"root",data:e}}function Xe(e){const t=x.compilerRuntimeExports.c(71),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:y,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:M,backgroundColor:R,showLabels:b,relativeHeight:w,tooltip:O,onSeriesMouseOver:B,showColorScale:T,showValues:E,graphID:U,highlightedDataPoints:J,onSeriesMouseClick:ot,graphDownload:nt,dataDownload:Q,language:it,showNAColor:rt,minHeight:k,theme:at,ariaLabel:_,resetSelectionOnDoubleClick:lt,detailsOnClick:tt,styles:C,classNames:j,animate:S,dimmedOpacity:st,precision:ut}=e,$=l===void 0?"":l,L=d===void 0?"":d,A=y===void 0?0:y,H=u===void 0?0:u,P=v===void 0?0:v,z=o===void 0?0:o,G=R===void 0?!1:R,F=b===void 0?!0:b,W=T===void 0?!0:T,X=E===void 0?!0:E;let D;t[0]!==J?(D=J===void 0?[]:J,t[0]=J,t[1]=D):D=t[1];const Y=D,q=nt===void 0?!1:nt,I=Q===void 0?!1:Q,V=it===void 0?"en":it,pt=rt===void 0?!0:rt,ct=k===void 0?0:k,Z=at===void 0?"light":at,s=lt===void 0?!0:lt,K=S===void 0?!1:S,Mt=st===void 0?.3:st,Ot=ut===void 0?2:ut,[xt,Wt]=N.useState(0),[yt,Xt]=N.useState(0),[Et,Yt]=N.useState(void 0),Rt=N.useRef(null),Vt=N.useRef(null);let wt,jt;t[2]===Symbol.for("react.memo_cache_sentinel")?(wt=()=>{const Nt=new ResizeObserver(Tt=>{Wt(Tt[0].target.clientWidth||620),Xt(Tt[0].target.clientHeight||480)});return Rt.current&&Nt.observe(Rt.current),()=>Nt.disconnect()},jt=[],t[2]=wt,t[3]=jt):(wt=t[2],jt=t[3]),N.useEffect(wt,jt);const St=j?.graphContainer,kt=C?.graphContainer;let dt;t[4]!==j?.description||t[5]!==j?.title||t[6]!==n||t[7]!==I||t[8]!==g||t[9]!==q||t[10]!==i||t[11]!==C?.description||t[12]!==C?.title||t[13]!==c?(dt=i||g||q||I?x.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:j?.title,description:j?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?Vt:void 0,dataDownload:I?n.map(en).filter(tn).length>0?n.map(_e).filter(Qe):n.filter(Je):null}):null,t[4]=j?.description,t[5]=j?.title,t[6]=n,t[7]=I,t[8]=g,t[9]=q,t[10]=i,t[11]=C?.description,t[12]=C?.title,t[13]=c,t[14]=dt):dt=t[14];let ht;t[15]!==K||t[16]!==z||t[17]!==j||t[18]!==f||t[19]!==p||t[20]!==r||t[21]!==n||t[22]!==tt||t[23]!==Mt||t[24]!==Y||t[25]!==V||t[26]!==A||t[27]!==ot||t[28]!==B||t[29]!==Ot||t[30]!==L||t[31]!==s||t[32]!==H||t[33]!==Et||t[34]!==W||t[35]!==F||t[36]!==pt||t[37]!==X||t[38]!==C||t[39]!==$||t[40]!==yt||t[41]!==xt||t[42]!==Z||t[43]!==O||t[44]!==P||t[45]!==c?(ht=n.length===0?x.jsxRuntimeExports.jsx(oe.EmptyState,{}):x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[W&&n.filter(Ze).length!==0?x.jsxRuntimeExports.jsx(ie.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||et.Colors[Z].categoricalColors.colors,colorDomain:f||Lt.uniqBy(n,"color",!0),setSelectedColor:Yt,showNAColor:pt,className:j?.colorLegend}):null,x.jsxRuntimeExports.jsx(At.GraphArea,{ref:Rt,children:xt&&yt?x.jsxRuntimeExports.jsx(Te,{data:n.filter(Ue),colors:n.filter(Ke).length===0?r?[r]:[et.Colors.primaryColors["blue-600"]]:r||et.Colors[Z].categoricalColors.colors,colorDomain:n.filter(Ye).length===0?[]:f||Lt.uniqBy(n,"color",!0),width:xt,height:yt,leftMargin:A,rightMargin:H,topMargin:P,bottomMargin:z,showLabels:F,showValues:X,suffix:$,prefix:L,selectedColor:Et,tooltip:O,onSeriesMouseOver:B,onSeriesMouseClick:ot,highlightedDataPoints:Y,resetSelectionOnDoubleClick:s,detailsOnClick:tt,styles:C,classNames:j,language:V,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Mt,precision:Ot}):null})]}),t[15]=K,t[16]=z,t[17]=j,t[18]=f,t[19]=p,t[20]=r,t[21]=n,t[22]=tt,t[23]=Mt,t[24]=Y,t[25]=V,t[26]=A,t[27]=ot,t[28]=B,t[29]=Ot,t[30]=L,t[31]=s,t[32]=H,t[33]=Et,t[34]=W,t[35]=F,t[36]=pt,t[37]=X,t[38]=C,t[39]=$,t[40]=yt,t[41]=xt,t[42]=Z,t[43]=O,t[44]=P,t[45]=c,t[46]=ht):ht=t[46];let ft;t[47]!==j?.footnote||t[48]!==j?.source||t[49]!==m||t[50]!==a||t[51]!==C?.footnote||t[52]!==C?.source||t[53]!==c?(ft=a||m?x.jsxRuntimeExports.jsx(ee.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:j?.footnote,source:j?.source},sources:a,footNote:m,width:c}):null,t[47]=j?.footnote,t[48]=j?.source,t[49]=m,t[50]=a,t[51]=C?.footnote,t[52]=C?.source,t[53]=c,t[54]=ft):ft=t[54];let Ct;return t[55]!==_||t[56]!==G||t[57]!==U||t[58]!==h||t[59]!==V||t[60]!==ct||t[61]!==M||t[62]!==w||t[63]!==St||t[64]!==kt||t[65]!==dt||t[66]!==ht||t[67]!==ft||t[68]!==Z||t[69]!==c?(Ct=x.jsxRuntimeExports.jsxs(At.GraphContainer,{className:St,style:kt,id:U,ref:Vt,"aria-label":_,backgroundColor:G,theme:Z,language:V,minHeight:ct,width:c,height:h,relativeHeight:w,padding:M,children:[dt,ht,ft]}),t[55]=_,t[56]=G,t[57]=U,t[58]=h,t[59]=V,t[60]=ct,t[61]=M,t[62]=w,t[63]=St,t[64]=kt,t[65]=dt,t[66]=ht,t[67]=ft,t[68]=Z,t[69]=c,t[70]=Ct):Ct=t[70],Ct}function Ye(e){return e.color}function Ke(e){return e.color}function Ue(e){return!te.checkIfNullOrUndefined(e.size)}function Ze(e){return e.color}function Je(e){return e!==void 0}function Qe(e){return e!==void 0}function _e(e){return e.data}function tn(e){return e!==void 0}function en(e){return e.data}exports.TreeMapGraph=Xe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./index-CHPV5EwG-CTPQjnHt.cjs"),N=require("react"),Tt=require("./Typography-DX7PlgQU.cjs"),Kt=require("./Tooltip-uUdw6wJL.cjs"),Ut=require("./numberFormattingFunction-02t-wJta.cjs"),kt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),et=require("./Colors.cjs"),Zt=require("./DetailsModal-BN0HDFlV.cjs"),Jt=require("./use-in-view-QcfiW0w3.cjs"),bt=require("./proxy-BxvUI_9l.cjs"),Qt=require("./index-DG2bgAva.cjs"),_t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),te=require("./GraphFooter.cjs"),ee=require("./GraphHeader.cjs"),ne=require("./ColorLegendWithMouseOver.cjs"),ie=require("./EmptyState-sAEZ_5rU.cjs"),At=require("./uniqBy-O05lp2S5.cjs"),Lt=require("./GraphContainer-d8A46BK2.cjs");function oe(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function re(){return this.eachAfter(oe)}function ae(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function le(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function se(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function ue(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function ce(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function de(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function he(e){for(var t=this,n=fe(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function fe(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function pe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function ge(){return Array.from(this)}function me(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function ve(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*xe(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function Gt(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=je)):t===void 0&&(t=we);for(var n=new vt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new vt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Ht)}function ye(){return Gt(this).eachBefore(Ce)}function we(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ce(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ht(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function vt(e){this.data=e,this.depth=this.height=0,this.parent=null}vt.prototype=Gt.prototype={constructor:vt,count:re,each:ae,eachAfter:se,eachBefore:le,find:ue,sum:ce,sort:de,path:he,ancestors:pe,descendants:ge,leaves:me,links:ve,copy:ye,[Symbol.iterator]:xe};function Bt(e){return e==null?null:Ft(e)}function Ft(e){if(typeof e!="function")throw new Error;return e}function gt(){return 0}function mt(e){return function(){return e}}function be(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Oe(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,y=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*y}var Me={depth:-1},Pt={},qt={};function Ee(e){return e.id}function Re(e){return e.parentId}function De(){var e=Ee,t=Re,n;function i(r){var l=Array.from(r),a=e,d=t,g,y,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,j)=>Se(n(b,j,r))),O=p.map(zt),R=new Set(p).add("");for(const b of O)R.has(b)||(R.add(b),p.push(b),O.push(zt(b)),l.push(qt));a=(b,j)=>p[j],d=(b,j)=>O[j]}for(u=0,g=l.length;u<g;++u)y=l[u],h=l[u]=new vt(y),(c=a(y,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Pt:h)),(c=d(y,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Pt)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===qt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===qt);--p)h.data=null}if(v.parent=Me,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Ht),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=Bt(r),i):e},i.parentId=function(r){return arguments.length?(t=Bt(r),i):t},i.path=function(r){return arguments.length?(n=Bt(r),i):n},i}function Se(e){e=`${e}`;let t=e.length;return It(e,t-1)&&!It(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function zt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!It(e,t););return e.slice(0,t)}function It(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function ke(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,y=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*y}var Be=(1+Math.sqrt(5))/2;function qe(e,t,n,i,r,l){for(var a=[],d=t.children,g,y,u=0,v=0,o=d.length,h,c,m=t.value,f,p,O,R,b,j,M;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=O=f,j=Math.max(c/h,h/c)/(m*e),M=f*f*j,b=Math.max(O/M,M/p);v<o;++v){if(f+=y=d[v].value,y<p&&(p=y),y>O&&(O=y),M=f*f*j,R=Math.max(O/M,M/p),R>b){f-=y;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Oe(g,n,i,r,m?i+=c*f/m:l):ke(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const Ie=(function e(t){function n(i,r,l,a,d){qe(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})(Be);function Ve(){var e=Ie,t=!1,n=1,i=1,r=[0],l=gt,a=gt,d=gt,g=gt,y=gt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(be),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=y(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Ft(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:mt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:mt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:mt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:mt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(y=typeof o=="function"?o:mt(+o),u):y},u}function Ne(e){const t=x.compilerRuntimeExports.c(73),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:y,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:O,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:j,language:M,styles:k,classNames:D,animate:E,dimmedOpacity:U,precision:J}=e,ot=N.useRef(null);let nt;t[0]!==E.amount||t[1]!==E.once?(nt={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=nt):nt=t[2];const Q=Jt.useInView(ot,nt),[it,rt]=N.useState(void 0),[$,at]=N.useState(void 0),[_,lt]=N.useState(void 0),[tt,C]=N.useState(void 0);let w;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==y?(w={top:y,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=y,t[7]=w):w=t[7];const S=w,st=l-S.left-S.right,ut=a-S.top-S.bottom;let T,A,L,P,z,G,H,F,W;if(t[8]!==E.duration||t[9]!==D?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==j||t[14]!==U||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==O||t[19]!==Q||t[20]!==M||t[21]!==S.left||t[22]!==S.top||t[23]!==$||t[24]!==R||t[25]!==h||t[26]!==J||t[27]!==p||t[28]!==b||t[29]!==c||t[30]!==v||t[31]!==m||t[32]!==k?.graphObjectValues||t[33]!==f||t[34]!==l){const pt=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(Fe)],ct=De().id(He).parentId(Ge)(pt);ct.sum(ze);const Z=Ve().size([st,ut]).padding(2)(ct);A=bt.motion.svg,z=`${l}px`,G=`${a}px`,H=`0 0 ${l} ${a}`,F="ltr",W=ot,P=`translate(${S.left},${S.top})`,T=Qt.AnimatePresence,L=Z.children?.map(s=>x.jsxRuntimeExports.jsxs(bt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:U:O.length!==0?O.indexOf(s.data.id)!==-1?.85:U:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:K=>{rt(s.data.data),C(K.clientY),lt(K.clientX),h?.(s.data.data)},onClick:()=>{(R||j)&&($===s.data.id&&b?(at(void 0),R?.(void 0)):(at(s.data.id),R?.(s.data.data)))},onMouseMove:K=>{rt(s.data.data),C(K.clientY),lt(K.clientX)},onMouseLeave:()=>{rt(void 0),lt(void 0),C(void 0),h?.(void 0)},children:[x.jsxRuntimeExports.jsx(bt.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(Pe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(Le).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?x.jsxRuntimeExports.jsx(bt.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:x.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:x.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:kt.getTextColorBasedOnBgColor(n.filter(Ae).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray)},children:[v?x.jsxRuntimeExports.jsx(Tt.j,{marginBottom:"none",size:"sm",leading:"none",className:x.mo("w-full treemap-label",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:kt.getTextColorBasedOnBgColor(n.filter(Te).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:s.data.id}):null,m?x.jsxRuntimeExports.jsx(Tt.j,{marginBottom:"none",size:"sm",leading:"none",className:x.mo("w-full font-bold treemap-value",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{color:kt.getTextColorBasedOnBgColor(n.filter($e).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:Ut.numberFormattingFunction(s.data.value,"NA",J,p,f)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=D?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=j,t[14]=U,t[15]=ut,t[16]=st,t[17]=a,t[18]=O,t[19]=Q,t[20]=M,t[21]=S.left,t[22]=S.top,t[23]=$,t[24]=R,t[25]=h,t[26]=J,t[27]=p,t[28]=b,t[29]=c,t[30]=v,t[31]=m,t[32]=k?.graphObjectValues,t[33]=f,t[34]=l,t[35]=T,t[36]=A,t[37]=L,t[38]=P,t[39]=z,t[40]=G,t[41]=H,t[42]=F,t[43]=W}else T=t[35],A=t[36],L=t[37],P=t[38],z=t[39],G=t[40],H=t[41],F=t[42],W=t[43];let X;t[44]!==T||t[45]!==L?(X=x.jsxRuntimeExports.jsx(T,{children:L}),t[44]=T,t[45]=L,t[46]=X):X=t[46];let B;t[47]!==P||t[48]!==X?(B=x.jsxRuntimeExports.jsx("g",{transform:P,children:X}),t[47]=P,t[48]=X,t[49]=B):B=t[49];let Y;t[50]!==A||t[51]!==B||t[52]!==z||t[53]!==G||t[54]!==H||t[55]!==F||t[56]!==W?(Y=x.jsxRuntimeExports.jsx(A,{width:z,height:G,viewBox:H,direction:F,ref:W,children:B}),t[50]=A,t[51]=B,t[52]=z,t[53]=G,t[54]=H,t[55]=F,t[56]=W,t[57]=Y):Y=t[57];let q;t[58]!==D?.tooltip||t[59]!==_||t[60]!==tt||t[61]!==it||t[62]!==k?.tooltip||t[63]!==o?(q=it&&o&&_&&tt?x.jsxRuntimeExports.jsx(Kt.Tooltip,{data:it,body:o,xPos:_,yPos:tt,backgroundStyle:k?.tooltip,className:D?.tooltip}):null,t[58]=D?.tooltip,t[59]=_,t[60]=tt,t[61]=it,t[62]=k?.tooltip,t[63]=o,t[64]=q):q=t[64];let I;t[65]!==D?.modal||t[66]!==j||t[67]!==$?(I=j&&$!==void 0?x.jsxRuntimeExports.jsx(Zt.DetailsModal,{body:j,data:$,setData:at,className:D?.modal}):null,t[65]=D?.modal,t[66]=j,t[67]=$,t[68]=I):I=t[68];let V;return t[69]!==Y||t[70]!==q||t[71]!==I?(V=x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[Y,q,I]}),t[69]=Y,t[70]=q,t[71]=I,t[72]=V):V=t[72],V}function $e(e){return e.color}function Te(e){return e.color}function Ae(e){return e.color}function Le(e){return e.color}function Pe(e){return e.color}function ze(e){return e.value}function Ge(e){return e.parent}function He(e){return e.id}function Fe(e){return{id:e.label,value:e.size,parent:"root",data:e}}function We(e){const t=x.compilerRuntimeExports.c(71),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:y,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:O,backgroundColor:R,showLabels:b,relativeHeight:j,tooltip:M,onSeriesMouseOver:k,showColorScale:D,showValues:E,graphID:U,highlightedDataPoints:J,onSeriesMouseClick:ot,graphDownload:nt,dataDownload:Q,language:it,showNAColor:rt,minHeight:$,theme:at,ariaLabel:_,resetSelectionOnDoubleClick:lt,detailsOnClick:tt,styles:C,classNames:w,animate:S,dimmedOpacity:st,precision:ut}=e,T=l===void 0?"":l,A=d===void 0?"":d,L=y===void 0?0:y,P=u===void 0?0:u,z=v===void 0?0:v,G=o===void 0?0:o,H=R===void 0?!1:R,F=b===void 0?!0:b,W=D===void 0?!0:D,X=E===void 0?!0:E;let B;t[0]!==J?(B=J===void 0?[]:J,t[0]=J,t[1]=B):B=t[1];const Y=B,q=nt===void 0?!1:nt,I=Q===void 0?!1:Q,V=it===void 0?"en":it,pt=rt===void 0?!0:rt,ct=$===void 0?0:$,Z=at===void 0?"light":at,s=lt===void 0?!0:lt,K=S===void 0?!1:S,Ot=st===void 0?.3:st,Mt=ut===void 0?2:ut,[xt,Wt]=N.useState(0),[yt,Xt]=N.useState(0),[Et,Yt]=N.useState(void 0),Rt=N.useRef(null),Vt=N.useRef(null);let wt,jt;t[2]===Symbol.for("react.memo_cache_sentinel")?(wt=()=>{const Nt=new ResizeObserver($t=>{Wt($t[0].target.clientWidth||620),Xt($t[0].target.clientHeight||480)});return Rt.current&&Nt.observe(Rt.current),()=>Nt.disconnect()},jt=[],t[2]=wt,t[3]=jt):(wt=t[2],jt=t[3]),N.useEffect(wt,jt);const Dt=w?.graphContainer,St=C?.graphContainer;let dt;t[4]!==w?.description||t[5]!==w?.title||t[6]!==n||t[7]!==I||t[8]!==g||t[9]!==q||t[10]!==i||t[11]!==C?.description||t[12]!==C?.title||t[13]!==c?(dt=i||g||q||I?x.jsxRuntimeExports.jsx(ee.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:w?.title,description:w?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?Vt:void 0,dataDownload:I?n.map(tn).filter(_e).length>0?n.map(Qe).filter(Je):n.filter(Ze):null}):null,t[4]=w?.description,t[5]=w?.title,t[6]=n,t[7]=I,t[8]=g,t[9]=q,t[10]=i,t[11]=C?.description,t[12]=C?.title,t[13]=c,t[14]=dt):dt=t[14];let ht;t[15]!==K||t[16]!==G||t[17]!==w||t[18]!==f||t[19]!==p||t[20]!==r||t[21]!==n||t[22]!==tt||t[23]!==Ot||t[24]!==Y||t[25]!==V||t[26]!==L||t[27]!==ot||t[28]!==k||t[29]!==Mt||t[30]!==A||t[31]!==s||t[32]!==P||t[33]!==Et||t[34]!==W||t[35]!==F||t[36]!==pt||t[37]!==X||t[38]!==C||t[39]!==T||t[40]!==yt||t[41]!==xt||t[42]!==Z||t[43]!==M||t[44]!==z||t[45]!==c?(ht=n.length===0?x.jsxRuntimeExports.jsx(ie.EmptyState,{}):x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[W&&n.filter(Ue).length!==0?x.jsxRuntimeExports.jsx(ne.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||et.Colors[Z].categoricalColors.colors,colorDomain:f||At.uniqBy(n,"color",!0),setSelectedColor:Yt,showNAColor:pt,className:w?.colorLegend}):null,x.jsxRuntimeExports.jsx(Lt.GraphArea,{ref:Rt,children:xt&&yt?x.jsxRuntimeExports.jsx(Ne,{data:n.filter(Ke),colors:n.filter(Ye).length===0?r?[r]:[et.Colors.primaryColors["blue-600"]]:r||et.Colors[Z].categoricalColors.colors,colorDomain:n.filter(Xe).length===0?[]:f||At.uniqBy(n,"color",!0),width:xt,height:yt,leftMargin:L,rightMargin:P,topMargin:z,bottomMargin:G,showLabels:F,showValues:X,suffix:T,prefix:A,selectedColor:Et,tooltip:M,onSeriesMouseOver:k,onSeriesMouseClick:ot,highlightedDataPoints:Y,resetSelectionOnDoubleClick:s,detailsOnClick:tt,styles:C,classNames:w,language:V,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Ot,precision:Mt}):null})]}),t[15]=K,t[16]=G,t[17]=w,t[18]=f,t[19]=p,t[20]=r,t[21]=n,t[22]=tt,t[23]=Ot,t[24]=Y,t[25]=V,t[26]=L,t[27]=ot,t[28]=k,t[29]=Mt,t[30]=A,t[31]=s,t[32]=P,t[33]=Et,t[34]=W,t[35]=F,t[36]=pt,t[37]=X,t[38]=C,t[39]=T,t[40]=yt,t[41]=xt,t[42]=Z,t[43]=M,t[44]=z,t[45]=c,t[46]=ht):ht=t[46];let ft;t[47]!==w?.footnote||t[48]!==w?.source||t[49]!==m||t[50]!==a||t[51]!==C?.footnote||t[52]!==C?.source||t[53]!==c?(ft=a||m?x.jsxRuntimeExports.jsx(te.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:a,footNote:m,width:c}):null,t[47]=w?.footnote,t[48]=w?.source,t[49]=m,t[50]=a,t[51]=C?.footnote,t[52]=C?.source,t[53]=c,t[54]=ft):ft=t[54];let Ct;return t[55]!==_||t[56]!==H||t[57]!==U||t[58]!==h||t[59]!==V||t[60]!==ct||t[61]!==O||t[62]!==j||t[63]!==Dt||t[64]!==St||t[65]!==dt||t[66]!==ht||t[67]!==ft||t[68]!==Z||t[69]!==c?(Ct=x.jsxRuntimeExports.jsxs(Lt.GraphContainer,{className:Dt,style:St,id:U,ref:Vt,"aria-label":_,backgroundColor:H,theme:Z,language:V,minHeight:ct,width:c,height:h,relativeHeight:j,padding:O,children:[dt,ht,ft]}),t[55]=_,t[56]=H,t[57]=U,t[58]=h,t[59]=V,t[60]=ct,t[61]=O,t[62]=j,t[63]=Dt,t[64]=St,t[65]=dt,t[66]=ht,t[67]=ft,t[68]=Z,t[69]=c,t[70]=Ct):Ct=t[70],Ct}function Xe(e){return e.color}function Ye(e){return e.color}function Ke(e){return!_t.checkIfNullOrUndefined(e.size)}function Ue(e){return e.color}function Ze(e){return e!==void 0}function Je(e){return e!==void 0}function Qe(e){return e.data}function _e(e){return e!==void 0}function tn(e){return e.data}exports.TreeMapGraph=We;
|
|
2
2
|
//# sourceMappingURL=TreeMapGraph.cjs.map
|