{"version":3,"file":"SimpleMap-CU3PtlHR.cjs","names":[],"sources":["../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubMultipleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubSingleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/index.tsx"],"sourcesContent":["import * as maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\nimport { GraphArea } from '@/Components/Elements/GraphContainer';\r\nimport {\r\n  LegendCollapseButton,\r\n  LegendExpandButton,\r\n} from '@/Components/Elements/LegendExpandControls';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\n\r\ninterface Props {\r\n  mapStyle: string;\r\n  center?: [number, number];\r\n  zoomLevel?: number;\r\n  includeLayers: string[];\r\n  excludeLayers: string[];\r\n  mapLegend?: string | React.ReactNode;\r\n}\r\n\r\nexport function GeoHubMultipleMap(props: Props) {\r\n  const { mapStyle, center, zoomLevel, includeLayers, excludeLayers, mapLegend } = props;\r\n\r\n  const [svgWidth, setSvgWidth] = useState(0);\r\n  const [svgHeight, setSvgHeight] = useState(0);\r\n  const [showLegend, setShowLegend] = useState(true);\r\n  const graphDiv = useRef<HTMLDivElement>(null);\r\n  const mapContainer = useRef<HTMLDivElement>(null);\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  const mapRef = useRef<any>(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  useEffect(() => {\r\n    if (mapContainer.current && svgWidth && !mapRef.current) {\r\n      fetchAndParseJSON(mapStyle).then((d) => {\r\n        const mapDiv = select(mapContainer.current);\r\n        mapDiv.selectAll('div').remove();\r\n        const protocol = new pmtiles.Protocol();\r\n        maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n        // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n        const mapObj: any = {\r\n          // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n          container: mapContainer.current as any,\r\n          style:\r\n            includeLayers.length === 0 && excludeLayers.length === 0\r\n              ? d\r\n              : {\r\n                  ...d,\r\n                  layers: filterData(d.layers, [\r\n                    {\r\n                      column: 'id',\r\n                      includeValues: includeLayers,\r\n                      excludeValues: excludeLayers,\r\n                    },\r\n                  ]),\r\n                },\r\n          attributionControl: true,\r\n        };\r\n        if (center) {\r\n          mapObj.center = center;\r\n        }\r\n        if (zoomLevel) {\r\n          mapObj.zoom = zoomLevel;\r\n        }\r\n        mapRef.current = new maplibreGl.Map(mapObj);\r\n        mapRef.current.addControl(\r\n          new maplibreGl.NavigationControl({\r\n            visualizePitch: true,\r\n            showZoom: true,\r\n            showCompass: true,\r\n          }),\r\n          'bottom-right',\r\n        );\r\n        mapRef.current.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n      });\r\n    }\r\n  }, [svgWidth, center, zoomLevel, includeLayers, excludeLayers, mapStyle]);\r\n  useEffect(() => {\r\n    if (mapRef.current) {\r\n      fetchAndParseJSON(mapStyle).then((d) => {\r\n        // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n        const mapStyleObj: any = {\r\n          ...d,\r\n          layers: filterData(d.layers, [\r\n            {\r\n              column: 'id',\r\n              includeValues: includeLayers,\r\n              excludeValues: excludeLayers,\r\n            },\r\n          ]),\r\n        };\r\n        mapRef.current.setStyle(mapStyleObj);\r\n      });\r\n    }\r\n  }, [excludeLayers, includeLayers, mapStyle]);\r\n  return (\r\n    <GraphArea ref={graphDiv}>\r\n      {svgWidth && svgHeight ? (\r\n        <div\r\n          style={{\r\n            width: svgWidth,\r\n            height: svgHeight,\r\n          }}\r\n        >\r\n          <div\r\n            ref={mapContainer}\r\n            className='map maplibre-show-control'\r\n            style={{ width: '100%', height: '100%' }}\r\n          />\r\n          {mapLegend ? (\r\n            <div className='absolute left-5.5 bottom-13'>\r\n              {showLegend ? (\r\n                <>\r\n                  <LegendCollapseButton setExpanded={setShowLegend} />\r\n                  <div\r\n                    className='color-legend-box p-2 bg-surface-sm/70'\r\n                    // biome-ignore lint/security/noDangerouslySetInnerHtmlWithChildren: Allow setInnerHTML here\r\n                    // biome-ignore lint/security/noDangerouslySetInnerHtml: Allow setInnerHTML here\r\n                    dangerouslySetInnerHTML={\r\n                      typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n                    }\r\n                  >\r\n                    {React.isValidElement(mapLegend) ? mapLegend : null}\r\n                  </div>\r\n                </>\r\n              ) : (\r\n                <LegendExpandButton setExpanded={setShowLegend} />\r\n              )}\r\n            </div>\r\n          ) : null}\r\n        </div>\r\n      ) : null}\r\n    </GraphArea>\r\n  );\r\n}\r\n","import * as maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\nimport { GraphArea } from '@/Components/Elements/GraphContainer';\r\nimport {\r\n  LegendCollapseButton,\r\n  LegendExpandButton,\r\n} from '@/Components/Elements/LegendExpandControls';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\n\r\ninterface Props {\r\n  mapStyle: string;\r\n  center?: [number, number];\r\n  zoomLevel?: number;\r\n  mapLegend?: string | React.ReactNode;\r\n  includeLayers: string[];\r\n  excludeLayers: string[];\r\n}\r\n\r\nexport function GeoHubSingleMap(props: Props) {\r\n  const { mapStyle, center, zoomLevel, includeLayers, excludeLayers, mapLegend } = props;\r\n  const [svgWidth, setSvgWidth] = useState(0);\r\n  const [svgHeight, setSvgHeight] = useState(0);\r\n  const [showLegend, setShowLegend] = useState(true);\r\n  const graphDiv = useRef<HTMLDivElement>(null);\r\n  const mapContainer = 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  useEffect(() => {\r\n    if (mapContainer.current && svgWidth) {\r\n      fetchAndParseJSON(mapStyle).then((d) => {\r\n        const mapDiv = select(mapContainer.current);\r\n        mapDiv.selectAll('div').remove();\r\n        const protocol = new pmtiles.Protocol();\r\n        maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n        // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n        const mapObj: any = {\r\n          // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n          container: mapContainer.current as any,\r\n          style:\r\n            includeLayers.length === 0 && excludeLayers.length === 0\r\n              ? d\r\n              : {\r\n                  ...d,\r\n                  layers: filterData(d.layers, [\r\n                    {\r\n                      column: 'id',\r\n                      includeValues: includeLayers,\r\n                      excludeValues: excludeLayers,\r\n                    },\r\n                  ]),\r\n                },\r\n          attributionControl: true,\r\n        };\r\n        if (center) {\r\n          mapObj.center = center;\r\n        }\r\n        if (zoomLevel) {\r\n          mapObj.zoom = zoomLevel;\r\n        }\r\n        const map = new maplibreGl.Map(mapObj);\r\n        map.addControl(\r\n          new maplibreGl.NavigationControl({\r\n            visualizePitch: true,\r\n            showZoom: true,\r\n            showCompass: true,\r\n          }),\r\n          'bottom-right',\r\n        );\r\n        map.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n      });\r\n    }\r\n  }, [svgWidth, mapStyle, center, zoomLevel, includeLayers, excludeLayers]);\r\n  return (\r\n    <GraphArea ref={graphDiv}>\r\n      {svgWidth && svgHeight ? (\r\n        <div\r\n          style={{\r\n            width: svgWidth,\r\n            height: svgHeight,\r\n          }}\r\n        >\r\n          <div\r\n            ref={mapContainer}\r\n            className='map maplibre-show-control'\r\n            style={{ width: '100%', height: '100%' }}\r\n          />\r\n          {mapLegend ? (\r\n            <div className='absolute left-5.5 bottom-13'>\r\n              {showLegend ? (\r\n                <>\r\n                  <LegendCollapseButton setExpanded={setShowLegend} />\r\n                  <div\r\n                    className='color-legend-box p-2 bg-surface-sm/70'\r\n                    // biome-ignore lint/security/noDangerouslySetInnerHtmlWithChildren: Allow setInnerHTML here\r\n                    // biome-ignore lint/security/noDangerouslySetInnerHtml: Allow setInnerHTML here\r\n                    dangerouslySetInnerHTML={\r\n                      typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n                    }\r\n                  >\r\n                    {React.isValidElement(mapLegend) ? mapLegend : null}\r\n                  </div>\r\n                </>\r\n              ) : (\r\n                <LegendExpandButton setExpanded={setShowLegend} />\r\n              )}\r\n            </div>\r\n          ) : null}\r\n        </div>\r\n      ) : null}\r\n    </GraphArea>\r\n  );\r\n}\r\n","import { createFilter, DropdownSelect } from '@undp/design-system-react/DropdownSelect';\r\nimport type React from 'react';\r\nimport { useRef, useState } from 'react';\r\nimport { GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport type {\r\n  ClassNameObject,\r\n  Languages,\r\n  MapLegendDataType,\r\n  SourcesDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { GeoHubMultipleMap } from './GeoHubMultipleMap';\r\nimport { GeoHubSingleMap } from './GeoHubSingleMap';\r\n\r\ninterface Props {\r\n  // Titles, Labels, and Sources\r\n  /** Title of the graph */\r\n  graphTitle?: string | React.ReactNode;\r\n  /** Description of the graph */\r\n  graphDescription?: string | React.ReactNode;\r\n  /** Footnote for the graph */\r\n  footNote?: string | React.ReactNode;\r\n  /** Source data for the graph */\r\n  sources?: SourcesDataType[];\r\n  /** Accessibility label */\r\n  ariaLabel?: string;\r\n\r\n  // Colors and Styling\r\n  /** Background color of the graph */\r\n  backgroundColor?: string | boolean;\r\n  /** 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  /** URL for mapStyle JSON. If the type is string, otherwise it creates and dropdown and provide end user to select the map style they would like to  */\r\n  mapStyle: string | { style: string; name: string }[];\r\n  /** Defines the legend for the map. If the mapStyle is string, mapLegend can be string or ReactNode. mapLegend with type string is show as innerHTML. If the mapStyle is not string, mapLegend is of type { mapStyleName: string; legend: string | React.ReactNode }[] where mapStyleName corresponds to the each name in the mapStyle. */\r\n  mapLegend?: string | React.ReactNode | MapLegendDataType[];\r\n  /** Starting center point of the map */\r\n  center?: [number, number];\r\n  /** Starting zoom level of the map */\r\n  zoomLevel?: number;\r\n  /** List of layer IDs to be included in the visualization. If this is present only these layers are included. */\r\n  includeLayers?: string[];\r\n  /** List of layer IDs to be excluded from the visualization */\r\n  excludeLayers?: string[];\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  /** Theme for the UI elements */\r\n  uiMode?: 'light' | 'normal';\r\n  /** Unique ID for the graph */\r\n  graphID?: string;\r\n}\r\n\r\n/** For using these maps you will have to install [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm) and [pmtiles](https://www.npmjs.com/package/pmtiles) package to your project */\r\nexport function GeoHubMap(props: Props) {\r\n  const {\r\n    mapStyle,\r\n    graphTitle,\r\n    height,\r\n    width,\r\n    relativeHeight,\r\n    sources,\r\n    graphDescription,\r\n    footNote,\r\n    padding,\r\n    backgroundColor = false,\r\n    center,\r\n    zoomLevel,\r\n    graphID,\r\n    language = 'en',\r\n    minHeight = 0,\r\n    theme = 'light',\r\n    includeLayers = [],\r\n    excludeLayers = [],\r\n    ariaLabel,\r\n    uiMode = 'normal',\r\n    styles,\r\n    classNames,\r\n    mapLegend,\r\n  } = props;\r\n\r\n  const [selectedMapStyle, setSelectedMapStyle] = useState<string | undefined>(undefined);\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n  const defaultMapStyleValue = typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style;\r\n\r\n  const filterConfig = {\r\n    ignoreCase: true,\r\n    ignoreAccents: true,\r\n    trim: true,\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 ? (\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        />\r\n      ) : null}\r\n      {typeof mapStyle === 'string' ? null : (\r\n        <DropdownSelect\r\n          options={mapStyle.map((d) => ({ label: d.name, value: d.style }))}\r\n          isClearable={false}\r\n          size='sm'\r\n          variant={uiMode}\r\n          isRtl={language === 'he' || language === 'ar'}\r\n          isSearchable\r\n          filterOption={createFilter(filterConfig)}\r\n          defaultValue={mapStyle.find((d) => d.style === defaultMapStyleValue)}\r\n          controlShouldRenderValue\r\n          // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n          onChange={(el: any) => {\r\n            if (el) setSelectedMapStyle(el.value);\r\n          }}\r\n        />\r\n      )}\r\n      {typeof mapStyle === 'string' ? (\r\n        <GeoHubSingleMap\r\n          mapStyle={mapStyle}\r\n          center={center}\r\n          zoomLevel={zoomLevel}\r\n          includeLayers={includeLayers}\r\n          excludeLayers={excludeLayers}\r\n          mapLegend={mapLegend as string | React.ReactNode | undefined}\r\n        />\r\n      ) : (\r\n        <GeoHubMultipleMap\r\n          mapStyle={selectedMapStyle || defaultMapStyleValue}\r\n          center={center}\r\n          zoomLevel={zoomLevel}\r\n          includeLayers={includeLayers}\r\n          excludeLayers={excludeLayers}\r\n          mapLegend={\r\n            ((mapLegend || []) as MapLegendDataType[]).find(\r\n              (d) =>\r\n                d.mapStyleName ===\r\n                mapStyle.find((el) => el.style === (selectedMapStyle || defaultMapStyleValue))\r\n                  ?.name,\r\n            )?.legend\r\n          }\r\n        />\r\n      )}\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"],"mappings":"2kBAwBA,SAAgB,EAAkB,EAAc,CAC9C,GAAM,CAAE,WAAU,SAAQ,YAAW,gBAAe,gBAAe,aAAc,EAE3E,CAAC,EAAU,IAAA,EAAA,EAAA,UAAwB,CAAC,EACpC,CAAC,EAAW,IAAA,EAAA,EAAA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