@burdenoff/microfe-ecoimpacthub 2026.704.4 → 2026.709.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/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts +5 -0
- package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts.map +1 -0
- package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts +4 -0
- package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts.map +1 -0
- package/dist/ecoimpacthub/EcoImpactHubRoutes.js +48 -40
- package/dist/ecoimpacthub/EcoImpactHubRoutes.js.map +1 -1
- package/dist/ecoimpacthub/components/DataTable.d.ts +28 -0
- package/dist/ecoimpacthub/components/DataTable.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EcoDiscussion.d.ts +18 -0
- package/dist/ecoimpacthub/components/EcoDiscussion.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EcoTags.d.ts +17 -0
- package/dist/ecoimpacthub/components/EcoTags.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EmptyState.d.ts +18 -0
- package/dist/ecoimpacthub/components/EmptyState.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EvidenceUpload.d.ts +14 -0
- package/dist/ecoimpacthub/components/EvidenceUpload.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts +10 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.js +8 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.js.map +1 -0
- package/dist/ecoimpacthub/components/FileLink.d.ts +15 -0
- package/dist/ecoimpacthub/components/FileLink.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/FilterTabs.d.ts +18 -0
- package/dist/ecoimpacthub/components/FilterTabs.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/MetricsCard.d.ts +23 -0
- package/dist/ecoimpacthub/components/MetricsCard.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/MiniBar.d.ts +16 -0
- package/dist/ecoimpacthub/components/MiniBar.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/PageLayout.d.ts +16 -0
- package/dist/ecoimpacthub/components/PageLayout.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/Pagination.d.ts +22 -0
- package/dist/ecoimpacthub/components/Pagination.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/StateViews.d.ts +24 -0
- package/dist/ecoimpacthub/components/StateViews.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/StatusBadge.d.ts +9 -0
- package/dist/ecoimpacthub/components/StatusBadge.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/Tabs.d.ts +17 -0
- package/dist/ecoimpacthub/components/Tabs.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/index.d.ts +19 -0
- package/dist/ecoimpacthub/components/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts +16 -0
- package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts.map +1 -0
- package/dist/ecoimpacthub/context/index.d.ts +6 -0
- package/dist/ecoimpacthub/context/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/index.d.ts +10 -0
- package/dist/ecoimpacthub/hooks/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useCursorPager.d.ts +33 -0
- package/dist/ecoimpacthub/hooks/useCursorPager.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoComments.d.ts +36 -0
- package/dist/ecoimpacthub/hooks/useEcoComments.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts +47 -0
- package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts +104 -0
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoTags.d.ts +44 -0
- package/dist/ecoimpacthub/hooks/useEcoTags.d.ts.map +1 -0
- package/dist/ecoimpacthub/index.d.ts +10 -0
- package/dist/ecoimpacthub/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/index.js +2 -0
- package/dist/ecoimpacthub/pages/DashboardPage.d.ts +10 -0
- package/dist/ecoimpacthub/pages/DashboardPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/DashboardPage.js +345 -189
- package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts +9 -0
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js +58 -0
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts +23 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js +70 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts +9 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.js +51 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts +9 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.js +29 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.js.map +1 -0
- package/dist/ecoimpacthub/pages/badges.d.ts +27 -0
- package/dist/ecoimpacthub/pages/badges.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/badges.js +71 -0
- package/dist/ecoimpacthub/pages/badges.js.map +1 -0
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts +15 -0
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +337 -300
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/carbonVisuals.d.ts +47 -0
- package/dist/ecoimpacthub/pages/carbonVisuals.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/carbonVisuals.js +89 -0
- package/dist/ecoimpacthub/pages/carbonVisuals.js.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts +12 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +252 -218
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +15 -12
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts +6 -0
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js +168 -0
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js.map +1 -0
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts +12 -0
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js +30 -17
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts +11 -0
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +236 -219
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts +11 -0
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +248 -212
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js +119 -118
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts +10 -0
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +498 -370
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/sites/SitesPage.js +109 -99
- package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts +22 -0
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js +64 -0
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js.map +1 -0
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts +9 -0
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +275 -259
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js +235 -177
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts +33 -0
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js +42 -0
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/ecoimpacthub/services/index.d.ts +6 -0
- package/dist/ecoimpacthub/services/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/services/index.js +1 -0
- package/dist/ecoimpacthub/types/index.d.ts +417 -0
- package/dist/ecoimpacthub/types/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/cn.d.ts +4 -0
- package/dist/ecoimpacthub/utils/cn.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/formatters.d.ts +26 -0
- package/dist/ecoimpacthub/utils/formatters.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/i18n.d.ts +6 -0
- package/dist/ecoimpacthub/utils/i18n.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/index.d.ts +9 -0
- package/dist/ecoimpacthub/utils/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/navigation.d.ts +14 -0
- package/dist/ecoimpacthub/utils/navigation.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +305 -0
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -0
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +44 -33
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +31 -23
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
- package/package.json +5 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { useEcoImpactHub as e } from "../../context/EcoImpactHubContext.js";
|
|
2
2
|
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
-
import { formatEnumLabel as n, formatRelativeTime as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { EmptyState as s } from "../../components/EmptyState.js";
|
|
3
|
+
import { formatEnumLabel as n, formatRelativeTime as ee } from "../../utils/formatters.js";
|
|
4
|
+
import { ErrorView as te, LoadingView as ne } from "../../components/StateViews.js";
|
|
5
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
7
6
|
import "../../context/index.js";
|
|
8
|
-
import { useEcoCreateSpecies as
|
|
9
|
-
import { useCursorPager as
|
|
7
|
+
import { useEcoCreateSpecies as re, useEcoSpecies as i } from "../../hooks/useEcoImpactHubApi.js";
|
|
8
|
+
import { useCursorPager as a } from "../../hooks/useCursorPager.js";
|
|
10
9
|
import "../../hooks/index.js";
|
|
11
|
-
import { DataTable as
|
|
12
|
-
import { Pagination as
|
|
13
|
-
import { FilterTabs as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
10
|
+
import { DataTable as o } from "../../components/DataTable.js";
|
|
11
|
+
import { Pagination as s } from "../../components/Pagination.js";
|
|
12
|
+
import { FilterTabs as c } from "../../components/FilterTabs.js";
|
|
13
|
+
import { ConservationBadge as ie } from "../_shared/ConservationBadge.js";
|
|
14
|
+
import { TaxonChip as ae } from "../_shared/TaxonChip.js";
|
|
15
|
+
import { useMemo as l, useState as u } from "react";
|
|
16
|
+
import { Plus as d, Rabbit as oe, Search as f, Star as p } from "lucide-react";
|
|
17
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
18
|
+
import { Button as _, GlassCard as v, Input as y, Label as b, ResponsiveDialog as x, ResponsiveDialogContent as se, ResponsiveDialogDescription as ce, ResponsiveDialogFooter as le, ResponsiveDialogHeader as ue, ResponsiveDialogTitle as de, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E, Textarea as D } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
//#region src/ecoimpacthub/pages/species/SpeciesPage.tsx
|
|
19
|
-
var
|
|
20
|
+
var O = [
|
|
20
21
|
"MAMMAL",
|
|
21
22
|
"BIRD",
|
|
22
23
|
"REPTILE",
|
|
@@ -26,7 +27,7 @@ var j = [
|
|
|
26
27
|
"PLANT",
|
|
27
28
|
"FUNGI",
|
|
28
29
|
"OTHER"
|
|
29
|
-
],
|
|
30
|
+
], k = [
|
|
30
31
|
"LEAST_CONCERN",
|
|
31
32
|
"NEAR_THREATENED",
|
|
32
33
|
"VULNERABLE",
|
|
@@ -35,13 +36,13 @@ var j = [
|
|
|
35
36
|
"EXTINCT_IN_WILD",
|
|
36
37
|
"DATA_DEFICIENT",
|
|
37
38
|
"NOT_EVALUATED"
|
|
38
|
-
],
|
|
39
|
+
], A = [{
|
|
39
40
|
value: "ALL",
|
|
40
41
|
label: "All species"
|
|
41
42
|
}, {
|
|
42
43
|
value: "PRIORITY",
|
|
43
44
|
label: "Priority only"
|
|
44
|
-
}],
|
|
45
|
+
}], j = 25, M = {
|
|
45
46
|
commonName: "",
|
|
46
47
|
scientificName: "",
|
|
47
48
|
taxonGroup: "MAMMAL",
|
|
@@ -49,284 +50,341 @@ var j = [
|
|
|
49
50
|
isPriority: !1,
|
|
50
51
|
description: ""
|
|
51
52
|
};
|
|
52
|
-
function
|
|
53
|
-
let { navigateTo:
|
|
54
|
-
taxonGroup:
|
|
55
|
-
conservationStatus:
|
|
56
|
-
priorityOnly:
|
|
53
|
+
function N() {
|
|
54
|
+
let { navigateTo: N } = e(), [P, F] = u("ALL"), [I, L] = u("ALL"), [R, z] = u("ALL"), [B, V] = u(""), H = a(), [fe, U] = u(!1), [W, G] = u(M), [K, q] = u(null), { data: J, isLoading: pe, isError: me, refetch: he } = i({
|
|
55
|
+
taxonGroup: P === "ALL" ? void 0 : P,
|
|
56
|
+
conservationStatus: I === "ALL" ? void 0 : I,
|
|
57
|
+
priorityOnly: R === "PRIORITY" ? !0 : void 0,
|
|
57
58
|
pagination: {
|
|
58
|
-
limit:
|
|
59
|
-
cursor:
|
|
59
|
+
limit: j,
|
|
60
|
+
cursor: H.cursor
|
|
60
61
|
}
|
|
61
|
-
}),
|
|
62
|
+
}), Y = re(), X = l(() => J?.items ?? [], [J]), Z = B.trim().toLowerCase(), Q = l(() => Z ? X.filter((e) => e.commonName.toLowerCase().includes(Z) || (e.scientificName?.toLowerCase().includes(Z) ?? !1)) : X, [X, Z]), ge = [
|
|
62
63
|
{
|
|
63
64
|
key: "name",
|
|
64
65
|
header: "Species",
|
|
65
|
-
render: (e) => /* @__PURE__ */
|
|
66
|
-
className: "
|
|
67
|
-
children:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
render: (e) => /* @__PURE__ */ g("div", {
|
|
67
|
+
className: "min-w-0",
|
|
68
|
+
children: [/* @__PURE__ */ h("p", {
|
|
69
|
+
className: "font-semibold text-text-primary",
|
|
70
|
+
children: e.commonName
|
|
71
|
+
}), e.scientificName && /* @__PURE__ */ h("p", {
|
|
72
|
+
className: "truncate text-xs italic text-text-tertiary",
|
|
73
|
+
children: e.scientificName
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
72
76
|
},
|
|
73
77
|
{
|
|
74
78
|
key: "taxonGroup",
|
|
75
|
-
header: "
|
|
79
|
+
header: "Taxon",
|
|
76
80
|
hideOnMobile: !0,
|
|
77
|
-
render: (e) => /* @__PURE__ */
|
|
78
|
-
className: "text-text-secondary",
|
|
79
|
-
children: n(e.taxonGroup)
|
|
80
|
-
})
|
|
81
|
+
render: (e) => /* @__PURE__ */ h(ae, { group: e.taxonGroup })
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
84
|
key: "conservationStatus",
|
|
84
|
-
header: "Conservation",
|
|
85
|
-
render: (e) => /* @__PURE__ */
|
|
85
|
+
header: "Conservation status",
|
|
86
|
+
render: (e) => /* @__PURE__ */ h(ie, { status: e.conservationStatus })
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
89
|
key: "priority",
|
|
89
90
|
header: "Priority",
|
|
90
91
|
align: "center",
|
|
91
|
-
render: (e) => e.isPriority ? /* @__PURE__ */
|
|
92
|
-
className: "inline-flex justify-center text-status-warning-text",
|
|
92
|
+
render: (e) => e.isPriority ? /* @__PURE__ */ h("span", {
|
|
93
|
+
className: "inline-flex items-center justify-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-status-warning-text",
|
|
93
94
|
title: "Priority species",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
}) :
|
|
95
|
+
children: /* @__PURE__ */ h(p, { className: "h-3.5 w-3.5 fill-current" })
|
|
96
|
+
}) : /* @__PURE__ */ h("span", {
|
|
97
|
+
className: "text-text-tertiary",
|
|
98
|
+
title: "Not prioritised",
|
|
99
|
+
children: "—"
|
|
100
|
+
})
|
|
96
101
|
},
|
|
97
102
|
{
|
|
98
103
|
key: "updated",
|
|
99
104
|
header: "Updated",
|
|
100
105
|
align: "right",
|
|
101
106
|
hideOnMobile: !0,
|
|
102
|
-
render: (e) => /* @__PURE__ */
|
|
103
|
-
className: "text-text-tertiary",
|
|
104
|
-
children:
|
|
107
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
108
|
+
className: "whitespace-nowrap text-text-tertiary",
|
|
109
|
+
children: ee(e.updatedAt)
|
|
105
110
|
})
|
|
106
111
|
}
|
|
107
112
|
], $ = () => {
|
|
108
|
-
|
|
113
|
+
G(M), q(null);
|
|
109
114
|
};
|
|
110
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ g(t, {
|
|
111
116
|
title: "Species",
|
|
112
117
|
description: "Tracked taxa — conservation status, priority focus & field observations.",
|
|
113
|
-
actions: /* @__PURE__ */
|
|
114
|
-
onClick: () =>
|
|
115
|
-
children: [/* @__PURE__ */
|
|
118
|
+
actions: /* @__PURE__ */ g(_, {
|
|
119
|
+
onClick: () => U(!0),
|
|
120
|
+
children: [/* @__PURE__ */ h(d, { className: "mr-1.5 h-4 w-4" }), " New species"]
|
|
116
121
|
}),
|
|
117
122
|
children: [
|
|
118
|
-
/* @__PURE__ */ v
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
/* @__PURE__ */ h(v, {
|
|
124
|
+
treatment: "plain",
|
|
125
|
+
className: "mb-5 p-4",
|
|
126
|
+
children: /* @__PURE__ */ g("div", {
|
|
127
|
+
className: "flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between",
|
|
128
|
+
children: [/* @__PURE__ */ g("div", {
|
|
129
|
+
className: "flex flex-wrap items-end gap-3",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ g("div", {
|
|
132
|
+
className: "grid gap-1.5",
|
|
133
|
+
children: [/* @__PURE__ */ h("span", {
|
|
134
|
+
className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
|
|
135
|
+
children: "Taxon group"
|
|
136
|
+
}), /* @__PURE__ */ g(S, {
|
|
137
|
+
value: P,
|
|
138
|
+
onValueChange: (e) => {
|
|
139
|
+
F(e), H.reset();
|
|
140
|
+
},
|
|
141
|
+
children: [/* @__PURE__ */ h(T, {
|
|
142
|
+
className: "w-44",
|
|
143
|
+
children: /* @__PURE__ */ h(E, { placeholder: "All groups" })
|
|
144
|
+
}), /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(w, {
|
|
145
|
+
value: "ALL",
|
|
146
|
+
children: "All groups"
|
|
147
|
+
}), O.map((e) => /* @__PURE__ */ h(w, {
|
|
148
|
+
value: e,
|
|
149
|
+
children: n(e)
|
|
150
|
+
}, e))] })]
|
|
151
|
+
})]
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ g("div", {
|
|
154
|
+
className: "grid gap-1.5",
|
|
155
|
+
children: [/* @__PURE__ */ h("span", {
|
|
156
|
+
className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
|
|
157
|
+
children: "Conservation status"
|
|
158
|
+
}), /* @__PURE__ */ g(S, {
|
|
159
|
+
value: I,
|
|
160
|
+
onValueChange: (e) => {
|
|
161
|
+
L(e), H.reset();
|
|
162
|
+
},
|
|
163
|
+
children: [/* @__PURE__ */ h(T, {
|
|
164
|
+
className: "w-52",
|
|
165
|
+
children: /* @__PURE__ */ h(E, { placeholder: "All conservation" })
|
|
166
|
+
}), /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(w, {
|
|
167
|
+
value: "ALL",
|
|
168
|
+
children: "All conservation"
|
|
169
|
+
}), k.map((e) => /* @__PURE__ */ h(w, {
|
|
170
|
+
value: e,
|
|
171
|
+
children: n(e)
|
|
172
|
+
}, e))] })]
|
|
173
|
+
})]
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ g("div", {
|
|
176
|
+
className: "grid gap-1.5",
|
|
177
|
+
children: [/* @__PURE__ */ h("span", {
|
|
178
|
+
className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
|
|
179
|
+
children: "Search this page"
|
|
180
|
+
}), /* @__PURE__ */ g("div", {
|
|
181
|
+
className: "relative",
|
|
182
|
+
children: [/* @__PURE__ */ h(f, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ h(y, {
|
|
183
|
+
value: B,
|
|
184
|
+
onChange: (e) => V(e.target.value),
|
|
185
|
+
placeholder: "Common or scientific name…",
|
|
186
|
+
className: "w-full pl-9 sm:w-64",
|
|
187
|
+
"aria-label": "Search loaded species by name"
|
|
188
|
+
})]
|
|
189
|
+
})]
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
}), /* @__PURE__ */ h(c, {
|
|
193
|
+
options: A,
|
|
194
|
+
value: R,
|
|
124
195
|
onChange: (e) => {
|
|
125
|
-
|
|
196
|
+
z(e), H.reset();
|
|
126
197
|
}
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
value: L,
|
|
130
|
-
onValueChange: (e) => {
|
|
131
|
-
R(e), U.reset();
|
|
132
|
-
},
|
|
133
|
-
children: [/* @__PURE__ */ _(O, {
|
|
134
|
-
className: "w-44",
|
|
135
|
-
children: /* @__PURE__ */ _(k, { placeholder: "All groups" })
|
|
136
|
-
}), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
|
|
137
|
-
value: "ALL",
|
|
138
|
-
children: "All groups"
|
|
139
|
-
}), j.map((e) => /* @__PURE__ */ _(D, {
|
|
140
|
-
value: e,
|
|
141
|
-
children: n(e)
|
|
142
|
-
}, e))] })]
|
|
143
|
-
}),
|
|
144
|
-
/* @__PURE__ */ v(T, {
|
|
145
|
-
value: z,
|
|
146
|
-
onValueChange: (e) => {
|
|
147
|
-
B(e), U.reset();
|
|
148
|
-
},
|
|
149
|
-
children: [/* @__PURE__ */ _(O, {
|
|
150
|
-
className: "w-52",
|
|
151
|
-
children: /* @__PURE__ */ _(k, { placeholder: "All conservation" })
|
|
152
|
-
}), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
|
|
153
|
-
value: "ALL",
|
|
154
|
-
children: "All conservation"
|
|
155
|
-
}), M.map((e) => /* @__PURE__ */ _(D, {
|
|
156
|
-
value: e,
|
|
157
|
-
children: n(e)
|
|
158
|
-
}, e))] })]
|
|
159
|
-
})
|
|
160
|
-
]
|
|
198
|
+
})]
|
|
199
|
+
})
|
|
161
200
|
}),
|
|
162
|
-
|
|
201
|
+
pe ? /* @__PURE__ */ h(ne, { label: "Loading species…" }) : me ? /* @__PURE__ */ h(te, {
|
|
163
202
|
message: "Couldn't load species.",
|
|
164
|
-
onRetry: () =>
|
|
165
|
-
}) :
|
|
203
|
+
onRetry: () => he()
|
|
204
|
+
}) : X.length === 0 ? /* @__PURE__ */ h(r, {
|
|
166
205
|
illustration: "empty-data",
|
|
167
|
-
icon: /* @__PURE__ */
|
|
206
|
+
icon: /* @__PURE__ */ h(oe, { className: "h-10 w-10" }),
|
|
168
207
|
title: "No species yet",
|
|
169
|
-
description:
|
|
170
|
-
action: /* @__PURE__ */
|
|
171
|
-
onClick: () =>
|
|
172
|
-
children: [/* @__PURE__ */
|
|
208
|
+
description: P === "ALL" && I === "ALL" && R === "ALL" ? "Register your first species to start logging field observations." : "No species match these filters.",
|
|
209
|
+
action: /* @__PURE__ */ g(_, {
|
|
210
|
+
onClick: () => U(!0),
|
|
211
|
+
children: [/* @__PURE__ */ h(d, { className: "mr-1.5 h-4 w-4" }), " New species"]
|
|
173
212
|
})
|
|
174
|
-
}) :
|
|
175
|
-
|
|
213
|
+
}) : Q.length === 0 ? /* @__PURE__ */ h(r, {
|
|
214
|
+
icon: /* @__PURE__ */ h(f, { className: "h-10 w-10" }),
|
|
215
|
+
title: "No matches on this page",
|
|
216
|
+
description: `No species on this page match “${B.trim()}”. Clear the search or page through the catalog.`,
|
|
217
|
+
action: /* @__PURE__ */ h(_, {
|
|
218
|
+
variant: "outline",
|
|
219
|
+
onClick: () => V(""),
|
|
220
|
+
children: "Clear search"
|
|
221
|
+
})
|
|
222
|
+
}) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(o, {
|
|
223
|
+
columns: ge,
|
|
176
224
|
rows: Q,
|
|
177
225
|
rowKey: (e) => e.id,
|
|
178
|
-
onRowClick: (e) =>
|
|
179
|
-
}), /* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
226
|
+
onRowClick: (e) => N(`species/${e.id}`)
|
|
227
|
+
}), Z ? /* @__PURE__ */ g("p", {
|
|
228
|
+
className: "mt-4 text-sm text-text-secondary tabular-nums",
|
|
229
|
+
children: [
|
|
230
|
+
Q.length,
|
|
231
|
+
" of ",
|
|
232
|
+
X.length,
|
|
233
|
+
" on this page match “",
|
|
234
|
+
B.trim(),
|
|
235
|
+
"”"
|
|
236
|
+
]
|
|
237
|
+
}) : /* @__PURE__ */ h(s, {
|
|
238
|
+
page: H.page,
|
|
239
|
+
pageSize: j,
|
|
240
|
+
itemCount: X.length,
|
|
241
|
+
hasMore: J?.pageInfo?.hasMore ?? !1,
|
|
242
|
+
onPageChange: (e) => H.onPageChange(e, J?.pageInfo?.cursor)
|
|
185
243
|
})] }),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
open:
|
|
244
|
+
/* @__PURE__ */ h(x, {
|
|
245
|
+
open: fe,
|
|
188
246
|
onOpenChange: (e) => {
|
|
189
|
-
|
|
247
|
+
U(e), e || $();
|
|
190
248
|
},
|
|
191
|
-
children: /* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ g(se, { children: [
|
|
250
|
+
/* @__PURE__ */ g(ue, { children: [/* @__PURE__ */ h(de, { children: "New species" }), /* @__PURE__ */ h(ce, { children: "Register a taxon to track its conservation status and field observations." })] }),
|
|
251
|
+
/* @__PURE__ */ g("div", {
|
|
194
252
|
className: "grid gap-4 py-2",
|
|
195
253
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ g("div", {
|
|
197
255
|
className: "grid gap-2 sm:grid-cols-2",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ g("div", {
|
|
199
257
|
className: "grid gap-1.5",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ h(b, {
|
|
201
259
|
htmlFor: "commonName",
|
|
202
260
|
children: "Common name *"
|
|
203
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ h(y, {
|
|
204
262
|
id: "commonName",
|
|
205
|
-
value:
|
|
206
|
-
onChange: (e) =>
|
|
207
|
-
...
|
|
263
|
+
value: W.commonName,
|
|
264
|
+
onChange: (e) => G({
|
|
265
|
+
...W,
|
|
208
266
|
commonName: e.target.value
|
|
209
267
|
}),
|
|
210
268
|
placeholder: "Indian Pangolin"
|
|
211
269
|
})]
|
|
212
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ g("div", {
|
|
213
271
|
className: "grid gap-1.5",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ h(b, {
|
|
215
273
|
htmlFor: "scientificName",
|
|
216
274
|
children: "Scientific name"
|
|
217
|
-
}), /* @__PURE__ */
|
|
275
|
+
}), /* @__PURE__ */ h(y, {
|
|
218
276
|
id: "scientificName",
|
|
219
|
-
value:
|
|
220
|
-
onChange: (e) =>
|
|
221
|
-
...
|
|
277
|
+
value: W.scientificName,
|
|
278
|
+
onChange: (e) => G({
|
|
279
|
+
...W,
|
|
222
280
|
scientificName: e.target.value
|
|
223
281
|
}),
|
|
224
282
|
placeholder: "Manis crassicaudata"
|
|
225
283
|
})]
|
|
226
284
|
})]
|
|
227
285
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ g("div", {
|
|
229
287
|
className: "grid gap-2 sm:grid-cols-2",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ g("div", {
|
|
231
289
|
className: "grid gap-1.5",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ h(b, {
|
|
233
291
|
htmlFor: "taxonGroup",
|
|
234
292
|
children: "Taxon group"
|
|
235
|
-
}), /* @__PURE__ */
|
|
236
|
-
value:
|
|
237
|
-
onValueChange: (e) =>
|
|
238
|
-
...
|
|
293
|
+
}), /* @__PURE__ */ g(S, {
|
|
294
|
+
value: W.taxonGroup,
|
|
295
|
+
onValueChange: (e) => G({
|
|
296
|
+
...W,
|
|
239
297
|
taxonGroup: e
|
|
240
298
|
}),
|
|
241
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ h(T, {
|
|
242
300
|
id: "taxonGroup",
|
|
243
|
-
children: /* @__PURE__ */
|
|
244
|
-
}), /* @__PURE__ */
|
|
301
|
+
children: /* @__PURE__ */ h(E, {})
|
|
302
|
+
}), /* @__PURE__ */ h(C, { children: O.map((e) => /* @__PURE__ */ h(w, {
|
|
245
303
|
value: e,
|
|
246
304
|
children: n(e)
|
|
247
305
|
}, e)) })]
|
|
248
306
|
})]
|
|
249
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), /* @__PURE__ */ g("div", {
|
|
250
308
|
className: "grid gap-1.5",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ h(b, {
|
|
252
310
|
htmlFor: "conservationStatus",
|
|
253
311
|
children: "Conservation status"
|
|
254
|
-
}), /* @__PURE__ */
|
|
255
|
-
value:
|
|
256
|
-
onValueChange: (e) =>
|
|
257
|
-
...
|
|
312
|
+
}), /* @__PURE__ */ g(S, {
|
|
313
|
+
value: W.conservationStatus,
|
|
314
|
+
onValueChange: (e) => G({
|
|
315
|
+
...W,
|
|
258
316
|
conservationStatus: e
|
|
259
317
|
}),
|
|
260
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ h(T, {
|
|
261
319
|
id: "conservationStatus",
|
|
262
|
-
children: /* @__PURE__ */
|
|
263
|
-
}), /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ h(E, {})
|
|
321
|
+
}), /* @__PURE__ */ h(C, { children: k.map((e) => /* @__PURE__ */ h(w, {
|
|
264
322
|
value: e,
|
|
265
323
|
children: n(e)
|
|
266
324
|
}, e)) })]
|
|
267
325
|
})]
|
|
268
326
|
})]
|
|
269
327
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ g("label", {
|
|
271
329
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ h("input", {
|
|
273
331
|
type: "checkbox",
|
|
274
|
-
checked:
|
|
275
|
-
onChange: (e) =>
|
|
276
|
-
...
|
|
332
|
+
checked: W.isPriority,
|
|
333
|
+
onChange: (e) => G({
|
|
334
|
+
...W,
|
|
277
335
|
isPriority: e.target.checked
|
|
278
336
|
}),
|
|
279
337
|
className: "h-4 w-4 rounded border-border-seam accent-action-primary-bg"
|
|
280
338
|
}), "Mark as priority species"]
|
|
281
339
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ g("div", {
|
|
283
341
|
className: "grid gap-1.5",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ h(b, {
|
|
285
343
|
htmlFor: "description",
|
|
286
344
|
children: "Description"
|
|
287
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ h(D, {
|
|
288
346
|
id: "description",
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
291
|
-
...
|
|
347
|
+
value: W.description,
|
|
348
|
+
onChange: (e) => G({
|
|
349
|
+
...W,
|
|
292
350
|
description: e.target.value
|
|
293
351
|
}),
|
|
294
352
|
placeholder: "Optional notes on habitat, range or identification.",
|
|
295
353
|
rows: 2
|
|
296
354
|
})]
|
|
297
355
|
}),
|
|
298
|
-
|
|
356
|
+
K && /* @__PURE__ */ h("p", {
|
|
299
357
|
className: "text-sm text-status-error-text",
|
|
300
|
-
children:
|
|
358
|
+
children: K
|
|
301
359
|
})
|
|
302
360
|
]
|
|
303
361
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ g(le, { children: [/* @__PURE__ */ h(_, {
|
|
305
363
|
variant: "outline",
|
|
306
|
-
onClick: () =>
|
|
364
|
+
onClick: () => U(!1),
|
|
307
365
|
children: "Cancel"
|
|
308
|
-
}), /* @__PURE__ */ _
|
|
366
|
+
}), /* @__PURE__ */ h(_, {
|
|
309
367
|
onClick: async () => {
|
|
310
|
-
if (!
|
|
311
|
-
|
|
368
|
+
if (!W.commonName.trim()) {
|
|
369
|
+
q("Common name is required.");
|
|
312
370
|
return;
|
|
313
371
|
}
|
|
314
372
|
try {
|
|
315
|
-
let e = await
|
|
316
|
-
commonName:
|
|
317
|
-
scientificName:
|
|
318
|
-
taxonGroup:
|
|
319
|
-
conservationStatus:
|
|
320
|
-
isPriority:
|
|
321
|
-
description:
|
|
373
|
+
let e = await Y.mutateAsync({
|
|
374
|
+
commonName: W.commonName.trim(),
|
|
375
|
+
scientificName: W.scientificName.trim() || null,
|
|
376
|
+
taxonGroup: W.taxonGroup,
|
|
377
|
+
conservationStatus: W.conservationStatus,
|
|
378
|
+
isPriority: W.isPriority,
|
|
379
|
+
description: W.description.trim() || null
|
|
322
380
|
});
|
|
323
|
-
|
|
381
|
+
U(!1), $(), N(`species/${e.id}`);
|
|
324
382
|
} catch (e) {
|
|
325
|
-
|
|
383
|
+
q(e instanceof Error ? e.message : "Failed to create species.");
|
|
326
384
|
}
|
|
327
385
|
},
|
|
328
|
-
disabled:
|
|
329
|
-
children:
|
|
386
|
+
disabled: Y.isPending,
|
|
387
|
+
children: Y.isPending ? "Creating…" : "Create species"
|
|
330
388
|
})] })
|
|
331
389
|
] })
|
|
332
390
|
})
|
|
@@ -334,6 +392,6 @@ function I() {
|
|
|
334
392
|
});
|
|
335
393
|
}
|
|
336
394
|
//#endregion
|
|
337
|
-
export {
|
|
395
|
+
export { N as SpeciesPage };
|
|
338
396
|
|
|
339
397
|
//# sourceMappingURL=SpeciesPage.js.map
|