col-browser 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +29 -1
  2. package/basemap/style.json +1 -1
  3. package/es/bibtex.js +1 -1
  4. package/es/chunks/{BibTex-Bmiqb90o.js → BibTex-2E8oB2c5.js} +2 -2
  5. package/es/chunks/{BibTex-Bmiqb90o.js.map → BibTex-2E8oB2c5.js.map} +1 -1
  6. package/es/chunks/{DatasetCitation-BtDwIIDX.js → DatasetCitation-CqEmtLlj.js} +3 -3
  7. package/es/chunks/{DatasetCitation-BtDwIIDX.js.map → DatasetCitation-CqEmtLlj.js.map} +1 -1
  8. package/es/chunks/{DatasetlogoWithFallback-CMPmcG2C.js → DatasetlogoWithFallback-DLNEhUlR.js} +2 -2
  9. package/es/chunks/{DatasetlogoWithFallback-CMPmcG2C.js.map → DatasetlogoWithFallback-DLNEhUlR.js.map} +1 -1
  10. package/es/chunks/Distributions-mIlSFgUC.js +230 -0
  11. package/es/chunks/Distributions-mIlSFgUC.js.map +1 -0
  12. package/es/chunks/{ErrorMsg-B-kvpMgH.js → ErrorMsg-Co668fRd.js} +8 -7
  13. package/es/chunks/{ErrorMsg-B-kvpMgH.js.map → ErrorMsg-Co668fRd.js.map} +1 -1
  14. package/es/chunks/{MetricsPresentation-DKCJQOtf.js → MetricsPresentation-D0lWPxCu.js} +2 -2
  15. package/es/chunks/{MetricsPresentation-DKCJQOtf.js.map → MetricsPresentation-D0lWPxCu.js.map} +1 -1
  16. package/es/chunks/{TaxonBreakdown-CILXbINQ.js → TaxonBreakdown-C2tMPpaB.js} +16 -15
  17. package/es/chunks/{TaxonBreakdown-CILXbINQ.js.map → TaxonBreakdown-C2tMPpaB.js.map} +1 -1
  18. package/es/chunks/{XrGutter-CPe8vyRy.js → XrGutter-CQdnOGIa.js} +2 -2
  19. package/es/chunks/{XrGutter-CPe8vyRy.js.map → XrGutter-CQdnOGIa.js.map} +1 -1
  20. package/es/chunks/client-CTn6s1A6.js +57 -0
  21. package/es/chunks/client-CTn6s1A6.js.map +1 -0
  22. package/es/chunks/{config-DFtvmQdF.js → config-9UwXwMRq.js} +2 -2
  23. package/es/chunks/{config-DFtvmQdF.js.map → config-9UwXwMRq.js.map} +1 -1
  24. package/es/chunks/{dataset-BKggpI8E.js → dataset-Dz2EA1A4.js} +3 -3
  25. package/es/chunks/{dataset-BKggpI8E.js.map → dataset-Dz2EA1A4.js.map} +1 -1
  26. package/es/chunks/{enumeration-aHxx2gjA.js → enumeration-DV0R7nXc.js} +3 -3
  27. package/es/chunks/{enumeration-aHxx2gjA.js.map → enumeration-DV0R7nXc.js.map} +1 -1
  28. package/es/chunks/index-CJZY-Eu5.js +1107 -0
  29. package/es/chunks/index-CJZY-Eu5.js.map +1 -0
  30. package/es/chunks/router-2hWSOoof.js +56 -0
  31. package/es/chunks/router-2hWSOoof.js.map +1 -0
  32. package/es/chunks/{sector-DdCBeUzI.js → sector-CRBn67UW.js} +3 -3
  33. package/es/chunks/{sector-DdCBeUzI.js.map → sector-CRBn67UW.js.map} +1 -1
  34. package/es/col-browser.css +1 -1
  35. package/es/config.js +1 -1
  36. package/es/index.js +1 -1
  37. package/es/map.js +30 -0
  38. package/es/map.js.map +1 -0
  39. package/es/search.js +99 -98
  40. package/es/search.js.map +1 -1
  41. package/es/sourceDataset.js +24 -23
  42. package/es/sourceDataset.js.map +1 -1
  43. package/es/sourceDatasetList.js +29 -28
  44. package/es/sourceDatasetList.js.map +1 -1
  45. package/es/taxon.js +52 -51
  46. package/es/taxon.js.map +1 -1
  47. package/es/taxonBreakdown.js +9 -8
  48. package/es/taxonBreakdown.js.map +1 -1
  49. package/es/taxonDistribution.js +18 -17
  50. package/es/taxonDistribution.js.map +1 -1
  51. package/es/tree.js +9 -8
  52. package/es/tree.js.map +1 -1
  53. package/package.json +5 -1
  54. package/types/map.d.ts +99 -0
  55. package/umd/col-browser.js +974 -233
  56. package/umd/col-browser.js.map +1 -1
  57. package/umd/col-browser.min.js +5 -5
  58. package/umd/col-browser.min.js.map +1 -1
  59. package/umd/main.css +2 -23
  60. package/es/chunks/Distributions-D_yRCeZ3.js +0 -1232
  61. package/es/chunks/Distributions-D_yRCeZ3.js.map +0 -1
  62. package/es/chunks/router-CssZk5qZ.js +0 -109
  63. package/es/chunks/router-CssZk5qZ.js.map +0 -1
package/es/search.js CHANGED
@@ -1,78 +1,79 @@
1
1
  var ut = Object.defineProperty;
2
- var ct = (r, i, a) => i in r ? ut(r, i, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[i] = a;
3
- var c = (r, i, a) => ct(r, typeof i != "symbol" ? i + "" : i, a);
2
+ var ct = (r, l, a) => l in r ? ut(r, l, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[l] = a;
3
+ var c = (r, l, a) => ct(r, typeof l != "symbol" ? l + "" : l, a);
4
4
  import { a as ht } from "./chunks/withDatasetKey-BgMY05XE.js";
5
5
  import { w as dt } from "./chunks/withTheme-Dh6PRuII.js";
6
6
  import { j as s } from "./chunks/jsx-runtime-BzflLqGi.js";
7
7
  import * as C from "react";
8
- import f from "react";
9
- import { L as S, c as j, s as pt, R as mt, b as gt } from "./chunks/router-CssZk5qZ.js";
10
- import { a as ft } from "./chunks/dataset-BKggpI8E.js";
11
- import { c as xt } from "./chunks/enumeration-aHxx2gjA.js";
8
+ import g from "react";
9
+ import { c as j, s as pt } from "./chunks/client-CTn6s1A6.js";
10
+ import { L as S, R as mt, b as ft } from "./chunks/router-2hWSOoof.js";
11
+ import { a as gt } from "./chunks/dataset-Dz2EA1A4.js";
12
+ import { c as xt } from "./chunks/enumeration-DV0R7nXc.js";
12
13
  import { r as St, w as vt } from "./chunks/storage-BgdCo9fV.js";
13
- import { Input as G, Form as R, Select as k, Row as x, Col as g, AutoComplete as K, Radio as yt, Alert as jt, Button as I, Table as bt } from "antd";
14
- import { c as b } from "./chunks/config-DFtvmQdF.js";
14
+ import { Input as G, Form as R, Select as k, Row as x, Col as f, AutoComplete as K, Radio as yt, Alert as jt, Button as I, Table as bt } from "antd";
15
+ import { c as b } from "./chunks/config-9UwXwMRq.js";
15
16
  import Ct from "query-string";
16
17
  import { isArray as O, startCase as m, snakeCase as M, get as u, initial as z, debounce as At, isEqual as Dt, isEmpty as Tt, merge as $t, forEach as Et } from "lodash-es";
17
- import { E as Ot } from "./chunks/ErrorMsg-B-kvpMgH.js";
18
- import { C as F, N as wt } from "./chunks/DatasetCitation-BtDwIIDX.js";
18
+ import { E as Ot } from "./chunks/ErrorMsg-Co668fRd.js";
19
+ import { C as F, N as wt } from "./chunks/DatasetCitation-CqEmtLlj.js";
19
20
  import Nt from "react-highlight-words";
20
- import { X as Rt } from "./chunks/XrGutter-CPe8vyRy.js";
21
+ import { X as Rt } from "./chunks/XrGutter-CQdnOGIa.js";
21
22
  import { I as P } from "./chunks/AntdIcon-B1nMlqyh.js";
22
23
  var kt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" };
23
24
  function w() {
24
25
  return w = Object.assign ? Object.assign.bind() : function(r) {
25
- for (var i = 1; i < arguments.length; i++) {
26
- var a = arguments[i];
26
+ for (var l = 1; l < arguments.length; l++) {
27
+ var a = arguments[l];
27
28
  for (var e in a)
28
29
  Object.prototype.hasOwnProperty.call(a, e) && (r[e] = a[e]);
29
30
  }
30
31
  return r;
31
32
  }, w.apply(this, arguments);
32
33
  }
33
- const _t = (r, i) => /* @__PURE__ */ C.createElement(P, w({}, r, {
34
- ref: i,
34
+ const _t = (r, l) => /* @__PURE__ */ C.createElement(P, w({}, r, {
35
+ ref: l,
35
36
  icon: kt
36
37
  })), U = /* @__PURE__ */ C.forwardRef(_t);
37
38
  process.env.NODE_ENV !== "production" && (U.displayName = "DownOutlined");
38
39
  var Bt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
39
40
  function N() {
40
41
  return N = Object.assign ? Object.assign.bind() : function(r) {
41
- for (var i = 1; i < arguments.length; i++) {
42
- var a = arguments[i];
42
+ for (var l = 1; l < arguments.length; l++) {
43
+ var a = arguments[l];
43
44
  for (var e in a)
44
45
  Object.prototype.hasOwnProperty.call(a, e) && (r[e] = a[e]);
45
46
  }
46
47
  return r;
47
48
  }, N.apply(this, arguments);
48
49
  }
49
- const It = (r, i) => /* @__PURE__ */ C.createElement(P, N({}, r, {
50
- ref: i,
50
+ const It = (r, l) => /* @__PURE__ */ C.createElement(P, N({}, r, {
51
+ ref: l,
51
52
  icon: Bt
52
53
  })), Y = /* @__PURE__ */ C.forwardRef(It);
53
54
  process.env.NODE_ENV !== "production" && (Y.displayName = "UpOutlined");
54
- const T = ["family", "superfamily", "order", "subclass", "class", "superclass", "subphylum", "phylum"], H = ({ classification: r, maxParents: i = r.length, truncate: a }) => {
55
- const e = r.slice(Math.max(r.length - i));
55
+ const T = ["family", "superfamily", "order", "subclass", "class", "superclass", "subphylum", "phylum"], H = ({ classification: r, maxParents: l = r.length, truncate: a }) => {
56
+ const e = r.slice(Math.max(r.length - l));
56
57
  if (a) {
57
58
  const n = r.reduce((h, d) => (h[d.rank] = d, h), {}), o = n.kingdom;
58
- let l;
59
+ let i;
59
60
  for (let h = 0; h < T.length; h++)
60
61
  if (n[T[h]]) {
61
- l = n[T[h]];
62
+ i = n[T[h]];
62
63
  break;
63
64
  }
64
- return o && l ? /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
65
+ return o && i ? /* @__PURE__ */ s.jsxs(g.Fragment, { children: [
65
66
  /* @__PURE__ */ s.jsx(S, { to: "taxon", args: o.id, children: o.name }),
66
- l.rank === "phylum" ? " > " : " > ... > ",
67
- /* @__PURE__ */ s.jsx(S, { to: "taxon", args: l.id, children: l.name })
67
+ i.rank === "phylum" ? " > " : " > ... > ",
68
+ /* @__PURE__ */ s.jsx(S, { to: "taxon", args: i.id, children: i.name })
68
69
  ] }) : o ? /* @__PURE__ */ s.jsx(S, { to: "taxon", args: o.id, children: o.name }) : null;
69
70
  } else
70
- return e.map((n, o) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
71
+ return e.map((n, o) => /* @__PURE__ */ s.jsxs(g.Fragment, { children: [
71
72
  /* @__PURE__ */ s.jsx(S, { to: "taxon", args: n.id, children: n.name }),
72
73
  !Object.is(e.length - 1, o) && " > "
73
74
  ] }, o));
74
75
  }, Mt = G.Search;
75
- class Ft extends f.Component {
76
+ class Ft extends g.Component {
76
77
  constructor(a) {
77
78
  super(a);
78
79
  c(this, "componentDidMount", () => {
@@ -116,7 +117,7 @@ const Lt = R.Item, L = k.Option, Vt = {
116
117
  md: { span: 16 }
117
118
  }
118
119
  };
119
- class p extends f.Component {
120
+ class p extends g.Component {
120
121
  constructor(a) {
121
122
  super(a);
122
123
  c(this, "handleChange", (a) => {
@@ -125,9 +126,9 @@ class p extends f.Component {
125
126
  });
126
127
  });
127
128
  c(this, "render", () => {
128
- const { defaultValue: a, label: e, vocab: n } = this.props, { randomID: o } = this.state, l = /* @__PURE__ */ new Set([...n.map((d) => d.value)]);
129
+ const { defaultValue: a, label: e, vocab: n } = this.props, { randomID: o } = this.state, i = /* @__PURE__ */ new Set([...n.map((d) => d.value)]);
129
130
  let h;
130
- return a && O(a) ? h = a.filter((d) => l.has(d)) : a && (h = [a].filter((d) => l.has(d))), /* @__PURE__ */ s.jsx(
131
+ return a && O(a) ? h = a.filter((d) => i.has(d)) : a && (h = [a].filter((d) => i.has(d))), /* @__PURE__ */ s.jsx(
131
132
  Lt,
132
133
  {
133
134
  ...Vt,
@@ -154,10 +155,10 @@ class p extends f.Component {
154
155
  };
155
156
  }
156
157
  }
157
- const Gt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueMap: n }) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
158
- u(i, "id") && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
158
+ const Gt = ({ issues: r, usage: l, classification: a, vernacularNames: e, issueMap: n }) => /* @__PURE__ */ s.jsxs(g.Fragment, { children: [
159
+ u(l, "id") && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
159
160
  /* @__PURE__ */ s.jsx(
160
- g,
161
+ f,
161
162
  {
162
163
  span: 3,
163
164
  style: {
@@ -168,11 +169,11 @@ const Gt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueM
168
169
  children: "ID:"
169
170
  }
170
171
  ),
171
- /* @__PURE__ */ s.jsx(g, { span: 18, children: u(i, "id") })
172
+ /* @__PURE__ */ s.jsx(f, { span: 18, children: u(l, "id") })
172
173
  ] }),
173
174
  a && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
174
175
  /* @__PURE__ */ s.jsx(
175
- g,
176
+ f,
176
177
  {
177
178
  span: 3,
178
179
  style: {
@@ -183,7 +184,7 @@ const Gt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueM
183
184
  children: "Classification:"
184
185
  }
185
186
  ),
186
- /* @__PURE__ */ s.jsx(g, { span: 18, children: /* @__PURE__ */ s.jsx(
187
+ /* @__PURE__ */ s.jsx(f, { span: 18, children: /* @__PURE__ */ s.jsx(
187
188
  H,
188
189
  {
189
190
  classification: z(a)
@@ -192,7 +193,7 @@ const Gt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueM
192
193
  ] }),
193
194
  e && /* @__PURE__ */ s.jsxs(x, { children: [
194
195
  /* @__PURE__ */ s.jsx(
195
- g,
196
+ f,
196
197
  {
197
198
  span: 3,
198
199
  style: {
@@ -203,11 +204,11 @@ const Gt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueM
203
204
  children: "Vernacular:"
204
205
  }
205
206
  ),
206
- /* @__PURE__ */ s.jsx(g, { span: 18, style: { paddingBottom: "12px" }, children: e.slice(0, 8).map((o) => o.name).join(", ") })
207
+ /* @__PURE__ */ s.jsx(f, { span: 18, style: { paddingBottom: "12px" }, children: e.slice(0, 8).map((o) => o.name).join(", ") })
207
208
  ] })
208
209
  ] });
209
210
  K.Option;
210
- class Kt extends f.Component {
211
+ class Kt extends g.Component {
211
212
  constructor(a) {
212
213
  super(a);
213
214
  c(this, "componentDidMount", () => {
@@ -238,10 +239,10 @@ class Kt extends f.Component {
238
239
  this.setState({ value: "", names: [] }, this.props.onResetSearch);
239
240
  });
240
241
  c(this, "render", () => {
241
- const { value: a, randomID: e } = this.state, { style: n } = this.props, o = this.state.datasets ? this.state.datasets.map((l) => {
242
- const h = `${l.alias || l.title} [${l.key}]`;
242
+ const { value: a, randomID: e } = this.state, { style: n } = this.props, o = this.state.datasets ? this.state.datasets.map((i) => {
243
+ const h = `${i.alias || i.title} [${i.key}]`;
243
244
  return {
244
- key: l.key,
245
+ key: i.key,
245
246
  value: h,
246
247
  label: /* @__PURE__ */ s.jsx(
247
248
  Nt,
@@ -252,18 +253,18 @@ class Kt extends f.Component {
252
253
  textToHighlight: h
253
254
  }
254
255
  ),
255
- data: l
256
+ data: i
256
257
  };
257
258
  }) : [];
258
259
  return /* @__PURE__ */ s.jsx("div", { id: `dataset_autocomplete_${e}`, children: /* @__PURE__ */ s.jsx(
259
260
  K,
260
261
  {
261
262
  onSelect: this.onSelectDataset,
262
- onSearch: (l) => l ? this.getDatasets(l) : this.onReset(),
263
+ onSearch: (i) => i ? this.getDatasets(i) : this.onReset(),
263
264
  options: o,
264
265
  placeholder: this.props.placeHolder || "Find dataset",
265
266
  style: n || { width: "100%" },
266
- onChange: (l) => this.setState({ value: l }),
267
+ onChange: (i) => this.setState({ value: i }),
267
268
  value: a,
268
269
  getPopupContainer: () => document.getElementById(`dataset_autocomplete_${e}`),
269
270
  children: /* @__PURE__ */ s.jsx(G.Search, { allowClear: !0 })
@@ -304,15 +305,15 @@ const V = "search-content-type", $ = R.Item, zt = yt.Group, q = [
304
305
  title: "Scientific Name",
305
306
  dataIndex: ["usage", "labelHtml"],
306
307
  key: "scientificName",
307
- render: (r, i) => {
308
+ render: (r, l) => {
308
309
  var e, n, o;
309
- const a = u(i, "usage.accepted.id") || u(i, "usage.id");
310
+ const a = u(l, "usage.accepted.id") || u(l, "usage.id");
310
311
  return /* @__PURE__ */ s.jsx(
311
312
  Rt,
312
313
  {
313
- merged: (e = i == null ? void 0 : i.usage) == null ? void 0 : e.merged,
314
- datasetKey: (n = i == null ? void 0 : i.usage) == null ? void 0 : n.datasetKey,
315
- verbatimSourceKey: (o = i == null ? void 0 : i.usage) == null ? void 0 : o.verbatimSourceKey,
314
+ merged: (e = l == null ? void 0 : l.usage) == null ? void 0 : e.merged,
315
+ datasetKey: (n = l == null ? void 0 : l.usage) == null ? void 0 : n.datasetKey,
316
+ verbatimSourceKey: (o = l == null ? void 0 : l.usage) == null ? void 0 : o.verbatimSourceKey,
316
317
  children: /* @__PURE__ */ s.jsx(S, { to: "taxon", args: a, children: /* @__PURE__ */ s.jsx("span", { dangerouslySetInnerHTML: { __html: r } }) })
317
318
  }
318
319
  );
@@ -325,7 +326,7 @@ const V = "search-content-type", $ = R.Item, zt = yt.Group, q = [
325
326
  dataIndex: ["usage", "status"],
326
327
  key: "status",
327
328
  width: 200,
328
- render: (r, i) => ["synonym", "ambiguous synonym", "misapplied"].includes(r) ? /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
329
+ render: (r, l) => ["synonym", "ambiguous synonym", "misapplied"].includes(r) ? /* @__PURE__ */ s.jsxs(g.Fragment, { children: [
329
330
  r,
330
331
  " ",
331
332
  r === "misapplied" ? "to " : "of ",
@@ -333,11 +334,11 @@ const V = "search-content-type", $ = R.Item, zt = yt.Group, q = [
333
334
  "span",
334
335
  {
335
336
  dangerouslySetInnerHTML: {
336
- __html: u(i, "usage.accepted.labelHtml")
337
+ __html: u(l, "usage.accepted.labelHtml")
337
338
  }
338
339
  }
339
340
  )
340
- ] }, u(i, "usage.id")) : r
341
+ ] }, u(l, "usage.id")) : r
341
342
  },
342
343
  {
343
344
  title: "Rank",
@@ -351,25 +352,25 @@ const V = "search-content-type", $ = R.Item, zt = yt.Group, q = [
351
352
  dataIndex: ["usage", "classification"],
352
353
  key: "parents",
353
354
  width: 180,
354
- render: (r, i) => u(i, "classification") ? /* @__PURE__ */ s.jsx(
355
+ render: (r, l) => u(l, "classification") ? /* @__PURE__ */ s.jsx(
355
356
  H,
356
357
  {
357
- classification: z(i.classification),
358
+ classification: z(l.classification),
358
359
  truncate: !0,
359
- datasetKey: u(i, "usage.name.datasetKey")
360
+ datasetKey: u(l, "usage.name.datasetKey")
360
361
  },
361
- u(i, "usage.id")
362
+ u(l, "usage.id")
362
363
  ) : ""
363
364
  }
364
365
  ];
365
- class Ut extends f.Component {
366
+ class Ut extends g.Component {
366
367
  constructor(a) {
367
368
  super(a);
368
369
  c(this, "componentDidMount", async () => {
369
370
  this.parseParamsAndGetData();
370
371
  const { datasetKey: a } = this.props;
371
372
  try {
372
- const { data: e } = await ft(a);
373
+ const { data: e } = await gt(a);
373
374
  this.setState({
374
375
  dataset: e,
375
376
  datasetOrigin: ((e == null ? void 0 : e.origin) || "").toLowerCase()
@@ -419,16 +420,16 @@ class Ut extends f.Component {
419
420
  const { params: a } = this.state;
420
421
  this.setState({ loading: !0 });
421
422
  const { datasetKey: e } = this.props, n = `${b.dataApi}dataset/${e}/nameusage/search`, o = u(a, "status") ? a : { ...a, status: "_NOT_NULL" };
422
- j(`${n}?${Ct.stringify(o)}`).then((l) => {
423
+ j(`${n}?${Ct.stringify(o)}`).then((i) => {
423
424
  const h = { ...this.state.pagination };
424
- h.total = l.data.total, this.setState({
425
+ h.total = i.data.total, this.setState({
425
426
  loading: !1,
426
- data: l.data,
427
+ data: i.data,
427
428
  err: null,
428
429
  pagination: h
429
430
  });
430
- }).catch((l) => {
431
- this.setState({ loading: !1, error: l, data: [] });
431
+ }).catch((i) => {
432
+ this.setState({ loading: !1, error: i, data: [] });
432
433
  });
433
434
  });
434
435
  c(this, "handleTableChange", (a, e, n) => {
@@ -442,11 +443,11 @@ class Ut extends f.Component {
442
443
  c(this, "updateSearch", (a) => {
443
444
  "sectorMode" in a && vt(V, a.sectorMode);
444
445
  let e = { ...this.state.params, offset: 0, limit: 50 };
445
- Et(a, (o, l) => {
446
- e[l] = o;
446
+ Et(a, (o, i) => {
447
+ e[i] = o;
447
448
  });
448
449
  const n = Object.keys(e).reduce(
449
- (o, l) => (e[l] !== null && (o[l] = e[l]), o),
450
+ (o, i) => (e[i] !== null && (o[i] = e[i]), o),
450
451
  {}
451
452
  );
452
453
  this.setState(
@@ -487,12 +488,12 @@ class Ut extends f.Component {
487
488
  data: { result: a, facets: e },
488
489
  loading: n,
489
490
  error: o,
490
- params: l,
491
+ params: i,
491
492
  pagination: h,
492
493
  advancedFilters: d,
493
494
  dataset: v,
494
495
  taxGroups: Ht
495
- } = this.state, { datasetKey: A, defaultTaxonKey: X, citation: _ } = this.props, D = String(l.type || "").toUpperCase() === "FUZZY", Z = u(e, "rank") ? e.rank.map((t) => ({
496
+ } = this.state, { datasetKey: A, defaultTaxonKey: X, citation: _ } = this.props, D = String(i.type || "").toUpperCase() === "FUZZY", Z = u(e, "rank") ? e.rank.map((t) => ({
496
497
  value: t.value,
497
498
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
498
499
  })) : null;
@@ -518,10 +519,10 @@ class Ut extends f.Component {
518
519
  })) : [], st = (t) => t === "1" || t === !0 || t === "true" ? "Extinct" : t === "0" || t === !1 || t === "false" ? "Extant" : "Unknown", nt = u(e, "extinct") ? e.extinct.map((t) => ({
519
520
  value: t.value,
520
521
  label: `${st(t == null ? void 0 : t.value)} (${t.count.toLocaleString("en-GB")})`
521
- })) : [], lt = u(e, "environment") ? e.environment.map((t) => ({
522
+ })) : [], it = u(e, "environment") ? e.environment.map((t) => ({
522
523
  value: t.value,
523
524
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
524
- })) : [], it = u(e, "group") ? e.group.map((t) => ({
525
+ })) : [], lt = u(e, "group") ? e.group.map((t) => ({
525
526
  value: t.value,
526
527
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
527
528
  })) : [], ot = u(e, "authorshipYear") ? e.authorshipYear.map((t) => ({
@@ -548,7 +549,7 @@ class Ut extends f.Component {
548
549
  }
549
550
  ) }),
550
551
  /* @__PURE__ */ s.jsxs(x, { children: [
551
- /* @__PURE__ */ s.jsxs(g, { xs: 24, sm: 24, md: 12, style: { marginBottom: "8px" }, children: [
552
+ /* @__PURE__ */ s.jsxs(f, { xs: 24, sm: 24, md: 12, style: { marginBottom: "8px" }, children: [
552
553
  /* @__PURE__ */ s.jsx(
553
554
  Ft,
554
555
  {
@@ -563,7 +564,7 @@ class Ut extends f.Component {
563
564
  {
564
565
  datasetKey: A,
565
566
  minRank: "GENUS",
566
- defaultTaxonKey: u(l, "TAXON_ID") || X || null,
567
+ defaultTaxonKey: u(i, "TAXON_ID") || X || null,
567
568
  onSelectName: (t) => {
568
569
  this.updateSearch({ TAXON_ID: t.key });
569
570
  },
@@ -582,7 +583,7 @@ class Ut extends f.Component {
582
583
  onSelectDataset: (t) => {
583
584
  this.updateSearch({ SECTOR_DATASET_KEY: t.key });
584
585
  },
585
- defaultDatasetKey: u(l, "SECTOR_DATASET_KEY") || null,
586
+ defaultDatasetKey: u(i, "SECTOR_DATASET_KEY") || null,
586
587
  onResetSearch: (t) => {
587
588
  this.updateSearch({ SECTOR_DATASET_KEY: null });
588
589
  },
@@ -599,7 +600,7 @@ class Ut extends f.Component {
599
600
  onChange: (t) => {
600
601
  this.updateSearch({ sectorMode: t.target.value.split(",").filter((rt) => rt !== "") });
601
602
  },
602
- value: O(l == null ? void 0 : l.sectorMode) ? (B = l == null ? void 0 : l.sectorMode) == null ? void 0 : B.join(",") : (l == null ? void 0 : l.sectorMode) || "",
603
+ value: O(i == null ? void 0 : i.sectorMode) ? (B = i == null ? void 0 : i.sectorMode) == null ? void 0 : B.join(",") : (i == null ? void 0 : i.sectorMode) || "",
603
604
  optionType: "button",
604
605
  options: [
605
606
  { value: "", label: "All" },
@@ -616,7 +617,7 @@ class Ut extends f.Component {
616
617
  size: "small",
617
618
  style: { minWidth: 200 },
618
619
  placeholder: "Search fields",
619
- value: O(l == null ? void 0 : l.content) ? l.content : l != null && l.content ? [l.content] : [],
620
+ value: O(i == null ? void 0 : i.content) ? i.content : i != null && i.content ? [i.content] : [],
620
621
  onChange: (t) => this.updateSearch({ content: t.length ? t : null }),
621
622
  options: [
622
623
  { value: "SCIENTIFIC_NAME", label: "Scientific name" },
@@ -638,11 +639,11 @@ class Ut extends f.Component {
638
639
  ) })
639
640
  ] }) })
640
641
  ] }),
641
- /* @__PURE__ */ s.jsxs(g, { xs: 24, sm: 24, md: 12, children: [
642
+ /* @__PURE__ */ s.jsxs(f, { xs: 24, sm: 24, md: 12, children: [
642
643
  /* @__PURE__ */ s.jsx(
643
644
  p,
644
645
  {
645
- defaultValue: u(l, "rank"),
646
+ defaultValue: u(i, "rank"),
646
647
  onChange: (t) => this.updateSearch({ rank: t }),
647
648
  vocab: Z || [],
648
649
  label: "Ranks"
@@ -651,7 +652,7 @@ class Ut extends f.Component {
651
652
  /* @__PURE__ */ s.jsx(
652
653
  p,
653
654
  {
654
- defaultValue: u(l, "status"),
655
+ defaultValue: u(i, "status"),
655
656
  onChange: (t) => this.updateSearch({ status: t }),
656
657
  vocab: J || [],
657
658
  label: "Status"
@@ -660,9 +661,9 @@ class Ut extends f.Component {
660
661
  /* @__PURE__ */ s.jsx(
661
662
  p,
662
663
  {
663
- defaultValue: u(l, "environment"),
664
+ defaultValue: u(i, "environment"),
664
665
  onChange: (t) => this.updateSearch({ environment: t }),
665
- vocab: lt,
666
+ vocab: it,
666
667
  label: "Environment"
667
668
  }
668
669
  ),
@@ -674,11 +675,11 @@ class Ut extends f.Component {
674
675
  label: "Extinct"
675
676
  }
676
677
  ),
677
- d && /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
678
+ d && /* @__PURE__ */ s.jsxs(g.Fragment, { children: [
678
679
  /* @__PURE__ */ s.jsx(
679
680
  p,
680
681
  {
681
- defaultValue: u(l, "nomstatus"),
682
+ defaultValue: u(i, "nomstatus"),
682
683
  onChange: (t) => this.updateSearch({ nomstatus: t }),
683
684
  vocab: Q || [],
684
685
  label: "Nomenclatural status"
@@ -687,7 +688,7 @@ class Ut extends f.Component {
687
688
  /* @__PURE__ */ s.jsx(
688
689
  p,
689
690
  {
690
- defaultValue: u(l, "nameType"),
691
+ defaultValue: u(i, "nameType"),
691
692
  onChange: (t) => this.updateSearch({ nameType: t }),
692
693
  vocab: tt || [],
693
694
  label: "Name type"
@@ -696,7 +697,7 @@ class Ut extends f.Component {
696
697
  /* @__PURE__ */ s.jsx(
697
698
  p,
698
699
  {
699
- defaultValue: u(l, "field"),
700
+ defaultValue: u(i, "field"),
700
701
  onChange: (t) => this.updateSearch({ field: t }),
701
702
  vocab: et || [],
702
703
  label: "Name field"
@@ -705,7 +706,7 @@ class Ut extends f.Component {
705
706
  /* @__PURE__ */ s.jsx(
706
707
  p,
707
708
  {
708
- defaultValue: u(l, "authorship"),
709
+ defaultValue: u(i, "authorship"),
709
710
  onChange: (t) => this.updateSearch({ authorship: t }),
710
711
  vocab: at,
711
712
  label: "Authorship"
@@ -714,16 +715,16 @@ class Ut extends f.Component {
714
715
  /* @__PURE__ */ s.jsx(
715
716
  p,
716
717
  {
717
- defaultValue: u(l, "group"),
718
+ defaultValue: u(i, "group"),
718
719
  onChange: (t) => this.updateSearch({ group: t }),
719
- vocab: it,
720
+ vocab: lt,
720
721
  label: "Taxonomic group"
721
722
  }
722
723
  ),
723
724
  /* @__PURE__ */ s.jsx(
724
725
  p,
725
726
  {
726
- defaultValue: u(l, "authorshipYear"),
727
+ defaultValue: u(i, "authorshipYear"),
727
728
  onChange: (t) => this.updateSearch({ authorshipYear: t }),
728
729
  vocab: ot,
729
730
  label: "Authorship year"
@@ -745,8 +746,8 @@ class Ut extends f.Component {
745
746
  ] })
746
747
  ] }),
747
748
  /* @__PURE__ */ s.jsxs(x, { children: [
748
- /* @__PURE__ */ s.jsx(g, { span: 12, style: { textAlign: "left", marginBottom: "8px" }, children: /* @__PURE__ */ s.jsx(I, { type: "primary", danger: !0, onClick: this.resetSearch, children: "Reset all" }) }),
749
- /* @__PURE__ */ s.jsx(g, { span: 12, style: { textAlign: "right", marginBottom: "8px" }, children: h && !isNaN(h.total) && `results: ${h.total.toLocaleString("en-GB")}` })
749
+ /* @__PURE__ */ s.jsx(f, { span: 12, style: { textAlign: "left", marginBottom: "8px" }, children: /* @__PURE__ */ s.jsx(I, { type: "primary", danger: !0, onClick: this.resetSearch, children: "Reset all" }) }),
750
+ /* @__PURE__ */ s.jsx(f, { span: 12, style: { textAlign: "right", marginBottom: "8px" }, children: h && !isNaN(h.total) && `results: ${h.total.toLocaleString("en-GB")}` })
750
751
  ] }),
751
752
  !o && /* @__PURE__ */ s.jsx(
752
753
  bt,
@@ -777,26 +778,26 @@ class Ut extends f.Component {
777
778
  }
778
779
  function Yt({
779
780
  datasetKey: r,
780
- filters: i,
781
+ filters: l,
781
782
  onFiltersChange: a,
782
783
  defaultTaxonKey: e,
783
784
  citation: n,
784
785
  auth: o,
785
- ...l
786
+ ...i
786
787
  }) {
787
- return pt(o), /* @__PURE__ */ s.jsx(mt.Provider, { value: gt(l), children: /* @__PURE__ */ s.jsx(
788
+ return pt(o), /* @__PURE__ */ s.jsx(mt.Provider, { value: ft(i), children: /* @__PURE__ */ s.jsx(
788
789
  Ut,
789
790
  {
790
791
  datasetKey: r,
791
- filters: i,
792
+ filters: l,
792
793
  onFiltersChange: a,
793
794
  defaultTaxonKey: e,
794
795
  citation: n
795
796
  }
796
797
  ) });
797
798
  }
798
- const de = dt(ht(Yt));
799
+ const pe = dt(ht(Yt));
799
800
  export {
800
- de as Search
801
+ pe as Search
801
802
  };
802
803
  //# sourceMappingURL=search.js.map