@burdenoff/microfe-ecoimpacthub 2026.819.4 → 2026.830.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 (51) hide show
  1. package/dist/ecoimpacthub/hooks/index.d.ts +2 -0
  2. package/dist/ecoimpacthub/hooks/index.d.ts.map +1 -1
  3. package/dist/ecoimpacthub/hooks/index.js +2 -0
  4. package/dist/ecoimpacthub/hooks/useActiveEcoEntity.d.ts +11 -0
  5. package/dist/ecoimpacthub/hooks/useActiveEcoEntity.d.ts.map +1 -0
  6. package/dist/ecoimpacthub/hooks/useActiveEcoEntity.js +21 -0
  7. package/dist/ecoimpacthub/hooks/useActiveEcoEntity.js.map +1 -0
  8. package/dist/ecoimpacthub/hooks/useTr.d.ts +4 -0
  9. package/dist/ecoimpacthub/hooks/useTr.d.ts.map +1 -0
  10. package/dist/ecoimpacthub/hooks/useTr.js +20 -0
  11. package/dist/ecoimpacthub/hooks/useTr.js.map +1 -0
  12. package/dist/ecoimpacthub/pages/DashboardPage.d.ts.map +1 -1
  13. package/dist/ecoimpacthub/pages/DashboardPage.js +162 -138
  14. package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
  15. package/dist/ecoimpacthub/pages/_shared/MethodPicker.d.ts +15 -0
  16. package/dist/ecoimpacthub/pages/_shared/MethodPicker.d.ts.map +1 -0
  17. package/dist/ecoimpacthub/pages/_shared/MethodPicker.js +36 -0
  18. package/dist/ecoimpacthub/pages/_shared/MethodPicker.js.map +1 -0
  19. package/dist/ecoimpacthub/pages/_shared/UseMyLocationButton.d.ts +15 -0
  20. package/dist/ecoimpacthub/pages/_shared/UseMyLocationButton.d.ts.map +1 -0
  21. package/dist/ecoimpacthub/pages/_shared/UseMyLocationButton.js +66 -0
  22. package/dist/ecoimpacthub/pages/_shared/UseMyLocationButton.js.map +1 -0
  23. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts.map +1 -1
  24. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +127 -124
  25. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
  26. package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts.map +1 -1
  27. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +226 -224
  28. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
  29. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts.map +1 -1
  30. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +159 -156
  31. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
  32. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts.map +1 -1
  33. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +40 -37
  34. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
  35. package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts.map +1 -1
  36. package/dist/ecoimpacthub/pages/sites/SitesPage.js +208 -171
  37. package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
  38. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts.map +1 -1
  39. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +211 -214
  40. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
  41. package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts.map +1 -1
  42. package/dist/ecoimpacthub/pages/species/SpeciesPage.js +174 -157
  43. package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
  44. package/dist/ecoimpacthub/utils/activeEntity.d.ts +30 -0
  45. package/dist/ecoimpacthub/utils/activeEntity.d.ts.map +1 -0
  46. package/dist/ecoimpacthub/utils/activeEntity.js +12 -0
  47. package/dist/ecoimpacthub/utils/activeEntity.js.map +1 -0
  48. package/dist/ecoimpacthub/utils/pageContext.d.ts.map +1 -1
  49. package/dist/ecoimpacthub/utils/pageContext.js +30 -25
  50. package/dist/ecoimpacthub/utils/pageContext.js.map +1 -1
  51. package/package.json +1 -1
@@ -4,33 +4,34 @@ import { ResponsiveContainer as n } from "../../node_modules/recharts/es6/compon
4
4
  import { Cell as r } from "../../node_modules/recharts/es6/component/Cell.js";
5
5
  import { LabelList as i } from "../../node_modules/recharts/es6/component/LabelList.js";
6
6
  import { Bar as ee } from "../../node_modules/recharts/es6/cartesian/Bar.js";
7
- import { CartesianGrid as te } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
8
- import { XAxis as a } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
7
+ import { CartesianGrid as a } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
8
+ import { XAxis as te } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
9
9
  import { YAxis as ne } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
10
10
  import { BarChart as re } from "../../node_modules/recharts/es6/chart/BarChart.js";
11
11
  import { PageLayout as o } from "../components/PageLayout.js";
12
12
  import { MetricsCard as s } from "../components/MetricsCard.js";
13
- import { formatCo2e as c, formatEnumLabel as ie, formatNumber as l, formatPercent as ae, formatRelativeTime as u } from "../utils/formatters.js";
14
- import { StatusBadge as d } from "../components/StatusBadge.js";
15
- import { MiniBar as f } from "../components/MiniBar.js";
16
- import { LoadingView as p, Section as m } from "../components/StateViews.js";
13
+ import { formatCo2e as c, formatEnumLabel as l, formatNumber as u, formatPercent as ie, formatRelativeTime as d } from "../utils/formatters.js";
14
+ import { StatusBadge as f } from "../components/StatusBadge.js";
15
+ import { MiniBar as p } from "../components/MiniBar.js";
16
+ import { LoadingView as ae, Section as m } from "../components/StateViews.js";
17
17
  import { EmptyState as h } from "../components/EmptyState.js";
18
18
  import { useDashboardLayout as oe } from "../hooks/useDashboardLayout.js";
19
19
  import { DashboardCustomizerDialog as se } from "../components/DashboardCustomizerDialog.js";
20
20
  import { Meter as ce, SCOPE_HUE as g, ScopeLegend as le, ScopeSplitBar as ue } from "./carbonVisuals.js";
21
21
  import "../context/index.js";
22
22
  import { useEcoCarbonTotals as de, useEcoHabitatProjects as fe, useEcoMeasurements as pe, useEcoObservations as me, useEcoSensors as he, useEcoSites as ge, useEcoSpecies as _e } from "../hooks/useEcoImpactHubApi.js";
23
+ import { useTr as ve } from "../hooks/useTr.js";
23
24
  import "../hooks/index.js";
24
- import { useMemo as ve, useState as ye } from "react";
25
- import { ArrowRight as _, Binoculars as v, Factory as y, LayoutGrid as be, MapPin as xe, PawPrint as Se, Radio as Ce, ShieldCheck as we, StickyNote as Te, Trees as Ee, TriangleAlert as De } from "lucide-react";
26
- import { Fragment as Oe, jsx as b, jsxs as x } from "react/jsx-runtime";
25
+ import { useMemo as ye, useState as be } from "react";
26
+ import { ArrowRight as _, Binoculars as v, Factory as y, LayoutGrid as xe, MapPin as Se, PawPrint as Ce, Radio as we, ShieldCheck as Te, StickyNote as Ee, Trees as De, TriangleAlert as Oe } from "lucide-react";
27
+ import { Fragment as ke, jsx as b, jsxs as x } from "react/jsx-runtime";
27
28
  import { Button as S, GlassCard as C } from "@burdenoff/fe-libs/ui";
28
29
  //#region src/ecoimpacthub/pages/DashboardPage.tsx
29
30
  var w = new Set([
30
31
  "PLANNED",
31
32
  "IN_PROGRESS",
32
33
  "MONITORING"
33
- ]), T = {
34
+ ]), Ae = {
34
35
  LEAST_CONCERN: "var(--color-status-success-text)",
35
36
  NEAR_THREATENED: "var(--color-accent-teal)",
36
37
  VULNERABLE: "var(--color-status-warning-text)",
@@ -40,32 +41,32 @@ var w = new Set([
40
41
  DATA_DEFICIENT: "var(--color-text-tertiary)",
41
42
  NOT_EVALUATED: "var(--color-text-tertiary)"
42
43
  };
43
- function E() {
44
- let { navigateTo: E, currentUser: D, workspaceId: ke } = e(), [Ae, O] = ye(!1), k = oe(ke, D?.id), A = ge({ pagination: {
44
+ function T() {
45
+ let T = ve(), { navigateTo: E, currentUser: D, workspaceId: O } = e(), [je, k] = be(!1), A = oe(O, D?.id), j = ge({ pagination: {
45
46
  limit: 100,
46
47
  offset: 0
47
- } }), j = _e({ pagination: {
48
+ } }), M = _e({ pagination: {
48
49
  limit: 100,
49
50
  offset: 0
50
- } }), M = fe(), N = de(), P = pe({
51
+ } }), N = fe(), P = de(), F = pe({
51
52
  breachesOnly: !0,
52
53
  pagination: {
53
54
  limit: 6,
54
55
  offset: 0
55
56
  }
56
- }), je = me({ pagination: {
57
+ }), Me = me({ pagination: {
57
58
  limit: 6,
58
59
  offset: 0
59
- } }), Me = he(), F = A.data?.items ?? [], I = j.data?.items ?? [], L = M.data?.items ?? [], R = Me.data?.items ?? [], z = F.filter((e) => e.status === "ACTIVE").length, Ne = I.filter((e) => e.isPriority).length, B = I.filter((e) => [
60
+ } }), Ne = he(), I = j.data?.items ?? [], L = M.data?.items ?? [], R = N.data?.items ?? [], z = Ne.data?.items ?? [], B = I.filter((e) => e.status === "ACTIVE").length, Pe = L.filter((e) => e.isPriority).length, V = L.filter((e) => [
60
61
  "VULNERABLE",
61
62
  "ENDANGERED",
62
63
  "CRITICALLY_ENDANGERED"
63
- ].includes(e.conservationStatus)).length, V = L.filter((e) => w.has(e.status)).length, H = R.filter((e) => e.status === "ONLINE").length, U = R.filter((e) => [
64
+ ].includes(e.conservationStatus)).length, H = R.filter((e) => w.has(e.status)).length, U = z.filter((e) => e.status === "ONLINE").length, W = z.filter((e) => [
64
65
  "OFFLINE",
65
66
  "DEGRADED",
66
67
  "MAINTENANCE"
67
- ].includes(e.status)).length, W = ve(() => {
68
- let e = N.data;
68
+ ].includes(e.status)).length, G = ye(() => {
69
+ let e = P.data;
69
70
  return e ? [
70
71
  {
71
72
  scope: "SCOPE_1",
@@ -83,51 +84,55 @@ function E() {
83
84
  kg: e.scope3
84
85
  }
85
86
  ] : [];
86
- }, [N.data]), Pe = A.isLoading && j.isLoading && M.isLoading && N.isLoading, G = /* @__PURE__ */ x(S, {
87
+ }, [P.data]), Fe = j.isLoading && M.isLoading && N.isLoading && P.isLoading, K = /* @__PURE__ */ x(S, {
87
88
  type: "button",
88
89
  variant: "outline",
89
90
  size: "sm",
90
- onClick: () => O(!0),
91
- children: [/* @__PURE__ */ b(be, { className: "mr-1.5 h-3.5 w-3.5" }), "Customize dashboard"]
91
+ onClick: () => k(!0),
92
+ children: [/* @__PURE__ */ b(xe, { className: "mr-1.5 h-3.5 w-3.5" }), T("ecoDashboard.customize", "Customize dashboard")]
92
93
  });
93
- if (Pe) return /* @__PURE__ */ b(o, {
94
- title: "EcoImpactHub",
94
+ if (Fe) return /* @__PURE__ */ b(o, {
95
+ title: T("ecoDashboard.title", "EcoImpactHub"),
95
96
  titleGradient: !0,
96
97
  aurora: !0,
97
- actions: G,
98
- children: /* @__PURE__ */ b(p, { label: "Loading your impact overview…" })
98
+ actions: K,
99
+ children: /* @__PURE__ */ b(ae, { label: T("ecoDashboard.loading", "Loading your impact overview…") })
99
100
  });
100
- let Fe = D?.firstName || D?.name || "there", K = P.data?.items ?? [], q = je.data?.items ?? [], J = /* @__PURE__ */ x("div", {
101
+ let Ie = D?.firstName || D?.name || "there", q = F.data?.items ?? [], J = Me.data?.items ?? [], Le = /* @__PURE__ */ x("div", {
101
102
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
102
103
  children: [
103
104
  /* @__PURE__ */ b(s, {
104
- icon: /* @__PURE__ */ b(xe, { className: "h-5 w-5" }),
105
- value: A.data?.pageInfo?.hasMore ? `${F.length}+` : l(F.length),
106
- label: "Monitored sites",
105
+ icon: /* @__PURE__ */ b(Se, { className: "h-5 w-5" }),
106
+ value: j.data?.pageInfo?.hasMore ? `${I.length}+` : u(I.length),
107
+ label: T("ecoDashboard.kpis.monitoredSites", "Monitored sites"),
107
108
  footer: /* @__PURE__ */ x("div", {
108
109
  className: "space-y-2",
109
- children: [/* @__PURE__ */ b(f, {
110
- value: F.length ? z / F.length * 100 : 0,
110
+ children: [/* @__PURE__ */ b(p, {
111
+ value: I.length ? B / I.length * 100 : 0,
111
112
  height: 4,
112
113
  barClassName: "bg-action-primary-bg"
113
114
  }), /* @__PURE__ */ x("p", {
114
115
  className: "text-xs text-text-tertiary",
115
- children: [/* @__PURE__ */ b("span", {
116
- className: "tabular-nums text-text-secondary",
117
- children: z
118
- }), " active"]
116
+ children: [
117
+ /* @__PURE__ */ b("span", {
118
+ className: "tabular-nums text-text-secondary",
119
+ children: B
120
+ }),
121
+ " ",
122
+ T("ecoDashboard.kpis.active", "active")
123
+ ]
119
124
  })]
120
125
  })
121
126
  }),
122
127
  /* @__PURE__ */ b(s, {
123
- icon: /* @__PURE__ */ b(Se, { className: "h-5 w-5" }),
124
- value: j.data?.pageInfo?.hasMore ? `${I.length}+` : l(I.length),
125
- label: "Species tracked",
126
- accent: B > 0 ? "warning" : void 0,
128
+ icon: /* @__PURE__ */ b(Ce, { className: "h-5 w-5" }),
129
+ value: M.data?.pageInfo?.hasMore ? `${L.length}+` : u(L.length),
130
+ label: T("ecoDashboard.kpis.speciesTracked", "Species tracked"),
131
+ accent: V > 0 ? "warning" : void 0,
127
132
  footer: /* @__PURE__ */ x("div", {
128
133
  className: "space-y-2",
129
- children: [/* @__PURE__ */ b(f, {
130
- value: I.length ? B / I.length * 100 : 0,
134
+ children: [/* @__PURE__ */ b(p, {
135
+ value: L.length ? V / L.length * 100 : 0,
131
136
  height: 4,
132
137
  barClassName: "bg-status-warning-text"
133
138
  }), /* @__PURE__ */ x("p", {
@@ -135,27 +140,30 @@ function E() {
135
140
  children: [
136
141
  /* @__PURE__ */ b("span", {
137
142
  className: "tabular-nums text-text-secondary",
138
- children: Ne
143
+ children: Pe
139
144
  }),
140
- " priority ·",
145
+ " ",
146
+ T("ecoDashboard.kpis.priority", "priority"),
147
+ " ·",
141
148
  " ",
142
149
  /* @__PURE__ */ b("span", {
143
150
  className: "tabular-nums text-text-secondary",
144
- children: B
151
+ children: V
145
152
  }),
146
- " threatened"
153
+ " ",
154
+ T("ecoDashboard.kpis.threatened", "threatened")
147
155
  ]
148
156
  })]
149
157
  })
150
158
  }),
151
159
  /* @__PURE__ */ b(s, {
152
- icon: /* @__PURE__ */ b(Ee, { className: "h-5 w-5" }),
153
- value: l(V),
154
- label: "Active habitat projects",
160
+ icon: /* @__PURE__ */ b(De, { className: "h-5 w-5" }),
161
+ value: u(H),
162
+ label: T("ecoDashboard.kpis.activeHabitatProjects", "Active habitat projects"),
155
163
  footer: /* @__PURE__ */ x("div", {
156
164
  className: "space-y-2",
157
- children: [/* @__PURE__ */ b(f, {
158
- value: L.length ? V / L.length * 100 : 0,
165
+ children: [/* @__PURE__ */ b(p, {
166
+ value: R.length ? H / R.length * 100 : 0,
159
167
  height: 4,
160
168
  barClassName: "bg-action-primary-bg"
161
169
  }), /* @__PURE__ */ x("p", {
@@ -163,60 +171,64 @@ function E() {
163
171
  children: [
164
172
  /* @__PURE__ */ b("span", {
165
173
  className: "tabular-nums text-text-secondary",
166
- children: l(L.length)
174
+ children: u(R.length)
167
175
  }),
168
176
  " ",
169
- "total"
177
+ T("ecoDashboard.kpis.total", "total")
170
178
  ]
171
179
  })]
172
180
  })
173
181
  }),
174
182
  /* @__PURE__ */ b(s, {
175
183
  icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
176
- value: N.data ? c(N.data.total) : "—",
177
- label: "Total footprint",
184
+ value: P.data ? c(P.data.total) : "—",
185
+ label: T("ecoDashboard.kpis.totalFootprint", "Total footprint"),
178
186
  featured: !0,
179
- footer: N.data && N.data.total > 0 ? /* @__PURE__ */ x("div", {
187
+ footer: P.data && P.data.total > 0 ? /* @__PURE__ */ x("div", {
180
188
  className: "space-y-2",
181
189
  children: [/* @__PURE__ */ b(ue, {
182
- scope1: N.data.scope1,
183
- scope2: N.data.scope2,
184
- scope3: N.data.scope3,
190
+ scope1: P.data.scope1,
191
+ scope2: P.data.scope2,
192
+ scope3: P.data.scope3,
185
193
  height: 6
186
194
  }), /* @__PURE__ */ b("p", {
187
195
  className: "text-xs text-text-tertiary",
188
- children: "Scope 1 · 2 · 3 split"
196
+ children: T("ecoDashboard.kpis.scopeSplit", "Scope 1 · 2 · 3 split")
189
197
  })]
190
198
  }) : void 0
191
199
  }),
192
200
  /* @__PURE__ */ b(s, {
193
- icon: /* @__PURE__ */ b(Ce, { className: "h-5 w-5" }),
194
- value: l(H),
195
- label: "Sensors online",
196
- accent: U > 0 ? "warning" : "success",
201
+ icon: /* @__PURE__ */ b(we, { className: "h-5 w-5" }),
202
+ value: u(U),
203
+ label: T("ecoDashboard.kpis.sensorsOnline", "Sensors online"),
204
+ accent: W > 0 ? "warning" : "success",
197
205
  footer: /* @__PURE__ */ x("div", {
198
206
  className: "space-y-2",
199
- children: [/* @__PURE__ */ b(f, {
200
- value: R.length ? H / R.length * 100 : 0,
207
+ children: [/* @__PURE__ */ b(p, {
208
+ value: z.length ? U / z.length * 100 : 0,
201
209
  height: 4,
202
210
  barClassName: "bg-status-success-text"
203
211
  }), /* @__PURE__ */ x("p", {
204
212
  className: "text-xs text-text-tertiary",
205
- children: [/* @__PURE__ */ b("span", {
206
- className: "tabular-nums text-text-secondary",
207
- children: U
208
- }), " need attention"]
213
+ children: [
214
+ /* @__PURE__ */ b("span", {
215
+ className: "tabular-nums text-text-secondary",
216
+ children: W
217
+ }),
218
+ " ",
219
+ T("ecoDashboard.kpis.needAttention", "need attention")
220
+ ]
209
221
  })]
210
222
  })
211
223
  }),
212
224
  /* @__PURE__ */ b(s, {
213
- icon: /* @__PURE__ */ b(De, { className: "h-5 w-5" }),
214
- value: P.data?.pageInfo?.hasMore ? `${K.length}+` : l(K.length),
215
- label: "Open breaches",
216
- accent: K.length > 0 ? "error" : "success",
225
+ icon: /* @__PURE__ */ b(Oe, { className: "h-5 w-5" }),
226
+ value: F.data?.pageInfo?.hasMore ? `${q.length}+` : u(q.length),
227
+ label: T("ecoDashboard.kpis.openBreaches", "Open breaches"),
228
+ accent: q.length > 0 ? "error" : "success",
217
229
  footer: /* @__PURE__ */ b("p", {
218
- className: K.length > 0 ? "text-xs font-medium text-status-error-text" : "text-xs text-text-tertiary",
219
- children: K.length > 0 ? "Needs attention" : "All parameters in range"
230
+ className: q.length > 0 ? "text-xs font-medium text-status-error-text" : "text-xs text-text-tertiary",
231
+ children: q.length > 0 ? T("ecoDashboard.kpis.needsAttention", "Needs attention") : T("ecoDashboard.kpis.allParametersInRange", "All parameters in range")
220
232
  })
221
233
  })
222
234
  ]
@@ -227,40 +239,44 @@ function E() {
227
239
  className: "mb-4 flex flex-wrap items-start justify-between gap-3",
228
240
  children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h2", {
229
241
  className: "text-base font-semibold text-text-primary",
230
- children: "Carbon footprint by scope"
242
+ children: T("ecoDashboard.carbonByScope.title", "Carbon footprint by scope")
231
243
  }), /* @__PURE__ */ b("p", {
232
244
  className: "mt-0.5 text-sm text-text-secondary",
233
- children: "GHG Protocol Scope 1 / 2 / 3 emissions (CO₂e)."
245
+ children: T("ecoDashboard.carbonByScope.description", "GHG Protocol Scope 1 / 2 / 3 emissions (CO₂e).")
234
246
  })] }), /* @__PURE__ */ x("div", {
235
247
  className: "flex items-center gap-4",
236
- children: [N.data && N.data.total > 0 && /* @__PURE__ */ x("div", {
248
+ children: [P.data && P.data.total > 0 && /* @__PURE__ */ x("div", {
237
249
  className: "text-right",
238
250
  children: [/* @__PURE__ */ b("p", {
239
251
  className: "text-lg font-semibold tabular-nums text-text-primary",
240
- children: c(N.data.total)
252
+ children: c(P.data.total)
241
253
  }), /* @__PURE__ */ b("p", {
242
254
  className: "text-xs text-text-tertiary",
243
- children: "total"
255
+ children: T("ecoDashboard.carbonByScope.total", "total")
244
256
  })]
245
257
  }), /* @__PURE__ */ x("button", {
246
258
  type: "button",
247
259
  onClick: () => E("carbon"),
248
260
  className: "inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",
249
- children: ["Ledger ", /* @__PURE__ */ b(_, { className: "h-4 w-4" })]
261
+ children: [
262
+ T("ecoDashboard.carbonByScope.ledger", "Ledger"),
263
+ " ",
264
+ /* @__PURE__ */ b(_, { className: "h-4 w-4" })
265
+ ]
250
266
  })]
251
267
  })]
252
- }), W.every((e) => e.kg === 0) ? /* @__PURE__ */ b(h, {
268
+ }), G.every((e) => e.kg === 0) ? /* @__PURE__ */ b(h, {
253
269
  illustration: "empty-data",
254
270
  icon: /* @__PURE__ */ b(y, { className: "h-10 w-10" }),
255
- title: "No carbon entries yet",
256
- description: "Record activity in the carbon ledger to see your Scope 1–3 footprint here."
257
- }) : /* @__PURE__ */ x(Oe, { children: [/* @__PURE__ */ b("div", {
271
+ title: T("ecoDashboard.carbonByScope.noDataTitle", "No carbon entries yet"),
272
+ description: T("ecoDashboard.carbonByScope.noDataDescription", "Record activity in the carbon ledger to see your Scope 1–3 footprint here.")
273
+ }) : /* @__PURE__ */ x(ke, { children: [/* @__PURE__ */ b("div", {
258
274
  className: "h-56",
259
275
  children: /* @__PURE__ */ b(n, {
260
276
  width: "100%",
261
277
  height: "100%",
262
278
  children: /* @__PURE__ */ x(re, {
263
- data: W,
279
+ data: G,
264
280
  margin: {
265
281
  top: 20,
266
282
  right: 8,
@@ -268,7 +284,7 @@ function E() {
268
284
  bottom: 0
269
285
  },
270
286
  children: [
271
- /* @__PURE__ */ b("defs", { children: W.map((e) => /* @__PURE__ */ x("linearGradient", {
287
+ /* @__PURE__ */ b("defs", { children: G.map((e) => /* @__PURE__ */ x("linearGradient", {
272
288
  id: `ecoScopeGrad-${e.scope}`,
273
289
  x1: "0",
274
290
  y1: "0",
@@ -288,13 +304,13 @@ function E() {
288
304
  }
289
305
  })]
290
306
  }, e.scope)) }),
291
- /* @__PURE__ */ b(te, {
307
+ /* @__PURE__ */ b(a, {
292
308
  vertical: !1,
293
309
  stroke: "var(--color-border-seam)",
294
310
  strokeOpacity: .6,
295
311
  strokeDasharray: "3 4"
296
312
  }),
297
- /* @__PURE__ */ b(a, {
313
+ /* @__PURE__ */ b(te, {
298
314
  dataKey: "label",
299
315
  tick: {
300
316
  fill: "var(--color-text-secondary)",
@@ -325,7 +341,7 @@ function E() {
325
341
  borderRadius: 12,
326
342
  color: "var(--color-text-primary)"
327
343
  },
328
- formatter: (e) => [c(e), "Emissions"]
344
+ formatter: (e) => [c(e), T("ecoDashboard.carbonByScope.emissions", "Emissions")]
329
345
  }),
330
346
  /* @__PURE__ */ x(ee, {
331
347
  dataKey: "kg",
@@ -336,7 +352,7 @@ function E() {
336
352
  2
337
353
  ],
338
354
  maxBarSize: 72,
339
- children: [W.map((e) => /* @__PURE__ */ b(r, { fill: `url(#ecoScopeGrad-${e.scope})` }, e.scope)), /* @__PURE__ */ b(i, {
355
+ children: [G.map((e) => /* @__PURE__ */ b(r, { fill: `url(#ecoScopeGrad-${e.scope})` }, e.scope)), /* @__PURE__ */ b(i, {
340
356
  dataKey: "kg",
341
357
  position: "top",
342
358
  formatter: (e) => e > 0 ? c(e) : "",
@@ -351,7 +367,7 @@ function E() {
351
367
  })
352
368
  })
353
369
  }), /* @__PURE__ */ b(le, {
354
- data: W,
370
+ data: G,
355
371
  className: "mt-4 border-t border-border-seam pt-4"
356
372
  })] })]
357
373
  }), X = /* @__PURE__ */ x(C, {
@@ -363,36 +379,40 @@ function E() {
363
379
  className: "flex items-center gap-2",
364
380
  children: [/* @__PURE__ */ b("h2", {
365
381
  className: "text-base font-semibold text-text-primary",
366
- children: "Recent breaches"
367
- }), K.length > 0 && /* @__PURE__ */ b("span", {
382
+ children: T("ecoDashboard.recentBreaches.title", "Recent breaches")
383
+ }), q.length > 0 && /* @__PURE__ */ b("span", {
368
384
  className: "rounded-full bg-status-error-bg-subtle px-2 py-0.5 text-xs font-medium tabular-nums text-status-error-text",
369
- children: P.data?.pageInfo?.hasMore ? `${K.length}+` : K.length
385
+ children: F.data?.pageInfo?.hasMore ? `${q.length}+` : q.length
370
386
  })]
371
387
  }), /* @__PURE__ */ x("button", {
372
388
  type: "button",
373
389
  onClick: () => E("monitoring"),
374
390
  className: "inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",
375
- children: ["Monitoring ", /* @__PURE__ */ b(_, { className: "h-4 w-4" })]
391
+ children: [
392
+ T("ecoDashboard.recentBreaches.monitoring", "Monitoring"),
393
+ " ",
394
+ /* @__PURE__ */ b(_, { className: "h-4 w-4" })
395
+ ]
376
396
  })]
377
- }), K.length === 0 ? /* @__PURE__ */ x("div", {
397
+ }), q.length === 0 ? /* @__PURE__ */ x("div", {
378
398
  className: "flex flex-col items-center justify-center rounded-xl border border-dashed border-border-seam py-10 text-center",
379
399
  children: [
380
400
  /* @__PURE__ */ b("span", {
381
401
  className: "flex size-12 items-center justify-center rounded-full bg-status-success-bg-subtle",
382
- children: /* @__PURE__ */ b(we, { className: "h-6 w-6 text-status-success-text" })
402
+ children: /* @__PURE__ */ b(Te, { className: "h-6 w-6 text-status-success-text" })
383
403
  }),
384
404
  /* @__PURE__ */ b("p", {
385
405
  className: "mt-3 text-sm font-medium text-text-primary",
386
- children: "All parameters in range"
406
+ children: T("ecoDashboard.recentBreaches.noBreachesTitle", "All parameters in range")
387
407
  }),
388
408
  /* @__PURE__ */ b("p", {
389
409
  className: "mt-1 text-xs text-text-tertiary",
390
- children: "No open threshold breaches."
410
+ children: T("ecoDashboard.recentBreaches.noBreachesDescription", "No open threshold breaches.")
391
411
  })
392
412
  ]
393
413
  }) : /* @__PURE__ */ b("ul", {
394
414
  className: "space-y-2.5",
395
- children: K.map((e) => /* @__PURE__ */ x("li", {
415
+ children: q.map((e) => /* @__PURE__ */ x("li", {
396
416
  className: "flex items-start justify-between gap-3 rounded-xl bg-bg-sunken/50 p-3",
397
417
  children: [/* @__PURE__ */ x("div", {
398
418
  className: "flex min-w-0 items-start gap-2.5",
@@ -410,41 +430,45 @@ function E() {
410
430
  /* @__PURE__ */ x("span", {
411
431
  className: "tabular-nums",
412
432
  children: [
413
- l(e.value),
433
+ u(e.value),
414
434
  " ",
415
435
  e.unit
416
436
  ]
417
437
  }),
418
438
  " ",
419
439
  "· ",
420
- u(e.recordedAt)
440
+ d(e.recordedAt)
421
441
  ]
422
442
  })]
423
443
  })]
424
- }), /* @__PURE__ */ b(d, { status: "BREACH" })]
444
+ }), /* @__PURE__ */ b(f, { status: "BREACH" })]
425
445
  }, e.id))
426
446
  })]
427
447
  }), Z = {
428
- kpis: J,
448
+ kpis: Le,
429
449
  carbonByScope: Y,
430
450
  recentBreaches: X,
431
451
  recentObservations: /* @__PURE__ */ b(m, {
432
- title: "Recent field observations",
433
- description: "Latest wildlife & biodiversity sightings recorded across your sites.",
452
+ title: T("ecoDashboard.recentObservations.title", "Recent field observations"),
453
+ description: T("ecoDashboard.recentObservations.description", "Latest wildlife & biodiversity sightings recorded across your sites."),
434
454
  action: /* @__PURE__ */ x("button", {
435
455
  type: "button",
436
456
  onClick: () => E("observations"),
437
457
  className: "inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",
438
- children: ["All observations ", /* @__PURE__ */ b(_, { className: "h-4 w-4" })]
458
+ children: [
459
+ T("ecoDashboard.recentObservations.all", "All observations"),
460
+ " ",
461
+ /* @__PURE__ */ b(_, { className: "h-4 w-4" })
462
+ ]
439
463
  }),
440
- children: q.length === 0 ? /* @__PURE__ */ b(h, {
464
+ children: J.length === 0 ? /* @__PURE__ */ b(h, {
441
465
  illustration: "empty-data",
442
466
  icon: /* @__PURE__ */ b(v, { className: "h-10 w-10" }),
443
- title: "No observations yet",
444
- description: "Record your first field observation to build your biodiversity dataset."
467
+ title: T("ecoDashboard.recentObservations.noDataTitle", "No observations yet"),
468
+ description: T("ecoDashboard.recentObservations.noDataDescription", "Record your first field observation to build your biodiversity dataset.")
445
469
  }) : /* @__PURE__ */ b("div", {
446
470
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
447
- children: q.map((e) => /* @__PURE__ */ x(C, {
471
+ children: J.map((e) => /* @__PURE__ */ x(C, {
448
472
  treatment: "plain",
449
473
  className: "p-4 transition-shadow hover:shadow-float",
450
474
  children: [/* @__PURE__ */ x("div", {
@@ -458,7 +482,7 @@ function E() {
458
482
  className: "min-w-0",
459
483
  children: [/* @__PURE__ */ b("p", {
460
484
  className: "truncate text-sm font-semibold text-text-primary",
461
- children: e.species?.commonName ?? "Unknown species"
485
+ children: e.species?.commonName ?? T("ecoDashboard.recentObservations.unknownSpecies", "Unknown species")
462
486
  }), e.species?.scientificName && /* @__PURE__ */ b("p", {
463
487
  className: "truncate text-xs italic text-text-tertiary",
464
488
  children: e.species.scientificName
@@ -466,24 +490,24 @@ function E() {
466
490
  })]
467
491
  }), /* @__PURE__ */ x("span", {
468
492
  className: "shrink-0 rounded-full bg-[var(--color-accent-soft)] px-2 py-0.5 text-xs font-medium tabular-nums text-text-primary",
469
- children: ["×", l(e.count)]
493
+ children: ["×", u(e.count)]
470
494
  })]
471
495
  }), /* @__PURE__ */ x("div", {
472
496
  className: "mt-3 flex items-center justify-between border-t border-border-seam/70 pt-2.5",
473
497
  children: [/* @__PURE__ */ b("span", {
474
498
  className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
475
- children: ie(e.method)
499
+ children: l(e.method)
476
500
  }), /* @__PURE__ */ b("span", {
477
501
  className: "text-xs text-text-tertiary",
478
- children: u(e.observedAt)
502
+ children: d(e.observedAt)
479
503
  })]
480
504
  })]
481
505
  }, e.id))
482
506
  })
483
507
  }),
484
- conservationStatus: I.length > 0 ? /* @__PURE__ */ b(m, {
485
- title: "Conservation status",
486
- description: "Distribution of tracked species by IUCN-style status.",
508
+ conservationStatus: L.length > 0 ? /* @__PURE__ */ b(m, {
509
+ title: T("ecoDashboard.conservationStatus.title", "Conservation status"),
510
+ description: T("ecoDashboard.conservationStatus.description", "Distribution of tracked species by IUCN-style status."),
487
511
  children: /* @__PURE__ */ b(C, {
488
512
  treatment: "plain",
489
513
  className: "p-6",
@@ -491,16 +515,16 @@ function E() {
491
515
  className: "space-y-3.5",
492
516
  children: (() => {
493
517
  let e = /* @__PURE__ */ new Map();
494
- for (let t of I) e.set(t.conservationStatus, (e.get(t.conservationStatus) ?? 0) + 1);
495
- let t = I.length;
518
+ for (let t of L) e.set(t.conservationStatus, (e.get(t.conservationStatus) ?? 0) + 1);
519
+ let t = L.length;
496
520
  return [...e.entries()].sort((e, t) => t[1] - e[1]).map(([e, n]) => {
497
- let r = n / t * 100, i = T[e] ?? "var(--color-text-tertiary)";
521
+ let r = n / t * 100, i = Ae[e] ?? "var(--color-text-tertiary)";
498
522
  return /* @__PURE__ */ x("div", {
499
523
  className: "flex items-center gap-3 sm:gap-4",
500
524
  children: [
501
525
  /* @__PURE__ */ b("div", {
502
526
  className: "w-36 shrink-0 sm:w-48",
503
- children: /* @__PURE__ */ b(d, { status: e })
527
+ children: /* @__PURE__ */ b(f, { status: e })
504
528
  }),
505
529
  /* @__PURE__ */ b(ce, {
506
530
  value: r,
@@ -513,7 +537,7 @@ function E() {
513
537
  }),
514
538
  /* @__PURE__ */ b("span", {
515
539
  className: "hidden w-12 shrink-0 text-right text-xs tabular-nums text-text-tertiary sm:inline",
516
- children: ae(r)
540
+ children: ie(r)
517
541
  })
518
542
  ]
519
543
  }, e);
@@ -522,7 +546,7 @@ function E() {
522
546
  })
523
547
  })
524
548
  }) : null
525
- }, Q = k.layout.widgetOrder, $ = [];
549
+ }, Q = A.layout.widgetOrder, $ = [];
526
550
  for (let e = 0; e < Q.length; e++) {
527
551
  let t = Q[e];
528
552
  if (t === "kpis") {
@@ -544,24 +568,24 @@ function E() {
544
568
  n && $.push(/* @__PURE__ */ b("div", { children: n }, t));
545
569
  }
546
570
  return /* @__PURE__ */ x(o, {
547
- title: "EcoImpactHub",
571
+ title: T("ecoDashboard.title", "EcoImpactHub"),
548
572
  titleGradient: !0,
549
573
  aurora: !0,
550
- description: `Welcome back, ${Fe} — your environment, conservation & sustainability control room.`,
551
- actions: G,
574
+ description: T("ecoDashboard.description", "Welcome back, {{name}} — your environment, conservation & sustainability control room.", { name: Ie }),
575
+ actions: K,
552
576
  children: [/* @__PURE__ */ x("div", {
553
577
  className: "space-y-6",
554
- children: [$, k.layout.notes.length > 0 && /* @__PURE__ */ b(m, {
555
- title: "Custom notes",
556
- description: "Your personal notes, visible only to you.",
578
+ children: [$, A.layout.notes.length > 0 && /* @__PURE__ */ b(m, {
579
+ title: T("ecoDashboard.customNotes.title", "Custom notes"),
580
+ description: T("ecoDashboard.customNotes.description", "Your personal notes, visible only to you."),
557
581
  children: /* @__PURE__ */ b("div", {
558
582
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
559
- children: k.layout.notes.map((e) => /* @__PURE__ */ b(C, {
583
+ children: A.layout.notes.map((e) => /* @__PURE__ */ b(C, {
560
584
  treatment: "plain",
561
585
  className: "p-4",
562
586
  children: /* @__PURE__ */ x("div", {
563
587
  className: "flex items-start gap-2.5",
564
- children: [/* @__PURE__ */ b(Te, { className: "mt-0.5 h-4 w-4 shrink-0 text-accent" }), /* @__PURE__ */ x("div", {
588
+ children: [/* @__PURE__ */ b(Ee, { className: "mt-0.5 h-4 w-4 shrink-0 text-accent" }), /* @__PURE__ */ x("div", {
565
589
  className: "min-w-0",
566
590
  children: [e.title && /* @__PURE__ */ b("p", {
567
591
  className: "truncate text-sm font-semibold text-text-primary",
@@ -576,13 +600,13 @@ function E() {
576
600
  })
577
601
  })]
578
602
  }), /* @__PURE__ */ b(se, {
579
- open: Ae,
580
- onOpenChange: O,
581
- layout: k
603
+ open: je,
604
+ onOpenChange: k,
605
+ layout: A
582
606
  })]
583
607
  });
584
608
  }
585
609
  //#endregion
586
- export { E as DashboardPage };
610
+ export { T as DashboardPage };
587
611
 
588
612
  //# sourceMappingURL=DashboardPage.js.map