@burdenoff/microfe-ecoimpacthub 2026.704.3 → 2026.704.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/ecoimpacthub/pages/DashboardPage.js +345 -189
  2. package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
  3. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js +58 -0
  4. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js.map +1 -0
  5. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js +70 -0
  6. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js.map +1 -0
  7. package/dist/ecoimpacthub/pages/_shared/MethodBadge.js +51 -0
  8. package/dist/ecoimpacthub/pages/_shared/MethodBadge.js.map +1 -0
  9. package/dist/ecoimpacthub/pages/_shared/TaxonChip.js +29 -0
  10. package/dist/ecoimpacthub/pages/_shared/TaxonChip.js.map +1 -0
  11. package/dist/ecoimpacthub/pages/badges.js +71 -0
  12. package/dist/ecoimpacthub/pages/badges.js.map +1 -0
  13. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +341 -300
  14. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
  15. package/dist/ecoimpacthub/pages/carbonVisuals.js +89 -0
  16. package/dist/ecoimpacthub/pages/carbonVisuals.js.map +1 -0
  17. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +252 -218
  18. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
  19. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +15 -12
  20. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
  21. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js +168 -0
  22. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js.map +1 -0
  23. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js +30 -17
  24. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js.map +1 -1
  25. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +236 -219
  26. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
  27. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +248 -212
  28. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
  29. package/dist/ecoimpacthub/pages/reports/ReportsPage.js +119 -118
  30. package/dist/ecoimpacthub/pages/reports/ReportsPage.js.map +1 -1
  31. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +498 -370
  32. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
  33. package/dist/ecoimpacthub/pages/sites/SitesPage.js +109 -99
  34. package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
  35. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js +64 -0
  36. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js.map +1 -0
  37. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +275 -259
  38. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
  39. package/dist/ecoimpacthub/pages/species/SpeciesPage.js +235 -177
  40. package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
  41. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +305 -0
  42. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -0
  43. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +44 -33
  44. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
  45. package/dist/node_modules/recharts/es6/util/ChartUtils.js +31 -23
  46. package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
  47. package/package.json +1 -1
@@ -1,21 +1,21 @@
1
- import { cn as e } from "../../utils/cn.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatCoords as n, formatDateTime as r, formatEnumLabel as i, formatNumber as ee } from "../../utils/formatters.js";
4
- import { ErrorView as te, LoadingView as ne } from "../../components/StateViews.js";
5
- import { EmptyState as re } from "../../components/EmptyState.js";
6
- import { useEcoObservations as ie, useEcoRecordObservation as a, useEcoSites as o, useEcoSpecies as s } from "../../hooks/useEcoImpactHubApi.js";
7
- import { useCursorPager as c } from "../../hooks/useCursorPager.js";
1
+ import { PageLayout as e } from "../../components/PageLayout.js";
2
+ import { formatCoords as t, formatDateTime as n, formatEnumLabel as r, formatNumber as i } from "../../utils/formatters.js";
3
+ import { ErrorView as a, LoadingView as o } from "../../components/StateViews.js";
4
+ import { EmptyState as s } from "../../components/EmptyState.js";
5
+ import { useEcoObservations as ee, useEcoRecordObservation as te, useEcoSites as ne, useEcoSpecies as re } from "../../hooks/useEcoImpactHubApi.js";
6
+ import { useCursorPager as ie } from "../../hooks/useCursorPager.js";
8
7
  import "../../hooks/index.js";
9
8
  import { DataTable as ae } from "../../components/DataTable.js";
10
- import { Pagination as l } from "../../components/Pagination.js";
11
- import { EvidenceUpload as u } from "../../components/EvidenceUpload.js";
12
- import { FileLink as d } from "../../components/FileLink.js";
13
- import { useMemo as f, useState as p } from "react";
14
- import { Binoculars as m, Plus as h } from "lucide-react";
15
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
16
- import { Button as y, Input as b, Label as x, ResponsiveDialog as oe, ResponsiveDialogContent as se, ResponsiveDialogDescription as S, ResponsiveDialogFooter as ce, ResponsiveDialogHeader as C, ResponsiveDialogTitle as w, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k, Textarea as le } from "@burdenoff/fe-libs/ui";
9
+ import { Pagination as oe } from "../../components/Pagination.js";
10
+ import { EvidenceUpload as se } from "../../components/EvidenceUpload.js";
11
+ import { MethodBadge as c } from "../_shared/MethodBadge.js";
12
+ import { EvidenceThumb as l } from "../_shared/EvidenceThumb.js";
13
+ import { useMemo as u, useState as d } from "react";
14
+ import { Binoculars as f, MapPin as p, Plus as m } from "lucide-react";
15
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
16
+ import { Button as v, GlassCard as ce, Input as y, Label as b, ResponsiveDialog as le, ResponsiveDialogContent as ue, ResponsiveDialogDescription as de, ResponsiveDialogFooter as fe, ResponsiveDialogHeader as pe, ResponsiveDialogTitle as me, Select as x, SelectContent as S, SelectItem as C, SelectTrigger as w, SelectValue as T, Textarea as E } from "@burdenoff/fe-libs/ui";
17
17
  //#region src/ecoimpacthub/pages/observations/ObservationsPage.tsx
18
- var ue = [
18
+ var D = [
19
19
  "DIRECT_SIGHTING",
20
20
  "CAMERA_TRAP",
21
21
  "ACOUSTIC",
@@ -23,53 +23,61 @@ var ue = [
23
23
  "EDNA",
24
24
  "TELEMETRY",
25
25
  "COMMUNITY_REPORT"
26
- ], A = 25, j = {
26
+ ], O = 25, k = {
27
27
  limit: 100,
28
28
  offset: 0
29
- }, M = "NONE";
30
- function N() {
29
+ }, A = "NONE";
30
+ function j() {
31
31
  let e = /* @__PURE__ */ new Date();
32
32
  return (/* @__PURE__ */ new Date(e.getTime() - e.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
33
33
  }
34
- function P() {
34
+ function M() {
35
35
  return {
36
36
  speciesId: "",
37
- observedAt: N(),
37
+ observedAt: j(),
38
38
  count: "1",
39
39
  method: "DIRECT_SIGHTING",
40
- siteId: M,
40
+ siteId: A,
41
41
  latitude: "",
42
42
  longitude: "",
43
43
  notes: "",
44
44
  evidence: null
45
45
  };
46
46
  }
47
- function F() {
48
- let [N, F] = p("ALL"), [I, L] = p("ALL"), R = c(), [z, B] = p(!1), [V, H] = p(P), [U, W] = p(null), G = o({ pagination: j }), K = s({ pagination: j }), { data: q, isLoading: de, isError: fe, refetch: pe } = ie({
49
- speciesId: N === "ALL" ? void 0 : N,
50
- siteId: I === "ALL" ? void 0 : I,
47
+ function N() {
48
+ let [j, N] = d("ALL"), [P, F] = d("ALL"), I = ie(), [L, R] = d(!1), [z, B] = d(M), [V, H] = d(null), U = ne({ pagination: k }), W = re({ pagination: k }), { data: G, isLoading: he, isError: ge, refetch: _e } = ee({
49
+ speciesId: j === "ALL" ? void 0 : j,
50
+ siteId: P === "ALL" ? void 0 : P,
51
51
  pagination: {
52
- limit: A,
53
- cursor: R.cursor
52
+ limit: O,
53
+ cursor: I.cursor
54
54
  }
55
- }), J = a(), Y = f(() => G.data?.items ?? [], [G.data]), X = f(() => K.data?.items ?? [], [K.data]), Z = f(() => q?.items ?? [], [q]), me = f(() => {
55
+ }), K = te(), q = u(() => U.data?.items ?? [], [U.data]), J = u(() => W.data?.items ?? [], [W.data]), Y = u(() => G?.items ?? [], [G]), ve = u(() => {
56
56
  let e = /* @__PURE__ */ new Map();
57
- for (let t of Y) e.set(t.id, t.name);
57
+ for (let t of q) e.set(t.id, t.name);
58
58
  return e;
59
- }, [Y]), he = f(() => {
59
+ }, [q]), X = u(() => {
60
60
  let e = /* @__PURE__ */ new Map();
61
- for (let t of X) e.set(t.id, t.commonName);
61
+ for (let t of J) e.set(t.id, t.commonName);
62
62
  return e;
63
- }, [X]), ge = [
63
+ }, [J]), Z = [
64
+ {
65
+ key: "evidence",
66
+ header: "Evidence",
67
+ render: (e) => /* @__PURE__ */ g(l, {
68
+ fileId: e.evidence?.id,
69
+ alt: e.species?.commonName ?? X.get(e.speciesId)
70
+ })
71
+ },
64
72
  {
65
73
  key: "species",
66
74
  header: "Species",
67
- render: (e) => /* @__PURE__ */ v("div", {
75
+ render: (e) => /* @__PURE__ */ _("div", {
68
76
  className: "min-w-0",
69
- children: [/* @__PURE__ */ _("p", {
77
+ children: [/* @__PURE__ */ g("p", {
70
78
  className: "font-semibold text-text-primary",
71
- children: e.species?.commonName ?? he.get(e.speciesId) ?? "Unknown species"
72
- }), e.species?.scientificName && /* @__PURE__ */ _("p", {
79
+ children: e.species?.commonName ?? X.get(e.speciesId) ?? "Unknown species"
80
+ }), e.species?.scientificName && /* @__PURE__ */ g("p", {
73
81
  className: "truncate text-xs italic text-text-tertiary",
74
82
  children: e.species.scientificName
75
83
  })]
@@ -78,29 +86,25 @@ function F() {
78
86
  {
79
87
  key: "method",
80
88
  header: "Method",
81
- render: (e) => /* @__PURE__ */ _("span", {
82
- className: "inline-flex rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
83
- children: i(e.method)
84
- })
89
+ render: (e) => /* @__PURE__ */ g(c, { method: e.method })
85
90
  },
86
91
  {
87
92
  key: "count",
88
93
  header: "Count",
89
94
  align: "right",
90
95
  sortValue: (e) => e.count,
91
- render: (e) => /* @__PURE__ */ v("span", {
92
- className: "tabular-nums text-text-secondary",
93
- children: ["×", ee(e.count)]
96
+ render: (e) => /* @__PURE__ */ _("span", {
97
+ className: "tabular-nums font-medium text-text-primary",
98
+ children: ["×", i(e.count)]
94
99
  })
95
100
  },
96
101
  {
97
102
  key: "observedAt",
98
103
  header: "Observed",
99
- align: "right",
100
104
  hideOnMobile: !0,
101
- render: (e) => /* @__PURE__ */ _("span", {
105
+ render: (e) => /* @__PURE__ */ g("span", {
102
106
  className: "whitespace-nowrap text-text-secondary",
103
- children: r(e.observedAt)
107
+ children: n(e.observedAt)
104
108
  })
105
109
  },
106
110
  {
@@ -108,11 +112,11 @@ function F() {
108
112
  header: "Site",
109
113
  hideOnMobile: !0,
110
114
  render: (e) => {
111
- let t = e.siteId ? me.get(e.siteId) : void 0;
112
- return t ? /* @__PURE__ */ _("span", {
115
+ let t = e.siteId ? ve.get(e.siteId) : void 0;
116
+ return t ? /* @__PURE__ */ g("span", {
113
117
  className: "text-text-secondary",
114
118
  children: t
115
- }) : /* @__PURE__ */ _("span", {
119
+ }) : /* @__PURE__ */ g("span", {
116
120
  className: "text-text-tertiary",
117
121
  children: "—"
118
122
  });
@@ -120,13 +124,19 @@ function F() {
120
124
  },
121
125
  {
122
126
  key: "coords",
123
- header: "Coordinates",
127
+ header: "Coords",
124
128
  hideOnMobile: !0,
125
- render: (t) => {
126
- let r = n(t.latitude, t.longitude);
127
- return /* @__PURE__ */ _("span", {
128
- className: e("tabular-nums", r === "—" ? "text-text-tertiary" : "text-text-secondary"),
129
- children: r
129
+ render: (e) => {
130
+ let n = t(e.latitude, e.longitude);
131
+ return n === "—" ? /* @__PURE__ */ g("span", {
132
+ className: "text-text-tertiary",
133
+ children: "—"
134
+ }) : /* @__PURE__ */ _("span", {
135
+ className: "inline-flex items-center gap-1 tabular-nums text-text-secondary",
136
+ children: [/* @__PURE__ */ g(p, {
137
+ className: "h-3.5 w-3.5 shrink-0 text-text-tertiary",
138
+ "aria-hidden": "true"
139
+ }), n]
130
140
  });
131
141
  }
132
142
  },
@@ -134,307 +144,314 @@ function F() {
134
144
  key: "notes",
135
145
  header: "Notes",
136
146
  hideOnMobile: !0,
137
- render: (e) => e.notes ? /* @__PURE__ */ _("span", {
147
+ render: (e) => e.notes ? /* @__PURE__ */ g("span", {
138
148
  className: "block max-w-xs truncate text-text-secondary",
139
149
  title: e.notes,
140
150
  children: e.notes
141
- }) : /* @__PURE__ */ _("span", {
142
- className: "text-text-tertiary",
143
- children: "—"
144
- })
145
- },
146
- {
147
- key: "evidence",
148
- header: "Evidence",
149
- hideOnMobile: !0,
150
- render: (e) => e.evidence?.id ? /* @__PURE__ */ _(d, { fileId: e.evidence.id }) : /* @__PURE__ */ _("span", {
151
+ }) : /* @__PURE__ */ g("span", {
151
152
  className: "text-text-tertiary",
152
153
  children: "—"
153
154
  })
154
155
  }
155
156
  ], Q = () => {
156
- H(P()), W(null), B(!0);
157
+ B(M()), H(null), R(!0);
157
158
  }, $ = () => {
158
- H(P()), W(null);
159
- }, _e = async () => {
160
- if (!V.speciesId) {
161
- W("Species is required.");
159
+ B(M()), H(null);
160
+ }, ye = async () => {
161
+ if (!z.speciesId) {
162
+ H("Species is required.");
162
163
  return;
163
164
  }
164
165
  try {
165
- await J.mutateAsync({
166
- speciesId: V.speciesId,
167
- observedAt: V.observedAt ? new Date(V.observedAt).toISOString() : (/* @__PURE__ */ new Date()).toISOString(),
168
- count: V.count ? Number(V.count) : 1,
169
- method: V.method,
170
- siteId: V.siteId && V.siteId !== M ? V.siteId : null,
171
- latitude: V.latitude ? Number(V.latitude) : null,
172
- longitude: V.longitude ? Number(V.longitude) : null,
173
- notes: V.notes.trim() || null,
174
- evidenceFileId: V.evidence?.fileId ?? null
175
- }), B(!1), $();
166
+ await K.mutateAsync({
167
+ speciesId: z.speciesId,
168
+ observedAt: z.observedAt ? new Date(z.observedAt).toISOString() : (/* @__PURE__ */ new Date()).toISOString(),
169
+ count: z.count ? Number(z.count) : 1,
170
+ method: z.method,
171
+ siteId: z.siteId && z.siteId !== A ? z.siteId : null,
172
+ latitude: z.latitude ? Number(z.latitude) : null,
173
+ longitude: z.longitude ? Number(z.longitude) : null,
174
+ notes: z.notes.trim() || null,
175
+ evidenceFileId: z.evidence?.fileId ?? null
176
+ }), R(!1), $();
176
177
  } catch (e) {
177
- W(e instanceof Error ? e.message : "Failed to record observation.");
178
+ H(e instanceof Error ? e.message : "Failed to record observation.");
178
179
  }
179
- }, ve = N !== "ALL" || I !== "ALL";
180
- return /* @__PURE__ */ v(t, {
180
+ }, be = j !== "ALL" || P !== "ALL";
181
+ return /* @__PURE__ */ _(e, {
181
182
  title: "Field Observations",
182
183
  description: "Wildlife & biodiversity sightings across every species and site — your citizen-science field log.",
183
- actions: /* @__PURE__ */ v(y, {
184
+ actions: /* @__PURE__ */ _(v, {
184
185
  onClick: Q,
185
- children: [/* @__PURE__ */ _(h, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
186
+ children: [/* @__PURE__ */ g(m, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
186
187
  }),
187
188
  children: [
188
- /* @__PURE__ */ v("div", {
189
- className: "mb-5 flex flex-wrap items-center gap-3",
190
- children: [/* @__PURE__ */ v(T, {
191
- value: N,
192
- onValueChange: (e) => {
193
- F(e), R.reset();
194
- },
195
- children: [/* @__PURE__ */ _(O, {
196
- className: "w-52",
197
- children: /* @__PURE__ */ _(k, { placeholder: "All species" })
198
- }), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
199
- value: "ALL",
200
- children: "All species"
201
- }), X.map((e) => /* @__PURE__ */ _(D, {
202
- value: e.id,
203
- children: e.commonName
204
- }, e.id))] })]
205
- }), /* @__PURE__ */ v(T, {
206
- value: I,
207
- onValueChange: (e) => {
208
- L(e), R.reset();
209
- },
210
- children: [/* @__PURE__ */ _(O, {
211
- className: "w-52",
212
- children: /* @__PURE__ */ _(k, { placeholder: "All sites" })
213
- }), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
214
- value: "ALL",
215
- children: "All sites"
216
- }), Y.map((e) => /* @__PURE__ */ _(D, {
217
- value: e.id,
218
- children: e.name
219
- }, e.id))] })]
220
- })]
189
+ /* @__PURE__ */ g(ce, {
190
+ treatment: "plain",
191
+ className: "mb-5 p-4",
192
+ children: /* @__PURE__ */ _("div", {
193
+ className: "flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end",
194
+ children: [/* @__PURE__ */ _("div", {
195
+ className: "grid gap-1.5",
196
+ children: [/* @__PURE__ */ g("span", {
197
+ className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
198
+ children: "Species"
199
+ }), /* @__PURE__ */ _(x, {
200
+ value: j,
201
+ onValueChange: (e) => {
202
+ N(e), I.reset();
203
+ },
204
+ children: [/* @__PURE__ */ g(w, {
205
+ className: "w-full sm:w-52",
206
+ children: /* @__PURE__ */ g(T, { placeholder: "All species" })
207
+ }), /* @__PURE__ */ _(S, { children: [/* @__PURE__ */ g(C, {
208
+ value: "ALL",
209
+ children: "All species"
210
+ }), J.map((e) => /* @__PURE__ */ g(C, {
211
+ value: e.id,
212
+ children: e.commonName
213
+ }, e.id))] })]
214
+ })]
215
+ }), /* @__PURE__ */ _("div", {
216
+ className: "grid gap-1.5",
217
+ children: [/* @__PURE__ */ g("span", {
218
+ className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
219
+ children: "Site"
220
+ }), /* @__PURE__ */ _(x, {
221
+ value: P,
222
+ onValueChange: (e) => {
223
+ F(e), I.reset();
224
+ },
225
+ children: [/* @__PURE__ */ g(w, {
226
+ className: "w-full sm:w-52",
227
+ children: /* @__PURE__ */ g(T, { placeholder: "All sites" })
228
+ }), /* @__PURE__ */ _(S, { children: [/* @__PURE__ */ g(C, {
229
+ value: "ALL",
230
+ children: "All sites"
231
+ }), q.map((e) => /* @__PURE__ */ g(C, {
232
+ value: e.id,
233
+ children: e.name
234
+ }, e.id))] })]
235
+ })]
236
+ })]
237
+ })
221
238
  }),
222
- de ? /* @__PURE__ */ _(ne, { label: "Loading observations…" }) : fe ? /* @__PURE__ */ _(te, {
239
+ he ? /* @__PURE__ */ g(o, { label: "Loading observations…" }) : ge ? /* @__PURE__ */ g(a, {
223
240
  message: "Couldn't load observations.",
224
- onRetry: () => pe()
225
- }) : Z.length === 0 ? /* @__PURE__ */ _(re, {
241
+ onRetry: () => _e()
242
+ }) : Y.length === 0 ? /* @__PURE__ */ g(s, {
226
243
  illustration: "empty-data",
227
- icon: /* @__PURE__ */ _(m, { className: "h-10 w-10" }),
244
+ icon: /* @__PURE__ */ g(f, { className: "h-10 w-10" }),
228
245
  title: "No observations yet",
229
- description: ve ? "No observations match these filters." : "Record your first field observation to start building your biodiversity dataset.",
230
- action: /* @__PURE__ */ v(y, {
246
+ description: be ? "No observations match these filters." : "Record your first field observation to start building your biodiversity dataset.",
247
+ action: /* @__PURE__ */ _(v, {
231
248
  onClick: Q,
232
- children: [/* @__PURE__ */ _(h, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
249
+ children: [/* @__PURE__ */ g(m, { className: "mr-1.5 h-4 w-4" }), " Record observation"]
233
250
  })
234
- }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(ae, {
235
- columns: ge,
236
- rows: Z,
251
+ }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(ae, {
252
+ columns: Z,
253
+ rows: Y,
237
254
  rowKey: (e) => e.id
238
- }), /* @__PURE__ */ _(l, {
239
- page: R.page,
240
- pageSize: A,
241
- itemCount: Z.length,
242
- hasMore: q?.pageInfo?.hasMore ?? !1,
243
- onPageChange: (e) => R.onPageChange(e, q?.pageInfo?.cursor)
255
+ }), /* @__PURE__ */ g(oe, {
256
+ page: I.page,
257
+ pageSize: O,
258
+ itemCount: Y.length,
259
+ hasMore: G?.pageInfo?.hasMore ?? !1,
260
+ onPageChange: (e) => I.onPageChange(e, G?.pageInfo?.cursor)
244
261
  })] }),
245
- /* @__PURE__ */ _(oe, {
246
- open: z,
262
+ /* @__PURE__ */ g(le, {
263
+ open: L,
247
264
  onOpenChange: (e) => {
248
- B(e), e || $();
265
+ R(e), e || $();
249
266
  },
250
- children: /* @__PURE__ */ v(se, { children: [
251
- /* @__PURE__ */ v(C, { children: [/* @__PURE__ */ _(w, { children: "Record observation" }), /* @__PURE__ */ _(S, { children: "Log a wildlife or biodiversity sighting in the field." })] }),
252
- /* @__PURE__ */ v("div", {
267
+ children: /* @__PURE__ */ _(ue, { children: [
268
+ /* @__PURE__ */ _(pe, { children: [/* @__PURE__ */ g(me, { children: "Record observation" }), /* @__PURE__ */ g(de, { children: "Log a wildlife or biodiversity sighting in the field." })] }),
269
+ /* @__PURE__ */ _("div", {
253
270
  className: "grid gap-4 py-2",
254
271
  children: [
255
- /* @__PURE__ */ v("div", {
272
+ /* @__PURE__ */ _("div", {
256
273
  className: "grid gap-1.5",
257
274
  children: [
258
- /* @__PURE__ */ _(x, {
275
+ /* @__PURE__ */ g(b, {
259
276
  htmlFor: "species",
260
277
  children: "Species *"
261
278
  }),
262
- /* @__PURE__ */ v(T, {
263
- value: V.speciesId,
264
- onValueChange: (e) => H({
265
- ...V,
279
+ /* @__PURE__ */ _(x, {
280
+ value: z.speciesId,
281
+ onValueChange: (e) => B({
282
+ ...z,
266
283
  speciesId: e
267
284
  }),
268
- children: [/* @__PURE__ */ _(O, {
285
+ children: [/* @__PURE__ */ g(w, {
269
286
  id: "species",
270
- children: /* @__PURE__ */ _(k, { placeholder: "Select a species" })
271
- }), /* @__PURE__ */ _(E, { children: X.map((e) => /* @__PURE__ */ _(D, {
287
+ children: /* @__PURE__ */ g(T, { placeholder: "Select a species" })
288
+ }), /* @__PURE__ */ g(S, { children: J.map((e) => /* @__PURE__ */ g(C, {
272
289
  value: e.id,
273
290
  children: e.commonName
274
291
  }, e.id)) })]
275
292
  }),
276
- X.length === 0 && /* @__PURE__ */ _("p", {
293
+ J.length === 0 && /* @__PURE__ */ g("p", {
277
294
  className: "text-xs text-text-tertiary",
278
295
  children: "No species defined yet — add one in the Species section first."
279
296
  })
280
297
  ]
281
298
  }),
282
- /* @__PURE__ */ v("div", {
299
+ /* @__PURE__ */ _("div", {
283
300
  className: "grid gap-2 sm:grid-cols-2",
284
- children: [/* @__PURE__ */ v("div", {
301
+ children: [/* @__PURE__ */ _("div", {
285
302
  className: "grid gap-1.5",
286
- children: [/* @__PURE__ */ _(x, {
303
+ children: [/* @__PURE__ */ g(b, {
287
304
  htmlFor: "observedAt",
288
305
  children: "Observed at"
289
- }), /* @__PURE__ */ _(b, {
306
+ }), /* @__PURE__ */ g(y, {
290
307
  id: "observedAt",
291
308
  type: "datetime-local",
292
- value: V.observedAt,
293
- onChange: (e) => H({
294
- ...V,
309
+ value: z.observedAt,
310
+ onChange: (e) => B({
311
+ ...z,
295
312
  observedAt: e.target.value
296
313
  })
297
314
  })]
298
- }), /* @__PURE__ */ v("div", {
315
+ }), /* @__PURE__ */ _("div", {
299
316
  className: "grid gap-1.5",
300
- children: [/* @__PURE__ */ _(x, {
317
+ children: [/* @__PURE__ */ g(b, {
301
318
  htmlFor: "count",
302
319
  children: "Count"
303
- }), /* @__PURE__ */ _(b, {
320
+ }), /* @__PURE__ */ g(y, {
304
321
  id: "count",
305
322
  type: "number",
306
323
  min: "1",
307
324
  step: "1",
308
- value: V.count,
309
- onChange: (e) => H({
310
- ...V,
325
+ value: z.count,
326
+ onChange: (e) => B({
327
+ ...z,
311
328
  count: e.target.value
312
329
  }),
313
330
  placeholder: "1"
314
331
  })]
315
332
  })]
316
333
  }),
317
- /* @__PURE__ */ v("div", {
334
+ /* @__PURE__ */ _("div", {
318
335
  className: "grid gap-2 sm:grid-cols-2",
319
- children: [/* @__PURE__ */ v("div", {
336
+ children: [/* @__PURE__ */ _("div", {
320
337
  className: "grid gap-1.5",
321
- children: [/* @__PURE__ */ _(x, {
338
+ children: [/* @__PURE__ */ g(b, {
322
339
  htmlFor: "method",
323
340
  children: "Method"
324
- }), /* @__PURE__ */ v(T, {
325
- value: V.method,
326
- onValueChange: (e) => H({
327
- ...V,
341
+ }), /* @__PURE__ */ _(x, {
342
+ value: z.method,
343
+ onValueChange: (e) => B({
344
+ ...z,
328
345
  method: e
329
346
  }),
330
- children: [/* @__PURE__ */ _(O, {
347
+ children: [/* @__PURE__ */ g(w, {
331
348
  id: "method",
332
- children: /* @__PURE__ */ _(k, {})
333
- }), /* @__PURE__ */ _(E, { children: ue.map((e) => /* @__PURE__ */ _(D, {
349
+ children: /* @__PURE__ */ g(T, {})
350
+ }), /* @__PURE__ */ g(S, { children: D.map((e) => /* @__PURE__ */ g(C, {
334
351
  value: e,
335
- children: i(e)
352
+ children: r(e)
336
353
  }, e)) })]
337
354
  })]
338
- }), /* @__PURE__ */ v("div", {
355
+ }), /* @__PURE__ */ _("div", {
339
356
  className: "grid gap-1.5",
340
- children: [/* @__PURE__ */ _(x, {
357
+ children: [/* @__PURE__ */ g(b, {
341
358
  htmlFor: "site",
342
359
  children: "Site"
343
- }), /* @__PURE__ */ v(T, {
344
- value: V.siteId,
345
- onValueChange: (e) => H({
346
- ...V,
360
+ }), /* @__PURE__ */ _(x, {
361
+ value: z.siteId,
362
+ onValueChange: (e) => B({
363
+ ...z,
347
364
  siteId: e
348
365
  }),
349
- children: [/* @__PURE__ */ _(O, {
366
+ children: [/* @__PURE__ */ g(w, {
350
367
  id: "site",
351
- children: /* @__PURE__ */ _(k, { placeholder: "No site" })
352
- }), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
353
- value: M,
368
+ children: /* @__PURE__ */ g(T, { placeholder: "No site" })
369
+ }), /* @__PURE__ */ _(S, { children: [/* @__PURE__ */ g(C, {
370
+ value: A,
354
371
  children: "No site"
355
- }), Y.map((e) => /* @__PURE__ */ _(D, {
372
+ }), q.map((e) => /* @__PURE__ */ g(C, {
356
373
  value: e.id,
357
374
  children: e.name
358
375
  }, e.id))] })]
359
376
  })]
360
377
  })]
361
378
  }),
362
- /* @__PURE__ */ v("div", {
379
+ /* @__PURE__ */ _("div", {
363
380
  className: "grid gap-2 sm:grid-cols-2",
364
- children: [/* @__PURE__ */ v("div", {
381
+ children: [/* @__PURE__ */ _("div", {
365
382
  className: "grid gap-1.5",
366
- children: [/* @__PURE__ */ _(x, {
383
+ children: [/* @__PURE__ */ g(b, {
367
384
  htmlFor: "lat",
368
385
  children: "Latitude"
369
- }), /* @__PURE__ */ _(b, {
386
+ }), /* @__PURE__ */ g(y, {
370
387
  id: "lat",
371
388
  type: "number",
372
389
  step: "any",
373
- value: V.latitude,
374
- onChange: (e) => H({
375
- ...V,
390
+ value: z.latitude,
391
+ onChange: (e) => B({
392
+ ...z,
376
393
  latitude: e.target.value
377
394
  }),
378
395
  placeholder: "12.9716"
379
396
  })]
380
- }), /* @__PURE__ */ v("div", {
397
+ }), /* @__PURE__ */ _("div", {
381
398
  className: "grid gap-1.5",
382
- children: [/* @__PURE__ */ _(x, {
399
+ children: [/* @__PURE__ */ g(b, {
383
400
  htmlFor: "lng",
384
401
  children: "Longitude"
385
- }), /* @__PURE__ */ _(b, {
402
+ }), /* @__PURE__ */ g(y, {
386
403
  id: "lng",
387
404
  type: "number",
388
405
  step: "any",
389
- value: V.longitude,
390
- onChange: (e) => H({
391
- ...V,
406
+ value: z.longitude,
407
+ onChange: (e) => B({
408
+ ...z,
392
409
  longitude: e.target.value
393
410
  }),
394
411
  placeholder: "77.5946"
395
412
  })]
396
413
  })]
397
414
  }),
398
- /* @__PURE__ */ v("div", {
415
+ /* @__PURE__ */ _("div", {
399
416
  className: "grid gap-1.5",
400
- children: [/* @__PURE__ */ _(x, {
417
+ children: [/* @__PURE__ */ g(b, {
401
418
  htmlFor: "notes",
402
419
  children: "Notes"
403
- }), /* @__PURE__ */ _(le, {
420
+ }), /* @__PURE__ */ g(E, {
404
421
  id: "notes",
405
- value: V.notes,
406
- onChange: (e) => H({
407
- ...V,
422
+ value: z.notes,
423
+ onChange: (e) => B({
424
+ ...z,
408
425
  notes: e.target.value
409
426
  }),
410
427
  placeholder: "Behaviour, habitat, weather or other field context.",
411
428
  rows: 2
412
429
  })]
413
430
  }),
414
- /* @__PURE__ */ _(u, {
431
+ /* @__PURE__ */ g(se, {
415
432
  id: "obsEvidence",
416
433
  label: "Evidence photo (optional)",
417
- value: V.evidence,
418
- onChange: (e) => H({
419
- ...V,
434
+ value: z.evidence,
435
+ onChange: (e) => B({
436
+ ...z,
420
437
  evidence: e
421
438
  }),
422
439
  hint: "Attach a photo, audio clip or PDF as supporting evidence."
423
440
  }),
424
- U && /* @__PURE__ */ _("p", {
441
+ V && /* @__PURE__ */ g("p", {
425
442
  className: "text-sm text-status-error-text",
426
- children: U
443
+ children: V
427
444
  })
428
445
  ]
429
446
  }),
430
- /* @__PURE__ */ v(ce, { children: [/* @__PURE__ */ _(y, {
447
+ /* @__PURE__ */ _(fe, { children: [/* @__PURE__ */ g(v, {
431
448
  variant: "outline",
432
- onClick: () => B(!1),
449
+ onClick: () => R(!1),
433
450
  children: "Cancel"
434
- }), /* @__PURE__ */ _(y, {
435
- onClick: _e,
436
- disabled: J.isPending,
437
- children: J.isPending ? "Recording…" : "Record observation"
451
+ }), /* @__PURE__ */ g(v, {
452
+ onClick: ye,
453
+ disabled: K.isPending,
454
+ children: K.isPending ? "Recording…" : "Record observation"
438
455
  })] })
439
456
  ] })
440
457
  })
@@ -442,6 +459,6 @@ function F() {
442
459
  });
443
460
  }
444
461
  //#endregion
445
- export { F as ObservationsPage };
462
+ export { N as ObservationsPage };
446
463
 
447
464
  //# sourceMappingURL=ObservationsPage.js.map