col-browser 2.1.0 → 2.2.1
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-DDYEbGhW.js → Distributions-CXIEJ6e6.js} +254 -233
- package/es/chunks/Distributions-CXIEJ6e6.js.map +1 -0
- package/es/chunks/TaxonBreakdown-BzDHojmp.js +210 -0
- package/es/chunks/TaxonBreakdown-BzDHojmp.js.map +1 -0
- package/es/chunks/index-BmhRLlZh.js +100 -0
- package/es/chunks/index-BmhRLlZh.js.map +1 -0
- package/es/chunks/storage-BgdCo9fV.js +20 -0
- package/es/chunks/storage-BgdCo9fV.js.map +1 -0
- package/es/index.js +1 -1
- package/es/routing.js +1 -1
- package/es/search.js +214 -207
- package/es/search.js.map +1 -1
- package/es/taxon.js +2 -2
- package/es/taxonBreakdown.js +22 -20
- package/es/taxonBreakdown.js.map +1 -1
- package/es/taxonDistribution.js +16 -14
- package/es/taxonDistribution.js.map +1 -1
- package/es/tree.js +142 -140
- package/es/tree.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +11 -0
- package/umd/col-browser.js +118 -49
- package/umd/col-browser.js.map +1 -1
- package/umd/col-browser.min.js +5 -5
- package/umd/col-browser.min.js.map +1 -1
- package/es/chunks/Distributions-DDYEbGhW.js.map +0 -1
- package/es/chunks/TaxonBreakdown-BshFaQql.js +0 -205
- package/es/chunks/TaxonBreakdown-BshFaQql.js.map +0 -1
- package/es/chunks/index-CNK3JADR.js +0 -95
- package/es/chunks/index-CNK3JADR.js.map +0 -1
package/es/search.js
CHANGED
|
@@ -1,62 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var c = (r, i,
|
|
4
|
-
import { a as
|
|
5
|
-
import { c as
|
|
1
|
+
var rt = Object.defineProperty;
|
|
2
|
+
var ut = (r, i, e) => i in r ? rt(r, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[i] = e;
|
|
3
|
+
var c = (r, i, e) => ut(r, typeof i != "symbol" ? i + "" : i, e);
|
|
4
|
+
import { a as ct } from "./chunks/withDatasetKey-BgMY05XE.js";
|
|
5
|
+
import { c as b, w as ht } from "./chunks/config-BPRXv9x8.js";
|
|
6
6
|
import { j as s } from "./chunks/jsx-runtime-BzflLqGi.js";
|
|
7
|
-
import * as
|
|
7
|
+
import * as D from "react";
|
|
8
8
|
import f from "react";
|
|
9
|
-
import { L as S, c as
|
|
10
|
-
import { a as
|
|
11
|
-
import { a as
|
|
12
|
-
import {
|
|
13
|
-
import yt from "
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
import { L as S, c as j, s as dt, R as pt, b as mt } from "./chunks/router-CssZk5qZ.js";
|
|
10
|
+
import { a as gt } from "./chunks/dataset-DvQG4NjA.js";
|
|
11
|
+
import { a as ft } from "./chunks/enumeration-yDQXSZsf.js";
|
|
12
|
+
import { r as xt, w as St } from "./chunks/storage-BgdCo9fV.js";
|
|
13
|
+
import { Input as V, Form as C, Select as _, Row as x, Col as g, AutoComplete as G, Radio as vt, Alert as yt, Button as bt, Table as jt } from "antd";
|
|
14
|
+
import Ct from "query-string";
|
|
15
|
+
import { isArray as O, startCase as m, snakeCase as B, get as u, initial as K, debounce as Dt, isEqual as At, isEmpty as Tt, merge as Et, forEach as $t } from "lodash-es";
|
|
16
|
+
import { E as Ot } from "./chunks/ErrorMsg-K8k5PPTp.js";
|
|
17
|
+
import { C as I, N as wt } from "./chunks/DatasetCitation-bkPmDDYB.js";
|
|
18
|
+
import Rt from "react-highlight-words";
|
|
19
|
+
import { M as _t } from "./chunks/MergedDataBadge-DsTsn5Xu.js";
|
|
20
|
+
import { I as P } from "./chunks/AntdIcon-B1nMlqyh.js";
|
|
21
|
+
var Nt = { 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) {
|
|
23
24
|
for (var i = 1; i < arguments.length; i++) {
|
|
24
|
-
var
|
|
25
|
-
for (var
|
|
26
|
-
Object.prototype.hasOwnProperty.call(
|
|
25
|
+
var e = arguments[i];
|
|
26
|
+
for (var a in e)
|
|
27
|
+
Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]);
|
|
27
28
|
}
|
|
28
29
|
return r;
|
|
29
|
-
},
|
|
30
|
+
}, w.apply(this, arguments);
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
+
const kt = (r, i) => /* @__PURE__ */ D.createElement(P, w({}, r, {
|
|
32
33
|
ref: i,
|
|
33
|
-
icon:
|
|
34
|
-
})),
|
|
35
|
-
process.env.NODE_ENV !== "production" && (
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
return
|
|
34
|
+
icon: Nt
|
|
35
|
+
})), z = /* @__PURE__ */ D.forwardRef(kt);
|
|
36
|
+
process.env.NODE_ENV !== "production" && (z.displayName = "DownOutlined");
|
|
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 R() {
|
|
39
|
+
return R = Object.assign ? Object.assign.bind() : function(r) {
|
|
39
40
|
for (var i = 1; i < arguments.length; i++) {
|
|
40
|
-
var
|
|
41
|
-
for (var
|
|
42
|
-
Object.prototype.hasOwnProperty.call(
|
|
41
|
+
var e = arguments[i];
|
|
42
|
+
for (var a in e)
|
|
43
|
+
Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]);
|
|
43
44
|
}
|
|
44
45
|
return r;
|
|
45
|
-
},
|
|
46
|
+
}, R.apply(this, arguments);
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
+
const It = (r, i) => /* @__PURE__ */ D.createElement(P, R({}, r, {
|
|
48
49
|
ref: i,
|
|
49
|
-
icon:
|
|
50
|
-
})),
|
|
51
|
-
process.env.NODE_ENV !== "production" && (
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
50
|
+
icon: Bt
|
|
51
|
+
})), H = /* @__PURE__ */ D.forwardRef(It);
|
|
52
|
+
process.env.NODE_ENV !== "production" && (H.displayName = "UpOutlined");
|
|
53
|
+
const T = ["family", "superfamily", "order", "subclass", "class", "superclass", "subphylum", "phylum"], U = ({ classification: r, maxParents: i = r.length, truncate: e }) => {
|
|
54
|
+
const a = r.slice(Math.max(r.length - i));
|
|
55
|
+
if (e) {
|
|
55
56
|
const l = r.reduce((h, d) => (h[d.rank] = d, h), {}), o = l.kingdom;
|
|
56
57
|
let n;
|
|
57
|
-
for (let h = 0; h <
|
|
58
|
-
if (l[
|
|
59
|
-
n = l[
|
|
58
|
+
for (let h = 0; h < T.length; h++)
|
|
59
|
+
if (l[T[h]]) {
|
|
60
|
+
n = l[T[h]];
|
|
60
61
|
break;
|
|
61
62
|
}
|
|
62
63
|
return o && n ? /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
|
|
@@ -65,19 +66,19 @@ const $ = ["family", "superfamily", "order", "subclass", "class", "superclass",
|
|
|
65
66
|
/* @__PURE__ */ s.jsx(S, { to: "taxon", args: n.id, children: n.name })
|
|
66
67
|
] }) : o ? /* @__PURE__ */ s.jsx(S, { to: "taxon", args: o.id, children: o.name }) : null;
|
|
67
68
|
} else
|
|
68
|
-
return
|
|
69
|
+
return a.map((l, o) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
|
|
69
70
|
/* @__PURE__ */ s.jsx(S, { to: "taxon", args: l.id, children: l.name }),
|
|
70
|
-
!Object.is(
|
|
71
|
+
!Object.is(a.length - 1, o) && " > "
|
|
71
72
|
] }, o));
|
|
72
|
-
},
|
|
73
|
-
class
|
|
74
|
-
constructor(
|
|
75
|
-
super(
|
|
73
|
+
}, Mt = V.Search;
|
|
74
|
+
class Lt extends f.Component {
|
|
75
|
+
constructor(e) {
|
|
76
|
+
super(e);
|
|
76
77
|
c(this, "componentDidMount", () => {
|
|
77
78
|
this.props.defaultValue && this.setState({ search: this.props.defaultValue });
|
|
78
79
|
});
|
|
79
|
-
c(this, "componentDidUpdate", (
|
|
80
|
-
|
|
80
|
+
c(this, "componentDidUpdate", (e) => {
|
|
81
|
+
e.defaultValue !== this.props.defaultValue && this.setState({ search: this.props.defaultValue });
|
|
81
82
|
});
|
|
82
83
|
c(this, "resetSearch", () => {
|
|
83
84
|
this.setState({ search: "" }, () => {
|
|
@@ -85,13 +86,13 @@ class _t extends f.Component {
|
|
|
85
86
|
});
|
|
86
87
|
});
|
|
87
88
|
c(this, "render", () => /* @__PURE__ */ s.jsx(
|
|
88
|
-
|
|
89
|
+
Mt,
|
|
89
90
|
{
|
|
90
91
|
style: this.props.style || null,
|
|
91
92
|
placeholder: "Search query",
|
|
92
93
|
value: this.state.search,
|
|
93
|
-
onSearch: (
|
|
94
|
-
onChange: (
|
|
94
|
+
onSearch: (e) => this.props.onSearch(this.state.search),
|
|
95
|
+
onChange: (e) => this.setState({ search: e.target.value }),
|
|
95
96
|
addonAfter: this.props.addonAfter,
|
|
96
97
|
allowClear: !0,
|
|
97
98
|
autoFocus: !0
|
|
@@ -102,7 +103,7 @@ class _t extends f.Component {
|
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
const
|
|
106
|
+
const Ft = C.Item, M = _.Option, Vt = {
|
|
106
107
|
labelCol: {
|
|
107
108
|
xs: { span: 24 },
|
|
108
109
|
sm: { span: 24 },
|
|
@@ -115,32 +116,32 @@ const Nt = D.Item, L = k.Option, Lt = {
|
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
class p extends f.Component {
|
|
118
|
-
constructor(
|
|
119
|
-
super(
|
|
120
|
-
c(this, "handleChange", (
|
|
121
|
-
this.setState({ selected:
|
|
122
|
-
this.props.onChange(
|
|
119
|
+
constructor(e) {
|
|
120
|
+
super(e);
|
|
121
|
+
c(this, "handleChange", (e) => {
|
|
122
|
+
this.setState({ selected: e }, () => {
|
|
123
|
+
this.props.onChange(e);
|
|
123
124
|
});
|
|
124
125
|
});
|
|
125
126
|
c(this, "render", () => {
|
|
126
|
-
const { defaultValue:
|
|
127
|
+
const { defaultValue: e, label: a, vocab: l } = this.props, { randomID: o } = this.state, n = /* @__PURE__ */ new Set([...l.map((d) => d.value)]);
|
|
127
128
|
let h;
|
|
128
|
-
return
|
|
129
|
-
|
|
129
|
+
return e && O(e) ? h = e.filter((d) => n.has(d)) : e && (h = [e].filter((d) => n.has(d))), /* @__PURE__ */ s.jsx(
|
|
130
|
+
Ft,
|
|
130
131
|
{
|
|
131
|
-
...
|
|
132
|
-
label:
|
|
132
|
+
...Vt,
|
|
133
|
+
label: a,
|
|
133
134
|
style: { marginBottom: "8px", width: "100%" },
|
|
134
|
-
children: /* @__PURE__ */ s.jsx("div", { id: `${
|
|
135
|
-
|
|
135
|
+
children: /* @__PURE__ */ s.jsx("div", { id: `${B(a)}_${o}`, children: /* @__PURE__ */ s.jsx(
|
|
136
|
+
_,
|
|
136
137
|
{
|
|
137
138
|
showSearch: !0,
|
|
138
139
|
mode: "multiple",
|
|
139
140
|
placeholder: "Please select",
|
|
140
141
|
value: h,
|
|
141
142
|
onChange: this.handleChange,
|
|
142
|
-
getPopupContainer: () => document.getElementById(`${
|
|
143
|
-
children: l.map((d) => typeof d == "string" ? /* @__PURE__ */ s.jsx(
|
|
143
|
+
getPopupContainer: () => document.getElementById(`${B(a)}_${o}`),
|
|
144
|
+
children: l.map((d) => typeof d == "string" ? /* @__PURE__ */ s.jsx(M, { value: d, children: m(d) }, d) : /* @__PURE__ */ s.jsx(M, { value: d.value, children: d.label }, d.value))
|
|
144
145
|
}
|
|
145
146
|
) })
|
|
146
147
|
}
|
|
@@ -152,7 +153,7 @@ class p extends f.Component {
|
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
|
-
const
|
|
156
|
+
const Gt = ({ issues: r, usage: i, classification: e, vernacularNames: a, issueMap: l }) => /* @__PURE__ */ s.jsxs(f.Fragment, { children: [
|
|
156
157
|
u(i, "id") && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
|
|
157
158
|
/* @__PURE__ */ s.jsx(
|
|
158
159
|
g,
|
|
@@ -168,7 +169,7 @@ const Mt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueM
|
|
|
168
169
|
),
|
|
169
170
|
/* @__PURE__ */ s.jsx(g, { span: 18, children: u(i, "id") })
|
|
170
171
|
] }),
|
|
171
|
-
|
|
172
|
+
e && /* @__PURE__ */ s.jsxs(x, { style: { marginBottom: "10px" }, children: [
|
|
172
173
|
/* @__PURE__ */ s.jsx(
|
|
173
174
|
g,
|
|
174
175
|
{
|
|
@@ -182,13 +183,13 @@ const Mt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueM
|
|
|
182
183
|
}
|
|
183
184
|
),
|
|
184
185
|
/* @__PURE__ */ s.jsx(g, { span: 18, children: /* @__PURE__ */ s.jsx(
|
|
185
|
-
|
|
186
|
+
U,
|
|
186
187
|
{
|
|
187
|
-
classification:
|
|
188
|
+
classification: K(e)
|
|
188
189
|
}
|
|
189
190
|
) })
|
|
190
191
|
] }),
|
|
191
|
-
|
|
192
|
+
a && /* @__PURE__ */ s.jsxs(x, { children: [
|
|
192
193
|
/* @__PURE__ */ s.jsx(
|
|
193
194
|
g,
|
|
194
195
|
{
|
|
@@ -201,51 +202,51 @@ const Mt = ({ issues: r, usage: i, classification: a, vernacularNames: e, issueM
|
|
|
201
202
|
children: "Vernacular:"
|
|
202
203
|
}
|
|
203
204
|
),
|
|
204
|
-
/* @__PURE__ */ s.jsx(g, { span: 18, style: { paddingBottom: "12px" }, children:
|
|
205
|
+
/* @__PURE__ */ s.jsx(g, { span: 18, style: { paddingBottom: "12px" }, children: a.slice(0, 8).map((o) => o.name).join(", ") })
|
|
205
206
|
] })
|
|
206
207
|
] });
|
|
207
|
-
|
|
208
|
-
class
|
|
209
|
-
constructor(
|
|
210
|
-
super(
|
|
208
|
+
G.Option;
|
|
209
|
+
class Kt extends f.Component {
|
|
210
|
+
constructor(e) {
|
|
211
|
+
super(e);
|
|
211
212
|
c(this, "componentDidMount", () => {
|
|
212
|
-
const { defaultDatasetKey: a } = this.props;
|
|
213
|
-
a && this.setDefaultValue(a);
|
|
214
|
-
});
|
|
215
|
-
c(this, "componentDidUpdate", (a) => {
|
|
216
213
|
const { defaultDatasetKey: e } = this.props;
|
|
217
|
-
e &&
|
|
214
|
+
e && this.setDefaultValue(e);
|
|
215
|
+
});
|
|
216
|
+
c(this, "componentDidUpdate", (e) => {
|
|
217
|
+
const { defaultDatasetKey: a } = this.props;
|
|
218
|
+
a && a !== e.defaultDatasetKey ? this.setDefaultValue(a) : e.defaultDatasetKey && !a && this.setState({ value: "" });
|
|
218
219
|
});
|
|
219
|
-
c(this, "setDefaultValue", (
|
|
220
|
-
|
|
221
|
-
this.setState({ value: u(
|
|
220
|
+
c(this, "setDefaultValue", (e) => {
|
|
221
|
+
j(`${b.dataApi}dataset/${e}`).then((a) => {
|
|
222
|
+
this.setState({ value: u(a, "data.title") || "" }), this.props.onSelectDataset(a.data);
|
|
222
223
|
});
|
|
223
224
|
});
|
|
224
|
-
c(this, "getDatasets", (
|
|
225
|
-
const { contributesTo:
|
|
226
|
-
|
|
225
|
+
c(this, "getDatasets", (e) => {
|
|
226
|
+
const { contributesTo: a } = this.props;
|
|
227
|
+
j(`${b.dataApi}dataset?q=${e}&limit=30${a ? "&contributesTo=" + a : ""}`).then((l) => {
|
|
227
228
|
this.setState({ datasets: l.data.result });
|
|
228
229
|
}).catch((l) => {
|
|
229
230
|
this.setState({ datasets: [], err: l });
|
|
230
231
|
});
|
|
231
232
|
});
|
|
232
|
-
c(this, "onSelectDataset", (
|
|
233
|
-
this.setState({ value:
|
|
233
|
+
c(this, "onSelectDataset", (e, a) => {
|
|
234
|
+
this.setState({ value: e }), this.props.onSelectDataset({ key: a.key, title: e });
|
|
234
235
|
});
|
|
235
236
|
c(this, "onReset", () => {
|
|
236
237
|
this.setState({ value: "", names: [] }, this.props.onResetSearch);
|
|
237
238
|
});
|
|
238
239
|
c(this, "render", () => {
|
|
239
|
-
const { value:
|
|
240
|
+
const { value: e, randomID: a } = this.state, { style: l } = this.props, o = this.state.datasets ? this.state.datasets.map((n) => {
|
|
240
241
|
const h = `${n.alias || n.title} [${n.key}]`;
|
|
241
242
|
return {
|
|
242
243
|
key: n.key,
|
|
243
244
|
value: h,
|
|
244
245
|
label: /* @__PURE__ */ s.jsx(
|
|
245
|
-
|
|
246
|
+
Rt,
|
|
246
247
|
{
|
|
247
248
|
highlightStyle: { fontWeight: "bold", padding: 0 },
|
|
248
|
-
searchWords:
|
|
249
|
+
searchWords: e.split(" "),
|
|
249
250
|
autoEscape: !0,
|
|
250
251
|
textToHighlight: h
|
|
251
252
|
}
|
|
@@ -253,8 +254,8 @@ class Ft extends f.Component {
|
|
|
253
254
|
data: n
|
|
254
255
|
};
|
|
255
256
|
}) : [];
|
|
256
|
-
return /* @__PURE__ */ s.jsx("div", { id: `dataset_autocomplete_${
|
|
257
|
-
|
|
257
|
+
return /* @__PURE__ */ s.jsx("div", { id: `dataset_autocomplete_${a}`, children: /* @__PURE__ */ s.jsx(
|
|
258
|
+
G,
|
|
258
259
|
{
|
|
259
260
|
onSelect: this.onSelectDataset,
|
|
260
261
|
onSearch: (n) => n ? this.getDatasets(n) : this.onReset(),
|
|
@@ -262,13 +263,13 @@ class Ft extends f.Component {
|
|
|
262
263
|
placeholder: this.props.placeHolder || "Find dataset",
|
|
263
264
|
style: l || { width: "100%" },
|
|
264
265
|
onChange: (n) => this.setState({ value: n }),
|
|
265
|
-
value:
|
|
266
|
-
getPopupContainer: () => document.getElementById(`dataset_autocomplete_${
|
|
267
|
-
children: /* @__PURE__ */ s.jsx(
|
|
266
|
+
value: e,
|
|
267
|
+
getPopupContainer: () => document.getElementById(`dataset_autocomplete_${a}`),
|
|
268
|
+
children: /* @__PURE__ */ s.jsx(V.Search, { allowClear: !0 })
|
|
268
269
|
}
|
|
269
270
|
) });
|
|
270
271
|
});
|
|
271
|
-
this.getDatasets =
|
|
272
|
+
this.getDatasets = Dt(this.getDatasets, 500), this.state = {
|
|
272
273
|
datasets: [],
|
|
273
274
|
value: "",
|
|
274
275
|
randomID: (Math.floor(Math.random() * 100) + 1) * (Math.floor(Math.random() * 100) + 1) * (Math.floor(Math.random() * 100) + 1)
|
|
@@ -278,7 +279,7 @@ class Ft extends f.Component {
|
|
|
278
279
|
this.getDatasets.cancel();
|
|
279
280
|
}
|
|
280
281
|
}
|
|
281
|
-
const E =
|
|
282
|
+
const L = "search-content-type", E = C.Item, F = vt.Group, W = [
|
|
282
283
|
"rank",
|
|
283
284
|
"issue",
|
|
284
285
|
"status",
|
|
@@ -290,22 +291,22 @@ const E = D.Item, M = ft.Group, U = [
|
|
|
290
291
|
"environment",
|
|
291
292
|
"group",
|
|
292
293
|
"authorshipYear"
|
|
293
|
-
], y = 50,
|
|
294
|
+
], y = 50, Y = 50, $ = {
|
|
294
295
|
limit: 50,
|
|
295
296
|
offset: 0,
|
|
296
|
-
facet:
|
|
297
|
+
facet: W,
|
|
297
298
|
//["rank", "issue", "status", "nomStatus", "nameType", "field"],
|
|
298
|
-
facetLimit:
|
|
299
|
+
facetLimit: Y,
|
|
299
300
|
sortBy: "relevance"
|
|
300
|
-
},
|
|
301
|
+
}, Pt = () => [
|
|
301
302
|
{
|
|
302
303
|
title: "",
|
|
303
304
|
dataIndex: ["usage", "merged"],
|
|
304
305
|
key: "merged",
|
|
305
306
|
width: 12,
|
|
306
307
|
render: (r, i) => {
|
|
307
|
-
var
|
|
308
|
-
return (
|
|
308
|
+
var e, a, l;
|
|
309
|
+
return (e = i == null ? void 0 : i.usage) != null && e.merged ? /* @__PURE__ */ s.jsx(_t, { datasetKey: (a = i == null ? void 0 : i.usage) == null ? void 0 : a.datasetKey, verbatimSourceKey: (l = i == null ? void 0 : i.usage) == null ? void 0 : l.verbatimSourceKey }) : "";
|
|
309
310
|
}
|
|
310
311
|
},
|
|
311
312
|
{
|
|
@@ -313,8 +314,8 @@ const E = D.Item, M = ft.Group, U = [
|
|
|
313
314
|
dataIndex: ["usage", "labelHtml"],
|
|
314
315
|
key: "scientificName",
|
|
315
316
|
render: (r, i) => {
|
|
316
|
-
const
|
|
317
|
-
return /* @__PURE__ */ s.jsx(S, { to: "taxon", args:
|
|
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 } }) });
|
|
318
319
|
},
|
|
319
320
|
width: 200,
|
|
320
321
|
sorter: !0
|
|
@@ -351,9 +352,9 @@ const E = D.Item, M = ft.Group, U = [
|
|
|
351
352
|
key: "parents",
|
|
352
353
|
width: 180,
|
|
353
354
|
render: (r, i) => u(i, "classification") ? /* @__PURE__ */ s.jsx(
|
|
354
|
-
|
|
355
|
+
U,
|
|
355
356
|
{
|
|
356
|
-
classification:
|
|
357
|
+
classification: K(i.classification),
|
|
357
358
|
truncate: !0,
|
|
358
359
|
datasetKey: u(i, "usage.name.datasetKey")
|
|
359
360
|
},
|
|
@@ -361,38 +362,43 @@ const E = D.Item, M = ft.Group, U = [
|
|
|
361
362
|
) : ""
|
|
362
363
|
}
|
|
363
364
|
];
|
|
364
|
-
class
|
|
365
|
-
constructor(
|
|
366
|
-
super(
|
|
365
|
+
class zt extends f.Component {
|
|
366
|
+
constructor(e) {
|
|
367
|
+
super(e);
|
|
367
368
|
c(this, "componentDidMount", async () => {
|
|
368
369
|
this.parseParamsAndGetData();
|
|
369
|
-
const { datasetKey:
|
|
370
|
+
const { datasetKey: e } = this.props;
|
|
370
371
|
try {
|
|
371
|
-
const { data:
|
|
372
|
+
const { data: a } = await gt(e);
|
|
372
373
|
this.setState({
|
|
373
|
-
dataset:
|
|
374
|
-
datasetOrigin: ((
|
|
374
|
+
dataset: a,
|
|
375
|
+
datasetOrigin: ((a == null ? void 0 : a.origin) || "").toLowerCase()
|
|
375
376
|
});
|
|
376
377
|
} catch {
|
|
377
378
|
}
|
|
378
379
|
try {
|
|
379
|
-
const
|
|
380
|
-
this.setState({ taxGroups:
|
|
380
|
+
const a = await ft();
|
|
381
|
+
this.setState({ taxGroups: a });
|
|
381
382
|
} catch {
|
|
382
383
|
}
|
|
383
384
|
});
|
|
384
|
-
c(this, "componentDidUpdate", (
|
|
385
|
-
|
|
385
|
+
c(this, "componentDidUpdate", (e) => {
|
|
386
|
+
At(e.filters, this.props.filters) || this.parseParamsAndGetData();
|
|
386
387
|
});
|
|
387
388
|
c(this, "getRank", () => {
|
|
388
|
-
|
|
389
|
-
(
|
|
389
|
+
j(`${b.dataApi}vocab/rank`).then(
|
|
390
|
+
(e) => this.setState({ rank: e.data.map((a) => a.name) })
|
|
390
391
|
);
|
|
391
392
|
});
|
|
392
393
|
c(this, "parseParamsAndGetData", () => {
|
|
393
|
-
const { defaultTaxonKey:
|
|
394
|
-
let l = { ...
|
|
395
|
-
|
|
394
|
+
const { defaultTaxonKey: e, filters: a } = this.props;
|
|
395
|
+
let l = { ...a || {} };
|
|
396
|
+
if (e && !l.TAXON_ID && (l.TAXON_ID = e), Tt(l)) {
|
|
397
|
+
l = { ...$ };
|
|
398
|
+
const o = xt(L, void 0);
|
|
399
|
+
o != null && (l.sectorMode = o), this.pushParams(l);
|
|
400
|
+
} else l.facet || (l.facet = W);
|
|
401
|
+
l.facetLimit || (l.facetLimit = Y), delete l.fuzzy, l.limit || (l.limit = y), l.offset || (l.offset = 0), this.setState(
|
|
396
402
|
{
|
|
397
403
|
params: l,
|
|
398
404
|
pagination: {
|
|
@@ -405,15 +411,15 @@ class Gt extends f.Component {
|
|
|
405
411
|
this.getData
|
|
406
412
|
);
|
|
407
413
|
});
|
|
408
|
-
c(this, "pushParams", (
|
|
409
|
-
const
|
|
410
|
-
|
|
414
|
+
c(this, "pushParams", (e) => {
|
|
415
|
+
const a = { ...e };
|
|
416
|
+
a.q || delete a.q, this.props.onFiltersChange && this.props.onFiltersChange(a);
|
|
411
417
|
});
|
|
412
418
|
c(this, "getData", () => {
|
|
413
|
-
const { params:
|
|
419
|
+
const { params: e } = this.state;
|
|
414
420
|
this.setState({ loading: !0 });
|
|
415
|
-
const { datasetKey:
|
|
416
|
-
|
|
421
|
+
const { datasetKey: a } = this.props, l = `${b.dataApi}dataset/${a}/nameusage/search`, o = u(e, "status") ? e : { ...e, status: "_NOT_NULL" };
|
|
422
|
+
j(`${l}?${Ct.stringify(o)}`).then((n) => {
|
|
417
423
|
const h = { ...this.state.pagination };
|
|
418
424
|
h.total = n.data.total, this.setState({
|
|
419
425
|
loading: !1,
|
|
@@ -425,21 +431,22 @@ class Gt extends f.Component {
|
|
|
425
431
|
this.setState({ loading: !1, error: n, data: [] });
|
|
426
432
|
});
|
|
427
433
|
});
|
|
428
|
-
c(this, "handleTableChange", (
|
|
429
|
-
let o =
|
|
430
|
-
limit:
|
|
431
|
-
offset: (
|
|
432
|
-
...
|
|
434
|
+
c(this, "handleTableChange", (e, a, l) => {
|
|
435
|
+
let o = Et(this.state.params, {
|
|
436
|
+
limit: e.pageSize,
|
|
437
|
+
offset: (e.current - 1) * e.pageSize,
|
|
438
|
+
...a
|
|
433
439
|
});
|
|
434
440
|
l && l.field && (l.field[l.field.length - 1] === "labelHtml" ? o.sortBy = "name" : l.field[l.field.length - 1] === "rank" ? o.sortBy = "taxonomic" : o.sortBy = l.field[l.field.length - 1]), l && l.order === "descend" ? o.reverse = !0 : o.reverse = !1, this.setState({ params: o }, () => this.pushParams(o));
|
|
435
441
|
});
|
|
436
|
-
c(this, "updateSearch", (
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
442
|
+
c(this, "updateSearch", (e) => {
|
|
443
|
+
"sectorMode" in e && St(L, e.sectorMode);
|
|
444
|
+
let a = { ...this.state.params, offset: 0, limit: 50 };
|
|
445
|
+
$t(e, (o, n) => {
|
|
446
|
+
a[n] = o;
|
|
440
447
|
});
|
|
441
|
-
const l = Object.keys(
|
|
442
|
-
(o, n) => (
|
|
448
|
+
const l = Object.keys(a).reduce(
|
|
449
|
+
(o, n) => (a[n] !== null && (o[n] = a[n]), o),
|
|
443
450
|
{}
|
|
444
451
|
);
|
|
445
452
|
this.setState(
|
|
@@ -450,9 +457,9 @@ class Gt extends f.Component {
|
|
|
450
457
|
c(this, "resetSearch", () => {
|
|
451
458
|
this.setState(
|
|
452
459
|
{
|
|
453
|
-
params:
|
|
460
|
+
params: $
|
|
454
461
|
},
|
|
455
|
-
() => this.pushParams(
|
|
462
|
+
() => this.pushParams($)
|
|
456
463
|
);
|
|
457
464
|
});
|
|
458
465
|
c(this, "toggleAdvancedFilters", () => {
|
|
@@ -461,7 +468,7 @@ class Gt extends f.Component {
|
|
|
461
468
|
this.state = {
|
|
462
469
|
data: [],
|
|
463
470
|
advancedFilters: !1,
|
|
464
|
-
columns:
|
|
471
|
+
columns: Pt(),
|
|
465
472
|
params: {},
|
|
466
473
|
taxGroups: [],
|
|
467
474
|
pagination: {
|
|
@@ -475,49 +482,49 @@ class Gt extends f.Component {
|
|
|
475
482
|
};
|
|
476
483
|
}
|
|
477
484
|
render() {
|
|
478
|
-
var
|
|
485
|
+
var k;
|
|
479
486
|
const {
|
|
480
|
-
data: { result:
|
|
487
|
+
data: { result: e, facets: a },
|
|
481
488
|
loading: l,
|
|
482
489
|
error: o,
|
|
483
490
|
params: n,
|
|
484
491
|
pagination: h,
|
|
485
492
|
advancedFilters: d,
|
|
486
493
|
dataset: v,
|
|
487
|
-
taxGroups:
|
|
488
|
-
} = this.state, { datasetKey:
|
|
494
|
+
taxGroups: Ut
|
|
495
|
+
} = this.state, { datasetKey: A, defaultTaxonKey: q, citation: N } = this.props, X = u(a, "rank") ? a.rank.map((t) => ({
|
|
489
496
|
value: t.value,
|
|
490
497
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
491
498
|
})) : null;
|
|
492
|
-
u(
|
|
499
|
+
u(a, "issue") && a.issue.map((t) => ({
|
|
493
500
|
value: t.value,
|
|
494
501
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
495
502
|
}));
|
|
496
|
-
const
|
|
503
|
+
const Z = u(a, "status") ? a.status.map((t) => ({
|
|
497
504
|
value: t.value,
|
|
498
505
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
499
|
-
})) : null,
|
|
506
|
+
})) : null, J = u(a, "nomStatus") ? a.nomStatus.map((t) => ({
|
|
500
507
|
value: t.value,
|
|
501
508
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
502
|
-
})) : null,
|
|
509
|
+
})) : null, Q = u(a, "nameType") ? a.nameType.map((t) => ({
|
|
503
510
|
value: t.value,
|
|
504
511
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
505
|
-
})) : null,
|
|
512
|
+
})) : null, tt = u(a, "field") ? a.field.map((t) => ({
|
|
506
513
|
value: t.value,
|
|
507
514
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
508
|
-
})) : null,
|
|
515
|
+
})) : null, et = u(a, "authorship") ? a.authorship.map((t) => ({
|
|
509
516
|
value: t.value,
|
|
510
517
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
511
|
-
})) : [],
|
|
518
|
+
})) : [], at = (t) => t === "1" || t === !0 || t === "true" ? "Extinct" : t === "0" || t === !1 || t === "false" ? "Extant" : "Unknown", st = u(a, "extinct") ? a.extinct.map((t) => ({
|
|
512
519
|
value: t.value,
|
|
513
|
-
label: `${
|
|
514
|
-
})) : [],
|
|
520
|
+
label: `${at(t == null ? void 0 : t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
521
|
+
})) : [], nt = u(a, "environment") ? a.environment.map((t) => ({
|
|
515
522
|
value: t.value,
|
|
516
523
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
517
|
-
})) : [],
|
|
524
|
+
})) : [], lt = u(a, "group") ? a.group.map((t) => ({
|
|
518
525
|
value: t.value,
|
|
519
526
|
label: `${m(t.value)} (${t.count.toLocaleString("en-GB")})`
|
|
520
|
-
})) : [],
|
|
527
|
+
})) : [], it = u(a, "authorshipYear") ? a.authorshipYear.map((t) => ({
|
|
521
528
|
value: t.value,
|
|
522
529
|
label: `${t.value} (${t.count.toLocaleString("en-GB")})`
|
|
523
530
|
})) : [];
|
|
@@ -531,19 +538,19 @@ class Gt extends f.Component {
|
|
|
531
538
|
margin: "16px 0"
|
|
532
539
|
},
|
|
533
540
|
children: [
|
|
534
|
-
|
|
541
|
+
N === "top" && v && /* @__PURE__ */ s.jsx(I, { dataset: v }),
|
|
535
542
|
/* @__PURE__ */ s.jsx(x, { children: o && /* @__PURE__ */ s.jsx(
|
|
536
|
-
|
|
543
|
+
yt,
|
|
537
544
|
{
|
|
538
545
|
style: { marginBottom: "10px" },
|
|
539
|
-
message: /* @__PURE__ */ s.jsx(
|
|
546
|
+
message: /* @__PURE__ */ s.jsx(Ot, { error: o }),
|
|
540
547
|
type: "error"
|
|
541
548
|
}
|
|
542
549
|
) }),
|
|
543
550
|
/* @__PURE__ */ s.jsxs(x, { children: [
|
|
544
551
|
/* @__PURE__ */ s.jsxs(g, { xs: 24, sm: 24, md: 12, style: { marginBottom: "8px" }, children: [
|
|
545
552
|
/* @__PURE__ */ s.jsx(
|
|
546
|
-
|
|
553
|
+
Lt,
|
|
547
554
|
{
|
|
548
555
|
defaultValue: u(this.props.filters || {}, "q"),
|
|
549
556
|
onSearch: (t) => this.updateSearch({ q: t }),
|
|
@@ -552,11 +559,11 @@ class Gt extends f.Component {
|
|
|
552
559
|
}
|
|
553
560
|
),
|
|
554
561
|
/* @__PURE__ */ s.jsx(
|
|
555
|
-
|
|
562
|
+
wt,
|
|
556
563
|
{
|
|
557
|
-
datasetKey:
|
|
564
|
+
datasetKey: A,
|
|
558
565
|
minRank: "GENUS",
|
|
559
|
-
defaultTaxonKey: u(n, "TAXON_ID") ||
|
|
566
|
+
defaultTaxonKey: u(n, "TAXON_ID") || q || null,
|
|
560
567
|
onSelectName: (t) => {
|
|
561
568
|
this.updateSearch({ TAXON_ID: t.key });
|
|
562
569
|
},
|
|
@@ -569,9 +576,9 @@ class Gt extends f.Component {
|
|
|
569
576
|
}
|
|
570
577
|
),
|
|
571
578
|
(this.state.datasetOrigin === "xrelease" || this.state.datasetOrigin === "release") && /* @__PURE__ */ s.jsx("div", { style: { marginTop: "8px", marginBottom: "8px" }, children: /* @__PURE__ */ s.jsx(
|
|
572
|
-
|
|
579
|
+
Kt,
|
|
573
580
|
{
|
|
574
|
-
contributesTo: Number(
|
|
581
|
+
contributesTo: Number(A),
|
|
575
582
|
onSelectDataset: (t) => {
|
|
576
583
|
this.updateSearch({ SECTOR_DATASET_KEY: t.key });
|
|
577
584
|
},
|
|
@@ -584,8 +591,8 @@ class Gt extends f.Component {
|
|
|
584
591
|
}
|
|
585
592
|
) }),
|
|
586
593
|
/* @__PURE__ */ s.jsxs("div", { style: { marginTop: "10px" }, children: [
|
|
587
|
-
/* @__PURE__ */ s.jsx(
|
|
588
|
-
|
|
594
|
+
/* @__PURE__ */ s.jsx(C, { layout: "inline", children: /* @__PURE__ */ s.jsx(E, { label: "Matching", children: /* @__PURE__ */ s.jsx(
|
|
595
|
+
F,
|
|
589
596
|
{
|
|
590
597
|
size: "small",
|
|
591
598
|
onChange: (t) => {
|
|
@@ -601,16 +608,16 @@ class Gt extends f.Component {
|
|
|
601
608
|
]
|
|
602
609
|
}
|
|
603
610
|
) }) }),
|
|
604
|
-
/* @__PURE__ */ s.jsxs(
|
|
611
|
+
/* @__PURE__ */ s.jsxs(C, { layout: "inline", children: [
|
|
605
612
|
(this.state.datasetOrigin === "xrelease" || this.state.datasetOrigin === "project") && /* @__PURE__ */ s.jsx(E, { label: "Content", children: /* @__PURE__ */ s.jsx(
|
|
606
|
-
|
|
613
|
+
F,
|
|
607
614
|
{
|
|
608
615
|
style: { marginLeft: "8px" },
|
|
609
616
|
size: "small",
|
|
610
617
|
onChange: (t) => {
|
|
611
|
-
this.updateSearch({ sectorMode: t.target.value.split(",").filter((
|
|
618
|
+
this.updateSearch({ sectorMode: t.target.value.split(",").filter((ot) => ot !== "") });
|
|
612
619
|
},
|
|
613
|
-
value: O(n == null ? void 0 : n.sectorMode) ? (
|
|
620
|
+
value: O(n == null ? void 0 : n.sectorMode) ? (k = n == null ? void 0 : n.sectorMode) == null ? void 0 : k.join(",") : (n == null ? void 0 : n.sectorMode) || "",
|
|
614
621
|
optionType: "button",
|
|
615
622
|
options: [
|
|
616
623
|
{ value: "", label: "All" },
|
|
@@ -620,7 +627,7 @@ class Gt extends f.Component {
|
|
|
620
627
|
}
|
|
621
628
|
) }),
|
|
622
629
|
/* @__PURE__ */ s.jsx(E, { children: /* @__PURE__ */ s.jsx(
|
|
623
|
-
|
|
630
|
+
_,
|
|
624
631
|
{
|
|
625
632
|
mode: "multiple",
|
|
626
633
|
allowClear: !0,
|
|
@@ -645,7 +652,7 @@ class Gt extends f.Component {
|
|
|
645
652
|
{
|
|
646
653
|
defaultValue: u(n, "rank"),
|
|
647
654
|
onChange: (t) => this.updateSearch({ rank: t }),
|
|
648
|
-
vocab:
|
|
655
|
+
vocab: X || [],
|
|
649
656
|
label: "Ranks"
|
|
650
657
|
}
|
|
651
658
|
),
|
|
@@ -654,7 +661,7 @@ class Gt extends f.Component {
|
|
|
654
661
|
{
|
|
655
662
|
defaultValue: u(n, "status"),
|
|
656
663
|
onChange: (t) => this.updateSearch({ status: t }),
|
|
657
|
-
vocab:
|
|
664
|
+
vocab: Z || [],
|
|
658
665
|
label: "Status"
|
|
659
666
|
}
|
|
660
667
|
),
|
|
@@ -663,7 +670,7 @@ class Gt extends f.Component {
|
|
|
663
670
|
{
|
|
664
671
|
defaultValue: u(n, "environment"),
|
|
665
672
|
onChange: (t) => this.updateSearch({ environment: t }),
|
|
666
|
-
vocab:
|
|
673
|
+
vocab: nt,
|
|
667
674
|
label: "Environment"
|
|
668
675
|
}
|
|
669
676
|
),
|
|
@@ -671,7 +678,7 @@ class Gt extends f.Component {
|
|
|
671
678
|
p,
|
|
672
679
|
{
|
|
673
680
|
onChange: (t) => this.updateSearch({ extinct: t }),
|
|
674
|
-
vocab:
|
|
681
|
+
vocab: st,
|
|
675
682
|
label: "Extinct"
|
|
676
683
|
}
|
|
677
684
|
),
|
|
@@ -681,7 +688,7 @@ class Gt extends f.Component {
|
|
|
681
688
|
{
|
|
682
689
|
defaultValue: u(n, "nomstatus"),
|
|
683
690
|
onChange: (t) => this.updateSearch({ nomstatus: t }),
|
|
684
|
-
vocab:
|
|
691
|
+
vocab: J || [],
|
|
685
692
|
label: "Nomenclatural status"
|
|
686
693
|
}
|
|
687
694
|
),
|
|
@@ -690,7 +697,7 @@ class Gt extends f.Component {
|
|
|
690
697
|
{
|
|
691
698
|
defaultValue: u(n, "nameType"),
|
|
692
699
|
onChange: (t) => this.updateSearch({ nameType: t }),
|
|
693
|
-
vocab:
|
|
700
|
+
vocab: Q || [],
|
|
694
701
|
label: "Name type"
|
|
695
702
|
}
|
|
696
703
|
),
|
|
@@ -699,7 +706,7 @@ class Gt extends f.Component {
|
|
|
699
706
|
{
|
|
700
707
|
defaultValue: u(n, "field"),
|
|
701
708
|
onChange: (t) => this.updateSearch({ field: t }),
|
|
702
|
-
vocab:
|
|
709
|
+
vocab: tt || [],
|
|
703
710
|
label: "Name field"
|
|
704
711
|
}
|
|
705
712
|
),
|
|
@@ -708,7 +715,7 @@ class Gt extends f.Component {
|
|
|
708
715
|
{
|
|
709
716
|
defaultValue: u(n, "authorship"),
|
|
710
717
|
onChange: (t) => this.updateSearch({ authorship: t }),
|
|
711
|
-
vocab:
|
|
718
|
+
vocab: et,
|
|
712
719
|
label: "Authorship"
|
|
713
720
|
}
|
|
714
721
|
),
|
|
@@ -717,7 +724,7 @@ class Gt extends f.Component {
|
|
|
717
724
|
{
|
|
718
725
|
defaultValue: u(n, "group"),
|
|
719
726
|
onChange: (t) => this.updateSearch({ group: t }),
|
|
720
|
-
vocab:
|
|
727
|
+
vocab: lt,
|
|
721
728
|
label: "Taxonomic group"
|
|
722
729
|
}
|
|
723
730
|
),
|
|
@@ -726,7 +733,7 @@ class Gt extends f.Component {
|
|
|
726
733
|
{
|
|
727
734
|
defaultValue: u(n, "authorshipYear"),
|
|
728
735
|
onChange: (t) => this.updateSearch({ authorshipYear: t }),
|
|
729
|
-
vocab:
|
|
736
|
+
vocab: it,
|
|
730
737
|
label: "Authorship year"
|
|
731
738
|
}
|
|
732
739
|
)
|
|
@@ -739,65 +746,65 @@ class Gt extends f.Component {
|
|
|
739
746
|
children: [
|
|
740
747
|
"Advanced",
|
|
741
748
|
" ",
|
|
742
|
-
this.state.advancedFilters ? /* @__PURE__ */ s.jsx(
|
|
749
|
+
this.state.advancedFilters ? /* @__PURE__ */ s.jsx(H, {}) : /* @__PURE__ */ s.jsx(z, {})
|
|
743
750
|
]
|
|
744
751
|
}
|
|
745
752
|
) })
|
|
746
753
|
] })
|
|
747
754
|
] }),
|
|
748
755
|
/* @__PURE__ */ s.jsxs(x, { children: [
|
|
749
|
-
/* @__PURE__ */ s.jsx(g, { span: 12, style: { textAlign: "left", marginBottom: "8px" }, children: /* @__PURE__ */ s.jsx(
|
|
756
|
+
/* @__PURE__ */ s.jsx(g, { span: 12, style: { textAlign: "left", marginBottom: "8px" }, children: /* @__PURE__ */ s.jsx(bt, { type: "primary", danger: !0, onClick: this.resetSearch, children: "Reset all" }) }),
|
|
750
757
|
/* @__PURE__ */ s.jsx(g, { span: 12, style: { textAlign: "right", marginBottom: "8px" }, children: h && !isNaN(h.total) && `results: ${h.total.toLocaleString("en-GB")}` })
|
|
751
758
|
] }),
|
|
752
759
|
!o && /* @__PURE__ */ s.jsx(
|
|
753
|
-
|
|
760
|
+
jt,
|
|
754
761
|
{
|
|
755
762
|
size: "small",
|
|
756
763
|
columns: this.state.columns,
|
|
757
764
|
scroll: { x: "max-content" },
|
|
758
|
-
dataSource:
|
|
765
|
+
dataSource: e,
|
|
759
766
|
loading: l,
|
|
760
767
|
pagination: this.state.pagination,
|
|
761
768
|
onChange: this.handleTableChange,
|
|
762
769
|
rowKey: (t) => t.usage.id,
|
|
763
770
|
showSorterTooltip: !1,
|
|
764
771
|
expandedRowRender: (t) => /* @__PURE__ */ s.jsx(
|
|
765
|
-
|
|
772
|
+
Gt,
|
|
766
773
|
{
|
|
767
774
|
...t,
|
|
768
|
-
datasetKey:
|
|
775
|
+
datasetKey: A
|
|
769
776
|
}
|
|
770
777
|
)
|
|
771
778
|
}
|
|
772
779
|
),
|
|
773
|
-
|
|
780
|
+
N === "bottom" && v && /* @__PURE__ */ s.jsx(I, { dataset: v })
|
|
774
781
|
]
|
|
775
782
|
}
|
|
776
783
|
);
|
|
777
784
|
}
|
|
778
785
|
}
|
|
779
|
-
function
|
|
786
|
+
function Ht({
|
|
780
787
|
datasetKey: r,
|
|
781
788
|
filters: i,
|
|
782
|
-
onFiltersChange:
|
|
783
|
-
defaultTaxonKey:
|
|
789
|
+
onFiltersChange: e,
|
|
790
|
+
defaultTaxonKey: a,
|
|
784
791
|
citation: l,
|
|
785
792
|
auth: o,
|
|
786
793
|
...n
|
|
787
794
|
}) {
|
|
788
|
-
return
|
|
789
|
-
|
|
795
|
+
return dt(o), /* @__PURE__ */ s.jsx(pt.Provider, { value: mt(n), children: /* @__PURE__ */ s.jsx(
|
|
796
|
+
zt,
|
|
790
797
|
{
|
|
791
798
|
datasetKey: r,
|
|
792
799
|
filters: i,
|
|
793
|
-
onFiltersChange:
|
|
794
|
-
defaultTaxonKey:
|
|
800
|
+
onFiltersChange: e,
|
|
801
|
+
defaultTaxonKey: a,
|
|
795
802
|
citation: l
|
|
796
803
|
}
|
|
797
804
|
) });
|
|
798
805
|
}
|
|
799
|
-
const
|
|
806
|
+
const ce = ht(ct(Ht));
|
|
800
807
|
export {
|
|
801
|
-
|
|
808
|
+
ce as Search
|
|
802
809
|
};
|
|
803
810
|
//# sourceMappingURL=search.js.map
|