col-browser 2.3.0 → 2.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "col-browser",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Catalogue of Life browse and search React components",
5
5
  "main": "umd/col-browser.js",
6
6
  "module": "es/index.js",
@@ -77539,7 +77539,8 @@ html body {
77539
77539
  decisions,
77540
77540
  typeMaterial,
77541
77541
  referenceIndexMap,
77542
- primarySource
77542
+ primarySource,
77543
+ misapplied
77543
77544
  }) => {
77544
77545
  const [showAll, setShowAll] = reactExports.useState(false);
77545
77546
  const getNomStatus = (taxon) => !nomStatus ? get(taxon, "name.nomStatus") : nomStatus[get(taxon, "name.nomStatus")][get(taxon, "name.code"), "zoological"];
@@ -77555,23 +77556,31 @@ html body {
77555
77556
  }
77556
77557
  };
77557
77558
  const items = [];
77558
- if (data.homotypic) {
77559
- [...data.homotypic].sort(sorter).forEach((s) => {
77560
- items.push({ syn: s, homotypic: true, indent: false });
77561
- });
77562
- }
77563
- if (data.heterotypicGroups) {
77564
- [...data.heterotypicGroups].sort((a, b2) => sorter(a[0], b2[0])).forEach((group) => {
77565
- group.forEach((s, i) => {
77566
- items.push({ syn: s, homotypic: i > 0, indent: i > 0 });
77559
+ if (misapplied) {
77560
+ if (data.misapplied) {
77561
+ [...data.misapplied].sort(sorter).forEach((s) => {
77562
+ items.push({ syn: s, homotypic: false, indent: false });
77567
77563
  });
77568
- });
77564
+ }
77565
+ } else {
77566
+ if (data.homotypic) {
77567
+ [...data.homotypic].sort(sorter).forEach((s) => {
77568
+ items.push({ syn: s, homotypic: true, indent: false });
77569
+ });
77570
+ }
77571
+ if (data.heterotypicGroups) {
77572
+ [...data.heterotypicGroups].sort((a, b2) => sorter(a[0], b2[0])).forEach((group) => {
77573
+ group.forEach((s, i) => {
77574
+ items.push({ syn: s, homotypic: i > 0, indent: i > 0 });
77575
+ });
77576
+ });
77577
+ }
77569
77578
  }
77570
77579
  const total = items.length;
77571
77580
  const visibleItems = showAll ? items : items.slice(0, TOP_N);
77572
77581
  const renderItem = ({ syn: s, homotypic, indent }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(BorderedListItem$1, { children: [
77573
77582
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: indent ? { marginLeft: "10px" } : null, children: [
77574
- homotypic === true ? "≡ " : "= ",
77583
+ misapplied ? "" : homotypic === true ? "≡ " : "= ",
77575
77584
  " ",
77576
77585
  /* @__PURE__ */ jsxRuntimeExports.jsx(LinkTo, { to: "taxon", args: get(s, "id"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
77577
77586
  "span",
@@ -87294,7 +87303,7 @@ html body {
87294
87303
  );
87295
87304
  const homotypic = get(info, "synonyms.homotypic", []);
87296
87305
  const heterotypic = get(info, "synonyms.heterotypic", []);
87297
- get(info, "synonyms.misapplied", []);
87306
+ const misapplied = get(info, "synonyms.misapplied", []);
87298
87307
  [
87299
87308
  ...homotypic.map((h) => ({ ...h, __homotypic: true })),
87300
87309
  ...heterotypic
@@ -87478,6 +87487,20 @@ html body {
87478
87487
  datasetKey
87479
87488
  }
87480
87489
  ) }),
87490
+ !isSynonym && misapplied.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(PresentationItem$1, { md, label: "Misapplied names", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
87491
+ SynonymsTable,
87492
+ {
87493
+ misapplied: true,
87494
+ primarySource: sourceDataset,
87495
+ data: get(info, "synonyms"),
87496
+ decisions: get(info, "decisions"),
87497
+ references: get(info, "references"),
87498
+ typeMaterial: get(info, "typeMaterial"),
87499
+ referenceIndexMap,
87500
+ style: { marginTop: "-3px" },
87501
+ datasetKey
87502
+ }
87503
+ ) }),
87481
87504
  get(info, "typeMaterial") && info.typeMaterial[(_m = (_l = info == null ? void 0 : info.usage) == null ? void 0 : _l.name) == null ? void 0 : _m.id] && /* @__PURE__ */ jsxRuntimeExports.jsx(PresentationItem$1, { md, label: "Type material", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
87482
87505
  TypeMaterial,
87483
87506
  {