col-browser 2.2.2 → 2.2.3
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-Cwl_75VG.js → Distributions-CLwWAH98.js} +424 -417
- package/es/chunks/{Distributions-Cwl_75VG.js.map → Distributions-CLwWAH98.js.map} +1 -1
- package/es/taxon.js +1 -2
- package/es/taxon.js.map +1 -1
- package/es/taxonDistribution.js +1 -1
- package/package.json +2 -2
- package/umd/col-browser.js +48 -44
- package/umd/col-browser.js.map +1 -1
- package/umd/col-browser.min.js +3 -3
- package/umd/col-browser.min.js.map +1 -1
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-CLwWAH98.js";
|
|
7
7
|
const C = ({
|
|
8
8
|
taxonId: o,
|
|
9
9
|
datasetKey: n,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "col-browser",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Catalogue of Life browse and search React components",
|
|
5
5
|
"main": "umd/col-browser.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"terser": "^5.48.0",
|
|
105
105
|
"typescript": "^6.0.0",
|
|
106
106
|
"vite": "^6.4.2",
|
|
107
|
-
"vitest": "^
|
|
107
|
+
"vitest": "^4.1.8"
|
|
108
108
|
},
|
|
109
109
|
"author": "",
|
|
110
110
|
"homepage": "",
|
package/umd/col-browser.js
CHANGED
|
@@ -79100,49 +79100,54 @@ html body {
|
|
|
79100
79100
|
if (!showMap && !hasAnyRecords) return null;
|
|
79101
79101
|
const unmappable = baseUnmappable + fetchFailures;
|
|
79102
79102
|
const showToggle = hasAnyRecords;
|
|
79103
|
-
|
|
79104
|
-
|
|
79105
|
-
|
|
79106
|
-
|
|
79107
|
-
|
|
79108
|
-
|
|
79109
|
-
|
|
79110
|
-
|
|
79111
|
-
|
|
79112
|
-
|
|
79113
|
-
|
|
79114
|
-
|
|
79115
|
-
|
|
79116
|
-
|
|
79117
|
-
|
|
79118
|
-
|
|
79119
|
-
|
|
79120
|
-
|
|
79121
|
-
|
|
79122
|
-
|
|
79123
|
-
|
|
79124
|
-
|
|
79125
|
-
|
|
79126
|
-
|
|
79127
|
-
|
|
79128
|
-
|
|
79129
|
-
|
|
79130
|
-
|
|
79131
|
-
|
|
79132
|
-
|
|
79133
|
-
|
|
79134
|
-
|
|
79135
|
-
|
|
79136
|
-
|
|
79137
|
-
|
|
79138
|
-
|
|
79139
|
-
|
|
79140
|
-
|
|
79141
|
-
|
|
79142
|
-
|
|
79143
|
-
|
|
79144
|
-
|
|
79145
|
-
|
|
79103
|
+
let body;
|
|
79104
|
+
if (!showMap) {
|
|
79105
|
+
body = /* @__PURE__ */ jsxRuntimeExports.jsx(ListView, { datasetKey, data });
|
|
79106
|
+
} else {
|
|
79107
|
+
const activeView = showToggle ? view : "map";
|
|
79108
|
+
body = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
79109
|
+
showToggle ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
79110
|
+
Radio.Group,
|
|
79111
|
+
{
|
|
79112
|
+
size: "small",
|
|
79113
|
+
value: activeView,
|
|
79114
|
+
onChange: (e2) => setView(e2.target.value),
|
|
79115
|
+
style: { marginBottom: 8 },
|
|
79116
|
+
children: [
|
|
79117
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Button, { value: "map", children: "Map" }),
|
|
79118
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Button, { value: "list", children: "List" })
|
|
79119
|
+
]
|
|
79120
|
+
}
|
|
79121
|
+
) : (
|
|
79122
|
+
// Reserve the vertical space the Map/List toggle would occupy so the
|
|
79123
|
+
// map's top edge lines up with the "Distributions" label.
|
|
79124
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: 24, marginBottom: 8 } })
|
|
79125
|
+
),
|
|
79126
|
+
activeView === "map" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
79127
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79128
|
+
DistributionsMap,
|
|
79129
|
+
{
|
|
79130
|
+
records: mappable,
|
|
79131
|
+
onUnmappable: setFetchFailures,
|
|
79132
|
+
datasetKey,
|
|
79133
|
+
focalTaxon,
|
|
79134
|
+
rankOrder,
|
|
79135
|
+
gbifChecklistKey,
|
|
79136
|
+
gbifAvailable
|
|
79137
|
+
}
|
|
79138
|
+
),
|
|
79139
|
+
showToggle && unmappable > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 6 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("a", { onClick: () => setView("list"), style: { cursor: "pointer" }, children: [
|
|
79140
|
+
"+",
|
|
79141
|
+
unmappable,
|
|
79142
|
+
" distribution",
|
|
79143
|
+
unmappable === 1 ? "" : "s",
|
|
79144
|
+
" not on map"
|
|
79145
|
+
] }) })
|
|
79146
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ListView, { datasetKey, data })
|
|
79147
|
+
] });
|
|
79148
|
+
}
|
|
79149
|
+
const mapNudge = label && showMap ? { marginTop: -3 } : null;
|
|
79150
|
+
const content = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...mapNudge, ...style2 }, children: body });
|
|
79146
79151
|
return label ? /* @__PURE__ */ jsxRuntimeExports.jsx(PresentationItem$1, { md: md2, label, children: content }) : content;
|
|
79147
79152
|
};
|
|
79148
79153
|
const rankStyle = {
|
|
@@ -87579,7 +87584,6 @@ html body {
|
|
|
87579
87584
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
87580
87585
|
DistributionsTable,
|
|
87581
87586
|
{
|
|
87582
|
-
style: { marginTop: "-3px" },
|
|
87583
87587
|
label: "Distributions",
|
|
87584
87588
|
md,
|
|
87585
87589
|
data: (info == null ? void 0 : info.distributions) || [],
|