col-browser 2.2.3 → 2.2.4
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/es/chunks/Distributions-BWucAjsL.js +1153 -0
- package/es/chunks/Distributions-BWucAjsL.js.map +1 -0
- package/es/col-browser.css +1 -1
- package/es/taxon.js +1 -1
- package/es/taxonDistribution.js +1 -1
- package/package.json +1 -1
- package/umd/col-browser.js +105 -90
- package/umd/col-browser.js.map +1 -1
- package/umd/col-browser.min.js +2 -2
- package/umd/col-browser.min.js.map +1 -1
- package/umd/main.css +22 -0
- package/es/chunks/Distributions-CLwWAH98.js +0 -1139
- package/es/chunks/Distributions-CLwWAH98.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Distributions-BWucAjsL.js","sources":["../../node_modules/@ant-design/icons-svg/es/asn/BookOutlined.js","../../node_modules/@ant-design/icons/es/icons/BookOutlined.js","../../src/Taxon/ReferencePopover.js","../../src/Taxon/DistributionsMap/descendantRanks.js","../../src/Taxon/DistributionsMap/descendantFetch.js","../../src/Taxon/DistributionsMap/colorAssignment.js","../../src/Taxon/DistributionsMap/IncludedTaxaLegend.js","../../src/Taxon/DistributionsMap/index.js","../../src/Taxon/Distributions.js"],"sourcesContent":["// This icon file is generated automatically.\nvar BookOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z\" } }] }, \"name\": \"book\", \"theme\": \"outlined\" };\nexport default BookOutlined;\n","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport BookOutlinedSvg from \"@ant-design/icons-svg/es/asn/BookOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst BookOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: BookOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(BookOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'BookOutlined';\n}\nexport default RefIcon;","import React from \"react\";\nimport { BookOutlined } from \"@ant-design/icons\";\nimport { Popover, Spin } from \"antd\";\nimport client from \"../api/client\";\nimport config from \"../config\";\nimport { get, isArray } from \"lodash-es\";\nimport ErrorMsg from \"../components/ErrorMsg\";\n\nclass ReferencePopover extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n reference: [],\n loading: false,\n error: null,\n };\n }\n\n getData = () => {\n const { referenceId, datasetKey, references } = this.props;\n if (referenceId) {\n const refIds = !isArray(referenceId) ? [referenceId] : referenceId;\n const reference = [];\n this.setState({ loading: true });\n Promise.allSettled(\n refIds.map((id) => get(references, id) ? Promise.resolve(reference.push(references[id])) :\n\n client(\n `${config.dataApi}dataset/${datasetKey}/reference/${id}`\n ).then((res) => reference.push(res.data)).catch(err => this.setState({error: err}))\n\n \n )\n ).then(() => this.setState({ reference, loading: false }));\n }\n };\n\n getContent = () => {\n const { error, reference, loading } = this.state;\n if (loading) {\n return <Spin />;\n } else if (error) {\n return <ErrorMsg error={error}/>;\n } else if (reference.length === 1) {\n return reference[0].citation;\n } else {\n return (\n <ul>\n {reference.map((r) => (\n <li key={r.id}>{r.citation}</li>\n ))}\n </ul>\n );\n }\n };\n\n scrollToReference = (e, id) => {\n // Default <a href=\"#col-reference-{id}\"> behaviour writes the hash into\n // window.location, which hijacks hosts using hash-based routing (the\n // GitHub Pages demo, COL portal preview). Scroll without touching the\n // URL.\n const el = document.getElementById(`col-reference-${id}`);\n if (el) {\n e.preventDefault();\n el.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n }\n };\n\n render = () => {\n const { referenceId, referenceIndexMap, trigger } = this.props;\n const refIds = !isArray(referenceId) ? [referenceId] : referenceId;\n let icon = referenceIndexMap && get(referenceIndexMap, refIds[0])\n ? refIds.map((r) => (\n <a\n key={r}\n className=\"col-reference-link\"\n href={`#col-reference-${r}`}\n onClick={(e) => this.scrollToReference(e, r)}\n >\n {`[${referenceIndexMap[r]}]`}\n </a>\n ))\n : <BookOutlined style={{ cursor: \"pointer\" }} />;\n\n return referenceId ? (\n <div id={`reference_${referenceId}`} key={`reference_${referenceId}`} style={this.props.style}>\n <Popover\n getPopupContainer={() =>\n document.getElementById(`reference_${referenceId}`)\n }\n placement={this.props.placement || \"left\"}\n title=\"Reference\"\n onOpenChange={(visible) => visible && this.getData()}\n content={<div style={{ maxWidth: \"500px\" }}>{this.getContent()}</div>}\n trigger={trigger || \"hover\"}\n >\n {icon}\n </Popover>\n </div>\n ) : (\n \"\"\n );\n };\n}\n\nexport default ReferencePopover;\n","export const INFRASPECIFIC_RANKS = [\n \"subspecies\",\n \"variety\",\n \"subvariety\",\n \"form\",\n \"subform\",\n \"infraspecific name\",\n];\n\nexport const getDescendantRanks = (focalRank, rankOrder) => {\n const focalIdx = rankOrder.indexOf(focalRank);\n if (focalIdx === -1) return [];\n return INFRASPECIFIC_RANKS.filter((r) => {\n const i = rankOrder.indexOf(r);\n return i > focalIdx;\n });\n};\n","import client from \"../../api/client\";\nimport config from \"../../config\";\nimport { getDescendantRanks } from \"./descendantRanks\";\n\nconst POOL_SIZE = 16;\n\nconst isMappable = (r) =>\n r?.area?.gazetteer !== \"text\" && !!r?.area?.globalId;\n\nconst runPool = async (items, worker, size) => {\n const results = new Array(items.length);\n let next = 0;\n const runners = Array.from({ length: Math.min(size, items.length) }, async () => {\n while (true) {\n const i = next++;\n if (i >= items.length) return;\n results[i] = await worker(items[i], i);\n }\n });\n await Promise.all(runners);\n return results;\n};\n\nconst searchDescendants = async (datasetKey, focalId, ranks) => {\n if (ranks.length === 0) return [];\n const params = new URLSearchParams();\n params.append(\"TAXON_ID\", focalId);\n ranks.forEach((r) => params.append(\"rank\", r));\n [\"accepted\", \"provisionally accepted\"].forEach((s) =>\n params.append(\"status\", s)\n );\n params.append(\"limit\", \"1000\");\n const url = `${config.dataApi}dataset/${datasetKey}/nameusage/search?${params}`;\n const res = await client(url);\n const list = res?.data?.result || [];\n return list\n .filter((u) => u?.usage?.id)\n .map((u) => ({\n id: u.usage.id,\n scientificName:\n u.usage?.name?.scientificName || u.usage?.label || u.usage.id,\n rank: u.usage?.name?.rank,\n parentId: u.usage?.parentId,\n }));\n};\n\nconst fetchDistributions = async (datasetKey, taxonId) => {\n const url = `${config.dataApi}dataset/${datasetKey}/taxon/${encodeURIComponent(taxonId)}/distribution`;\n try {\n const res = await client(url);\n return Array.isArray(res?.data) ? res.data : [];\n } catch {\n return [];\n }\n};\n\n/**\n * Fetch all infraspecific descendants of `focalTaxon` and their distributions.\n * Returns { taxa, descendantsFailed } where each taxon carries `mappable` (the\n * mappable subset of its distributions) and `distributions` (the full list).\n */\nexport const fetchDescendants = async ({ datasetKey, focalTaxon, rankOrder }) => {\n const ranks = getDescendantRanks(focalTaxon?.name?.rank, rankOrder);\n let descendantsFailed = false;\n let list = [];\n try {\n list = await searchDescendants(datasetKey, focalTaxon.id, ranks);\n } catch {\n descendantsFailed = true;\n return { taxa: [], descendantsFailed };\n }\n\n const distributions = await runPool(\n list,\n (t) => fetchDistributions(datasetKey, t.id),\n POOL_SIZE\n );\n\n const taxa = list.map((t, i) => {\n const all = distributions[i] || [];\n return { ...t, distributions: all, mappable: all.filter(isMappable) };\n });\n return { taxa, descendantsFailed };\n};\n","export const VIVID_PALETTE = [\n \"#E58606\",\n \"#5D69B1\",\n \"#52BCA3\",\n \"#99C945\",\n \"#CC61B0\",\n \"#24796C\",\n \"#DAA51B\",\n \"#2F8AC4\",\n \"#764E9F\",\n \"#ED645A\",\n \"#CC3A8E\",\n \"#A5AA99\",\n];\n\nconst rankIndex = (rank, rankOrder) => {\n const i = rankOrder.indexOf(rank);\n return i === -1 ? rankOrder.length : i;\n};\n\nexport const assignColors = (taxa, rankOrder) => {\n const sorted = [...taxa].sort((a, b) => {\n const ra = rankIndex(a.rank, rankOrder);\n const rb = rankIndex(b.rank, rankOrder);\n if (ra !== rb) return ra - rb;\n return a.scientificName.localeCompare(b.scientificName);\n });\n const out = {};\n sorted.forEach((t, i) => {\n out[t.id] = VIVID_PALETTE[i % VIVID_PALETTE.length];\n });\n return out;\n};\n","import { useState } from \"react\";\n\nconst wrapStyle = {\n position: \"absolute\",\n bottom: 8,\n left: 8,\n zIndex: 1000,\n background: \"#fff\",\n borderRadius: 4,\n boxShadow: \"0 1px 4px rgba(0,0,0,0.2)\",\n padding: \"6px 8px\",\n fontSize: 12,\n lineHeight: 1.5,\n maxWidth: 260,\n};\n\nconst scrollStyle = {\n maxHeight: 240,\n overflowY: \"auto\",\n};\n\nconst groupHeadingStyle = {\n fontWeight: 600,\n marginTop: 4,\n};\n\nconst firstGroupHeadingStyle = {\n ...groupHeadingStyle,\n marginTop: 0,\n};\n\nconst rowStyle = {\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n paddingLeft: 4,\n};\n\nconst swatchStyle = (color) => ({\n display: \"inline-block\",\n width: 12,\n height: 12,\n background: color,\n border: \"1px solid rgba(0,0,0,0.15)\",\n borderRadius: 2,\n flex: \"0 0 auto\",\n});\n\nconst footerToggleStyle = {\n marginTop: 6,\n cursor: \"pointer\",\n color: \"#1890ff\",\n fontSize: 11,\n};\n\nconst footerWrapStyle = {\n marginTop: 4,\n borderTop: \"1px solid #eee\",\n paddingTop: 4,\n color: \"#666\",\n};\n\nconst footerGroupHeadingStyle = {\n fontWeight: 600,\n marginTop: 4,\n};\n\nconst footerFirstGroupHeadingStyle = {\n ...footerGroupHeadingStyle,\n marginTop: 0,\n};\n\nconst footerNameStyle = {\n fontStyle: \"italic\",\n paddingLeft: 4,\n};\n\nconst totalCount = (groups) =>\n groups.reduce((sum, g) => sum + g.taxa.length, 0);\n\nconst GbifHexEntry = () => (\n <div style={rowStyle}>\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <polygon\n points=\"3,1 9,1 11,6 9,11 3,11 1,6\"\n fill=\"#de1e6e\"\n stroke=\"rgba(0,0,0,0.25)\"\n strokeWidth=\"0.75\"\n />\n </svg>\n <span>GBIF occurrences</span>\n </div>\n);\n\nconst IncludedTaxaLegend = ({ visibleGroups, unmappableGroups, showGbif }) => {\n const [showUnmappable, setShowUnmappable] = useState(false);\n const visibleCount = totalCount(visibleGroups);\n const unmappableCount = totalCount(unmappableGroups);\n if (visibleCount === 0 && unmappableCount === 0 && !showGbif) return null;\n return (\n <div style={wrapStyle}>\n <div style={scrollStyle}>\n {visibleGroups.map((g, i) => (\n <div key={g.rank}>\n <div style={i === 0 ? firstGroupHeadingStyle : groupHeadingStyle}>\n {g.label}\n </div>\n {g.taxa.map((t) => (\n <div key={t.id} style={rowStyle}>\n <span style={swatchStyle(t.color)} />\n <span style={{ fontStyle: \"italic\" }}>\n {t.displayName || t.scientificName}\n </span>\n </div>\n ))}\n </div>\n ))}\n {showGbif && <GbifHexEntry />}\n </div>\n {unmappableCount > 0 && (\n <>\n <div\n style={footerToggleStyle}\n onClick={() => setShowUnmappable((v) => !v)}\n >\n {showUnmappable ? \"− Hide\" : \"+\"} {unmappableCount} without map data\n </div>\n {showUnmappable && (\n <div style={footerWrapStyle}>\n {unmappableGroups.map((g, i) => (\n <div key={g.rank}>\n <div\n style={\n i === 0\n ? footerFirstGroupHeadingStyle\n : footerGroupHeadingStyle\n }\n >\n {g.label}\n </div>\n {g.taxa.map((t) => (\n <div key={t.id} style={footerNameStyle}>\n {t.displayName || t.scientificName}\n </div>\n ))}\n </div>\n ))}\n </div>\n )}\n </>\n )}\n </div>\n );\n};\n\nexport default IncludedTaxaLegend;\n","import { useEffect, useMemo, useRef, useState } from \"react\";\nimport maplibregl from \"maplibre-gl\";\nimport \"maplibre-gl/dist/maplibre-gl.css\";\nimport \"./treeControl.css\";\nimport client from \"../../api/client\";\nimport config from \"../../config\";\nimport { fetchDescendants } from \"./descendantFetch\";\nimport { getDescendantRanks, INFRASPECIFIC_RANKS } from \"./descendantRanks\";\nimport { assignColors } from \"./colorAssignment\";\nimport IncludedTaxaLegend from \"./IncludedTaxaLegend\";\nimport { readSetting, writeSetting } from \"../../storage\";\n\nconst POPUP_FIELDS = [\n \"establishmentMeans\",\n \"degreeOfEstablishment\",\n \"pathway\",\n \"threatStatus\",\n \"year\",\n \"lifeStage\",\n];\n\nexport const ESTABLISHMENT_MEANS = [\n { key: \"nativeendemic\", label: \"Native endemic\", color: \"#0F8554\" },\n { key: \"native\", label: \"Native\", color: \"#87C55F\" },\n { key: \"nativereintroduced\", label: \"Native reintroduced\", color: \"#C9DB74\" },\n { key: \"introduced\", label: \"Introduced\", color: \"#FE88B1\" },\n {\n key: \"introducedassistedcolonisation\",\n label: \"Introduced assisted colonisation\",\n color: \"#DCB0F2\",\n },\n { key: \"vagrant\", label: \"Vagrant\", color: \"#F6CF71\" },\n { key: \"uncertain\", label: \"Uncertain\", color: \"#8BE0A4\" },\n];\n\nconst ESTABLISHMENT_COLORS = Object.fromEntries(\n ESTABLISHMENT_MEANS.map((m) => [m.key, m.color])\n);\nexport const MISSING_COLOR = \"#66C5CC\";\n\nconst normalizeKey = (v) =>\n String(v || \"\")\n .toLowerCase()\n .replace(/[^a-z]/g, \"\");\n\nconst resolveKey = (record) => {\n const raw = record?.establishmentMeans;\n if (raw == null || raw === \"\") return null;\n const k = normalizeKey(raw);\n return ESTABLISHMENT_COLORS[k] ? k : \"uncertain\";\n};\n\nconst colorFor = (record) => {\n const k = resolveKey(record);\n return k == null ? MISSING_COLOR : ESTABLISHMENT_COLORS[k];\n};\n\nconst POSITRON_STYLE =\n \"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json\";\n\n// localStorage-backed GBIF overlay preference: a user who turns the overlay off\n// keeps it off across page loads and sessions. Applies to all maps, including\n// GBIF-only ones — there, turning it off collapses the (otherwise empty) map to\n// a small activate bar (see the render below).\nconst GBIF_VISIBLE_KEY = \"gbif-visible\";\nconst readStoredGbifVisible = (defaultValue) =>\n readSetting(GBIF_VISIBLE_KEY, defaultValue);\nconst writeStoredGbifVisible = (visible) =>\n writeSetting(GBIF_VISIBLE_KEY, visible);\n\n// GBIF v2 occurrence-density tile path (multitaxonomy). Concatenated with\n// config.gbifApi at request time.\nconst GBIF_TILE_PATH =\n \"/v2/map/occurrence/density/{z}/{x}/{y}@1x.png\" +\n \"?srs=EPSG%3A3857&style=iNaturalist.poly&bin=hex&hexPerTile=64\" +\n \"&hasCoordinate=true&hasGeospatialIssue=false&occurrenceStatus=PRESENT\" +\n \"&checklistKey={checklistKey}&taxonKey={taxonKey}\";\n\n// Layer IDs\nconst FOCAL_SOURCE = \"col-focal-distributions\";\nconst FOCAL_FILL = \"col-focal-fill\";\nconst FOCAL_LINE = \"col-focal-line\";\nconst GBIF_SOURCE = \"col-gbif-occurrences\";\nconst GBIF_LAYER = \"col-gbif-occurrences\";\nconst descendantSourceId = (id) => `col-descendant-${id}`;\nconst descendantFillId = (id) => `col-descendant-fill-${id}`;\nconst descendantLineId = (id) => `col-descendant-line-${id}`;\n\nconst cache = new Map();\n\nconst fetchShape = (gazetteer, id) => {\n const key = `${gazetteer}:${id}`;\n if (cache.has(key)) return cache.get(key);\n const url = `${config.dataApi}vocab/area/${key}`;\n const p = client(url, {\n headers: { Accept: \"application/geo+json\" },\n }).then(\n (r) => r.data,\n () => null\n );\n cache.set(key, p);\n return p;\n};\n\nconst escapeHtml = (s) =>\n String(s)\n .replace(/&/g, \"&\")\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/\"/g, \""\");\n\nconst popupHtml = (record) => {\n const title = record?.area?.name || record?.area?.globalId || \"\";\n const rows = POPUP_FIELDS.map((f) => [f, record?.[f]])\n .filter(([, v]) => v != null && v !== \"\")\n .map(\n ([k, v]) =>\n `<div><strong>${escapeHtml(k)}:</strong> ${escapeHtml(v)}</div>`\n )\n .join(\"\");\n return `<div style=\"min-width:180px\"><div style=\"font-weight:600;margin-bottom:4px\">${escapeHtml(\n title\n )}</div>${rows}</div>`;\n};\n\nconst descendantPopupHtml = (taxon, record) => {\n const head =\n `<div style=\"font-weight:600;font-style:italic;margin-bottom:4px\">${escapeHtml(\n taxon.scientificName\n )}</div>` +\n `<div style=\"color:#888;margin-bottom:4px\">${escapeHtml(taxon.rank || \"\")}</div>`;\n return head + popupHtml(record);\n};\n\nconst RANK_LABEL_PLURAL = {\n subspecies: \"subspecies\",\n variety: \"varieties\",\n subvariety: \"subvarieties\",\n form: \"forms\",\n subform: \"subforms\",\n \"infraspecific name\": \"infraspecific names\",\n};\nconst rankLabelPlural = (rank) => RANK_LABEL_PLURAL[rank] || rank;\n\nconst epithet = (scientificName) => {\n if (!scientificName) return \"\";\n const tokens = scientificName.trim().split(/\\s+/);\n return tokens[tokens.length - 1];\n};\n\n// Hex swatch + label for the GBIF density layer.\nconst GbifLegendEntry = () => (\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 6 }}>\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <polygon\n points=\"3,1 9,1 11,6 9,11 3,11 1,6\"\n fill=\"#de1e6e\"\n stroke=\"rgba(0,0,0,0.25)\"\n strokeWidth=\"0.75\"\n />\n </svg>\n <span>GBIF occurrences</span>\n </div>\n);\n\n// Compute bounds [[minLng,minLat],[maxLng,maxLat]] of a FeatureCollection.\nconst computeBounds = (features) => {\n let minLng = Infinity,\n minLat = Infinity,\n maxLng = -Infinity,\n maxLat = -Infinity;\n const visit = (coords) => {\n if (typeof coords[0] === \"number\") {\n const [lng, lat] = coords;\n if (lng < minLng) minLng = lng;\n if (lng > maxLng) maxLng = lng;\n if (lat < minLat) minLat = lat;\n if (lat > maxLat) maxLat = lat;\n } else {\n for (let i = 0; i < coords.length; i++) visit(coords[i]);\n }\n };\n for (let i = 0; i < features.length; i++) {\n const g = features[i]?.geometry;\n if (g?.coordinates) visit(g.coordinates);\n }\n if (minLng === Infinity) return null;\n return [\n [minLng, minLat],\n [maxLng, maxLat],\n ];\n};\n\nconst flattenFeatures = (geojson) => {\n if (!geojson) return [];\n if (geojson.type === \"FeatureCollection\") return geojson.features || [];\n return [geojson];\n};\n\nconst supported = () => {\n if (typeof maplibregl?.supported === \"function\") return maplibregl.supported();\n // Newer maplibre-gl uses isWebGLSupported / no helper — assume true at SSR time.\n return typeof WebGLRenderingContext !== \"undefined\";\n};\n\nconst DistributionsMap = ({\n records,\n onUnmappable,\n datasetKey,\n focalTaxon,\n rankOrder,\n gbifChecklistKey,\n // true | null → show GBIF layer; false → GBIF API returned 0 occurrences,\n // grey out the toggle and skip loading tiles. Defaults to true so the\n // component works without the count check.\n gbifAvailable = true,\n}) => {\n const containerRef = useRef(null);\n const wrapperRef = useRef(null);\n const mapRef = useRef(null);\n const popupRef = useRef(null);\n const recordMapRef = useRef(new Map()); // recordKey → record\n const descendantTaxonMapRef = useRef(new Map()); // taxonId → taxon\n const descendantRecordMapRef = useRef(new Map()); // recordKey → { taxon, record }\n const focalAttachedRef = useRef(false);\n const gbifAttachedRef = useRef(false);\n const descendantLayersRef = useRef(new Set()); // taxonIds currently attached\n\n const [styleReady, setStyleReady] = useState(false);\n const [focalReady, setFocalReady] = useState(false);\n const [descendantState, setDescendantState] = useState({\n status: \"idle\", // idle | loading | ready | empty | error\n taxa: [],\n });\n const [focalVisible, setFocalVisible] = useState(true);\n const isGbifOnly = !!gbifChecklistKey && (!records || records.length === 0);\n // Respect the saved GBIF preference on every map. On a GBIF-only map, an\n // off preference collapses to a small activate bar instead of an empty map.\n const [gbifVisible, setGbifVisible] = useState(() =>\n readStoredGbifVisible(true)\n );\n const [visibleTaxonIds, setVisibleTaxonIds] = useState(new Set());\n const [controlOpen, setControlOpen] = useState(false);\n const fetchTriggeredRef = useRef(false);\n\n const handleToggleGbif = () => {\n setGbifVisible((v) => {\n const next = !v;\n writeStoredGbifVisible(next);\n return next;\n });\n };\n\n const activateGbif = () => {\n setGbifVisible(true);\n writeStoredGbifVisible(true);\n };\n\n const presentMeans = useMemo(() => {\n if (!records?.length) return [];\n const seen = new Set();\n records.forEach((r) => {\n const k = resolveKey(r);\n if (k != null) seen.add(k);\n });\n return ESTABLISHMENT_MEANS.filter((m) => seen.has(m.key));\n }, [records]);\n\n const descendantColors = useMemo(() => {\n if (descendantState.status !== \"ready\") return {};\n return assignColors(\n descendantState.taxa.filter((t) => t.mappable.length > 0),\n rankOrder || []\n );\n }, [descendantState, rankOrder]);\n\n const descendantLegend = useMemo(() => {\n if (descendantState.status !== \"ready\") {\n return { visibleGroups: [], unmappableGroups: [] };\n }\n const decorate = (t) => ({\n ...t,\n color: descendantColors[t.id],\n displayName: epithet(t.scientificName),\n });\n const groupByRank = (taxa) => {\n const byRank = {};\n taxa.forEach((t) => {\n (byRank[t.rank] = byRank[t.rank] || []).push(decorate(t));\n });\n return INFRASPECIFIC_RANKS.filter((r) => byRank[r]).map((r) => ({\n rank: r,\n label: rankLabelPlural(r),\n taxa: byRank[r],\n }));\n };\n const visibleGroups = groupByRank(\n descendantState.taxa.filter(\n (t) => t.mappable.length > 0 && visibleTaxonIds.has(t.id)\n )\n );\n const unmappableGroups = groupByRank(\n descendantState.taxa.filter((t) => t.mappable.length === 0)\n );\n return { visibleGroups, unmappableGroups };\n }, [descendantState, descendantColors, visibleTaxonIds]);\n\n const showDescendantLegend = descendantLegend.visibleGroups.length > 0;\n\n // Mount map once.\n useEffect(() => {\n if (!containerRef.current || mapRef.current) return;\n if (!supported()) return;\n const map = new maplibregl.Map({\n container: containerRef.current,\n style: POSITRON_STYLE,\n center: [0, 20],\n zoom: 1,\n minZoom: 0,\n attributionControl: false,\n renderWorldCopies: true,\n });\n map.addControl(\n new maplibregl.AttributionControl({ compact: true }),\n \"bottom-right\"\n );\n map.addControl(\n new maplibregl.NavigationControl({ showCompass: false }),\n \"top-left\"\n );\n // Fullscreen toggle, top-right. Expand the whole wrapper (not just the map\n // canvas) so the legend and the layer control come along into fullscreen.\n // The custom layer \"+\" button is positioned just below this control.\n map.addControl(\n new maplibregl.FullscreenControl({ container: wrapperRef.current }),\n \"top-right\"\n );\n mapRef.current = map;\n\n map.on(\"load\", () => {\n setStyleReady(true);\n // Start the attribution control collapsed. MapLibre opens it by\n // default in compact mode and only closes it on drag; remove the\n // `compact-show` class to hide the inner attribution text until the\n // user clicks the (i) button.\n const attrib = map\n .getContainer()\n .querySelector(\".maplibregl-ctrl-attrib\");\n if (attrib) attrib.classList.remove(\"maplibregl-compact-show\");\n });\n\n const resizeObserver =\n typeof ResizeObserver !== \"undefined\"\n ? new ResizeObserver(() => map.resize())\n : null;\n if (resizeObserver) resizeObserver.observe(containerRef.current);\n\n return () => {\n if (resizeObserver) resizeObserver.disconnect();\n if (popupRef.current) {\n popupRef.current.remove();\n popupRef.current = null;\n }\n map.remove();\n mapRef.current = null;\n focalAttachedRef.current = false;\n gbifAttachedRef.current = false;\n descendantLayersRef.current = new Set();\n };\n }, []);\n\n // Focal taxon polygons.\n useEffect(() => {\n if (!styleReady || !records?.length) return;\n const map = mapRef.current;\n if (!map) return;\n let cancelled = false;\n setFocalReady(false);\n\n Promise.allSettled(\n records.map((r) =>\n fetchShape(r.area.gazetteer, r.area.id).then((geojson) => ({\n record: r,\n geojson,\n }))\n )\n ).then((results) => {\n if (cancelled) return;\n const features = [];\n const recordMap = new Map();\n let failures = 0;\n results.forEach((res, i) => {\n if (res.status !== \"fulfilled\" || !res.value.geojson) {\n failures += 1;\n return;\n }\n const { record, geojson } = res.value;\n const color = colorFor(record);\n const recordKey = `focal-${i}`;\n recordMap.set(recordKey, record);\n flattenFeatures(geojson).forEach((f) => {\n features.push({\n ...f,\n properties: {\n ...(f.properties || {}),\n _recordKey: recordKey,\n _color: color,\n },\n });\n });\n });\n recordMapRef.current = recordMap;\n\n const data = { type: \"FeatureCollection\", features };\n if (map.getSource(FOCAL_SOURCE)) {\n map.getSource(FOCAL_SOURCE).setData(data);\n } else {\n // GBIF raster may already be on the map (its effect runs synchronously\n // while this one is async). Insert focal layers below GBIF so the\n // occurrence overlay always paints on top.\n const beforeId = map.getLayer(GBIF_LAYER) ? GBIF_LAYER : undefined;\n map.addSource(FOCAL_SOURCE, { type: \"geojson\", data });\n map.addLayer(\n {\n id: FOCAL_FILL,\n type: \"fill\",\n source: FOCAL_SOURCE,\n paint: {\n \"fill-color\": [\"coalesce\", [\"get\", \"_color\"], MISSING_COLOR],\n \"fill-opacity\": 0.65,\n },\n },\n beforeId\n );\n map.addLayer(\n {\n id: FOCAL_LINE,\n type: \"line\",\n source: FOCAL_SOURCE,\n paint: {\n \"line-color\": [\"coalesce\", [\"get\", \"_color\"], MISSING_COLOR],\n \"line-width\": 1,\n },\n },\n beforeId\n );\n map.on(\"click\", FOCAL_FILL, onFocalClick);\n map.on(\"mouseenter\", FOCAL_FILL, onMouseEnter);\n map.on(\"mouseleave\", FOCAL_FILL, onMouseLeave);\n focalAttachedRef.current = true;\n }\n\n if (features.length > 0) {\n const bounds = computeBounds(features);\n if (bounds) map.fitBounds(bounds, { padding: 20, animate: false });\n }\n if (typeof onUnmappable === \"function\") onUnmappable(failures);\n setFocalReady(true);\n });\n\n return () => {\n cancelled = true;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [styleReady, records]);\n\n // Focal click handler — defined as stable closure that reads ref.\n const onFocalClick = (e) => {\n const map = mapRef.current;\n if (!map) return;\n const feature = e.features?.[0];\n const key = feature?.properties?._recordKey;\n const record = key ? recordMapRef.current.get(key) : null;\n if (!record) return;\n if (popupRef.current) popupRef.current.remove();\n popupRef.current = new maplibregl.Popup({ closeButton: true, maxWidth: \"320px\" })\n .setLngLat(e.lngLat)\n .setHTML(popupHtml(record))\n .addTo(map);\n };\n\n const onMouseEnter = () => {\n const map = mapRef.current;\n if (map) map.getCanvas().style.cursor = \"pointer\";\n };\n const onMouseLeave = () => {\n const map = mapRef.current;\n if (map) map.getCanvas().style.cursor = \"\";\n };\n\n // Sync focal visibility.\n useEffect(() => {\n const map = mapRef.current;\n if (!map || !focalAttachedRef.current) return;\n const v = focalVisible ? \"visible\" : \"none\";\n if (map.getLayer(FOCAL_FILL)) map.setLayoutProperty(FOCAL_FILL, \"visibility\", v);\n if (map.getLayer(FOCAL_LINE)) map.setLayoutProperty(FOCAL_LINE, \"visibility\", v);\n }, [focalVisible, focalReady]);\n\n // GBIF raster layer — added always last so it sits on top.\n useEffect(() => {\n if (!styleReady) return;\n const map = mapRef.current;\n if (!map) return;\n const removeGbif = () => {\n if (map.getLayer(GBIF_LAYER)) map.removeLayer(GBIF_LAYER);\n if (map.getSource(GBIF_SOURCE)) map.removeSource(GBIF_SOURCE);\n gbifAttachedRef.current = false;\n };\n removeGbif();\n if (!gbifChecklistKey || !focalTaxon?.id) return;\n // GBIF API said this taxon has 0 occurrences — skip the tile request.\n if (gbifAvailable === false) return;\n const url = (config.gbifApi + GBIF_TILE_PATH)\n .replace(\"{checklistKey}\", encodeURIComponent(gbifChecklistKey))\n .replace(\"{taxonKey}\", encodeURIComponent(focalTaxon.id));\n // Link to GBIF's multitaxonomy occurrence search for the focal taxon.\n // Lives on demo.gbif.org (config.gbifPortal) until that feature moves to\n // the production portal; same checklistKey we pass to the tile API.\n const searchUrl =\n config.gbifPortal +\n \"/occurrence/search?checklist_key=\" +\n encodeURIComponent(gbifChecklistKey) +\n \"&taxon_key=\" +\n encodeURIComponent(focalTaxon.id);\n map.addSource(GBIF_SOURCE, {\n type: \"raster\",\n tiles: [url],\n tileSize: 256,\n attribution:\n '<a href=\"' +\n searchUrl +\n '\" target=\"_blank\" rel=\"noopener\">GBIF</a> occurrence data',\n });\n map.addLayer({\n id: GBIF_LAYER,\n type: \"raster\",\n source: GBIF_SOURCE,\n paint: { \"raster-opacity\": 0.9 },\n layout: { visibility: gbifVisible ? \"visible\" : \"none\" },\n });\n gbifAttachedRef.current = true;\n // Intentionally no cleanup return: deps changes are handled by the\n // removeGbif() call at the top of the next run, and unmount is handled\n // by the mount effect's map.remove() which disposes everything. If we\n // returned removeGbif here, it could run after map.remove() (React\n // runs cleanups in reverse declaration order on unmount) and throw\n // because MapLibre nulls map.style during remove().\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [styleReady, gbifChecklistKey, focalTaxon?.id, gbifAvailable]);\n\n // Sync GBIF visibility.\n useEffect(() => {\n const map = mapRef.current;\n if (!map || !gbifAttachedRef.current) return;\n const v = gbifVisible ? \"visible\" : \"none\";\n if (map.getLayer(GBIF_LAYER)) map.setLayoutProperty(GBIF_LAYER, \"visibility\", v);\n }, [gbifVisible]);\n\n // Descendant layers — added once when state.status becomes \"ready\".\n useEffect(() => {\n if (!styleReady) return;\n const map = mapRef.current;\n if (!map) return;\n // Tear down previous descendant layers.\n descendantLayersRef.current.forEach((id) => {\n if (map.getLayer(descendantFillId(id))) map.removeLayer(descendantFillId(id));\n if (map.getLayer(descendantLineId(id))) map.removeLayer(descendantLineId(id));\n if (map.getSource(descendantSourceId(id))) map.removeSource(descendantSourceId(id));\n });\n descendantLayersRef.current = new Set();\n descendantTaxonMapRef.current = new Map();\n descendantRecordMapRef.current = new Map();\n\n if (descendantState.status !== \"ready\") return;\n const colors = descendantColors;\n descendantState.taxa.forEach((t) => {\n if (t.mappable.length === 0) return;\n descendantTaxonMapRef.current.set(t.id, t);\n Promise.allSettled(\n t.mappable.map((rec) =>\n fetchShape(rec.area.gazetteer, rec.area.id).then((geojson) => ({\n record: rec,\n geojson,\n }))\n )\n ).then((results) => {\n if (!mapRef.current) return;\n const features = [];\n results.forEach((res, i) => {\n if (res.status !== \"fulfilled\" || !res.value.geojson) return;\n const { record, geojson } = res.value;\n const recordKey = `desc-${t.id}-${i}`;\n descendantRecordMapRef.current.set(recordKey, { taxon: t, record });\n flattenFeatures(geojson).forEach((f) => {\n features.push({\n ...f,\n properties: {\n ...(f.properties || {}),\n _recordKey: recordKey,\n },\n });\n });\n });\n const color = colors[t.id] || MISSING_COLOR;\n const data = { type: \"FeatureCollection\", features };\n const srcId = descendantSourceId(t.id);\n if (mapRef.current.getSource(srcId)) {\n mapRef.current.getSource(srcId).setData(data);\n } else {\n mapRef.current.addSource(srcId, { type: \"geojson\", data });\n const fillId = descendantFillId(t.id);\n const lineId = descendantLineId(t.id);\n const beforeId = mapRef.current.getLayer(GBIF_LAYER) ? GBIF_LAYER : undefined;\n mapRef.current.addLayer(\n {\n id: fillId,\n type: \"fill\",\n source: srcId,\n paint: { \"fill-color\": color, \"fill-opacity\": 0.55 },\n layout: { visibility: \"none\" },\n },\n beforeId\n );\n mapRef.current.addLayer(\n {\n id: lineId,\n type: \"line\",\n source: srcId,\n paint: { \"line-color\": color, \"line-width\": 2 },\n layout: { visibility: \"none\" },\n },\n beforeId\n );\n mapRef.current.on(\"click\", fillId, onDescendantClick);\n mapRef.current.on(\"mouseenter\", fillId, onMouseEnter);\n mapRef.current.on(\"mouseleave\", fillId, onMouseLeave);\n descendantLayersRef.current.add(t.id);\n }\n });\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [styleReady, descendantState, descendantColors]);\n\n const onDescendantClick = (e) => {\n const map = mapRef.current;\n if (!map) return;\n const feature = e.features?.[0];\n const key = feature?.properties?._recordKey;\n const data = key ? descendantRecordMapRef.current.get(key) : null;\n if (!data) return;\n if (popupRef.current) popupRef.current.remove();\n popupRef.current = new maplibregl.Popup({ closeButton: true, maxWidth: \"320px\" })\n .setLngLat(e.lngLat)\n .setHTML(descendantPopupHtml(data.taxon, data.record))\n .addTo(map);\n };\n\n // Sync descendant visibility.\n useEffect(() => {\n const map = mapRef.current;\n if (!map) return;\n descendantLayersRef.current.forEach((id) => {\n const v = visibleTaxonIds.has(id) ? \"visible\" : \"none\";\n if (map.getLayer(descendantFillId(id))) {\n map.setLayoutProperty(descendantFillId(id), \"visibility\", v);\n }\n if (map.getLayer(descendantLineId(id))) {\n map.setLayoutProperty(descendantLineId(id), \"visibility\", v);\n }\n });\n }, [visibleTaxonIds, descendantState]);\n\n // Trigger descendant fetch (on control open).\n const triggerDescendantFetch = () => {\n if (fetchTriggeredRef.current) return;\n if (!datasetKey || !focalTaxon || !rankOrder) return;\n const focalRank = focalTaxon?.name?.rank;\n if (!focalRank) return;\n if (focalRank !== \"species\" && !INFRASPECIFIC_RANKS.includes(focalRank)) return;\n const ranks = getDescendantRanks(focalRank, rankOrder);\n if (ranks.length === 0) return;\n fetchTriggeredRef.current = true;\n setDescendantState({ status: \"loading\", taxa: [] });\n fetchDescendants({ datasetKey, focalTaxon, rankOrder }).then(\n ({ taxa, descendantsFailed }) => {\n if (descendantsFailed) {\n setDescendantState({ status: \"error\", taxa: [] });\n return;\n }\n if (taxa.length === 0) {\n setDescendantState({ status: \"empty\", taxa: [] });\n return;\n }\n setDescendantState({ status: \"ready\", taxa });\n }\n );\n };\n\n const openControl = () => {\n setControlOpen(true);\n triggerDescendantFetch();\n };\n\n // Group descendants by rank for the control panel.\n const descendantsByRank = useMemo(() => {\n if (descendantState.status !== \"ready\") return [];\n const byRank = {};\n descendantState.taxa\n .filter((t) => t.mappable.length > 0)\n .forEach((t) => {\n (byRank[t.rank] = byRank[t.rank] || []).push(t);\n });\n return INFRASPECIFIC_RANKS.filter((r) => byRank[r]).map((r) => ({\n rank: r,\n label: rankLabelPlural(r),\n taxa: byRank[r].slice().sort((a, b) =>\n a.scientificName.localeCompare(b.scientificName)\n ),\n }));\n }, [descendantState]);\n\n const toggleTaxon = (id) => {\n setVisibleTaxonIds((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n };\n\n const toggleRankGroup = (rankTaxa) => {\n setVisibleTaxonIds((prev) => {\n const next = new Set(prev);\n const allOn = rankTaxa.every((t) => prev.has(t.id));\n rankTaxa.forEach((t) => {\n if (allOn) next.delete(t.id);\n else next.add(t.id);\n });\n return next;\n });\n };\n\n if (!supported()) {\n return (\n <div\n style={{\n padding: 12,\n background: \"#fafafa\",\n border: \"1px solid #eee\",\n borderRadius: 4,\n color: \"#666\",\n fontSize: 12,\n }}\n >\n Maps require WebGL, which your browser doesn't support.\n </div>\n );\n }\n\n // A GBIF-only taxon (no curated distribution polygons) with the GBIF overlay\n // turned off would render a blank map — collapse to a slim bar that\n // re-activates the map + overlay.\n if (isGbifOnly && !gbifVisible) {\n return (\n <div\n className=\"col-distributions-map col-distributions-map--collapsed\"\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n padding: \"8px 12px\",\n background: \"#fafafa\",\n border: \"1px solid #eee\",\n borderRadius: 4,\n color: \"#666\",\n fontSize: 12,\n }}\n >\n <span>No curated distribution data.</span>\n <a\n role=\"button\"\n tabIndex={0}\n style={{ cursor: \"pointer\" }}\n onClick={activateGbif}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n activateGbif();\n }\n }}\n >\n Show GBIF occurrences\n </a>\n </div>\n );\n }\n\n const focalName = focalTaxon?.name?.scientificName || \"This taxon\";\n\n return (\n <div\n className=\"col-distributions-map\"\n ref={wrapperRef}\n style={{ position: \"relative\" }}\n >\n <div\n ref={containerRef}\n className=\"col-distributions-map__canvas\"\n style={{ height: 360, width: \"100%\", background: \"#f5f5f5\" }}\n />\n\n <LayerControl\n open={controlOpen}\n onOpen={openControl}\n onClose={() => setControlOpen(false)}\n focalName={focalName}\n focalReady={focalReady}\n focalVisible={focalVisible}\n onToggleFocal={() => setFocalVisible((v) => !v)}\n gbifEnabled={!!gbifChecklistKey}\n gbifVisible={gbifVisible}\n gbifAvailable={gbifAvailable}\n onToggleGbif={handleToggleGbif}\n descendantStatus={descendantState.status}\n descendantsByRank={descendantsByRank}\n descendantColors={descendantColors}\n visibleTaxonIds={visibleTaxonIds}\n onToggleTaxon={toggleTaxon}\n onToggleRankGroup={toggleRankGroup}\n onRetry={() => {\n fetchTriggeredRef.current = false;\n setDescendantState({ status: \"idle\", taxa: [] });\n triggerDescendantFetch();\n }}\n />\n\n {!showDescendantLegend &&\n (presentMeans.length > 0 ||\n (gbifChecklistKey && gbifAvailable !== false && gbifVisible)) && (\n <div\n style={{\n position: \"absolute\",\n bottom: 8,\n left: 8,\n zIndex: 1,\n background: \"#fff\",\n borderRadius: 4,\n boxShadow: \"0 1px 4px rgba(0,0,0,0.2)\",\n padding: \"6px 8px\",\n fontSize: 12,\n lineHeight: 1.5,\n }}\n >\n {presentMeans.map((m) => (\n <div\n key={m.key}\n style={{ display: \"flex\", alignItems: \"center\", gap: 6 }}\n >\n <span\n style={{\n display: \"inline-block\",\n width: 12,\n height: 12,\n background: m.color,\n border: \"1px solid rgba(0,0,0,0.15)\",\n borderRadius: 2,\n }}\n />\n <span>{m.label}</span>\n </div>\n ))}\n {gbifChecklistKey && gbifAvailable !== false && gbifVisible && (\n <GbifLegendEntry />\n )}\n </div>\n )}\n {showDescendantLegend && (\n <IncludedTaxaLegend\n visibleGroups={descendantLegend.visibleGroups}\n unmappableGroups={descendantLegend.unmappableGroups}\n showGbif={!!gbifChecklistKey && gbifAvailable !== false && gbifVisible}\n />\n )}\n </div>\n );\n};\n\n// Layer toggle panel — collapsed \"+\" button at top-right that expands on click.\nconst LayerControl = ({\n open,\n onOpen,\n onClose,\n focalName,\n focalReady,\n focalVisible,\n onToggleFocal,\n gbifEnabled,\n gbifVisible,\n gbifAvailable,\n onToggleGbif,\n descendantStatus,\n descendantsByRank,\n descendantColors,\n visibleTaxonIds,\n onToggleTaxon,\n onToggleRankGroup,\n onRetry,\n}) => {\n if (!open) {\n return (\n <button\n type=\"button\"\n onClick={onOpen}\n onMouseEnter={onOpen}\n title=\"Layers\"\n style={{\n position: \"absolute\",\n // Sits just below the maplibre fullscreen control (top-right).\n top: 48,\n right: 10,\n zIndex: 2,\n width: 30,\n height: 30,\n background: \"#fff\",\n border: \"1px solid rgba(0,0,0,0.2)\",\n borderRadius: 4,\n cursor: \"pointer\",\n fontSize: 18,\n lineHeight: \"26px\",\n padding: 0,\n boxShadow: \"0 1px 4px rgba(0,0,0,0.2)\",\n }}\n >\n +\n </button>\n );\n }\n return (\n <div\n style={{\n position: \"absolute\",\n // Aligns with the collapsed \"+\" button, below the fullscreen control.\n top: 48,\n right: 10,\n zIndex: 2,\n background: \"#fff\",\n borderRadius: 4,\n boxShadow: \"0 1px 4px rgba(0,0,0,0.2)\",\n padding: \"6px 10px\",\n fontSize: 12,\n lineHeight: 1.5,\n maxHeight: 320,\n overflowY: \"auto\",\n minWidth: 160,\n }}\n onMouseLeave={onClose}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 6 }}>\n <input\n type=\"checkbox\"\n checked={focalVisible}\n disabled={!focalReady}\n onChange={onToggleFocal}\n />\n <span style={{ fontStyle: \"italic\" }}>{focalName}</span>\n </div>\n {gbifEnabled && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n opacity: gbifAvailable === false ? 0.5 : 1,\n }}\n title={\n gbifAvailable === false\n ? \"GBIF has no occurrence records for this taxon.\"\n : undefined\n }\n >\n <input\n type=\"checkbox\"\n checked={gbifAvailable === false ? false : gbifVisible}\n disabled={gbifAvailable === false}\n onChange={onToggleGbif}\n />\n <span>GBIF occurrences</span>\n </div>\n )}\n {descendantStatus === \"loading\" && (\n <div style={{ marginTop: 6, color: \"#888\" }}>Loading descendants…</div>\n )}\n {descendantStatus === \"error\" && (\n <div style={{ marginTop: 6, color: \"#888\" }}>\n Couldn't load descendants.{\" \"}\n <a onClick={onRetry} style={{ cursor: \"pointer\" }}>\n Retry\n </a>\n </div>\n )}\n {descendantStatus === \"ready\" &&\n descendantsByRank.map((group) => {\n const allOn = group.taxa.every((t) => visibleTaxonIds.has(t.id));\n const someOn = group.taxa.some((t) => visibleTaxonIds.has(t.id));\n return (\n <div key={group.rank} style={{ marginTop: 6 }}>\n <label\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n fontWeight: 600,\n }}\n >\n <input\n type=\"checkbox\"\n checked={allOn}\n ref={(el) => {\n if (el) el.indeterminate = !allOn && someOn;\n }}\n onChange={() => onToggleRankGroup(group.taxa)}\n />\n {group.label}\n </label>\n <div style={{ paddingLeft: 18 }}>\n {group.taxa.map((t) => (\n <label\n key={t.id}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n }}\n >\n <input\n type=\"checkbox\"\n checked={visibleTaxonIds.has(t.id)}\n onChange={() => onToggleTaxon(t.id)}\n />\n <span\n style={{\n display: \"inline-block\",\n width: 10,\n height: 10,\n background: descendantColors[t.id],\n border: \"1px solid rgba(0,0,0,0.15)\",\n borderRadius: 2,\n }}\n />\n <span style={{ fontStyle: \"italic\" }}>\n {epithet(t.scientificName)}\n </span>\n </label>\n ))}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default DistributionsMap;\n","import { useState, useEffect } from \"react\";\nimport { Radio } from \"antd\";\nimport { get, keyBy, startCase } from \"lodash-es\";\nimport ReferencePopover from \"./ReferencePopover\";\nimport config from \"../config\";\n// publicClient (no CoL auth) for the third-party GBIF occurrence API below.\nimport client, { publicClient } from \"../api/client\";\nimport MergedDataBadge from \"../components/MergedDataBadge\";\nimport PresentationItem from \"../components/PresentationItem\";\nimport DistributionsMap from \"./DistributionsMap\";\n\nconst isMappable = (r) =>\n r?.area?.gazetteer !== \"text\" && !!r?.area?.globalId;\n\nconst ListView = ({ datasetKey, data }) => {\n const [iso3Map, setIso3Map] = useState({});\n\n useEffect(() => {\n let isIso = false;\n for (let i = 0; i < data.length; i++) {\n if (data[i].gazetteer === \"iso\") {\n isIso = true;\n break;\n }\n }\n if (isIso) {\n client(`${config.dataApi}vocab/country`).then((res) => {\n setIso3Map(keyBy(res.data, \"alpha3\"));\n });\n }\n }, []);\n\n return (\n <div>\n {data.map((s, i) => (\n <span key={i}>\n {s?.merged && (\n <MergedDataBadge\n createdBy={s?.createdBy}\n datasetKey={s.datasetKey}\n sourceDatasetKey={s?.sourceDatasetKey}\n verbatimSourceKey={s?.verbatimSourceKey}\n style={{ marginRight: \"4px\" }}\n />\n )}\n {(get(iso3Map, `[${get(s, \"area.name\")}].name`)\n ? startCase(get(iso3Map, `[${get(s, \"area.name\")}].name`))\n : null) ||\n get(s, \"area.name\") ||\n get(s, \"area.globalId\")}{\" \"}\n {s.referenceId && (\n <ReferencePopover\n datasetKey={datasetKey}\n referenceId={s.referenceId}\n placement=\"bottom\"\n />\n )}\n {i < data.length - 1 && \", \"}\n </span>\n ))}\n </div>\n );\n};\n\nconst DistributionsTable = ({\n datasetKey,\n data,\n style,\n showDistributionMap,\n focalTaxon,\n rankOrder,\n gbifChecklistKey,\n label,\n md,\n}) => {\n const mappable = data.filter(isMappable);\n const baseUnmappable = data.length - mappable.length;\n const hasGbifConfigured = !!gbifChecklistKey;\n const hasAnyRecords = data.length > 0;\n const [view, setView] = useState(\"map\");\n const [fetchFailures, setFetchFailures] = useState(0);\n\n // null = unknown (loading or unconfigured), number = occurrence count.\n const [gbifCount, setGbifCount] = useState(null);\n useEffect(() => {\n if (!gbifChecklistKey || !focalTaxon?.id) {\n setGbifCount(null);\n return undefined;\n }\n setGbifCount(null);\n let cancelled = false;\n publicClient\n .get(`${config.gbifApi}/v1/occurrence/search`, {\n params: {\n checklistKey: gbifChecklistKey,\n taxonKey: focalTaxon.id,\n hasCoordinate: true,\n hasGeospatialIssue: false,\n occurrenceStatus: 'PRESENT',\n limit: 0,\n },\n })\n .then(\n (res) => {\n if (!cancelled) setGbifCount(res?.data?.count ?? 0);\n },\n () => {\n // On API failure, treat as \"unknown\" — leave the toggle enabled\n // rather than greying it out for an outage.\n if (!cancelled) setGbifCount(null);\n }\n );\n return () => {\n cancelled = true;\n };\n }, [gbifChecklistKey, focalTaxon?.id]);\n\n // true → GBIF has occurrences (or unknown — still loading or API failed)\n // false → GBIF returned count = 0\n const gbifAvailable = !hasGbifConfigured\n ? false\n : gbifCount === null || gbifCount > 0;\n\n const allMappableFailed =\n mappable.length > 0 && fetchFailures >= mappable.length;\n const showMap =\n showDistributionMap &&\n (mappable.length > 0 || gbifAvailable) &&\n !(mappable.length > 0 && allMappableFailed && !gbifAvailable);\n\n // Nothing to show — no map (no mappable records and no GBIF occurrences) and\n // no records to list. Hide the whole block, like other empty content blocks.\n if (!showMap && !hasAnyRecords) return null;\n\n const unmappable = baseUnmappable + fetchFailures;\n const showToggle = hasAnyRecords;\n\n let body;\n if (!showMap) {\n // No map to show — just the plain text list.\n body = <ListView datasetKey={datasetKey} data={data} />;\n } else {\n // Map available. The Map/List toggle is rendered above the view switch so\n // it stays visible in BOTH sub-views — the user can always go back to the\n // map after looking at the list.\n const activeView = showToggle ? view : \"map\";\n body = (\n <>\n {showToggle ? (\n <Radio.Group\n size=\"small\"\n value={activeView}\n onChange={(e) => setView(e.target.value)}\n style={{ marginBottom: 8 }}\n >\n <Radio.Button value=\"map\">Map</Radio.Button>\n <Radio.Button value=\"list\">List</Radio.Button>\n </Radio.Group>\n ) : (\n // Reserve the vertical space the Map/List toggle would occupy so the\n // map's top edge lines up with the \"Distributions\" label.\n <div style={{ height: 24, marginBottom: 8 }} />\n )}\n {activeView === \"map\" ? (\n <>\n <DistributionsMap\n records={mappable}\n onUnmappable={setFetchFailures}\n datasetKey={datasetKey}\n focalTaxon={focalTaxon}\n rankOrder={rankOrder}\n gbifChecklistKey={gbifChecklistKey}\n gbifAvailable={gbifAvailable}\n />\n {showToggle && unmappable > 0 && (\n <div style={{ marginTop: 6 }}>\n <a onClick={() => setView(\"list\")} style={{ cursor: \"pointer\" }}>\n +{unmappable} distribution{unmappable === 1 ? \"\" : \"s\"} not on\n map\n </a>\n </div>\n )}\n </>\n ) : (\n <ListView datasetKey={datasetKey} data={data} />\n )}\n </>\n );\n }\n\n // No negative top nudge: the map block's top element (the Map/List toggle, or\n // the spacer reserving its height) lines up with the \"Distributions\" label\n // the same way every other content row does. The plain text-only list aligns\n // naturally too.\n const content = <div style={style}>{body}</div>;\n\n // When a `label` is given (the Taxon page), own the labelled block so it\n // disappears entirely when empty (returning null above). Standalone embeds\n // pass no label and just get the bare block.\n return label ? (\n <PresentationItem md={md} label={label}>\n {content}\n </PresentationItem>\n ) : (\n content\n );\n};\n\nexport default DistributionsTable;\n"],"names":["BookOutlined","_extends","target","i","source","key","props","ref","React","AntdIcon","BookOutlinedSvg","RefIcon","ReferencePopover","__publicField","referenceId","datasetKey","references","refIds","isArray","reference","id","get","client","config","res","err","error","loading","Spin","jsx","ErrorMsg","r","e","el","referenceIndexMap","trigger","icon","Popover","visible","INFRASPECIFIC_RANKS","getDescendantRanks","focalRank","rankOrder","focalIdx","POOL_SIZE","isMappable","_a","_b","runPool","items","worker","size","results","next","runners","searchDescendants","focalId","ranks","params","s","url","_c","_e","_d","_f","fetchDistributions","taxonId","fetchDescendants","focalTaxon","descendantsFailed","list","distributions","t","all","VIVID_PALETTE","rankIndex","rank","assignColors","taxa","sorted","a","b","ra","rb","out","wrapStyle","scrollStyle","groupHeadingStyle","firstGroupHeadingStyle","rowStyle","swatchStyle","color","footerToggleStyle","footerWrapStyle","footerGroupHeadingStyle","footerFirstGroupHeadingStyle","footerNameStyle","totalCount","groups","sum","g","GbifHexEntry","jsxs","IncludedTaxaLegend","visibleGroups","unmappableGroups","showGbif","showUnmappable","setShowUnmappable","useState","visibleCount","unmappableCount","Fragment","v","POPUP_FIELDS","ESTABLISHMENT_MEANS","ESTABLISHMENT_COLORS","m","MISSING_COLOR","normalizeKey","resolveKey","record","raw","k","colorFor","POSITRON_STYLE","GBIF_VISIBLE_KEY","readStoredGbifVisible","defaultValue","readSetting","writeStoredGbifVisible","writeSetting","GBIF_TILE_PATH","FOCAL_SOURCE","FOCAL_FILL","FOCAL_LINE","GBIF_SOURCE","GBIF_LAYER","descendantSourceId","descendantFillId","descendantLineId","cache","fetchShape","gazetteer","p","escapeHtml","popupHtml","title","rows","f","descendantPopupHtml","taxon","RANK_LABEL_PLURAL","rankLabelPlural","epithet","scientificName","tokens","GbifLegendEntry","computeBounds","features","minLng","minLat","maxLng","maxLat","visit","coords","lng","lat","flattenFeatures","geojson","supported","maplibregl","DistributionsMap","records","onUnmappable","gbifChecklistKey","gbifAvailable","containerRef","useRef","wrapperRef","mapRef","popupRef","recordMapRef","descendantTaxonMapRef","descendantRecordMapRef","focalAttachedRef","gbifAttachedRef","descendantLayersRef","styleReady","setStyleReady","focalReady","setFocalReady","descendantState","setDescendantState","focalVisible","setFocalVisible","isGbifOnly","gbifVisible","setGbifVisible","visibleTaxonIds","setVisibleTaxonIds","controlOpen","setControlOpen","fetchTriggeredRef","handleToggleGbif","activateGbif","presentMeans","useMemo","seen","descendantColors","descendantLegend","decorate","groupByRank","byRank","showDescendantLegend","useEffect","map","attrib","resizeObserver","cancelled","recordMap","failures","recordKey","data","beforeId","onFocalClick","onMouseEnter","onMouseLeave","bounds","feature","searchUrl","colors","rec","srcId","fillId","lineId","onDescendantClick","triggerDescendantFetch","openControl","descendantsByRank","toggleTaxon","prev","toggleRankGroup","rankTaxa","allOn","focalName","LayerControl","open","onOpen","onClose","onToggleFocal","gbifEnabled","onToggleGbif","descendantStatus","onToggleTaxon","onToggleRankGroup","onRetry","group","someOn","ListView","iso3Map","setIso3Map","isIso","keyBy","MergedDataBadge","startCase","DistributionsTable","style","showDistributionMap","label","md","mappable","baseUnmappable","hasGbifConfigured","hasAnyRecords","view","setView","fetchFailures","setFetchFailures","gbifCount","setGbifCount","publicClient","allMappableFailed","showMap","unmappable","showToggle","body","activeView","Radio","content","PresentationItem"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAIA,KAAe,EAAE,MAAQ,EAAE,KAAO,OAAO,OAAS,EAAE,SAAW,iBAA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,IAAI,KAAK;AAAA,UAAI;AAAA,QAAA,EAAA,CAEzD,EAAA,CACF;AAAA,MAAA,EAAA,CAEJ,IAEA/P,gBAAAA,EAAAA,IAACsO,IAAA,EAAS,YAAApP,GAAwB,MAAAgN,EAAA,CAAY;AAAA,IAAA,GAElD;AAAA,EAEJ;AAMA,QAAMkE,KAAUpQ,gBAAAA,EAAAA,IAAC,OAAA,EAAI,OAAA8O,GAAe,UAAAmB,GAAK;AAKzC,SAAOjB,IACLhP,gBAAAA,MAACqQ,IAAA,EAAiB,IAAApB,GAAQ,OAAAD,GACvB,cACH,IAEAoB;AAEJ;","x_google_ignoreList":[0,1]}
|
package/es/col-browser.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@media(max-width:575px){.col-distributions-map{margin-left:-34px;margin-right:-34px}}.catalogue-of-life{color:#000000a6;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-variant:tabular-nums;line-height:1.5;background-color:#fff;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum"}.catalogue-of-life .ant-table-small>.ant-table-content>.ant-table-body{margin:0!important}.catalogue-of-life table tr.even,.catalogue-of-life table tr.alt,.catalogue-of-life table tr:nth-of-type(2n){background:inherit}.catalogue-of-life .colplus-taxon-page-list tbody tr:last-child>td{border-bottom:none!important}.catalogue-of-life .catalogue-of-life-404{min-height:calc(100vh - 80px)}.catalogue-of-life .colplus-taxon-page-list th,.catalogue-of-life .colplus-taxon-page-list td{padding:5px 3px!important;font-size:12px;border-bottom:none!important;background-color:inherit}.catalogue-of-life .colplus-taxon-page-list table{border:none}.catalogue-of-life .ant-tree-node-content-wrapper{margin-left:6px}.catalogue-of-life .ant-input-search>input{height:24px!important}.catalogue-of-life .ant-tree-treenode.filter-node,.catalogue-of-life .ant-tree-treenode.filter-node span.tree-node-rank{color:red}.catalogue-of-life .tree-node-rank{color:#00000073}.catalogue-of-life .ant-rate-star-full .ant-rate-star-second,.catalogue-of-life .ant-rate-star-half .ant-rate-star-first{color:inherit}.catalogue-of-life button.ant-pagination-item-link{padding:0}.catalogue-of-life .ant-tree,.catalogue-of-life .ant-table,.catalogue-of-life .ant-tree-list,.catalogue-of-life .ant-tree-treenode,.catalogue-of-life .tree-node-rank,.catalogue-of-life .catalogue-of-life a,.catalogue-of-life .catalogue-of-life .ant-input-affix-wrapper,.catalogue-of-life .catalogue-of-life .ant-input,.catalogue-of-life .rc-virtual-list,.catalogue-of-life .ant-select-item-option-content{background-color:inherit;background:inherit}.catalogue-of-life :target{display:block;margin-top:-80px;height:80px;width:1px}.catalogue-of-life .col-reference-link-container :target{display:block;margin-top:0!important;height:100%!important;width:100%!important}.catalogue-of-life .col-reference-link{vertical-align:super;font-size:9px;font-weight:400}.catalogue-of-life a.col-tree-data-source{color:orange;font-size:11px}.catalogue-of-life .col-dataset-citation{margin-top:8px;margin-bottom:8px}.catalogue-of-life .col-dataset-citation-source{font-size:9px}.taxon-autocomplete .ant-select-clear{opacity:1}td.ant-table-cell{color:#000}
|
|
1
|
+
@media(max-width:575px){.col-distributions-map{margin-left:-34px;margin-right:-34px}}.col-distributions-map:fullscreen{width:100%;height:100%;background:#fff}.col-distributions-map:fullscreen .col-distributions-map__canvas{height:100%!important}.col-distributions-map:-webkit-full-screen{width:100%;height:100%;background:#fff}.col-distributions-map:-webkit-full-screen .col-distributions-map__canvas{height:100%!important}.catalogue-of-life{color:#000000a6;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-variant:tabular-nums;line-height:1.5;background-color:#fff;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum"}.catalogue-of-life .ant-table-small>.ant-table-content>.ant-table-body{margin:0!important}.catalogue-of-life table tr.even,.catalogue-of-life table tr.alt,.catalogue-of-life table tr:nth-of-type(2n){background:inherit}.catalogue-of-life .colplus-taxon-page-list tbody tr:last-child>td{border-bottom:none!important}.catalogue-of-life .catalogue-of-life-404{min-height:calc(100vh - 80px)}.catalogue-of-life .colplus-taxon-page-list th,.catalogue-of-life .colplus-taxon-page-list td{padding:5px 3px!important;font-size:12px;border-bottom:none!important;background-color:inherit}.catalogue-of-life .colplus-taxon-page-list table{border:none}.catalogue-of-life .ant-tree-node-content-wrapper{margin-left:6px}.catalogue-of-life .ant-input-search>input{height:24px!important}.catalogue-of-life .ant-tree-treenode.filter-node,.catalogue-of-life .ant-tree-treenode.filter-node span.tree-node-rank{color:red}.catalogue-of-life .tree-node-rank{color:#00000073}.catalogue-of-life .ant-rate-star-full .ant-rate-star-second,.catalogue-of-life .ant-rate-star-half .ant-rate-star-first{color:inherit}.catalogue-of-life button.ant-pagination-item-link{padding:0}.catalogue-of-life .ant-tree,.catalogue-of-life .ant-table,.catalogue-of-life .ant-tree-list,.catalogue-of-life .ant-tree-treenode,.catalogue-of-life .tree-node-rank,.catalogue-of-life .catalogue-of-life a,.catalogue-of-life .catalogue-of-life .ant-input-affix-wrapper,.catalogue-of-life .catalogue-of-life .ant-input,.catalogue-of-life .rc-virtual-list,.catalogue-of-life .ant-select-item-option-content{background-color:inherit;background:inherit}.catalogue-of-life :target{display:block;margin-top:-80px;height:80px;width:1px}.catalogue-of-life .col-reference-link-container :target{display:block;margin-top:0!important;height:100%!important;width:100%!important}.catalogue-of-life .col-reference-link{vertical-align:super;font-size:9px;font-weight:400}.catalogue-of-life a.col-tree-data-source{color:orange;font-size:11px}.catalogue-of-life .col-dataset-citation{margin-top:8px;margin-bottom:8px}.catalogue-of-life .col-dataset-citation-source{font-size:9px}.taxon-autocomplete .ant-select-clear{opacity:1}td.ant-table-cell{color:#000}
|
package/es/taxon.js
CHANGED
|
@@ -14,7 +14,7 @@ import { Row as d3, Col as V, Popover as O3, Tag as m3, Space as n2, Tooltip as
|
|
|
14
14
|
import { isArray as d2, get as s, capitalize as v3, values as c2, startCase as _3 } from "lodash-es";
|
|
15
15
|
import y2 from "react-jss";
|
|
16
16
|
import { w as g2, P as L, g as N3 } from "./chunks/PresentationItem-C4yZ555-.js";
|
|
17
|
-
import { R as R3, D as f2 } from "./chunks/Distributions-
|
|
17
|
+
import { R as R3, D as f2 } from "./chunks/Distributions-BWucAjsL.js";
|
|
18
18
|
import { M as X } from "./chunks/MergedDataBadge-DsTsn5Xu.js";
|
|
19
19
|
import x3 from "linkify-html";
|
|
20
20
|
import { R as E3 } from "./chunks/LinkOutlined-2IkQWTV7.js";
|
package/es/taxonDistribution.js
CHANGED
|
@@ -3,7 +3,7 @@ import { j as i } from "./chunks/jsx-runtime-BzflLqGi.js";
|
|
|
3
3
|
import { useState as s, useEffect as $ } from "react";
|
|
4
4
|
import { s as D, c as l, R as T, b as g } from "./chunks/router-CssZk5qZ.js";
|
|
5
5
|
import { Row as k, Col as v, Spin as w } from "antd";
|
|
6
|
-
import { D as A } from "./chunks/Distributions-
|
|
6
|
+
import { D as A } from "./chunks/Distributions-BWucAjsL.js";
|
|
7
7
|
const C = ({
|
|
8
8
|
taxonId: o,
|
|
9
9
|
datasetKey: n,
|
package/package.json
CHANGED
package/umd/col-browser.js
CHANGED
|
@@ -78246,6 +78246,7 @@ html body {
|
|
|
78246
78246
|
}) => {
|
|
78247
78247
|
var _a2;
|
|
78248
78248
|
const containerRef = reactExports.useRef(null);
|
|
78249
|
+
const wrapperRef = reactExports.useRef(null);
|
|
78249
78250
|
const mapRef = reactExports.useRef(null);
|
|
78250
78251
|
const popupRef = reactExports.useRef(null);
|
|
78251
78252
|
const recordMapRef = reactExports.useRef(/* @__PURE__ */ new Map());
|
|
@@ -78347,6 +78348,10 @@ html body {
|
|
|
78347
78348
|
new maplibregl.NavigationControl({ showCompass: false }),
|
|
78348
78349
|
"top-left"
|
|
78349
78350
|
);
|
|
78351
|
+
map.addControl(
|
|
78352
|
+
new maplibregl.FullscreenControl({ container: wrapperRef.current }),
|
|
78353
|
+
"top-right"
|
|
78354
|
+
);
|
|
78350
78355
|
mapRef.current = map;
|
|
78351
78356
|
map.on("load", () => {
|
|
78352
78357
|
setStyleReady(true);
|
|
@@ -78735,93 +78740,102 @@ html body {
|
|
|
78735
78740
|
);
|
|
78736
78741
|
}
|
|
78737
78742
|
const focalName = ((_a2 = focalTaxon == null ? void 0 : focalTaxon.name) == null ? void 0 : _a2.scientificName) || "This taxon";
|
|
78738
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
78739
|
-
|
|
78740
|
-
|
|
78741
|
-
|
|
78742
|
-
|
|
78743
|
-
|
|
78744
|
-
|
|
78745
|
-
|
|
78746
|
-
|
|
78747
|
-
|
|
78748
|
-
|
|
78749
|
-
|
|
78750
|
-
|
|
78751
|
-
|
|
78752
|
-
|
|
78753
|
-
|
|
78754
|
-
|
|
78755
|
-
|
|
78756
|
-
|
|
78757
|
-
|
|
78758
|
-
|
|
78759
|
-
|
|
78760
|
-
|
|
78761
|
-
|
|
78762
|
-
|
|
78763
|
-
|
|
78764
|
-
|
|
78765
|
-
|
|
78766
|
-
|
|
78767
|
-
|
|
78768
|
-
|
|
78769
|
-
|
|
78770
|
-
|
|
78771
|
-
|
|
78772
|
-
|
|
78773
|
-
|
|
78774
|
-
|
|
78775
|
-
|
|
78776
|
-
|
|
78777
|
-
|
|
78778
|
-
|
|
78779
|
-
|
|
78780
|
-
|
|
78781
|
-
|
|
78782
|
-
|
|
78783
|
-
|
|
78784
|
-
|
|
78785
|
-
|
|
78786
|
-
|
|
78787
|
-
|
|
78788
|
-
|
|
78789
|
-
|
|
78790
|
-
|
|
78791
|
-
|
|
78792
|
-
|
|
78793
|
-
|
|
78794
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78795
|
-
"span",
|
|
78796
|
-
{
|
|
78797
|
-
style: {
|
|
78798
|
-
display: "inline-block",
|
|
78799
|
-
width: 12,
|
|
78800
|
-
height: 12,
|
|
78801
|
-
background: m2.color,
|
|
78802
|
-
border: "1px solid rgba(0,0,0,0.15)",
|
|
78803
|
-
borderRadius: 2
|
|
78804
|
-
}
|
|
78805
|
-
}
|
|
78806
|
-
),
|
|
78807
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: m2.label })
|
|
78808
|
-
]
|
|
78743
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
78744
|
+
"div",
|
|
78745
|
+
{
|
|
78746
|
+
className: "col-distributions-map",
|
|
78747
|
+
ref: wrapperRef,
|
|
78748
|
+
style: { position: "relative" },
|
|
78749
|
+
children: [
|
|
78750
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78751
|
+
"div",
|
|
78752
|
+
{
|
|
78753
|
+
ref: containerRef,
|
|
78754
|
+
className: "col-distributions-map__canvas",
|
|
78755
|
+
style: { height: 360, width: "100%", background: "#f5f5f5" }
|
|
78756
|
+
}
|
|
78757
|
+
),
|
|
78758
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78759
|
+
LayerControl,
|
|
78760
|
+
{
|
|
78761
|
+
open: controlOpen,
|
|
78762
|
+
onOpen: openControl,
|
|
78763
|
+
onClose: () => setControlOpen(false),
|
|
78764
|
+
focalName,
|
|
78765
|
+
focalReady,
|
|
78766
|
+
focalVisible,
|
|
78767
|
+
onToggleFocal: () => setFocalVisible((v2) => !v2),
|
|
78768
|
+
gbifEnabled: !!gbifChecklistKey,
|
|
78769
|
+
gbifVisible,
|
|
78770
|
+
gbifAvailable,
|
|
78771
|
+
onToggleGbif: handleToggleGbif,
|
|
78772
|
+
descendantStatus: descendantState.status,
|
|
78773
|
+
descendantsByRank,
|
|
78774
|
+
descendantColors,
|
|
78775
|
+
visibleTaxonIds,
|
|
78776
|
+
onToggleTaxon: toggleTaxon,
|
|
78777
|
+
onToggleRankGroup: toggleRankGroup,
|
|
78778
|
+
onRetry: () => {
|
|
78779
|
+
fetchTriggeredRef.current = false;
|
|
78780
|
+
setDescendantState({ status: "idle", taxa: [] });
|
|
78781
|
+
triggerDescendantFetch();
|
|
78782
|
+
}
|
|
78783
|
+
}
|
|
78784
|
+
),
|
|
78785
|
+
!showDescendantLegend && (presentMeans.length > 0 || gbifChecklistKey && gbifAvailable !== false && gbifVisible) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
78786
|
+
"div",
|
|
78787
|
+
{
|
|
78788
|
+
style: {
|
|
78789
|
+
position: "absolute",
|
|
78790
|
+
bottom: 8,
|
|
78791
|
+
left: 8,
|
|
78792
|
+
zIndex: 1,
|
|
78793
|
+
background: "#fff",
|
|
78794
|
+
borderRadius: 4,
|
|
78795
|
+
boxShadow: "0 1px 4px rgba(0,0,0,0.2)",
|
|
78796
|
+
padding: "6px 8px",
|
|
78797
|
+
fontSize: 12,
|
|
78798
|
+
lineHeight: 1.5
|
|
78809
78799
|
},
|
|
78810
|
-
|
|
78811
|
-
|
|
78812
|
-
|
|
78813
|
-
|
|
78814
|
-
|
|
78815
|
-
|
|
78816
|
-
|
|
78817
|
-
|
|
78818
|
-
|
|
78819
|
-
|
|
78820
|
-
|
|
78821
|
-
|
|
78822
|
-
|
|
78823
|
-
|
|
78824
|
-
|
|
78800
|
+
children: [
|
|
78801
|
+
presentMeans.map((m2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
78802
|
+
"div",
|
|
78803
|
+
{
|
|
78804
|
+
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
78805
|
+
children: [
|
|
78806
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78807
|
+
"span",
|
|
78808
|
+
{
|
|
78809
|
+
style: {
|
|
78810
|
+
display: "inline-block",
|
|
78811
|
+
width: 12,
|
|
78812
|
+
height: 12,
|
|
78813
|
+
background: m2.color,
|
|
78814
|
+
border: "1px solid rgba(0,0,0,0.15)",
|
|
78815
|
+
borderRadius: 2
|
|
78816
|
+
}
|
|
78817
|
+
}
|
|
78818
|
+
),
|
|
78819
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: m2.label })
|
|
78820
|
+
]
|
|
78821
|
+
},
|
|
78822
|
+
m2.key
|
|
78823
|
+
)),
|
|
78824
|
+
gbifChecklistKey && gbifAvailable !== false && gbifVisible && /* @__PURE__ */ jsxRuntimeExports.jsx(GbifLegendEntry, {})
|
|
78825
|
+
]
|
|
78826
|
+
}
|
|
78827
|
+
),
|
|
78828
|
+
showDescendantLegend && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78829
|
+
IncludedTaxaLegend,
|
|
78830
|
+
{
|
|
78831
|
+
visibleGroups: descendantLegend.visibleGroups,
|
|
78832
|
+
unmappableGroups: descendantLegend.unmappableGroups,
|
|
78833
|
+
showGbif: !!gbifChecklistKey && gbifAvailable !== false && gbifVisible
|
|
78834
|
+
}
|
|
78835
|
+
)
|
|
78836
|
+
]
|
|
78837
|
+
}
|
|
78838
|
+
);
|
|
78825
78839
|
};
|
|
78826
78840
|
const LayerControl = ({
|
|
78827
78841
|
open: open2,
|
|
@@ -78853,7 +78867,8 @@ html body {
|
|
|
78853
78867
|
title: "Layers",
|
|
78854
78868
|
style: {
|
|
78855
78869
|
position: "absolute",
|
|
78856
|
-
top
|
|
78870
|
+
// Sits just below the maplibre fullscreen control (top-right).
|
|
78871
|
+
top: 48,
|
|
78857
78872
|
right: 10,
|
|
78858
78873
|
zIndex: 2,
|
|
78859
78874
|
width: 30,
|
|
@@ -78876,7 +78891,8 @@ html body {
|
|
|
78876
78891
|
{
|
|
78877
78892
|
style: {
|
|
78878
78893
|
position: "absolute",
|
|
78879
|
-
|
|
78894
|
+
// Aligns with the collapsed "+" button, below the fullscreen control.
|
|
78895
|
+
top: 48,
|
|
78880
78896
|
right: 10,
|
|
78881
78897
|
zIndex: 2,
|
|
78882
78898
|
background: "#fff",
|
|
@@ -79146,8 +79162,7 @@ html body {
|
|
|
79146
79162
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ListView, { datasetKey, data })
|
|
79147
79163
|
] });
|
|
79148
79164
|
}
|
|
79149
|
-
const
|
|
79150
|
-
const content = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...mapNudge, ...style2 }, children: body });
|
|
79165
|
+
const content = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: style2, children: body });
|
|
79151
79166
|
return label ? /* @__PURE__ */ jsxRuntimeExports.jsx(PresentationItem$1, { md: md2, label, children: content }) : content;
|
|
79152
79167
|
};
|
|
79153
79168
|
const rankStyle = {
|