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