col-browser 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/search.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var ut = Object.defineProperty;
2
- var ct = (r, i, e) => i in r ? ut(r, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[i] = e;
3
- var c = (r, i, e) => ct(r, typeof i != "symbol" ? i + "" : i, e);
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);
4
4
  import { a as ht } from "./chunks/withDatasetKey-BgMY05XE.js";
5
5
  import { c as j, w as dt } from "./chunks/config-BPRXv9x8.js";
6
6
  import { j as s } from "./chunks/jsx-runtime-BzflLqGi.js";
@@ -9,50 +9,50 @@ import f from "react";
9
9
  import { L as S, c as b, s as pt, R as mt, b as gt } from "./chunks/router-CssZk5qZ.js";
10
10
  import { a as ft } from "./chunks/dataset-DvQG4NjA.js";
11
11
  import { a as xt } from "./chunks/enumeration-yDQXSZsf.js";
12
- import { r as St, w as yt } from "./chunks/storage-BgdCo9fV.js";
13
- import { Input as G, Form as N, Select as R, Row as x, Col as g, AutoComplete as K, Radio as vt, Alert as jt, Button as I, Table as bt } from "antd";
12
+ 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
14
  import Ct from "query-string";
15
- import { isArray as w, 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";
16
- import { E as wt } from "./chunks/ErrorMsg-K8k5PPTp.js";
17
- import { C as F, N as Ot } from "./chunks/DatasetCitation-bkPmDDYB.js";
18
- import kt from "react-highlight-words";
19
- import { M as Nt } from "./chunks/MergedDataBadge-DsTsn5Xu.js";
15
+ 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";
16
+ import { E as Ot } from "./chunks/ErrorMsg-K8k5PPTp.js";
17
+ import { C as F, N as wt } from "./chunks/DatasetCitation-bkPmDDYB.js";
18
+ import Nt from "react-highlight-words";
19
+ import { X as Rt } from "./chunks/XrGutter-CG0gAVhH.js";
20
20
  import { I as P } from "./chunks/AntdIcon-B1nMlqyh.js";
21
- var Rt = { 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" };
22
- function O() {
23
- return O = Object.assign ? Object.assign.bind() : function(r) {
21
+ 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" };
22
+ function w() {
23
+ return w = Object.assign ? Object.assign.bind() : function(r) {
24
24
  for (var i = 1; i < arguments.length; i++) {
25
- var e = arguments[i];
26
- for (var a in e)
27
- Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]);
25
+ var a = arguments[i];
26
+ for (var e in a)
27
+ Object.prototype.hasOwnProperty.call(a, e) && (r[e] = a[e]);
28
28
  }
29
29
  return r;
30
- }, O.apply(this, arguments);
30
+ }, w.apply(this, arguments);
31
31
  }
32
- const Bt = (r, i) => /* @__PURE__ */ C.createElement(P, O({}, r, {
32
+ const _t = (r, i) => /* @__PURE__ */ C.createElement(P, w({}, r, {
33
33
  ref: i,
34
- icon: Rt
35
- })), U = /* @__PURE__ */ C.forwardRef(Bt);
34
+ icon: kt
35
+ })), U = /* @__PURE__ */ C.forwardRef(_t);
36
36
  process.env.NODE_ENV !== "production" && (U.displayName = "DownOutlined");
37
- var _t = { 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" };
38
- function k() {
39
- return k = Object.assign ? Object.assign.bind() : function(r) {
37
+ 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" };
38
+ function N() {
39
+ return N = Object.assign ? Object.assign.bind() : function(r) {
40
40
  for (var i = 1; i < arguments.length; i++) {
41
- var e = arguments[i];
42
- for (var a in e)
43
- Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]);
41
+ var a = arguments[i];
42
+ for (var e in a)
43
+ Object.prototype.hasOwnProperty.call(a, e) && (r[e] = a[e]);
44
44
  }
45
45
  return r;
46
- }, k.apply(this, arguments);
46
+ }, N.apply(this, arguments);
47
47
  }
48
- const It = (r, i) => /* @__PURE__ */ C.createElement(P, k({}, r, {
48
+ const It = (r, i) => /* @__PURE__ */ C.createElement(P, N({}, r, {
49
49
  ref: i,
50
- icon: _t
50
+ icon: Bt
51
51
  })), Y = /* @__PURE__ */ C.forwardRef(It);
52
52
  process.env.NODE_ENV !== "production" && (Y.displayName = "UpOutlined");
53
- const T = ["family", "superfamily", "order", "subclass", "class", "superclass", "subphylum", "phylum"], H = ({ classification: r, maxParents: i = r.length, truncate: e }) => {
54
- const a = r.slice(Math.max(r.length - i));
55
- if (e) {
53
+ const T = ["family", "superfamily", "order", "subclass", "class", "superclass", "subphylum", "phylum"], H = ({ classification: r, maxParents: i = r.length, truncate: a }) => {
54
+ const e = r.slice(Math.max(r.length - i));
55
+ if (a) {
56
56
  const n = r.reduce((h, d) => (h[d.rank] = d, h), {}), o = n.kingdom;
57
57
  let l;
58
58
  for (let h = 0; h < T.length; h++)
@@ -66,19 +66,19 @@ const T = ["family", "superfamily", "order", "subclass", "class", "superclass",
66
66
  /* @__PURE__ */ s.jsx(S, { to: "taxon", args: l.id, children: l.name })
67
67
  ] }) : o ? /* @__PURE__ */ s.jsx(S, { to: "taxon", args: o.id, children: o.name }) : null;
68
68
  } else
69
- return a.map((n, o) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
69
+ return e.map((n, o) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
70
70
  /* @__PURE__ */ s.jsx(S, { to: "taxon", args: n.id, children: n.name }),
71
- !Object.is(a.length - 1, o) && " > "
71
+ !Object.is(e.length - 1, o) && " > "
72
72
  ] }, o));
73
73
  }, Mt = G.Search;
74
74
  class Ft extends f.Component {
75
- constructor(e) {
76
- super(e);
75
+ constructor(a) {
76
+ super(a);
77
77
  c(this, "componentDidMount", () => {
78
78
  this.props.defaultValue && this.setState({ search: this.props.defaultValue });
79
79
  });
80
- c(this, "componentDidUpdate", (e) => {
81
- e.defaultValue !== this.props.defaultValue && this.setState({ search: this.props.defaultValue });
80
+ c(this, "componentDidUpdate", (a) => {
81
+ a.defaultValue !== this.props.defaultValue && this.setState({ search: this.props.defaultValue });
82
82
  });
83
83
  c(this, "resetSearch", () => {
84
84
  this.setState({ search: "" }, () => {
@@ -91,8 +91,8 @@ class Ft extends f.Component {
91
91
  style: this.props.style || null,
92
92
  placeholder: "Search query",
93
93
  value: this.state.search,
94
- onSearch: (e) => this.props.onSearch(this.state.search),
95
- onChange: (e) => this.setState({ search: e.target.value }),
94
+ onSearch: (a) => this.props.onSearch(this.state.search),
95
+ onChange: (a) => this.setState({ search: a.target.value }),
96
96
  addonAfter: this.props.addonAfter,
97
97
  allowClear: !0,
98
98
  autoFocus: !0
@@ -103,7 +103,7 @@ class Ft extends f.Component {
103
103
  };
104
104
  }
105
105
  }
106
- const Lt = N.Item, L = R.Option, Vt = {
106
+ const Lt = R.Item, L = k.Option, Vt = {
107
107
  labelCol: {
108
108
  xs: { span: 24 },
109
109
  sm: { span: 24 },
@@ -116,31 +116,31 @@ const Lt = N.Item, L = R.Option, Vt = {
116
116
  }
117
117
  };
118
118
  class p extends f.Component {
119
- constructor(e) {
120
- super(e);
121
- c(this, "handleChange", (e) => {
122
- this.setState({ selected: e }, () => {
123
- this.props.onChange(e);
119
+ constructor(a) {
120
+ super(a);
121
+ c(this, "handleChange", (a) => {
122
+ this.setState({ selected: a }, () => {
123
+ this.props.onChange(a);
124
124
  });
125
125
  });
126
126
  c(this, "render", () => {
127
- const { defaultValue: e, label: a, vocab: n } = this.props, { randomID: o } = this.state, l = /* @__PURE__ */ new Set([...n.map((d) => d.value)]);
127
+ const { defaultValue: a, label: e, vocab: n } = this.props, { randomID: o } = this.state, l = /* @__PURE__ */ new Set([...n.map((d) => d.value)]);
128
128
  let h;
129
- return e && w(e) ? h = e.filter((d) => l.has(d)) : e && (h = [e].filter((d) => l.has(d))), /* @__PURE__ */ s.jsx(
129
+ return a && O(a) ? h = a.filter((d) => l.has(d)) : a && (h = [a].filter((d) => l.has(d))), /* @__PURE__ */ s.jsx(
130
130
  Lt,
131
131
  {
132
132
  ...Vt,
133
- label: a,
133
+ label: e,
134
134
  style: { marginBottom: "8px", width: "100%" },
135
- children: /* @__PURE__ */ s.jsx("div", { id: `${M(a)}_${o}`, children: /* @__PURE__ */ s.jsx(
136
- R,
135
+ children: /* @__PURE__ */ s.jsx("div", { id: `${M(e)}_${o}`, children: /* @__PURE__ */ s.jsx(
136
+ k,
137
137
  {
138
138
  showSearch: !0,
139
139
  mode: "multiple",
140
140
  placeholder: "Please select",
141
141
  value: h,
142
142
  onChange: this.handleChange,
143
- getPopupContainer: () => document.getElementById(`${M(a)}_${o}`),
143
+ getPopupContainer: () => document.getElementById(`${M(e)}_${o}`),
144
144
  children: n.map((d) => typeof d == "string" ? /* @__PURE__ */ s.jsx(L, { value: d, children: m(d) }, d) : /* @__PURE__ */ s.jsx(L, { value: d.value, children: d.label }, d.value))
145
145
  }
146
146
  ) })
@@ -153,7 +153,7 @@ class p extends f.Component {
153
153
  };
154
154
  }
155
155
  }
156
- const Gt = ({ issues: r, usage: i, classification: e, vernacularNames: a, issueMap: n }) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
156
+ const Gt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueMap: n }) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
157
157
  u(i, "id") && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
158
158
  /* @__PURE__ */ s.jsx(
159
159
  g,
@@ -169,7 +169,7 @@ const Gt = ({ issues: r, usage: i, classification: e, vernacularNames: a, issueM
169
169
  ),
170
170
  /* @__PURE__ */ s.jsx(g, { span: 18, children: u(i, "id") })
171
171
  ] }),
172
- e && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
172
+ a && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
173
173
  /* @__PURE__ */ s.jsx(
174
174
  g,
175
175
  {
@@ -185,11 +185,11 @@ const Gt = ({ issues: r, usage: i, classification: e, vernacularNames: a, issueM
185
185
  /* @__PURE__ */ s.jsx(g, { span: 18, children: /* @__PURE__ */ s.jsx(
186
186
  H,
187
187
  {
188
- classification: z(e)
188
+ classification: z(a)
189
189
  }
190
190
  ) })
191
191
  ] }),
192
- a && /* @__PURE__ */ s.jsxs(x, { children: [
192
+ e && /* @__PURE__ */ s.jsxs(x, { children: [
193
193
  /* @__PURE__ */ s.jsx(
194
194
  g,
195
195
  {
@@ -202,51 +202,51 @@ const Gt = ({ issues: r, usage: i, classification: e, vernacularNames: a, issueM
202
202
  children: "Vernacular:"
203
203
  }
204
204
  ),
205
- /* @__PURE__ */ s.jsx(g, { span: 18, style: { paddingBottom: "12px" }, children: a.slice(0, 8).map((o) => o.name).join(", ") })
205
+ /* @__PURE__ */ s.jsx(g, { span: 18, style: { paddingBottom: "12px" }, children: e.slice(0, 8).map((o) => o.name).join(", ") })
206
206
  ] })
207
207
  ] });
208
208
  K.Option;
209
209
  class Kt extends f.Component {
210
- constructor(e) {
211
- super(e);
210
+ constructor(a) {
211
+ super(a);
212
212
  c(this, "componentDidMount", () => {
213
- const { defaultDatasetKey: e } = this.props;
214
- e && this.setDefaultValue(e);
215
- });
216
- c(this, "componentDidUpdate", (e) => {
217
213
  const { defaultDatasetKey: a } = this.props;
218
- a && a !== e.defaultDatasetKey ? this.setDefaultValue(a) : e.defaultDatasetKey && !a && this.setState({ value: "" });
214
+ a && this.setDefaultValue(a);
215
+ });
216
+ c(this, "componentDidUpdate", (a) => {
217
+ const { defaultDatasetKey: e } = this.props;
218
+ e && e !== a.defaultDatasetKey ? this.setDefaultValue(e) : a.defaultDatasetKey && !e && this.setState({ value: "" });
219
219
  });
220
- c(this, "setDefaultValue", (e) => {
221
- b(`${j.dataApi}dataset/${e}`).then((a) => {
222
- this.setState({ value: u(a, "data.title") || "" }), this.props.onSelectDataset(a.data);
220
+ c(this, "setDefaultValue", (a) => {
221
+ b(`${j.dataApi}dataset/${a}`).then((e) => {
222
+ this.setState({ value: u(e, "data.title") || "" }), this.props.onSelectDataset(e.data);
223
223
  });
224
224
  });
225
- c(this, "getDatasets", (e) => {
226
- const { contributesTo: a } = this.props;
227
- b(`${j.dataApi}dataset?q=${e}&limit=30${a ? "&contributesTo=" + a : ""}`).then((n) => {
225
+ c(this, "getDatasets", (a) => {
226
+ const { contributesTo: e } = this.props;
227
+ b(`${j.dataApi}dataset?q=${a}&limit=30${e ? "&contributesTo=" + e : ""}`).then((n) => {
228
228
  this.setState({ datasets: n.data.result });
229
229
  }).catch((n) => {
230
230
  this.setState({ datasets: [], err: n });
231
231
  });
232
232
  });
233
- c(this, "onSelectDataset", (e, a) => {
234
- this.setState({ value: e }), this.props.onSelectDataset({ key: a.key, title: e });
233
+ c(this, "onSelectDataset", (a, e) => {
234
+ this.setState({ value: a }), this.props.onSelectDataset({ key: e.key, title: a });
235
235
  });
236
236
  c(this, "onReset", () => {
237
237
  this.setState({ value: "", names: [] }, this.props.onResetSearch);
238
238
  });
239
239
  c(this, "render", () => {
240
- const { value: e, randomID: a } = this.state, { style: n } = this.props, o = this.state.datasets ? this.state.datasets.map((l) => {
240
+ const { value: a, randomID: e } = this.state, { style: n } = this.props, o = this.state.datasets ? this.state.datasets.map((l) => {
241
241
  const h = `${l.alias || l.title} [${l.key}]`;
242
242
  return {
243
243
  key: l.key,
244
244
  value: h,
245
245
  label: /* @__PURE__ */ s.jsx(
246
- kt,
246
+ Nt,
247
247
  {
248
248
  highlightStyle: { fontWeight: "bold", padding: 0 },
249
- searchWords: e.split(" "),
249
+ searchWords: a.split(" "),
250
250
  autoEscape: !0,
251
251
  textToHighlight: h
252
252
  }
@@ -254,7 +254,7 @@ class Kt extends f.Component {
254
254
  data: l
255
255
  };
256
256
  }) : [];
257
- return /* @__PURE__ */ s.jsx("div", { id: `dataset_autocomplete_${a}`, children: /* @__PURE__ */ s.jsx(
257
+ return /* @__PURE__ */ s.jsx("div", { id: `dataset_autocomplete_${e}`, children: /* @__PURE__ */ s.jsx(
258
258
  K,
259
259
  {
260
260
  onSelect: this.onSelectDataset,
@@ -263,8 +263,8 @@ class Kt extends f.Component {
263
263
  placeholder: this.props.placeHolder || "Find dataset",
264
264
  style: n || { width: "100%" },
265
265
  onChange: (l) => this.setState({ value: l }),
266
- value: e,
267
- getPopupContainer: () => document.getElementById(`dataset_autocomplete_${a}`),
266
+ value: a,
267
+ getPopupContainer: () => document.getElementById(`dataset_autocomplete_${e}`),
268
268
  children: /* @__PURE__ */ s.jsx(G.Search, { allowClear: !0 })
269
269
  }
270
270
  ) });
@@ -279,7 +279,7 @@ class Kt extends f.Component {
279
279
  this.getDatasets.cancel();
280
280
  }
281
281
  }
282
- const V = "search-content-type", $ = N.Item, zt = vt.Group, q = [
282
+ const V = "search-content-type", $ = R.Item, zt = yt.Group, q = [
283
283
  "rank",
284
284
  "issue",
285
285
  "status",
@@ -291,7 +291,7 @@ const V = "search-content-type", $ = N.Item, zt = vt.Group, q = [
291
291
  "environment",
292
292
  "group",
293
293
  "authorshipYear"
294
- ], v = 50, W = 50, E = {
294
+ ], y = 50, W = 50, E = {
295
295
  limit: 50,
296
296
  offset: 0,
297
297
  facet: q,
@@ -299,23 +299,22 @@ const V = "search-content-type", $ = N.Item, zt = vt.Group, q = [
299
299
  facetLimit: W,
300
300
  sortBy: "relevance"
301
301
  }, Pt = () => [
302
- {
303
- title: "",
304
- dataIndex: ["usage", "merged"],
305
- key: "merged",
306
- width: 12,
307
- render: (r, i) => {
308
- var e, a, n;
309
- return (e = i == null ? void 0 : i.usage) != null && e.merged ? /* @__PURE__ */ s.jsx(Nt, { datasetKey: (a = i == null ? void 0 : i.usage) == null ? void 0 : a.datasetKey, verbatimSourceKey: (n = i == null ? void 0 : i.usage) == null ? void 0 : n.verbatimSourceKey }) : "";
310
- }
311
- },
312
302
  {
313
303
  title: "Scientific Name",
314
304
  dataIndex: ["usage", "labelHtml"],
315
305
  key: "scientificName",
316
306
  render: (r, i) => {
317
- const e = u(i, "usage.accepted.id") || u(i, "usage.id");
318
- return /* @__PURE__ */ s.jsx(S, { to: "taxon", args: e, children: /* @__PURE__ */ s.jsx("span", { dangerouslySetInnerHTML: { __html: r } }) });
307
+ var e, n, o;
308
+ const a = u(i, "usage.accepted.id") || u(i, "usage.id");
309
+ return /* @__PURE__ */ s.jsx(
310
+ Rt,
311
+ {
312
+ merged: (e = i == null ? void 0 : i.usage) == null ? void 0 : e.merged,
313
+ datasetKey: (n = i == null ? void 0 : i.usage) == null ? void 0 : n.datasetKey,
314
+ verbatimSourceKey: (o = i == null ? void 0 : i.usage) == null ? void 0 : o.verbatimSourceKey,
315
+ children: /* @__PURE__ */ s.jsx(S, { to: "taxon", args: a, children: /* @__PURE__ */ s.jsx("span", { dangerouslySetInnerHTML: { __html: r } }) })
316
+ }
317
+ );
319
318
  },
320
319
  width: 200,
321
320
  sorter: !0
@@ -363,47 +362,47 @@ const V = "search-content-type", $ = N.Item, zt = vt.Group, q = [
363
362
  }
364
363
  ];
365
364
  class Ut extends f.Component {
366
- constructor(e) {
367
- super(e);
365
+ constructor(a) {
366
+ super(a);
368
367
  c(this, "componentDidMount", async () => {
369
368
  this.parseParamsAndGetData();
370
- const { datasetKey: e } = this.props;
369
+ const { datasetKey: a } = this.props;
371
370
  try {
372
- const { data: a } = await ft(e);
371
+ const { data: e } = await ft(a);
373
372
  this.setState({
374
- dataset: a,
375
- datasetOrigin: ((a == null ? void 0 : a.origin) || "").toLowerCase()
373
+ dataset: e,
374
+ datasetOrigin: ((e == null ? void 0 : e.origin) || "").toLowerCase()
376
375
  });
377
376
  } catch {
378
377
  }
379
378
  try {
380
- const a = await xt();
381
- this.setState({ taxGroups: a });
379
+ const e = await xt();
380
+ this.setState({ taxGroups: e });
382
381
  } catch {
383
382
  }
384
383
  });
385
- c(this, "componentDidUpdate", (e) => {
386
- Dt(e.filters, this.props.filters) || this.parseParamsAndGetData();
384
+ c(this, "componentDidUpdate", (a) => {
385
+ Dt(a.filters, this.props.filters) || this.parseParamsAndGetData();
387
386
  });
388
387
  c(this, "getRank", () => {
389
388
  b(`${j.dataApi}vocab/rank`).then(
390
- (e) => this.setState({ rank: e.data.map((a) => a.name) })
389
+ (a) => this.setState({ rank: a.data.map((e) => e.name) })
391
390
  );
392
391
  });
393
392
  c(this, "parseParamsAndGetData", () => {
394
- const { defaultTaxonKey: e, filters: a } = this.props;
395
- let n = { ...a || {} };
396
- if (e && !n.TAXON_ID && (n.TAXON_ID = e), Tt(n)) {
393
+ const { defaultTaxonKey: a, filters: e } = this.props;
394
+ let n = { ...e || {} };
395
+ if (a && !n.TAXON_ID && (n.TAXON_ID = a), Tt(n)) {
397
396
  n = { ...E };
398
397
  const o = St(V, void 0);
399
398
  o != null && (n.sectorMode = o), this.pushParams(n);
400
399
  } else n.facet || (n.facet = q);
401
- n.facetLimit || (n.facetLimit = W), delete n.fuzzy, n.type && String(n.type).toUpperCase() !== "FUZZY" && delete n.type, n.limit || (n.limit = v), n.offset || (n.offset = 0), this.setState(
400
+ n.facetLimit || (n.facetLimit = W), delete n.fuzzy, n.type && String(n.type).toUpperCase() !== "FUZZY" && delete n.type, n.limit || (n.limit = y), n.offset || (n.offset = 0), this.setState(
402
401
  {
403
402
  params: n,
404
403
  pagination: {
405
- pageSize: n.limit || v,
406
- current: Number(n.offset || 0) / Number(n.limit || v) + 1,
404
+ pageSize: n.limit || y,
405
+ current: Number(n.offset || 0) / Number(n.limit || y) + 1,
407
406
  showQuickJumper: !0,
408
407
  pageSizeOptions: [50, 100, 500, 1e3]
409
408
  }
@@ -411,14 +410,14 @@ class Ut extends f.Component {
411
410
  this.getData
412
411
  );
413
412
  });
414
- c(this, "pushParams", (e) => {
415
- const a = { ...e };
416
- a.q || delete a.q, this.props.onFiltersChange && this.props.onFiltersChange(a);
413
+ c(this, "pushParams", (a) => {
414
+ const e = { ...a };
415
+ e.q || delete e.q, this.props.onFiltersChange && this.props.onFiltersChange(e);
417
416
  });
418
417
  c(this, "getData", () => {
419
- const { params: e } = this.state;
418
+ const { params: a } = this.state;
420
419
  this.setState({ loading: !0 });
421
- const { datasetKey: a } = this.props, n = `${j.dataApi}dataset/${a}/nameusage/search`, o = u(e, "status") ? e : { ...e, status: "_NOT_NULL" };
420
+ const { datasetKey: e } = this.props, n = `${j.dataApi}dataset/${e}/nameusage/search`, o = u(a, "status") ? a : { ...a, status: "_NOT_NULL" };
422
421
  b(`${n}?${Ct.stringify(o)}`).then((l) => {
423
422
  const h = { ...this.state.pagination };
424
423
  h.total = l.data.total, this.setState({
@@ -431,22 +430,22 @@ class Ut extends f.Component {
431
430
  this.setState({ loading: !1, error: l, data: [] });
432
431
  });
433
432
  });
434
- c(this, "handleTableChange", (e, a, n) => {
433
+ c(this, "handleTableChange", (a, e, n) => {
435
434
  let o = $t(this.state.params, {
436
- limit: e.pageSize,
437
- offset: (e.current - 1) * e.pageSize,
438
- ...a
435
+ limit: a.pageSize,
436
+ offset: (a.current - 1) * a.pageSize,
437
+ ...e
439
438
  });
440
439
  n && n.field && (n.field[n.field.length - 1] === "labelHtml" ? o.sortBy = "name" : n.field[n.field.length - 1] === "rank" ? o.sortBy = "taxonomic" : o.sortBy = n.field[n.field.length - 1]), n && n.order === "descend" ? o.reverse = !0 : o.reverse = !1, this.setState({ params: o }, () => this.pushParams(o));
441
440
  });
442
- c(this, "updateSearch", (e) => {
443
- "sectorMode" in e && yt(V, e.sectorMode);
444
- let a = { ...this.state.params, offset: 0, limit: 50 };
445
- Et(e, (o, l) => {
446
- a[l] = o;
441
+ c(this, "updateSearch", (a) => {
442
+ "sectorMode" in a && vt(V, a.sectorMode);
443
+ let e = { ...this.state.params, offset: 0, limit: 50 };
444
+ Et(a, (o, l) => {
445
+ e[l] = o;
447
446
  });
448
- const n = Object.keys(a).reduce(
449
- (o, l) => (a[l] !== null && (o[l] = a[l]), o),
447
+ const n = Object.keys(e).reduce(
448
+ (o, l) => (e[l] !== null && (o[l] = e[l]), o),
450
449
  {}
451
450
  );
452
451
  this.setState(
@@ -472,7 +471,7 @@ class Ut extends f.Component {
472
471
  params: {},
473
472
  taxGroups: [],
474
473
  pagination: {
475
- pageSize: v,
474
+ pageSize: y,
476
475
  current: 1,
477
476
  showQuickJumper: !0,
478
477
  pageSizeOptions: [50, 100, 500, 1e3]
@@ -482,49 +481,49 @@ class Ut extends f.Component {
482
481
  };
483
482
  }
484
483
  render() {
485
- var _;
484
+ var B;
486
485
  const {
487
- data: { result: e, facets: a },
486
+ data: { result: a, facets: e },
488
487
  loading: n,
489
488
  error: o,
490
489
  params: l,
491
490
  pagination: h,
492
491
  advancedFilters: d,
493
- dataset: y,
492
+ dataset: v,
494
493
  taxGroups: Ht
495
- } = this.state, { datasetKey: A, defaultTaxonKey: Z, citation: B } = this.props, D = String(l.type || "").toUpperCase() === "FUZZY", X = u(a, "rank") ? a.rank.map((t) => ({
494
+ } = this.state, { datasetKey: A, defaultTaxonKey: X, citation: _ } = this.props, D = String(l.type || "").toUpperCase() === "FUZZY", Z = u(e, "rank") ? e.rank.map((t) => ({
496
495
  value: t.value,
497
496
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
498
497
  })) : null;
499
- u(a, "issue") && a.issue.map((t) => ({
498
+ u(e, "issue") && e.issue.map((t) => ({
500
499
  value: t.value,
501
500
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
502
501
  }));
503
- const J = u(a, "status") ? a.status.map((t) => ({
502
+ const J = u(e, "status") ? e.status.map((t) => ({
504
503
  value: t.value,
505
504
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
506
- })) : null, Q = u(a, "nomStatus") ? a.nomStatus.map((t) => ({
505
+ })) : null, Q = u(e, "nomStatus") ? e.nomStatus.map((t) => ({
507
506
  value: t.value,
508
507
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
509
- })) : null, tt = u(a, "nameType") ? a.nameType.map((t) => ({
508
+ })) : null, tt = u(e, "nameType") ? e.nameType.map((t) => ({
510
509
  value: t.value,
511
510
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
512
- })) : null, et = u(a, "field") ? a.field.map((t) => ({
511
+ })) : null, et = u(e, "field") ? e.field.map((t) => ({
513
512
  value: t.value,
514
513
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
515
- })) : null, at = u(a, "authorship") ? a.authorship.map((t) => ({
514
+ })) : null, at = u(e, "authorship") ? e.authorship.map((t) => ({
516
515
  value: t.value,
517
516
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
518
- })) : [], st = (t) => t === "1" || t === !0 || t === "true" ? "Extinct" : t === "0" || t === !1 || t === "false" ? "Extant" : "Unknown", nt = u(a, "extinct") ? a.extinct.map((t) => ({
517
+ })) : [], 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
518
  value: t.value,
520
519
  label: `${st(t == null ? void 0 : t.value)} (${t.count.toLocaleString("en-GB")})`
521
- })) : [], lt = u(a, "environment") ? a.environment.map((t) => ({
520
+ })) : [], lt = u(e, "environment") ? e.environment.map((t) => ({
522
521
  value: t.value,
523
522
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
524
- })) : [], it = u(a, "group") ? a.group.map((t) => ({
523
+ })) : [], it = u(e, "group") ? e.group.map((t) => ({
525
524
  value: t.value,
526
525
  label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
527
- })) : [], ot = u(a, "authorshipYear") ? a.authorshipYear.map((t) => ({
526
+ })) : [], ot = u(e, "authorshipYear") ? e.authorshipYear.map((t) => ({
528
527
  value: t.value,
529
528
  label: `${t.value} (${t.count.toLocaleString("en-GB")})`
530
529
  })) : [];
@@ -538,12 +537,12 @@ class Ut extends f.Component {
538
537
  margin: "16px 0"
539
538
  },
540
539
  children: [
541
- B === "top" && y && /* @__PURE__ */ s.jsx(F, { dataset: y }),
540
+ _ === "top" && v && /* @__PURE__ */ s.jsx(F, { dataset: v }),
542
541
  /* @__PURE__ */ s.jsx(x, { children: o && /* @__PURE__ */ s.jsx(
543
542
  jt,
544
543
  {
545
544
  style: { marginBottom: "10px" },
546
- message: /* @__PURE__ */ s.jsx(wt, { error: o }),
545
+ message: /* @__PURE__ */ s.jsx(Ot, { error: o }),
547
546
  type: "error"
548
547
  }
549
548
  ) }),
@@ -559,11 +558,11 @@ class Ut extends f.Component {
559
558
  }
560
559
  ),
561
560
  /* @__PURE__ */ s.jsx(
562
- Ot,
561
+ wt,
563
562
  {
564
563
  datasetKey: A,
565
564
  minRank: "GENUS",
566
- defaultTaxonKey: u(l, "TAXON_ID") || Z || null,
565
+ defaultTaxonKey: u(l, "TAXON_ID") || X || null,
567
566
  onSelectName: (t) => {
568
567
  this.updateSearch({ TAXON_ID: t.key });
569
568
  },
@@ -590,7 +589,7 @@ class Ut extends f.Component {
590
589
  autoFocus: !1
591
590
  }
592
591
  ) }),
593
- /* @__PURE__ */ s.jsx("div", { style: { marginTop: "10px" }, children: /* @__PURE__ */ s.jsxs(N, { layout: "inline", children: [
592
+ /* @__PURE__ */ s.jsx("div", { style: { marginTop: "10px" }, children: /* @__PURE__ */ s.jsxs(R, { layout: "inline", children: [
594
593
  (this.state.datasetOrigin === "xrelease" || this.state.datasetOrigin === "project") && /* @__PURE__ */ s.jsx($, { label: "Content", children: /* @__PURE__ */ s.jsx(
595
594
  zt,
596
595
  {
@@ -599,7 +598,7 @@ class Ut extends f.Component {
599
598
  onChange: (t) => {
600
599
  this.updateSearch({ sectorMode: t.target.value.split(",").filter((rt) => rt !== "") });
601
600
  },
602
- value: w(l == null ? void 0 : l.sectorMode) ? (_ = l == null ? void 0 : l.sectorMode) == null ? void 0 : _.join(",") : (l == null ? void 0 : l.sectorMode) || "",
601
+ 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
602
  optionType: "button",
604
603
  options: [
605
604
  { value: "", label: "All" },
@@ -609,14 +608,14 @@ class Ut extends f.Component {
609
608
  }
610
609
  ) }),
611
610
  /* @__PURE__ */ s.jsx($, { children: /* @__PURE__ */ s.jsx(
612
- R,
611
+ k,
613
612
  {
614
613
  mode: "multiple",
615
614
  allowClear: !0,
616
615
  size: "small",
617
616
  style: { minWidth: 200 },
618
617
  placeholder: "Search fields",
619
- value: w(l == null ? void 0 : l.content) ? l.content : l != null && l.content ? [l.content] : [],
618
+ value: O(l == null ? void 0 : l.content) ? l.content : l != null && l.content ? [l.content] : [],
620
619
  onChange: (t) => this.updateSearch({ content: t.length ? t : null }),
621
620
  options: [
622
621
  { value: "SCIENTIFIC_NAME", label: "Scientific name" },
@@ -644,7 +643,7 @@ class Ut extends f.Component {
644
643
  {
645
644
  defaultValue: u(l, "rank"),
646
645
  onChange: (t) => this.updateSearch({ rank: t }),
647
- vocab: X || [],
646
+ vocab: Z || [],
648
647
  label: "Ranks"
649
648
  }
650
649
  ),
@@ -754,7 +753,7 @@ class Ut extends f.Component {
754
753
  size: "small",
755
754
  columns: this.state.columns,
756
755
  scroll: { x: "max-content" },
757
- dataSource: e,
756
+ dataSource: a,
758
757
  loading: n,
759
758
  pagination: this.state.pagination,
760
759
  onChange: this.handleTableChange,
@@ -769,7 +768,7 @@ class Ut extends f.Component {
769
768
  )
770
769
  }
771
770
  ),
772
- B === "bottom" && y && /* @__PURE__ */ s.jsx(F, { dataset: y })
771
+ _ === "bottom" && v && /* @__PURE__ */ s.jsx(F, { dataset: v })
773
772
  ]
774
773
  }
775
774
  );
@@ -778,8 +777,8 @@ class Ut extends f.Component {
778
777
  function Yt({
779
778
  datasetKey: r,
780
779
  filters: i,
781
- onFiltersChange: e,
782
- defaultTaxonKey: a,
780
+ onFiltersChange: a,
781
+ defaultTaxonKey: e,
783
782
  citation: n,
784
783
  auth: o,
785
784
  ...l
@@ -789,8 +788,8 @@ function Yt({
789
788
  {
790
789
  datasetKey: r,
791
790
  filters: i,
792
- onFiltersChange: e,
793
- defaultTaxonKey: a,
791
+ onFiltersChange: a,
792
+ defaultTaxonKey: e,
794
793
  citation: n
795
794
  }
796
795
  ) });