@undp/data-viz 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +195 -195
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +1 -1
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +1 -1
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +2 -2
- package/dist/HybridMap.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BiVariateChoroplethMap.js","sources":["../src/Components/Graphs/Maps/BiVariateMap/Graph.tsx","../src/Components/Graphs/Maps/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n mapData: FeatureCollection;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n zoomAndCenterByHighlightedIds: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const pathGenerator = geoPath().projection(projection);\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n ))\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\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={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\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 {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useEffect, useEffectEvent, useMemo, useRef, useState } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\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: BivariateMapDataType[];\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. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\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 /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\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 /** 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 /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\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 xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds = false,\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(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 onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\r\n }\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\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":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","formattedMapData","useMemo","rewind","reverse","showLegend","setShowLegend","useState","undefined","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","once","amount","mapG","zoomRef","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","xRange","Array","from","_","i","yRange","xScale","scaleThreshold","domain","range","yScale","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","path","stroke","strokeWidth","fill","AnimatePresence","index","findIndex","el","id","xColorCoord","checkIfNullOrUndefined","x","yColorCoord","y","color","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","j","cursor","numberFormattingFunction","max","P","display","WebkitLineClamp","WebkitBoxOrient","overflow","writingMode","Tooltip","DetailsModal","modal","BiVariateChoroplethMap","$","_c","graphTitle","t0","t1","sources","graphDescription","footNote","t2","t3","t4","t5","padding","t6","t7","backgroundColor","t8","t9","relativeHeight","isWorldMap","t10","t11","graphID","t12","t13","t14","graphDownload","t15","dataDownload","t16","showAntarctica","t17","language","t18","minHeight","t19","theme","t20","ariaLabel","t21","t22","t23","t24","t25","t26","timeline","t27","t28","t29","t30","Colors","light","bivariateColors","colors05x05","graphNoData","grays","t31","t32","t33","t34","enabled","autoplay","showOnlyActiveDate","t35","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t36","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","fetchAndParseJSON","then","d_1","t40","t41","t42","speed","interval","setInterval","clearInterval","t43","t44","getSliderMarks","markObj","console","error","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","d_7","format","_temp8","getJenks","_temp9","_temp0","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_9","d_8","NAME","d_4","d_3","d_2","d_6","d_5","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,+BAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,4BAAAA;AAAAA,EAAAA,IACEnC,GACEoC,IAAmBC,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/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n mapData: FeatureCollection;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n zoomAndCenterByHighlightedIds: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const pathGenerator = geoPath().projection(projection);\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n className='undp-map-shapes'\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n ))\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\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={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\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 {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useEffect, useEffectEvent, useMemo, useRef, useState } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\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: BivariateMapDataType[];\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. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\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 /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\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 /** 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 /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\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 xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds = false,\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(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 onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\r\n }\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\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":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","formattedMapData","useMemo","rewind","reverse","showLegend","setShowLegend","useState","undefined","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","once","amount","mapG","zoomRef","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","xRange","Array","from","_","i","yRange","xScale","scaleThreshold","domain","range","yScale","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","path","stroke","strokeWidth","fill","AnimatePresence","index","findIndex","el","id","xColorCoord","checkIfNullOrUndefined","x","yColorCoord","y","color","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","j","cursor","numberFormattingFunction","max","P","display","WebkitLineClamp","WebkitBoxOrient","overflow","writingMode","Tooltip","DetailsModal","modal","BiVariateChoroplethMap","$","_c","graphTitle","t0","t1","sources","graphDescription","footNote","t2","t3","t4","t5","padding","t6","t7","backgroundColor","t8","t9","relativeHeight","isWorldMap","t10","t11","graphID","t12","t13","t14","graphDownload","t15","dataDownload","t16","showAntarctica","t17","language","t18","minHeight","t19","theme","t20","ariaLabel","t21","t22","t23","t24","t25","t26","timeline","t27","t28","t29","t30","Colors","light","bivariateColors","colors05x05","graphNoData","grays","t31","t32","t33","t34","enabled","autoplay","showOnlyActiveDate","t35","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t36","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","fetchAndParseJSON","then","d_1","t40","t41","t42","speed","interval","setInterval","clearInterval","t43","t44","getSliderMarks","markObj","console","error","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","d_7","format","_temp8","getJenks","_temp9","_temp0","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_9","d_8","NAME","d_4","d_3","d_2","d_6","d_5","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAA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AAAxB,GAAAyB,GAAA;AAAA,SA+J4BrP,MAAM9C;AAAS;AA/J3C,SAAAyQ,GAAA2B,GAAA;AAAA,SA8J6CtP,MAAM9C;AAAS;AA9J5D,SAAAwQ,GAAA6B,GAAA;AAAA,SA8JyBvP,EAACxF;AAAK;AA9J/B,SAAAiT,GAAA+B,GAAA;AAAA,SA6J2CxP,MAAM9C;AAAS;AA7J1D,SAAAsQ,GAAAiC,GAAA;AAAA,SA6JuBzP,EAACxF;AAAK;AA7J7B,SAAAkQ,GAAAgF,GAAAC,GAAA;AAAA,SAmEkBD,IAAIC;AAAC;AAnEvB,SAAAnF,GAAAxK,GAAA;AAAA,SA+DgBA,EAACoK;AAAK;"}
|
package/dist/ChoroplethMap.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),yt=require("./getSliderMarks-CIuSoedo.cjs"),Ct=require("./Spinner-jTMOLuw_.cjs"),vt=require("./parse-xYI9yrvL.cjs"),Dt=require("./index-DQA8q5sC.cjs"),F=require("./index-DLFt97gy.cjs"),jt=require("./Typography-sa1UE0oF.cjs"),St=require("./index-C5K--w8d.cjs"),Nt=require("./numberFormattingFunction-02t-wJta.cjs"),Mt=require("./Tooltip-BLa2EfMs.cjs"),Ot=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),gt=require("./index-C6er0ety.cjs"),qt=require("./DetailsModal-DHttOA80.cjs"),It=require("./ordinal-CrsysVE-.cjs"),Pt=require("./threshold-DNsSUf8Q.cjs"),xt=require("./select-Bnfk0lJx.cjs"),Qe=require("./proxy-C4-uo6nS.cjs"),zt=require("./use-in-view-C3o_ntMv.cjs"),At=require("./index-CoobIWNj.cjs"),Bt=require("./GraphFooter.cjs"),Ft=require("./GraphHeader.cjs"),et=require("./Colors.cjs"),Lt=require("./fetchAndParseData-QTF6tjij.cjs"),Tt=require("./getUniqValue-NX8DgwND.cjs"),Wt=require("./getJenks-BzJvhy_H.cjs"),bt=require("./GraphContainer-B1EDxJ0S.cjs");function _t(d){const{data:e,colorDomain:r,colors:a,mapData:L,colorLegendTitle:E,categorical:T,height:f,width:h,scale:x,centerPoint:W,tooltip:Z,mapBorderWidth:Q,mapBorderColor:xe,mapNoDataColor:ge,onSeriesMouseOver:ee,showColorScale:fe,zoomScaleExtend:Oe,zoomTranslateExtend:qe,highlightedIds:b,onSeriesMouseClick:te,mapProperty:g,resetSelectionOnDoubleClick:ye,detailsOnClick:H,styles:Ie,classNames:oe,mapProjection:D,zoomInteraction:S,animate:k,dimmedOpacity:N,customLayers:re,collapseColorScaleByDefault:ve,zoomAndCenterByHighlightedIds:je,projectionRotate:_,rewindCoordinatesInMapData:be}=d,y=c.useMemo(()=>be?F.index_default(L,{reverse:!0}):L,[L,be]),[w,M]=c.useState(void 0),V=c.useRef(null),[Pe,ne]=c.useState(ve===void 0?!(h<680):!ve),[u,p]=c.useState(void 0),[U,ae]=c.useState(void 0),[Ee,se]=c.useState(void 0),[X,$]=c.useState(void 0),O=c.useRef(null),Y=zt.useInView(O,{once:k.once,amount:k.amount}),ke=c.useRef(null),ze=T?It.ordinal().domain(r).range(a):Pt.threshold().domain(r).range(a);c.useEffect(()=>{const o=xt.select(ke.current),n=xt.select(O.current),j=i=>{if(S==="noZoom")return!1;if(S==="button")return!i.type.includes("wheel");const le=i.type==="wheel",ce=i.type.startsWith("touch"),Se=i.type==="mousedown"||i.type==="mousemove";return ce?!0:le?S==="scroll"?!0:i.ctrlKey:Se&&!i.button&&!i.ctrlKey},C=F.zoom().scaleExtent(Oe).translateExtent(qe||[[-20,-20],[h+20,f+20]]).filter(j).on("zoom",({transform:i})=>{o.attr("transform",i)});n.call(C),V.current=C},[f,h,S]);const v=F.index_default$1({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),R=St.index_default({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),q=v[2]-v[0],we=v[3]-v[1],Re=h*190/960*360/q,Ce=f*190/678*180/we,I=x*Math.min(Re,Ce),De=D==="mercator"?F.geoMercator().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="equalEarth"?F.geoEqualEarth().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="naturalEarth"?F.geoNaturalEarth1().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="orthographic"?F.geoOrthographic().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):F.geoAlbersUsa().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I),G=F.geoPath().projection(De),ie=o=>{if(!O.current||!V.current)return;xt.select(O.current).call(V.current.scaleBy,o==="in"?1.2:1/1.2)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:"relative",children:[t.jsxRuntimeExports.jsx(Qe.motion.svg,{width:`${h}px`,height:`${f}px`,viewBox:`0 0 ${h} ${f}`,ref:O,direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{ref:ke,children:[re.filter(o=>o.position==="before").map(o=>o.layer),y.features.map((o,n)=>{if(!o.properties?.[g])return null;const j=G(o);return j?t.jsxRuntimeExports.jsx(Qe.motion.g,{opacity:w?N:b.length!==0?b.indexOf(o.properties[g])!==-1?1:N:1,children:t.jsxRuntimeExports.jsx("path",{d:j,style:{stroke:xe,strokeWidth:Q,fill:ge}})},n):null}),t.jsxRuntimeExports.jsx(At.AnimatePresence,{children:e.map(o=>{const n=y.features.findIndex(i=>o.id===i.properties[g]);if(n===-1)return null;const j=G(y.features[n]);if(!j)return null;const C=Ot.checkIfNullOrUndefined(o.x)?ge:ze(o.x);return t.jsxRuntimeExports.jsx(Qe.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:w?w===C?1:N:b.length!==0?b.indexOf(o.id)!==-1?1:N:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},onMouseEnter:i=>{ae(o),$(i.clientY),se(i.clientX),ee?.(o)},onMouseMove:i=>{ae(o),$(i.clientY),se(i.clientX)},onMouseLeave:()=>{ae(void 0),se(void 0),$(void 0),ee?.(void 0)},onClick:()=>{(te||H)&&(Dt.isEqual(u,o)&&ye?(p(void 0),te?.(void 0)):(p(o),te?.(o)))},children:t.jsxRuntimeExports.jsx(Qe.motion.path,{d:j,variants:{initial:{fill:C,opacity:0},whileInView:{fill:C,opacity:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},style:{stroke:xe,strokeWidth:Q}},`${o.id}`)},o.id)})}),U?y.features.filter(o=>o.properties[g]===U.id).map((o,n)=>t.jsxRuntimeExports.jsx("path",{d:G(o)||"",className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},n)):null,re.filter(o=>o.position==="after").map(o=>o.layer)]})}),fe===!1?null:t.jsxRuntimeExports.jsx("div",{className:t.mo("absolute left-4 bottom-4 map-color-legend",oe?.colorLegend),children:Pe?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{ne(!1)},children:t.jsxRuntimeExports.jsx(gt.X,{})}),t.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:T?void 0:"340px"},children:[E&&E!==""?t.jsxRuntimeExports.jsx(jt.j,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:E}):null,T?t.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:r.map((o,n)=>t.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{M(a[n%a.length])},onMouseLeave:()=>{M(void 0)},children:[t.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:a[n%a.length]}}),t.jsxRuntimeExports.jsx(jt.j,{size:"sm",marginBottom:"none",leading:"none",children:o})]},n))}):t.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{children:[r.map((o,n)=>t.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{M(a[n])},onMouseLeave:()=>{M(void 0)},className:"cursor-pointer",children:[t.jsxRuntimeExports.jsx("rect",{x:n*320/a.length+1,y:1,width:320/a.length-2,height:8,className:w===a[n]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:a[n],...w===a[n]?{}:{stroke:a[n]}}}),t.jsxRuntimeExports.jsx("text",{x:(n+1)*320/a.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Nt.numberFormattingFunction(o,"NA")})]},n)),t.jsxRuntimeExports.jsx("g",{children:t.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{M(a[r.length])},onMouseLeave:()=>{M(void 0)},x:r.length*320/a.length+1,y:1,width:320/a.length-2,height:8,className:`cursor-pointer ${w===a[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:a[r.length],...w===a[r.length]?{}:{stroke:a[r.length]}}})})]})})]})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{ne(!0)},children:t.jsxRuntimeExports.jsx("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",children:"Show Legend"})})}),S==="button"&&t.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),H&&u!==void 0?t.jsxRuntimeExports.jsx(qt.DetailsModal,{body:H,data:u,setData:p,className:oe?.modal}):null,U&&Z&&Ee&&X?t.jsxRuntimeExports.jsx(Mt.Tooltip,{data:U,body:Z,xPos:Ee,yPos:X,backgroundStyle:Ie?.tooltip,className:oe?.tooltip}):null]})}function $t(d){const e=t.compilerRuntimeExports.c(126),{data:r,mapData:a,graphTitle:L,colors:E,sources:T,graphDescription:f,height:h,width:x,footNote:W,colorDomain:Z,colorLegendTitle:Q,scaleType:xe,scale:ge,centerPoint:ee,padding:fe,mapBorderWidth:Oe,mapNoDataColor:qe,backgroundColor:b,mapBorderColor:te,relativeHeight:g,tooltip:ye,onSeriesMouseOver:H,isWorldMap:Ie,showColorScale:oe,zoomScaleExtend:D,zoomTranslateExtend:S,graphID:k,highlightedIds:N,onSeriesMouseClick:re,mapProperty:ve,graphDownload:je,dataDownload:_,showAntarctica:be,language:y,minHeight:w,theme:M,ariaLabel:V,resetSelectionOnDoubleClick:Pe,detailsOnClick:ne,styles:u,classNames:p,mapProjection:U,zoomInteraction:ae,animate:Ee,dimmedOpacity:se,customLayers:X,timeline:$,collapseColorScaleByDefault:O,projectionRotate:Y,zoomAndCenterByHighlightedIds:ke,rewindCoordinatesInMapData:ze}=d,v=a===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":a,R=W===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":W,q=xe===void 0?"threshold":xe,we=ge===void 0?.95:ge,Re=Oe===void 0?.5:Oe,Ce=qe===void 0?et.Colors.light.graphNoData:qe,I=b===void 0?!1:b,De=te===void 0?et.Colors.light.grays["gray-500"]:te,G=Ie===void 0?!0:Ie,ie=oe===void 0?!0:oe;let o;e[0]!==D?(o=D===void 0?[.8,6]:D,e[0]=D,e[1]=o):o=e[1];const n=o;let j;e[2]!==N?(j=N===void 0?[]:N,e[2]=N,e[3]=j):j=e[3];const C=j,i=ve===void 0?"ISO3":ve,le=je===void 0?!1:je,ce=_===void 0?!1:_,Se=be===void 0?!1:be,tt=y===void 0?"en":y,P=w===void 0?0:w,J=M===void 0?"light":M,ot=Pe===void 0?!0:Pe,rt=U===void 0?"naturalEarth":U,nt=ae===void 0?"button":ae,Ae=Ee===void 0?!1:Ee,at=se===void 0?.3:se;let Be;e[4]!==X?(Be=X===void 0?[]:X,e[4]=X,e[5]=Be):Be=e[5];const st=Be;let Fe;e[6]!==$?(Fe=$===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:$,e[6]=$,e[7]=Fe):Fe=e[7];const s=Fe;let Le;e[8]!==Y?(Le=Y===void 0?[0,0]:Y,e[8]=Y,e[9]=Le):Le=e[9];const it=Le,lt=ke===void 0?!1:ke,ct=ze===void 0?!0:ze,[K,Et]=c.useState(0),[Ne,kt]=c.useState(0),[z,wt]=c.useState(s.autoplay);let Me;if(e[10]!==r||e[11]!==s.dateFormat){let m;e[13]!==s.dateFormat?(m=B=>vt.parse(`${B.date}`,s.dateFormat||"yyyy",new Date).getTime(),e[13]=s.dateFormat,e[14]=m):m=e[14],Me=[...new Set(r.filter(Zt).map(m))],Me.sort(Kt),e[10]=r,e[11]=s.dateFormat,e[12]=Me}else Me=e[12];const l=Me,[A,dt]=c.useState(s.autoplay?0:l.length-1),[de,Rt]=c.useState(void 0),ut=c.useRef(null),ft=c.useRef(null);let Te,We;e[15]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{const m=new ResizeObserver(B=>{Et(B[0].target.clientWidth||620),kt(B[0].target.clientHeight||480)});return ut.current&&m.observe(ut.current),()=>m.disconnect()},We=[],e[15]=Te,e[16]=We):(Te=e[15],We=e[16]),c.useEffect(Te,We);let _e;e[17]===Symbol.for("react.memo_cache_sentinel")?(_e=m=>{Rt(m)},e[17]=_e):_e=e[17];const $e=c.useEffectEvent(_e);let Ge;e[18]!==v||e[19]!==$e?(Ge=()=>{typeof v=="string"?Lt.fetchAndParseJSON(v).then(B=>{$e(B)}):$e(v)},e[18]=v,e[19]=$e,e[20]=Ge):Ge=e[20];let He;e[21]!==v?(He=[v],e[21]=v,e[22]=He):He=e[22],c.useEffect(Ge,He);let Ve;e[23]!==Z||e[24]!==E?.length||e[25]!==r||e[26]!==q?(Ve=Z||(q==="categorical"?Tt.getUniqValue(r,"x"):Wt.getJenks(r.map(Jt),E?.length||4)),e[23]=Z,e[24]=E?.length,e[25]=r,e[26]=q,e[27]=Ve):Ve=e[27];const Ue=Ve;let Xe,Ye;e[28]!==z||e[29]!==s.speed||e[30]!==l?(Xe=()=>{const m=setInterval(()=>{dt(B=>B<l.length-1?B+1:0)},(s.speed||2)*1e3);return z||clearInterval(m),()=>clearInterval(m)},Ye=[l,z,s.speed],e[28]=z,e[29]=s.speed,e[30]=l,e[31]=Xe,e[32]=Ye):(Xe=e[31],Ye=e[32]),c.useEffect(Xe,Ye);const pt=s.dateFormat||"yyyy";let Je;e[33]!==A||e[34]!==pt||e[35]!==s.showOnlyActiveDate||e[36]!==l?(Je=yt.getSliderMarks(l,A,s.showOnlyActiveDate,pt),e[33]=A,e[34]=pt,e[35]=s.showOnlyActiveDate,e[36]=l,e[37]=Je):Je=e[37];const Ke=Je,mt=p?.graphContainer,ht=u?.graphContainer;let ue;e[38]!==p?.description||e[39]!==p?.title||e[40]!==r||e[41]!==ce||e[42]!==f||e[43]!==le||e[44]!==L||e[45]!==u?.description||e[46]!==u?.title||e[47]!==x?(ue=L||f||le||ce?t.jsxRuntimeExports.jsx(Ft.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:p?.title,description:p?.description},graphTitle:L,graphDescription:f,width:x,graphDownload:le?ft:void 0,dataDownload:ce?r.map(Yt).filter(Xt).length>0?r.map(Ut).filter(Vt):r.filter(Ht):null}):null,e[38]=p?.description,e[39]=p?.title,e[40]=r,e[41]=ce,e[42]=f,e[43]=le,e[44]=L,e[45]=u?.description,e[46]=u?.title,e[47]=x,e[48]=ue):ue=e[48];let pe;e[49]!==A||e[50]!==Ke||e[51]!==z||e[52]!==s.enabled||e[53]!==l?(pe=s.enabled&&l.length>0&&Ke?t.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[t.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{wt(!z)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":z?"Click to pause animation":"Click to play animation",children:z?t.jsxRuntimeExports.jsx(gt.Pause,{}):t.jsxRuntimeExports.jsx(gt.Play,{})}),t.jsxRuntimeExports.jsx(yt.Nr,{min:l[0],max:l[l.length-1],marks:Ke,step:null,defaultValue:l[l.length-1],value:l[A],onChangeComplete:m=>{dt(l.indexOf(m))},onChange:m=>{dt(l.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[49]=A,e[50]=Ke,e[51]=z,e[52]=s.enabled,e[53]=l,e[54]=pe):pe=e[54];let me;e[55]!==Ae||e[56]!==ee||e[57]!==p||e[58]!==O||e[59]!==Q||e[60]!==E||e[61]!==st||e[62]!==r||e[63]!==ne||e[64]!==at||e[65]!==Ue||e[66]!==h||e[67]!==C||e[68]!==A||e[69]!==G||e[70]!==De||e[71]!==Re||e[72]!==Ce||e[73]!==rt||e[74]!==i||e[75]!==de||e[76]!==P||e[77]!==re||e[78]!==H||e[79]!==it||e[80]!==g||e[81]!==ot||e[82]!==ct||e[83]!==we||e[84]!==q||e[85]!==Se||e[86]!==ie||e[87]!==u||e[88]!==Ne||e[89]!==K||e[90]!==J||e[91]!==s.dateFormat||e[92]!==s.enabled||e[93]!==ye||e[94]!==l||e[95]!==x||e[96]!==lt||e[97]!==nt||e[98]!==n||e[99]!==S?(me=t.jsxRuntimeExports.jsx(bt.GraphArea,{ref:ut,children:K&&Ne&&de?t.jsxRuntimeExports.jsx(_t,{data:r.filter(m=>s.enabled?m.date===vt.format(new Date(l[A]),s.dateFormat||"yyyy"):m),mapData:Se?de:{...de,features:de.features.filter(Gt)},colorDomain:Ue,width:K,height:Ne,scale:we,centerPoint:ee,colors:E||(q==="categorical"?et.Colors[J].categoricalColors.colors:et.Colors[J].sequentialColors[`neutralColorsx0${Ue.length+1}`]),colorLegendTitle:Q,mapBorderWidth:Re,mapNoDataColor:Ce,categorical:q==="categorical",mapBorderColor:De,tooltip:ye,onSeriesMouseOver:H,isWorldMap:G,showColorScale:ie,zoomScaleExtend:n,zoomTranslateExtend:S,onSeriesMouseClick:re,mapProperty:i,highlightedIds:C,resetSelectionOnDoubleClick:ot,styles:u,classNames:p,detailsOnClick:ne,mapProjection:rt||(G?"naturalEarth":"mercator"),zoomInteraction:nt,dimmedOpacity:at,animate:Ae===!0?{duration:.5,once:!0,amount:.5}:Ae||{duration:0,once:!0,amount:0},customLayers:st,zoomAndCenterByHighlightedIds:lt,collapseColorScaleByDefault:O,projectionRotate:it,rewindCoordinatesInMapData:ct}):t.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(P,h||(g?P?(x||K)*g>P?(x||K)*g:P:(x||K)*g:Ne))}px`},className:"flex items-center justify-center",children:t.jsxRuntimeExports.jsx(Ct.w,{"aria-label":"Loading graph"})})}),e[55]=Ae,e[56]=ee,e[57]=p,e[58]=O,e[59]=Q,e[60]=E,e[61]=st,e[62]=r,e[63]=ne,e[64]=at,e[65]=Ue,e[66]=h,e[67]=C,e[68]=A,e[69]=G,e[70]=De,e[71]=Re,e[72]=Ce,e[73]=rt,e[74]=i,e[75]=de,e[76]=P,e[77]=re,e[78]=H,e[79]=it,e[80]=g,e[81]=ot,e[82]=ct,e[83]=we,e[84]=q,e[85]=Se,e[86]=ie,e[87]=u,e[88]=Ne,e[89]=K,e[90]=J,e[91]=s.dateFormat,e[92]=s.enabled,e[93]=ye,e[94]=l,e[95]=x,e[96]=lt,e[97]=nt,e[98]=n,e[99]=S,e[100]=me):me=e[100];let he;e[101]!==p?.footnote||e[102]!==p?.source||e[103]!==R||e[104]!==T||e[105]!==u?.footnote||e[106]!==u?.source||e[107]!==x?(he=T||R?t.jsxRuntimeExports.jsx(Bt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:T,footNote:R,width:x}):null,e[101]=p?.footnote,e[102]=p?.source,e[103]=R,e[104]=T,e[105]=u?.footnote,e[106]=u?.source,e[107]=x,e[108]=he):he=e[108];let Ze;return e[109]!==V||e[110]!==I||e[111]!==k||e[112]!==h||e[113]!==tt||e[114]!==P||e[115]!==fe||e[116]!==g||e[117]!==mt||e[118]!==ht||e[119]!==ue||e[120]!==pe||e[121]!==me||e[122]!==he||e[123]!==J||e[124]!==x?(Ze=t.jsxRuntimeExports.jsxs(bt.GraphContainer,{className:mt,style:ht,id:k,ref:ft,"aria-label":V,backgroundColor:I,theme:J,language:tt,minHeight:P,width:x,height:h,relativeHeight:g,padding:fe,children:[ue,pe,me,he]}),e[109]=V,e[110]=I,e[111]=k,e[112]=h,e[113]=tt,e[114]=P,e[115]=fe,e[116]=g,e[117]=mt,e[118]=ht,e[119]=ue,e[120]=pe,e[121]=me,e[122]=he,e[123]=J,e[124]=x,e[125]=Ze):Ze=e[125],Ze}function Gt(d){return d.properties.NAME!=="Antarctica"}function Ht(d){return d!==void 0}function Vt(d){return d!==void 0}function Ut(d){return d.data}function Xt(d){return d!==void 0}function Yt(d){return d.data}function Jt(d){return d.x}function Kt(d,e){return d-e}function Zt(d){return d.date}exports.ChoroplethMap=$t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),yt=require("./getSliderMarks-CIuSoedo.cjs"),Ct=require("./Spinner-jTMOLuw_.cjs"),vt=require("./parse-xYI9yrvL.cjs"),Dt=require("./index-DQA8q5sC.cjs"),F=require("./index-DLFt97gy.cjs"),jt=require("./Typography-sa1UE0oF.cjs"),St=require("./index-C5K--w8d.cjs"),Nt=require("./numberFormattingFunction-02t-wJta.cjs"),Mt=require("./Tooltip-BLa2EfMs.cjs"),Ot=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),gt=require("./index-C6er0ety.cjs"),qt=require("./DetailsModal-DHttOA80.cjs"),It=require("./ordinal-CrsysVE-.cjs"),Pt=require("./threshold-DNsSUf8Q.cjs"),xt=require("./select-Bnfk0lJx.cjs"),Qe=require("./proxy-C4-uo6nS.cjs"),zt=require("./use-in-view-C3o_ntMv.cjs"),At=require("./index-CoobIWNj.cjs"),Bt=require("./GraphFooter.cjs"),Ft=require("./GraphHeader.cjs"),et=require("./Colors.cjs"),Lt=require("./fetchAndParseData-QTF6tjij.cjs"),Tt=require("./getUniqValue-NX8DgwND.cjs"),Wt=require("./getJenks-BzJvhy_H.cjs"),bt=require("./GraphContainer-B1EDxJ0S.cjs");function _t(d){const{data:e,colorDomain:r,colors:n,mapData:L,colorLegendTitle:E,categorical:T,height:f,width:h,scale:x,centerPoint:W,tooltip:Z,mapBorderWidth:Q,mapBorderColor:xe,mapNoDataColor:ge,onSeriesMouseOver:ee,showColorScale:fe,zoomScaleExtend:Oe,zoomTranslateExtend:qe,highlightedIds:b,onSeriesMouseClick:te,mapProperty:g,resetSelectionOnDoubleClick:ye,detailsOnClick:H,styles:Ie,classNames:oe,mapProjection:D,zoomInteraction:S,animate:k,dimmedOpacity:N,customLayers:re,collapseColorScaleByDefault:ve,zoomAndCenterByHighlightedIds:je,projectionRotate:_,rewindCoordinatesInMapData:be}=d,y=c.useMemo(()=>be?F.index_default(L,{reverse:!0}):L,[L,be]),[w,M]=c.useState(void 0),V=c.useRef(null),[Pe,ae]=c.useState(ve===void 0?!(h<680):!ve),[u,p]=c.useState(void 0),[U,ne]=c.useState(void 0),[Ee,se]=c.useState(void 0),[X,$]=c.useState(void 0),O=c.useRef(null),Y=zt.useInView(O,{once:k.once,amount:k.amount}),ke=c.useRef(null),ze=T?It.ordinal().domain(r).range(n):Pt.threshold().domain(r).range(n);c.useEffect(()=>{const o=xt.select(ke.current),a=xt.select(O.current),j=i=>{if(S==="noZoom")return!1;if(S==="button")return!i.type.includes("wheel");const le=i.type==="wheel",ce=i.type.startsWith("touch"),Se=i.type==="mousedown"||i.type==="mousemove";return ce?!0:le?S==="scroll"?!0:i.ctrlKey:Se&&!i.button&&!i.ctrlKey},C=F.zoom().scaleExtent(Oe).translateExtent(qe||[[-20,-20],[h+20,f+20]]).filter(j).on("zoom",({transform:i})=>{o.attr("transform",i)});a.call(C),V.current=C},[f,h,S]);const v=F.index_default$1({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),R=St.index_default({...y,features:je?y.features.filter(o=>(b||[]).length===0||b.indexOf(o.properties[g])!==-1):y.features}),q=v[2]-v[0],we=v[3]-v[1],Re=h*190/960*360/q,Ce=f*190/678*180/we,I=x*Math.min(Re,Ce),De=D==="mercator"?F.geoMercator().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="equalEarth"?F.geoEqualEarth().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="naturalEarth"?F.geoNaturalEarth1().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):D==="orthographic"?F.geoOrthographic().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I):F.geoAlbersUsa().rotate(_).center(W||R.geometry.coordinates).translate([h/2,f/2]).scale(I),G=F.geoPath().projection(De),ie=o=>{if(!O.current||!V.current)return;xt.select(O.current).call(V.current.scaleBy,o==="in"?1.2:1/1.2)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:"relative",children:[t.jsxRuntimeExports.jsx(Qe.motion.svg,{width:`${h}px`,height:`${f}px`,viewBox:`0 0 ${h} ${f}`,ref:O,direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{ref:ke,children:[re.filter(o=>o.position==="before").map(o=>o.layer),y.features.map((o,a)=>{if(!o.properties?.[g])return null;const j=G(o);return j?t.jsxRuntimeExports.jsx(Qe.motion.g,{opacity:w?N:b.length!==0?b.indexOf(o.properties[g])!==-1?1:N:1,children:t.jsxRuntimeExports.jsx("path",{d:j,style:{stroke:xe,strokeWidth:Q,fill:ge}})},a):null}),t.jsxRuntimeExports.jsx(At.AnimatePresence,{children:e.map(o=>{const a=y.features.findIndex(i=>o.id===i.properties[g]);if(a===-1)return null;const j=G(y.features[a]);if(!j)return null;const C=Ot.checkIfNullOrUndefined(o.x)?ge:ze(o.x);return t.jsxRuntimeExports.jsx(Qe.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:w?w===C?1:N:b.length!==0?b.indexOf(o.id)!==-1?1:N:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},onMouseEnter:i=>{ne(o),$(i.clientY),se(i.clientX),ee?.(o)},onMouseMove:i=>{ne(o),$(i.clientY),se(i.clientX)},onMouseLeave:()=>{ne(void 0),se(void 0),$(void 0),ee?.(void 0)},onClick:()=>{(te||H)&&(Dt.isEqual(u,o)&&ye?(p(void 0),te?.(void 0)):(p(o),te?.(o)))},children:t.jsxRuntimeExports.jsx(Qe.motion.path,{d:j,variants:{initial:{fill:C,opacity:0},whileInView:{fill:C,opacity:1,transition:{duration:k.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:k.duration}},style:{stroke:xe,strokeWidth:Q}},`${o.id}`)},o.id)})}),U?y.features.filter(o=>o.properties[g]===U.id).map((o,a)=>t.jsxRuntimeExports.jsx("path",{d:G(o)||"",className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},a)):null,re.filter(o=>o.position==="after").map(o=>o.layer)]})}),fe===!1?null:t.jsxRuntimeExports.jsx("div",{className:t.mo("absolute left-4 bottom-4 map-color-legend",oe?.colorLegend),children:Pe?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{ae(!1)},children:t.jsxRuntimeExports.jsx(gt.X,{})}),t.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:T?void 0:"340px"},children:[E&&E!==""?t.jsxRuntimeExports.jsx(jt.j,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:E}):null,T?t.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:r.map((o,a)=>t.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{M(n[a%n.length])},onMouseLeave:()=>{M(void 0)},children:[t.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n[a%n.length]}}),t.jsxRuntimeExports.jsx(jt.j,{size:"sm",marginBottom:"none",leading:"none",children:o})]},a))}):t.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{children:[r.map((o,a)=>t.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{M(n[a])},onMouseLeave:()=>{M(void 0)},className:"cursor-pointer",children:[t.jsxRuntimeExports.jsx("rect",{x:a*320/n.length+1,y:1,width:320/n.length-2,height:8,className:w===n[a]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:n[a],...w===n[a]?{}:{stroke:n[a]}}}),t.jsxRuntimeExports.jsx("text",{x:(a+1)*320/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Nt.numberFormattingFunction(o,"NA")})]},a)),t.jsxRuntimeExports.jsx("g",{children:t.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{M(n[r.length])},onMouseLeave:()=>{M(void 0)},x:r.length*320/n.length+1,y:1,width:320/n.length-2,height:8,className:`cursor-pointer ${w===n[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...w===n[r.length]?{}:{stroke:n[r.length]}}})})]})})]})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{ae(!0)},children:t.jsxRuntimeExports.jsx("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",children:"Show Legend"})})}),S==="button"&&t.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),t.jsxRuntimeExports.jsx("button",{onClick:()=>ie("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),H&&u!==void 0?t.jsxRuntimeExports.jsx(qt.DetailsModal,{body:H,data:u,setData:p,className:oe?.modal}):null,U&&Z&&Ee&&X?t.jsxRuntimeExports.jsx(Mt.Tooltip,{data:U,body:Z,xPos:Ee,yPos:X,backgroundStyle:Ie?.tooltip,className:oe?.tooltip}):null]})}function $t(d){const e=t.compilerRuntimeExports.c(126),{data:r,mapData:n,graphTitle:L,colors:E,sources:T,graphDescription:f,height:h,width:x,footNote:W,colorDomain:Z,colorLegendTitle:Q,scaleType:xe,scale:ge,centerPoint:ee,padding:fe,mapBorderWidth:Oe,mapNoDataColor:qe,backgroundColor:b,mapBorderColor:te,relativeHeight:g,tooltip:ye,onSeriesMouseOver:H,isWorldMap:Ie,showColorScale:oe,zoomScaleExtend:D,zoomTranslateExtend:S,graphID:k,highlightedIds:N,onSeriesMouseClick:re,mapProperty:ve,graphDownload:je,dataDownload:_,showAntarctica:be,language:y,minHeight:w,theme:M,ariaLabel:V,resetSelectionOnDoubleClick:Pe,detailsOnClick:ae,styles:u,classNames:p,mapProjection:U,zoomInteraction:ne,animate:Ee,dimmedOpacity:se,customLayers:X,timeline:$,collapseColorScaleByDefault:O,projectionRotate:Y,zoomAndCenterByHighlightedIds:ke,rewindCoordinatesInMapData:ze}=d,v=n===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":n,R=W===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":W,q=xe===void 0?"threshold":xe,we=ge===void 0?.95:ge,Re=Oe===void 0?.5:Oe,Ce=qe===void 0?et.Colors.light.graphNoData:qe,I=b===void 0?!1:b,De=te===void 0?et.Colors.light.grays["gray-500"]:te,G=Ie===void 0?!0:Ie,ie=oe===void 0?!0:oe;let o;e[0]!==D?(o=D===void 0?[.8,6]:D,e[0]=D,e[1]=o):o=e[1];const a=o;let j;e[2]!==N?(j=N===void 0?[]:N,e[2]=N,e[3]=j):j=e[3];const C=j,i=ve===void 0?"ISO3":ve,le=je===void 0?!1:je,ce=_===void 0?!1:_,Se=be===void 0?!1:be,tt=y===void 0?"en":y,P=w===void 0?0:w,J=M===void 0?"light":M,ot=Pe===void 0?!0:Pe,rt=U===void 0?"naturalEarth":U,at=ne===void 0?"button":ne,Ae=Ee===void 0?!1:Ee,nt=se===void 0?.3:se;let Be;e[4]!==X?(Be=X===void 0?[]:X,e[4]=X,e[5]=Be):Be=e[5];const st=Be;let Fe;e[6]!==$?(Fe=$===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:$,e[6]=$,e[7]=Fe):Fe=e[7];const s=Fe;let Le;e[8]!==Y?(Le=Y===void 0?[0,0]:Y,e[8]=Y,e[9]=Le):Le=e[9];const it=Le,lt=ke===void 0?!1:ke,ct=ze===void 0?!0:ze,[K,Et]=c.useState(0),[Ne,kt]=c.useState(0),[z,wt]=c.useState(s.autoplay);let Me;if(e[10]!==r||e[11]!==s.dateFormat){let m;e[13]!==s.dateFormat?(m=B=>vt.parse(`${B.date}`,s.dateFormat||"yyyy",new Date).getTime(),e[13]=s.dateFormat,e[14]=m):m=e[14],Me=[...new Set(r.filter(Zt).map(m))],Me.sort(Kt),e[10]=r,e[11]=s.dateFormat,e[12]=Me}else Me=e[12];const l=Me,[A,dt]=c.useState(s.autoplay?0:l.length-1),[de,Rt]=c.useState(void 0),ut=c.useRef(null),ft=c.useRef(null);let Te,We;e[15]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{const m=new ResizeObserver(B=>{Et(B[0].target.clientWidth||620),kt(B[0].target.clientHeight||480)});return ut.current&&m.observe(ut.current),()=>m.disconnect()},We=[],e[15]=Te,e[16]=We):(Te=e[15],We=e[16]),c.useEffect(Te,We);let _e;e[17]===Symbol.for("react.memo_cache_sentinel")?(_e=m=>{Rt(m)},e[17]=_e):_e=e[17];const $e=c.useEffectEvent(_e);let Ge;e[18]!==v||e[19]!==$e?(Ge=()=>{typeof v=="string"?Lt.fetchAndParseJSON(v).then(B=>{$e(B)}):$e(v)},e[18]=v,e[19]=$e,e[20]=Ge):Ge=e[20];let He;e[21]!==v?(He=[v],e[21]=v,e[22]=He):He=e[22],c.useEffect(Ge,He);let Ve;e[23]!==Z||e[24]!==E?.length||e[25]!==r||e[26]!==q?(Ve=Z||(q==="categorical"?Tt.getUniqValue(r,"x"):Wt.getJenks(r.map(Jt),E?.length||4)),e[23]=Z,e[24]=E?.length,e[25]=r,e[26]=q,e[27]=Ve):Ve=e[27];const Ue=Ve;let Xe,Ye;e[28]!==z||e[29]!==s.speed||e[30]!==l?(Xe=()=>{const m=setInterval(()=>{dt(B=>B<l.length-1?B+1:0)},(s.speed||2)*1e3);return z||clearInterval(m),()=>clearInterval(m)},Ye=[l,z,s.speed],e[28]=z,e[29]=s.speed,e[30]=l,e[31]=Xe,e[32]=Ye):(Xe=e[31],Ye=e[32]),c.useEffect(Xe,Ye);const pt=s.dateFormat||"yyyy";let Je;e[33]!==A||e[34]!==pt||e[35]!==s.showOnlyActiveDate||e[36]!==l?(Je=yt.getSliderMarks(l,A,s.showOnlyActiveDate,pt),e[33]=A,e[34]=pt,e[35]=s.showOnlyActiveDate,e[36]=l,e[37]=Je):Je=e[37];const Ke=Je,mt=p?.graphContainer,ht=u?.graphContainer;let ue;e[38]!==p?.description||e[39]!==p?.title||e[40]!==r||e[41]!==ce||e[42]!==f||e[43]!==le||e[44]!==L||e[45]!==u?.description||e[46]!==u?.title||e[47]!==x?(ue=L||f||le||ce?t.jsxRuntimeExports.jsx(Ft.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:p?.title,description:p?.description},graphTitle:L,graphDescription:f,width:x,graphDownload:le?ft:void 0,dataDownload:ce?r.map(Yt).filter(Xt).length>0?r.map(Ut).filter(Vt):r.filter(Ht):null}):null,e[38]=p?.description,e[39]=p?.title,e[40]=r,e[41]=ce,e[42]=f,e[43]=le,e[44]=L,e[45]=u?.description,e[46]=u?.title,e[47]=x,e[48]=ue):ue=e[48];let pe;e[49]!==A||e[50]!==Ke||e[51]!==z||e[52]!==s.enabled||e[53]!==l?(pe=s.enabled&&l.length>0&&Ke?t.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[t.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{wt(!z)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":z?"Click to pause animation":"Click to play animation",children:z?t.jsxRuntimeExports.jsx(gt.Pause,{}):t.jsxRuntimeExports.jsx(gt.Play,{})}),t.jsxRuntimeExports.jsx(yt.Nr,{min:l[0],max:l[l.length-1],marks:Ke,step:null,defaultValue:l[l.length-1],value:l[A],onChangeComplete:m=>{dt(l.indexOf(m))},onChange:m=>{dt(l.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[49]=A,e[50]=Ke,e[51]=z,e[52]=s.enabled,e[53]=l,e[54]=pe):pe=e[54];let me;e[55]!==Ae||e[56]!==ee||e[57]!==p||e[58]!==O||e[59]!==Q||e[60]!==E||e[61]!==st||e[62]!==r||e[63]!==ae||e[64]!==nt||e[65]!==Ue||e[66]!==h||e[67]!==C||e[68]!==A||e[69]!==G||e[70]!==De||e[71]!==Re||e[72]!==Ce||e[73]!==rt||e[74]!==i||e[75]!==de||e[76]!==P||e[77]!==re||e[78]!==H||e[79]!==it||e[80]!==g||e[81]!==ot||e[82]!==ct||e[83]!==we||e[84]!==q||e[85]!==Se||e[86]!==ie||e[87]!==u||e[88]!==Ne||e[89]!==K||e[90]!==J||e[91]!==s.dateFormat||e[92]!==s.enabled||e[93]!==ye||e[94]!==l||e[95]!==x||e[96]!==lt||e[97]!==at||e[98]!==a||e[99]!==S?(me=t.jsxRuntimeExports.jsx(bt.GraphArea,{ref:ut,children:K&&Ne&&de?t.jsxRuntimeExports.jsx(_t,{data:r.filter(m=>s.enabled?m.date===vt.format(new Date(l[A]),s.dateFormat||"yyyy"):m),mapData:Se?de:{...de,features:de.features.filter(Gt)},colorDomain:Ue,width:K,height:Ne,scale:we,centerPoint:ee,colors:E||(q==="categorical"?et.Colors[J].categoricalColors.colors:et.Colors[J].sequentialColors[`neutralColorsx0${Ue.length+1}`]),colorLegendTitle:Q,mapBorderWidth:Re,mapNoDataColor:Ce,categorical:q==="categorical",mapBorderColor:De,tooltip:ye,onSeriesMouseOver:H,isWorldMap:G,showColorScale:ie,zoomScaleExtend:a,zoomTranslateExtend:S,onSeriesMouseClick:re,mapProperty:i,highlightedIds:C,resetSelectionOnDoubleClick:ot,styles:u,classNames:p,detailsOnClick:ae,mapProjection:rt||(G?"naturalEarth":"mercator"),zoomInteraction:at,dimmedOpacity:nt,animate:Ae===!0?{duration:.5,once:!0,amount:.5}:Ae||{duration:0,once:!0,amount:0},customLayers:st,zoomAndCenterByHighlightedIds:lt,collapseColorScaleByDefault:O,projectionRotate:it,rewindCoordinatesInMapData:ct}):t.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(P,h||(g?P?(x||K)*g>P?(x||K)*g:P:(x||K)*g:Ne))}px`},className:"flex items-center justify-center",children:t.jsxRuntimeExports.jsx(Ct.w,{"aria-label":"Loading graph"})})}),e[55]=Ae,e[56]=ee,e[57]=p,e[58]=O,e[59]=Q,e[60]=E,e[61]=st,e[62]=r,e[63]=ae,e[64]=nt,e[65]=Ue,e[66]=h,e[67]=C,e[68]=A,e[69]=G,e[70]=De,e[71]=Re,e[72]=Ce,e[73]=rt,e[74]=i,e[75]=de,e[76]=P,e[77]=re,e[78]=H,e[79]=it,e[80]=g,e[81]=ot,e[82]=ct,e[83]=we,e[84]=q,e[85]=Se,e[86]=ie,e[87]=u,e[88]=Ne,e[89]=K,e[90]=J,e[91]=s.dateFormat,e[92]=s.enabled,e[93]=ye,e[94]=l,e[95]=x,e[96]=lt,e[97]=at,e[98]=a,e[99]=S,e[100]=me):me=e[100];let he;e[101]!==p?.footnote||e[102]!==p?.source||e[103]!==R||e[104]!==T||e[105]!==u?.footnote||e[106]!==u?.source||e[107]!==x?(he=T||R?t.jsxRuntimeExports.jsx(Bt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:T,footNote:R,width:x}):null,e[101]=p?.footnote,e[102]=p?.source,e[103]=R,e[104]=T,e[105]=u?.footnote,e[106]=u?.source,e[107]=x,e[108]=he):he=e[108];let Ze;return e[109]!==V||e[110]!==I||e[111]!==k||e[112]!==h||e[113]!==tt||e[114]!==P||e[115]!==fe||e[116]!==g||e[117]!==mt||e[118]!==ht||e[119]!==ue||e[120]!==pe||e[121]!==me||e[122]!==he||e[123]!==J||e[124]!==x?(Ze=t.jsxRuntimeExports.jsxs(bt.GraphContainer,{className:mt,style:ht,id:k,ref:ft,"aria-label":V,backgroundColor:I,theme:J,language:tt,minHeight:P,width:x,height:h,relativeHeight:g,padding:fe,children:[ue,pe,me,he]}),e[109]=V,e[110]=I,e[111]=k,e[112]=h,e[113]=tt,e[114]=P,e[115]=fe,e[116]=g,e[117]=mt,e[118]=ht,e[119]=ue,e[120]=pe,e[121]=me,e[122]=he,e[123]=J,e[124]=x,e[125]=Ze):Ze=e[125],Ze}function Gt(d){return d.properties.NAME!=="Antarctica"}function Ht(d){return d!==void 0}function Vt(d){return d!==void 0}function Ut(d){return d.data}function Xt(d){return d!==void 0}function Yt(d){return d.data}function Jt(d){return d.x}function Kt(d,e){return d-e}function Zt(d){return d.date}exports.ChoroplethMap=$t;
|
|
2
2
|
//# sourceMappingURL=ChoroplethMap.cjs.map
|