@burdenoff/microfe-healthybowl 2026.714.6 → 2026.714.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/healthybowl/HealthyBowlRoutes.js +111 -95
- package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
- package/dist/healthybowl/hooks/useWeatherIntelligence.js +224 -0
- package/dist/healthybowl/hooks/useWeatherIntelligence.js.map +1 -0
- package/dist/healthybowl/pages/weather/FrostRiskCalendarPage.js +258 -0
- package/dist/healthybowl/pages/weather/FrostRiskCalendarPage.js.map +1 -0
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +255 -0
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js.map +1 -0
- package/dist/healthybowl/pages/weather/WeatherAnomalyReportPage.js +387 -0
- package/dist/healthybowl/pages/weather/WeatherAnomalyReportPage.js.map +1 -0
- package/dist/healthybowl/pages/weather/WeatherHistoryPage.js +313 -114
- package/dist/healthybowl/pages/weather/WeatherHistoryPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherOverviewPage.js +554 -213
- package/dist/healthybowl/pages/weather/WeatherOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +457 -0
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
|
+
import { EmptyState as t } from "../../components/EmptyState.js";
|
|
3
|
+
import { ErrorState as n } from "../../components/ErrorState.js";
|
|
4
|
+
import { PageLoader as r } from "../../components/PageLoader.js";
|
|
5
|
+
import { useToast as i } from "../../hooks/useToast.js";
|
|
6
|
+
import "../../components/index.js";
|
|
7
|
+
import { useWeatherIntelligence as a } from "../../hooks/useWeatherIntelligence.js";
|
|
8
|
+
import { useEffect as o, useMemo as s, useState as c } from "react";
|
|
9
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { Activity as u, Bell as d, CloudSun as f, Loader2 as p, MoonStar as m, RefreshCw as h, Save as g, Sparkles as _ } from "lucide-react";
|
|
11
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
12
|
+
import { Button as b } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
//#region src/healthybowl/pages/weather/WeatherSettingsPage.tsx
|
|
14
|
+
var x = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", S = [
|
|
15
|
+
12,
|
|
16
|
+
24,
|
|
17
|
+
48
|
|
18
|
+
], C = [
|
|
19
|
+
5,
|
|
20
|
+
7,
|
|
21
|
+
10
|
|
22
|
+
], w = ["metric", "imperial"], T = [
|
|
23
|
+
{
|
|
24
|
+
code: "en",
|
|
25
|
+
labelKey: "healthybowl.weather.settings.language.en",
|
|
26
|
+
fallback: "English"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
code: "hi",
|
|
30
|
+
labelKey: "healthybowl.weather.settings.language.hi",
|
|
31
|
+
fallback: "Hindi"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
code: "mr",
|
|
35
|
+
labelKey: "healthybowl.weather.settings.language.mr",
|
|
36
|
+
fallback: "Marathi"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
code: "ta",
|
|
40
|
+
labelKey: "healthybowl.weather.settings.language.ta",
|
|
41
|
+
fallback: "Tamil"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
code: "te",
|
|
45
|
+
labelKey: "healthybowl.weather.settings.language.te",
|
|
46
|
+
fallback: "Telugu"
|
|
47
|
+
}
|
|
48
|
+
], E = (e) => ({
|
|
49
|
+
inAppEnabled: e.inAppEnabled,
|
|
50
|
+
smsEnabled: e.smsEnabled,
|
|
51
|
+
smsNumber: e.smsNumber ?? "",
|
|
52
|
+
emailEnabled: e.emailEnabled,
|
|
53
|
+
webhookEnabled: e.webhookEnabled,
|
|
54
|
+
webhookUrl: e.webhookUrl ?? "",
|
|
55
|
+
quietHoursEnabled: e.quietHoursEnabled,
|
|
56
|
+
quietHoursStart: e.quietHoursStart ?? "22:00",
|
|
57
|
+
quietHoursEnd: e.quietHoursEnd ?? "06:00",
|
|
58
|
+
escalateCriticalFrost: e.escalateCriticalFrost,
|
|
59
|
+
alertLeadTimeHours: e.alertLeadTimeHours,
|
|
60
|
+
baselineYears: e.baselineYears,
|
|
61
|
+
deviationThresholdPct: e.deviationThresholdPct,
|
|
62
|
+
weeklyDigestEmail: e.weeklyDigestEmail,
|
|
63
|
+
aiAdvisoryEnabled: e.aiAdvisoryEnabled,
|
|
64
|
+
advisoryLanguage: e.advisoryLanguage ?? "en",
|
|
65
|
+
units: e.units ?? "metric"
|
|
66
|
+
}), D = ({ icon: e, title: t, description: n, children: r }) => /* @__PURE__ */ y("section", {
|
|
67
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
68
|
+
children: [/* @__PURE__ */ y("div", {
|
|
69
|
+
className: "mb-4 flex items-start gap-2",
|
|
70
|
+
children: [/* @__PURE__ */ v("span", {
|
|
71
|
+
className: "mt-0.5 text-text-secondary",
|
|
72
|
+
children: e
|
|
73
|
+
}), /* @__PURE__ */ y("div", {
|
|
74
|
+
className: "space-y-0.5",
|
|
75
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
76
|
+
className: "text-sm font-semibold text-text-primary",
|
|
77
|
+
children: t
|
|
78
|
+
}), n && /* @__PURE__ */ v("p", {
|
|
79
|
+
className: "text-xs text-text-secondary",
|
|
80
|
+
children: n
|
|
81
|
+
})]
|
|
82
|
+
})]
|
|
83
|
+
}), r]
|
|
84
|
+
}), O = ({ checked: e, onChange: t, label: n, labelId: r }) => {
|
|
85
|
+
let { t: i } = l();
|
|
86
|
+
return /* @__PURE__ */ y("div", {
|
|
87
|
+
className: "flex items-center justify-between gap-3",
|
|
88
|
+
children: [/* @__PURE__ */ y("span", {
|
|
89
|
+
id: r,
|
|
90
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
91
|
+
children: [n, /* @__PURE__ */ y("span", {
|
|
92
|
+
className: "inline-flex items-center gap-1 text-xs text-text-secondary",
|
|
93
|
+
children: [/* @__PURE__ */ v("span", { className: `h-2 w-2 rounded-full ${e ? "bg-success" : "bg-bg-sunken"}` }), e ? i("healthybowl.weather.settings.on", "On") : i("healthybowl.weather.settings.off", "Off")]
|
|
94
|
+
})]
|
|
95
|
+
}), /* @__PURE__ */ v("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
role: "switch",
|
|
98
|
+
"aria-checked": e,
|
|
99
|
+
"aria-labelledby": r,
|
|
100
|
+
onClick: () => t(!e),
|
|
101
|
+
className: `relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${e ? "bg-success" : "bg-bg-sunken"}`,
|
|
102
|
+
children: /* @__PURE__ */ v("span", { className: `inline-block h-5 w-5 transform rounded-full bg-bg-surface shadow-sm transition-transform ${e ? "translate-x-5" : "translate-x-0.5"}` })
|
|
103
|
+
})]
|
|
104
|
+
});
|
|
105
|
+
}, k = ({ label: e, htmlFor: t, children: n }) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
106
|
+
htmlFor: t,
|
|
107
|
+
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
108
|
+
children: e
|
|
109
|
+
}), n] }), A = () => {
|
|
110
|
+
let { t: A } = l(), { toast: j } = i(), { settings: M, loadingSettings: N, errorSettings: P, refetchSettings: F, saveSettings: I, syncHistory: L } = a(), [R, z] = c(null), [B, V] = c(!1), [H, U] = c(!1);
|
|
111
|
+
o(() => {
|
|
112
|
+
M && z(E(M));
|
|
113
|
+
}, [M]);
|
|
114
|
+
let W = (e, t) => z((n) => n && {
|
|
115
|
+
...n,
|
|
116
|
+
[e]: t
|
|
117
|
+
}), G = s(() => !M?.historyStartYear || !M?.historyEndYear ? null : `${M.historyStartYear} – ${M.historyEndYear}`, [M]), K = s(() => {
|
|
118
|
+
if (!M?.historyLastSyncedAt) return null;
|
|
119
|
+
let e = new Date(M.historyLastSyncedAt);
|
|
120
|
+
return Number.isNaN(e.getTime()) ? null : e.toLocaleString();
|
|
121
|
+
}, [M]), q = async () => {
|
|
122
|
+
U(!0);
|
|
123
|
+
try {
|
|
124
|
+
await L(), await F(), j({
|
|
125
|
+
title: A("healthybowl.weather.settings.toast.resynced.title", "History re-synced"),
|
|
126
|
+
description: A("healthybowl.weather.settings.toast.resynced.description", "The historical weather archive has been refreshed from Open-Meteo ERA5."),
|
|
127
|
+
variant: "success"
|
|
128
|
+
});
|
|
129
|
+
} catch (e) {
|
|
130
|
+
j({
|
|
131
|
+
title: A("healthybowl.weather.settings.toast.resyncError.title", "Could not re-sync history"),
|
|
132
|
+
description: e instanceof Error ? e.message : void 0,
|
|
133
|
+
variant: "error"
|
|
134
|
+
});
|
|
135
|
+
} finally {
|
|
136
|
+
U(!1);
|
|
137
|
+
}
|
|
138
|
+
}, J = async () => {
|
|
139
|
+
if (!R) return;
|
|
140
|
+
let e = {
|
|
141
|
+
inAppEnabled: R.inAppEnabled,
|
|
142
|
+
smsEnabled: R.smsEnabled,
|
|
143
|
+
smsNumber: R.smsNumber.trim() || null,
|
|
144
|
+
emailEnabled: R.emailEnabled,
|
|
145
|
+
webhookEnabled: R.webhookEnabled,
|
|
146
|
+
webhookUrl: R.webhookUrl.trim() || null,
|
|
147
|
+
quietHoursEnabled: R.quietHoursEnabled,
|
|
148
|
+
quietHoursStart: R.quietHoursStart || null,
|
|
149
|
+
quietHoursEnd: R.quietHoursEnd || null,
|
|
150
|
+
escalateCriticalFrost: R.escalateCriticalFrost,
|
|
151
|
+
alertLeadTimeHours: R.alertLeadTimeHours,
|
|
152
|
+
baselineYears: R.baselineYears,
|
|
153
|
+
deviationThresholdPct: R.deviationThresholdPct,
|
|
154
|
+
weeklyDigestEmail: R.weeklyDigestEmail,
|
|
155
|
+
aiAdvisoryEnabled: R.aiAdvisoryEnabled,
|
|
156
|
+
advisoryLanguage: R.advisoryLanguage || null,
|
|
157
|
+
units: R.units || null
|
|
158
|
+
};
|
|
159
|
+
V(!0);
|
|
160
|
+
try {
|
|
161
|
+
await I(e), j({
|
|
162
|
+
title: A("healthybowl.weather.settings.toast.saved.title", "Settings saved"),
|
|
163
|
+
description: A("healthybowl.weather.settings.toast.saved.description", "Your weather & alert preferences have been updated."),
|
|
164
|
+
variant: "success"
|
|
165
|
+
});
|
|
166
|
+
} catch (e) {
|
|
167
|
+
j({
|
|
168
|
+
title: A("healthybowl.weather.settings.toast.saveError.title", "Could not save settings"),
|
|
169
|
+
description: e instanceof Error ? e.message : void 0,
|
|
170
|
+
variant: "error"
|
|
171
|
+
});
|
|
172
|
+
} finally {
|
|
173
|
+
V(!1);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
return /* @__PURE__ */ v(e, {
|
|
177
|
+
title: A("healthybowl.weather.settings.title", "Weather & Alert Settings"),
|
|
178
|
+
description: A("healthybowl.weather.settings.description", "Configure your weather archive, notification channels, quiet hours and AI advisory"),
|
|
179
|
+
purpose: "Everything that controls how HealthyBowl watches the weather for your farm: which years of history it compares against, how it reaches you when frost, a storm, heat or an anomaly is coming (in-app, SMS, email or a FluidGrids webhook), when to stay quiet, and how sensitive the anomaly detection is. Tune it once and every early-warning alert follows these rules.",
|
|
180
|
+
children: N && !M ? /* @__PURE__ */ v(r, {}) : P && !M ? /* @__PURE__ */ v(n, { onRetry: () => void F() }) : !R || !M ? /* @__PURE__ */ v(t, {
|
|
181
|
+
title: A("healthybowl.weather.settings.empty.title", "No weather settings yet"),
|
|
182
|
+
description: A("healthybowl.weather.settings.empty.description", "Weather settings will appear here once your workspace weather archive is initialised.")
|
|
183
|
+
}) : /* @__PURE__ */ y("div", {
|
|
184
|
+
className: "space-y-6",
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ v(D, {
|
|
187
|
+
icon: /* @__PURE__ */ v(f, { className: "h-4 w-4" }),
|
|
188
|
+
title: A("healthybowl.weather.settings.location.title", "Farm Location & Data"),
|
|
189
|
+
description: A("healthybowl.weather.settings.location.description", "The historical weather archive your early-warning system compares against."),
|
|
190
|
+
children: /* @__PURE__ */ y("div", {
|
|
191
|
+
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
192
|
+
children: [/* @__PURE__ */ y("div", {
|
|
193
|
+
className: "space-y-3",
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ y("div", {
|
|
196
|
+
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
|
|
197
|
+
children: [/* @__PURE__ */ v("span", {
|
|
198
|
+
className: "text-text-secondary",
|
|
199
|
+
children: A("healthybowl.weather.settings.location.archive", "Historical archive")
|
|
200
|
+
}), /* @__PURE__ */ v("span", {
|
|
201
|
+
className: "font-medium text-text-primary",
|
|
202
|
+
children: G ? A("healthybowl.weather.settings.location.archiveValue", "{{range}} (Open-Meteo ERA5)", { range: G }) : A("healthybowl.weather.settings.location.notSynced", "Not synced yet (Open-Meteo ERA5)")
|
|
203
|
+
})]
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ y("div", {
|
|
206
|
+
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
|
|
207
|
+
children: [/* @__PURE__ */ v("span", {
|
|
208
|
+
className: "text-text-secondary",
|
|
209
|
+
children: A("healthybowl.weather.settings.location.lastSynced", "Last synced")
|
|
210
|
+
}), /* @__PURE__ */ v("span", {
|
|
211
|
+
className: "font-medium text-text-primary",
|
|
212
|
+
children: K ?? A("healthybowl.weather.settings.location.never", "Never")
|
|
213
|
+
})]
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ y(b, {
|
|
216
|
+
variant: "outline",
|
|
217
|
+
size: "sm",
|
|
218
|
+
onClick: () => void q(),
|
|
219
|
+
disabled: H,
|
|
220
|
+
children: [H ? /* @__PURE__ */ v(p, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ v(h, { className: "h-4 w-4" }), A("healthybowl.weather.settings.location.resync", "Re-sync history")]
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
}), /* @__PURE__ */ v(k, {
|
|
224
|
+
label: A("healthybowl.weather.settings.location.units", "Units"),
|
|
225
|
+
htmlFor: "hb-weather-units",
|
|
226
|
+
children: /* @__PURE__ */ v("select", {
|
|
227
|
+
id: "hb-weather-units",
|
|
228
|
+
value: R.units,
|
|
229
|
+
onChange: (e) => W("units", e.target.value),
|
|
230
|
+
className: x,
|
|
231
|
+
children: w.map((e) => /* @__PURE__ */ v("option", {
|
|
232
|
+
value: e,
|
|
233
|
+
children: e === "metric" ? A("healthybowl.weather.settings.units.metric", "Metric (°C, mm)") : A("healthybowl.weather.settings.units.imperial", "Imperial (°F, in)")
|
|
234
|
+
}, e))
|
|
235
|
+
})
|
|
236
|
+
})]
|
|
237
|
+
})
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ v(D, {
|
|
240
|
+
icon: /* @__PURE__ */ v(d, { className: "h-4 w-4" }),
|
|
241
|
+
title: A("healthybowl.weather.settings.channels.title", "Notification Channels"),
|
|
242
|
+
description: A("healthybowl.weather.settings.channels.description", "How HealthyBowl reaches you when an alert fires."),
|
|
243
|
+
children: /* @__PURE__ */ y("div", {
|
|
244
|
+
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
|
|
245
|
+
children: [/* @__PURE__ */ y("div", {
|
|
246
|
+
className: "space-y-4",
|
|
247
|
+
children: [/* @__PURE__ */ v(O, {
|
|
248
|
+
checked: R.inAppEnabled,
|
|
249
|
+
onChange: (e) => W("inAppEnabled", e),
|
|
250
|
+
label: A("healthybowl.weather.settings.channels.inApp", "In-app notifications"),
|
|
251
|
+
labelId: "hb-weather-inapp"
|
|
252
|
+
}), /* @__PURE__ */ v("div", {
|
|
253
|
+
className: "space-y-2",
|
|
254
|
+
children: /* @__PURE__ */ v(O, {
|
|
255
|
+
checked: R.emailEnabled,
|
|
256
|
+
onChange: (e) => W("emailEnabled", e),
|
|
257
|
+
label: A("healthybowl.weather.settings.channels.email", "Email alerts"),
|
|
258
|
+
labelId: "hb-weather-email"
|
|
259
|
+
})
|
|
260
|
+
})]
|
|
261
|
+
}), /* @__PURE__ */ y("div", {
|
|
262
|
+
className: "space-y-4",
|
|
263
|
+
children: [/* @__PURE__ */ y("div", {
|
|
264
|
+
className: "space-y-2",
|
|
265
|
+
children: [/* @__PURE__ */ v(O, {
|
|
266
|
+
checked: R.smsEnabled,
|
|
267
|
+
onChange: (e) => W("smsEnabled", e),
|
|
268
|
+
label: A("healthybowl.weather.settings.channels.sms", "SMS alerts"),
|
|
269
|
+
labelId: "hb-weather-sms"
|
|
270
|
+
}), R.smsEnabled && /* @__PURE__ */ v("input", {
|
|
271
|
+
type: "tel",
|
|
272
|
+
value: R.smsNumber,
|
|
273
|
+
onChange: (e) => W("smsNumber", e.target.value),
|
|
274
|
+
placeholder: A("healthybowl.weather.settings.channels.smsPlaceholder", "+91 98765 43210"),
|
|
275
|
+
"aria-label": A("healthybowl.weather.settings.channels.smsNumber", "SMS number"),
|
|
276
|
+
className: x
|
|
277
|
+
})]
|
|
278
|
+
}), /* @__PURE__ */ y("div", {
|
|
279
|
+
className: "space-y-2",
|
|
280
|
+
children: [/* @__PURE__ */ v(O, {
|
|
281
|
+
checked: R.webhookEnabled,
|
|
282
|
+
onChange: (e) => W("webhookEnabled", e),
|
|
283
|
+
label: A("healthybowl.weather.settings.channels.webhook", "Webhook (FluidGrids)"),
|
|
284
|
+
labelId: "hb-weather-webhook"
|
|
285
|
+
}), R.webhookEnabled && /* @__PURE__ */ v("input", {
|
|
286
|
+
type: "url",
|
|
287
|
+
value: R.webhookUrl,
|
|
288
|
+
onChange: (e) => W("webhookUrl", e.target.value),
|
|
289
|
+
placeholder: A("healthybowl.weather.settings.channels.webhookPlaceholder", "https://www.example.com/fluidgrids"),
|
|
290
|
+
"aria-label": A("healthybowl.weather.settings.channels.webhookUrl", "Webhook URL"),
|
|
291
|
+
className: x
|
|
292
|
+
})]
|
|
293
|
+
})]
|
|
294
|
+
})]
|
|
295
|
+
})
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ v(D, {
|
|
298
|
+
icon: /* @__PURE__ */ v(m, { className: "h-4 w-4" }),
|
|
299
|
+
title: A("healthybowl.weather.settings.quiet.title", "Quiet Hours & Delivery"),
|
|
300
|
+
description: A("healthybowl.weather.settings.quiet.description", "Suppress non-critical alerts overnight and choose how far ahead to warn you."),
|
|
301
|
+
children: /* @__PURE__ */ y("div", {
|
|
302
|
+
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
|
|
303
|
+
children: [/* @__PURE__ */ y("div", {
|
|
304
|
+
className: "space-y-3",
|
|
305
|
+
children: [/* @__PURE__ */ v(O, {
|
|
306
|
+
checked: R.quietHoursEnabled,
|
|
307
|
+
onChange: (e) => W("quietHoursEnabled", e),
|
|
308
|
+
label: A("healthybowl.weather.settings.quiet.doNotDisturb", "Do not disturb"),
|
|
309
|
+
labelId: "hb-weather-quiet"
|
|
310
|
+
}), R.quietHoursEnabled && /* @__PURE__ */ y("div", {
|
|
311
|
+
className: "grid grid-cols-2 gap-3",
|
|
312
|
+
children: [/* @__PURE__ */ v(k, {
|
|
313
|
+
label: A("healthybowl.weather.settings.quiet.from", "From"),
|
|
314
|
+
htmlFor: "hb-weather-quiet-start",
|
|
315
|
+
children: /* @__PURE__ */ v("input", {
|
|
316
|
+
id: "hb-weather-quiet-start",
|
|
317
|
+
type: "time",
|
|
318
|
+
value: R.quietHoursStart,
|
|
319
|
+
onChange: (e) => W("quietHoursStart", e.target.value),
|
|
320
|
+
className: x
|
|
321
|
+
})
|
|
322
|
+
}), /* @__PURE__ */ v(k, {
|
|
323
|
+
label: A("healthybowl.weather.settings.quiet.to", "To"),
|
|
324
|
+
htmlFor: "hb-weather-quiet-end",
|
|
325
|
+
children: /* @__PURE__ */ v("input", {
|
|
326
|
+
id: "hb-weather-quiet-end",
|
|
327
|
+
type: "time",
|
|
328
|
+
value: R.quietHoursEnd,
|
|
329
|
+
onChange: (e) => W("quietHoursEnd", e.target.value),
|
|
330
|
+
className: x
|
|
331
|
+
})
|
|
332
|
+
})]
|
|
333
|
+
})]
|
|
334
|
+
}), /* @__PURE__ */ y("div", {
|
|
335
|
+
className: "space-y-4",
|
|
336
|
+
children: [/* @__PURE__ */ v(O, {
|
|
337
|
+
checked: R.escalateCriticalFrost,
|
|
338
|
+
onChange: (e) => W("escalateCriticalFrost", e),
|
|
339
|
+
label: A("healthybowl.weather.settings.quiet.escalate", "Escalate critical frost alerts even during quiet hours"),
|
|
340
|
+
labelId: "hb-weather-escalate"
|
|
341
|
+
}), /* @__PURE__ */ v(k, {
|
|
342
|
+
label: A("healthybowl.weather.settings.quiet.leadTime", "Alert lead time"),
|
|
343
|
+
htmlFor: "hb-weather-lead",
|
|
344
|
+
children: /* @__PURE__ */ v("select", {
|
|
345
|
+
id: "hb-weather-lead",
|
|
346
|
+
value: R.alertLeadTimeHours,
|
|
347
|
+
onChange: (e) => W("alertLeadTimeHours", Number(e.target.value)),
|
|
348
|
+
className: x,
|
|
349
|
+
children: S.map((e) => /* @__PURE__ */ v("option", {
|
|
350
|
+
value: e,
|
|
351
|
+
children: A("healthybowl.weather.settings.quiet.leadTimeOption", "{{hours}} hours before", { hours: e })
|
|
352
|
+
}, e))
|
|
353
|
+
})
|
|
354
|
+
})]
|
|
355
|
+
})]
|
|
356
|
+
})
|
|
357
|
+
}),
|
|
358
|
+
/* @__PURE__ */ v(D, {
|
|
359
|
+
icon: /* @__PURE__ */ v(u, { className: "h-4 w-4" }),
|
|
360
|
+
title: A("healthybowl.weather.settings.anomaly.title", "Anomaly Detection"),
|
|
361
|
+
description: A("healthybowl.weather.settings.anomaly.description", "Tune how HealthyBowl decides this season is running abnormally versus the baseline."),
|
|
362
|
+
children: /* @__PURE__ */ y("div", {
|
|
363
|
+
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-3",
|
|
364
|
+
children: [
|
|
365
|
+
/* @__PURE__ */ v(k, {
|
|
366
|
+
label: A("healthybowl.weather.settings.anomaly.baseline", "Baseline window"),
|
|
367
|
+
htmlFor: "hb-weather-baseline",
|
|
368
|
+
children: /* @__PURE__ */ v("select", {
|
|
369
|
+
id: "hb-weather-baseline",
|
|
370
|
+
value: R.baselineYears,
|
|
371
|
+
onChange: (e) => W("baselineYears", Number(e.target.value)),
|
|
372
|
+
className: x,
|
|
373
|
+
children: C.map((e) => /* @__PURE__ */ v("option", {
|
|
374
|
+
value: e,
|
|
375
|
+
children: A("healthybowl.weather.settings.anomaly.baselineOption", "{{years}} years", { years: e })
|
|
376
|
+
}, e))
|
|
377
|
+
})
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ v(k, {
|
|
380
|
+
label: A("healthybowl.weather.settings.anomaly.deviation", "Deviation threshold: {{pct}}%", { pct: R.deviationThresholdPct }),
|
|
381
|
+
htmlFor: "hb-weather-deviation",
|
|
382
|
+
children: /* @__PURE__ */ v("input", {
|
|
383
|
+
id: "hb-weather-deviation",
|
|
384
|
+
type: "range",
|
|
385
|
+
min: 0,
|
|
386
|
+
max: 100,
|
|
387
|
+
step: 5,
|
|
388
|
+
value: R.deviationThresholdPct,
|
|
389
|
+
onChange: (e) => W("deviationThresholdPct", Number(e.target.value)),
|
|
390
|
+
className: "h-2 w-full cursor-pointer appearance-none rounded-full bg-bg-sunken accent-[var(--color-primary)]"
|
|
391
|
+
})
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ v("div", {
|
|
394
|
+
className: "flex items-end",
|
|
395
|
+
children: /* @__PURE__ */ v("div", {
|
|
396
|
+
className: "w-full",
|
|
397
|
+
children: /* @__PURE__ */ v(O, {
|
|
398
|
+
checked: R.weeklyDigestEmail,
|
|
399
|
+
onChange: (e) => W("weeklyDigestEmail", e),
|
|
400
|
+
label: A("healthybowl.weather.settings.anomaly.digest", "Weekly anomaly digest email"),
|
|
401
|
+
labelId: "hb-weather-digest"
|
|
402
|
+
})
|
|
403
|
+
})
|
|
404
|
+
})
|
|
405
|
+
]
|
|
406
|
+
})
|
|
407
|
+
}),
|
|
408
|
+
/* @__PURE__ */ v(D, {
|
|
409
|
+
icon: /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
|
|
410
|
+
title: A("healthybowl.weather.settings.ai.title", "AI Advisory"),
|
|
411
|
+
description: A("healthybowl.weather.settings.ai.description", "Plain-language explanations and recommended actions attached to each alert."),
|
|
412
|
+
children: /* @__PURE__ */ y("div", {
|
|
413
|
+
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
|
|
414
|
+
children: [/* @__PURE__ */ v(O, {
|
|
415
|
+
checked: R.aiAdvisoryEnabled,
|
|
416
|
+
onChange: (e) => W("aiAdvisoryEnabled", e),
|
|
417
|
+
label: A("healthybowl.weather.settings.ai.explanations", "Plain-English explanations"),
|
|
418
|
+
labelId: "hb-weather-ai"
|
|
419
|
+
}), /* @__PURE__ */ v(k, {
|
|
420
|
+
label: A("healthybowl.weather.settings.ai.language", "Language"),
|
|
421
|
+
htmlFor: "hb-weather-language",
|
|
422
|
+
children: /* @__PURE__ */ v("select", {
|
|
423
|
+
id: "hb-weather-language",
|
|
424
|
+
value: R.advisoryLanguage,
|
|
425
|
+
onChange: (e) => W("advisoryLanguage", e.target.value),
|
|
426
|
+
className: x,
|
|
427
|
+
children: T.map((e) => /* @__PURE__ */ v("option", {
|
|
428
|
+
value: e.code,
|
|
429
|
+
children: A(e.labelKey, e.fallback)
|
|
430
|
+
}, e.code))
|
|
431
|
+
})
|
|
432
|
+
})]
|
|
433
|
+
})
|
|
434
|
+
}),
|
|
435
|
+
/* @__PURE__ */ y("div", {
|
|
436
|
+
className: "flex items-center gap-3",
|
|
437
|
+
children: [/* @__PURE__ */ y(b, {
|
|
438
|
+
onClick: () => void J(),
|
|
439
|
+
disabled: B,
|
|
440
|
+
children: [B ? /* @__PURE__ */ v(p, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ v(g, { className: "h-4 w-4" }), B ? A("healthybowl.weather.settings.actions.saving", "Saving…") : A("healthybowl.weather.settings.actions.save", "Save changes")]
|
|
441
|
+
}), /* @__PURE__ */ v(b, {
|
|
442
|
+
variant: "ghost",
|
|
443
|
+
onClick: () => {
|
|
444
|
+
M && z(E(M));
|
|
445
|
+
},
|
|
446
|
+
disabled: B,
|
|
447
|
+
children: A("healthybowl.weather.settings.actions.cancel", "Cancel")
|
|
448
|
+
})]
|
|
449
|
+
})
|
|
450
|
+
]
|
|
451
|
+
})
|
|
452
|
+
});
|
|
453
|
+
};
|
|
454
|
+
//#endregion
|
|
455
|
+
export { A as WeatherSettingsPage };
|
|
456
|
+
|
|
457
|
+
//# sourceMappingURL=WeatherSettingsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WeatherSettingsPage.js","names":[],"sources":["../../../../src/healthybowl/pages/weather/WeatherSettingsPage.tsx"],"sourcesContent":["/**\n * Weather & Alert Settings — configuration surface for the Historical Weather &\n * Early-Warning system (roadmap #20 / BOFF-2892).\n *\n * Farm-level knobs for the weather-intelligence platform: the historical data\n * archive (with a \"Re-sync history\" action), notification channels (in-app / SMS\n * / email / webhook), quiet-hours & delivery, anomaly-detection tuning, and the\n * AI advisory. All values come from `useWeatherIntelligence().settings`; the form\n * is a controlled mirror seeded from that value and persisted via `saveSettings`.\n * Nothing is fabricated — an unconfigured farm shows the honest empty state.\n * @module healthybowl\n */\nimport { useEffect, useMemo, useState, type FC, type ReactNode } from 'react';\nimport { CloudSun, RefreshCw, Loader2, Bell, MoonStar, Activity, Sparkles, Save } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { PageLayout, ErrorState, PageLoader, EmptyState } from '../../components';\nimport { useToast } from '../../hooks/useToast';\nimport {\n useWeatherIntelligence,\n type WeatherAlertSettings,\n type UpsertWeatherAlertSettingsInput,\n} from '../../hooks/useWeatherIntelligence';\n\nconst inputClass =\n 'h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\n\nconst LEAD_TIME_OPTIONS = [12, 24, 48] as const;\nconst BASELINE_YEAR_OPTIONS = [5, 7, 10] as const;\nconst UNIT_OPTIONS = ['metric', 'imperial'] as const;\nconst LANGUAGE_OPTIONS = [\n { code: 'en', labelKey: 'healthybowl.weather.settings.language.en', fallback: 'English' },\n { code: 'hi', labelKey: 'healthybowl.weather.settings.language.hi', fallback: 'Hindi' },\n { code: 'mr', labelKey: 'healthybowl.weather.settings.language.mr', fallback: 'Marathi' },\n { code: 'ta', labelKey: 'healthybowl.weather.settings.language.ta', fallback: 'Tamil' },\n { code: 'te', labelKey: 'healthybowl.weather.settings.language.te', fallback: 'Telugu' },\n] as const;\n\n/** Editable, non-null projection of {@link WeatherAlertSettings} for the form. */\ninterface SettingsFormState {\n inAppEnabled: boolean;\n smsEnabled: boolean;\n smsNumber: string;\n emailEnabled: boolean;\n webhookEnabled: boolean;\n webhookUrl: string;\n quietHoursEnabled: boolean;\n quietHoursStart: string;\n quietHoursEnd: string;\n escalateCriticalFrost: boolean;\n alertLeadTimeHours: number;\n baselineYears: number;\n deviationThresholdPct: number;\n weeklyDigestEmail: boolean;\n aiAdvisoryEnabled: boolean;\n advisoryLanguage: string;\n units: string;\n}\n\n/** Maps a loaded {@link WeatherAlertSettings} onto the controlled form shape. */\nconst toFormState = (s: WeatherAlertSettings): SettingsFormState => ({\n inAppEnabled: s.inAppEnabled,\n smsEnabled: s.smsEnabled,\n smsNumber: s.smsNumber ?? '',\n emailEnabled: s.emailEnabled,\n webhookEnabled: s.webhookEnabled,\n webhookUrl: s.webhookUrl ?? '',\n quietHoursEnabled: s.quietHoursEnabled,\n quietHoursStart: s.quietHoursStart ?? '22:00',\n quietHoursEnd: s.quietHoursEnd ?? '06:00',\n escalateCriticalFrost: s.escalateCriticalFrost,\n alertLeadTimeHours: s.alertLeadTimeHours,\n baselineYears: s.baselineYears,\n deviationThresholdPct: s.deviationThresholdPct,\n weeklyDigestEmail: s.weeklyDigestEmail,\n aiAdvisoryEnabled: s.aiAdvisoryEnabled,\n advisoryLanguage: s.advisoryLanguage ?? 'en',\n units: s.units ?? 'metric',\n});\n\n/** A labelled section card matching the mock's grouped layout. */\nconst Section: FC<{ icon: ReactNode; title: string; description?: string; children: ReactNode }> = ({\n icon,\n title,\n description,\n children,\n}) => (\n <section className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <div className=\"mb-4 flex items-start gap-2\">\n <span className=\"mt-0.5 text-text-secondary\">{icon}</span>\n <div className=\"space-y-0.5\">\n <h2 className=\"text-sm font-semibold text-text-primary\">{title}</h2>\n {description && <p className=\"text-xs text-text-secondary\">{description}</p>}\n </div>\n </div>\n {children}\n </section>\n);\n\n/** Accessible on/off switch styled with design tokens; shows an \"On/Off\" label. */\nconst Toggle: FC<{ checked: boolean; onChange: (v: boolean) => void; label: string; labelId: string }> = ({\n checked,\n onChange,\n label,\n labelId,\n}) => {\n const { t } = useI18n();\n return (\n <div className=\"flex items-center justify-between gap-3\">\n <span id={labelId} className=\"flex items-center gap-2 text-sm text-text-primary\">\n {label}\n <span className=\"inline-flex items-center gap-1 text-xs text-text-secondary\">\n <span className={`h-2 w-2 rounded-full ${checked ? 'bg-success' : 'bg-bg-sunken'}`} />\n {checked ? t('healthybowl.weather.settings.on', 'On') : t('healthybowl.weather.settings.off', 'Off')}\n </span>\n </span>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={checked}\n aria-labelledby={labelId}\n onClick={() => onChange(!checked)}\n className={`relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${\n checked ? 'bg-success' : 'bg-bg-sunken'\n }`}\n >\n <span\n className={`inline-block h-5 w-5 transform rounded-full bg-bg-surface shadow-sm transition-transform ${\n checked ? 'translate-x-5' : 'translate-x-0.5'\n }`}\n />\n </button>\n </div>\n );\n};\n\n/** A form field with a label above the control. */\nconst Field: FC<{ label: string; htmlFor?: string; children: ReactNode }> = ({ label, htmlFor, children }) => (\n <div>\n <label htmlFor={htmlFor} className=\"mb-1 block text-sm font-medium text-text-primary\">\n {label}\n </label>\n {children}\n </div>\n);\n\nexport const WeatherSettingsPage: FC = () => {\n const { t } = useI18n();\n const { toast } = useToast();\n const { settings, loadingSettings, errorSettings, refetchSettings, saveSettings, syncHistory } =\n useWeatherIntelligence();\n\n const [form, setForm] = useState<SettingsFormState | null>(null);\n const [saving, setSaving] = useState(false);\n const [syncing, setSyncing] = useState(false);\n\n // Seed the controlled form once (and whenever) settings load/refetch.\n useEffect(() => {\n if (settings) setForm(toFormState(settings));\n }, [settings]);\n\n const update = <K extends keyof SettingsFormState>(key: K, value: SettingsFormState[K]) =>\n setForm((prev) => (prev ? { ...prev, [key]: value } : prev));\n\n const archiveLabel = useMemo(() => {\n if (!settings?.historyStartYear || !settings?.historyEndYear) return null;\n return `${settings.historyStartYear} – ${settings.historyEndYear}`;\n }, [settings]);\n\n const lastSyncedLabel = useMemo(() => {\n if (!settings?.historyLastSyncedAt) return null;\n const d = new Date(settings.historyLastSyncedAt);\n return Number.isNaN(d.getTime()) ? null : d.toLocaleString();\n }, [settings]);\n\n const handleResync = async () => {\n setSyncing(true);\n try {\n await syncHistory();\n await refetchSettings();\n toast({\n title: t('healthybowl.weather.settings.toast.resynced.title', 'History re-synced'),\n description: t(\n 'healthybowl.weather.settings.toast.resynced.description',\n 'The historical weather archive has been refreshed from Open-Meteo ERA5.'\n ),\n variant: 'success',\n });\n } catch (err) {\n toast({\n title: t('healthybowl.weather.settings.toast.resyncError.title', 'Could not re-sync history'),\n description: err instanceof Error ? err.message : undefined,\n variant: 'error',\n });\n } finally {\n setSyncing(false);\n }\n };\n\n const handleSave = async () => {\n if (!form) return;\n const input: UpsertWeatherAlertSettingsInput = {\n inAppEnabled: form.inAppEnabled,\n smsEnabled: form.smsEnabled,\n smsNumber: form.smsNumber.trim() || null,\n emailEnabled: form.emailEnabled,\n webhookEnabled: form.webhookEnabled,\n webhookUrl: form.webhookUrl.trim() || null,\n quietHoursEnabled: form.quietHoursEnabled,\n quietHoursStart: form.quietHoursStart || null,\n quietHoursEnd: form.quietHoursEnd || null,\n escalateCriticalFrost: form.escalateCriticalFrost,\n alertLeadTimeHours: form.alertLeadTimeHours,\n baselineYears: form.baselineYears,\n deviationThresholdPct: form.deviationThresholdPct,\n weeklyDigestEmail: form.weeklyDigestEmail,\n aiAdvisoryEnabled: form.aiAdvisoryEnabled,\n advisoryLanguage: form.advisoryLanguage || null,\n units: form.units || null,\n };\n setSaving(true);\n try {\n await saveSettings(input);\n toast({\n title: t('healthybowl.weather.settings.toast.saved.title', 'Settings saved'),\n description: t(\n 'healthybowl.weather.settings.toast.saved.description',\n 'Your weather & alert preferences have been updated.'\n ),\n variant: 'success',\n });\n } catch (err) {\n toast({\n title: t('healthybowl.weather.settings.toast.saveError.title', 'Could not save settings'),\n description: err instanceof Error ? err.message : undefined,\n variant: 'error',\n });\n } finally {\n setSaving(false);\n }\n };\n\n const handleCancel = () => {\n if (settings) setForm(toFormState(settings));\n };\n\n return (\n <PageLayout\n title={t('healthybowl.weather.settings.title', 'Weather & Alert Settings')}\n description={t(\n 'healthybowl.weather.settings.description',\n 'Configure your weather archive, notification channels, quiet hours and AI advisory'\n )}\n purpose=\"Everything that controls how HealthyBowl watches the weather for your farm: which years of history it compares against, how it reaches you when frost, a storm, heat or an anomaly is coming (in-app, SMS, email or a FluidGrids webhook), when to stay quiet, and how sensitive the anomaly detection is. Tune it once and every early-warning alert follows these rules.\"\n >\n {loadingSettings && !settings ? (\n <PageLoader />\n ) : errorSettings && !settings ? (\n <ErrorState onRetry={() => void refetchSettings()} />\n ) : !form || !settings ? (\n <EmptyState\n title={t('healthybowl.weather.settings.empty.title', 'No weather settings yet')}\n description={t(\n 'healthybowl.weather.settings.empty.description',\n 'Weather settings will appear here once your workspace weather archive is initialised.'\n )}\n />\n ) : (\n <div className=\"space-y-6\">\n {/* ── Farm Location & Data ─────────────────────────────────────────── */}\n <Section\n icon={<CloudSun className=\"h-4 w-4\" />}\n title={t('healthybowl.weather.settings.location.title', 'Farm Location & Data')}\n description={t(\n 'healthybowl.weather.settings.location.description',\n 'The historical weather archive your early-warning system compares against.'\n )}\n >\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n <div className=\"space-y-3\">\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <span className=\"text-text-secondary\">\n {t('healthybowl.weather.settings.location.archive', 'Historical archive')}\n </span>\n <span className=\"font-medium text-text-primary\">\n {archiveLabel\n ? t('healthybowl.weather.settings.location.archiveValue', '{{range}} (Open-Meteo ERA5)', {\n range: archiveLabel,\n })\n : t('healthybowl.weather.settings.location.notSynced', 'Not synced yet (Open-Meteo ERA5)')}\n </span>\n </div>\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <span className=\"text-text-secondary\">\n {t('healthybowl.weather.settings.location.lastSynced', 'Last synced')}\n </span>\n <span className=\"font-medium text-text-primary\">\n {lastSyncedLabel ?? t('healthybowl.weather.settings.location.never', 'Never')}\n </span>\n </div>\n <Button variant=\"outline\" size=\"sm\" onClick={() => void handleResync()} disabled={syncing}>\n {syncing ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <RefreshCw className=\"h-4 w-4\" />}\n {t('healthybowl.weather.settings.location.resync', 'Re-sync history')}\n </Button>\n </div>\n <Field label={t('healthybowl.weather.settings.location.units', 'Units')} htmlFor=\"hb-weather-units\">\n <select\n id=\"hb-weather-units\"\n value={form.units}\n onChange={(e) => update('units', e.target.value)}\n className={inputClass}\n >\n {UNIT_OPTIONS.map((u) => (\n <option key={u} value={u}>\n {u === 'metric'\n ? t('healthybowl.weather.settings.units.metric', 'Metric (°C, mm)')\n : t('healthybowl.weather.settings.units.imperial', 'Imperial (°F, in)')}\n </option>\n ))}\n </select>\n </Field>\n </div>\n </Section>\n\n {/* ── Notification Channels ────────────────────────────────────────── */}\n <Section\n icon={<Bell className=\"h-4 w-4\" />}\n title={t('healthybowl.weather.settings.channels.title', 'Notification Channels')}\n description={t(\n 'healthybowl.weather.settings.channels.description',\n 'How HealthyBowl reaches you when an alert fires.'\n )}\n >\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2\">\n <div className=\"space-y-4\">\n <Toggle\n checked={form.inAppEnabled}\n onChange={(v) => update('inAppEnabled', v)}\n label={t('healthybowl.weather.settings.channels.inApp', 'In-app notifications')}\n labelId=\"hb-weather-inapp\"\n />\n <div className=\"space-y-2\">\n <Toggle\n checked={form.emailEnabled}\n onChange={(v) => update('emailEnabled', v)}\n label={t('healthybowl.weather.settings.channels.email', 'Email alerts')}\n labelId=\"hb-weather-email\"\n />\n </div>\n </div>\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <Toggle\n checked={form.smsEnabled}\n onChange={(v) => update('smsEnabled', v)}\n label={t('healthybowl.weather.settings.channels.sms', 'SMS alerts')}\n labelId=\"hb-weather-sms\"\n />\n {form.smsEnabled && (\n <input\n type=\"tel\"\n value={form.smsNumber}\n onChange={(e) => update('smsNumber', e.target.value)}\n placeholder={t('healthybowl.weather.settings.channels.smsPlaceholder', '+91 98765 43210')}\n aria-label={t('healthybowl.weather.settings.channels.smsNumber', 'SMS number')}\n className={inputClass}\n />\n )}\n </div>\n <div className=\"space-y-2\">\n <Toggle\n checked={form.webhookEnabled}\n onChange={(v) => update('webhookEnabled', v)}\n label={t('healthybowl.weather.settings.channels.webhook', 'Webhook (FluidGrids)')}\n labelId=\"hb-weather-webhook\"\n />\n {form.webhookEnabled && (\n <input\n type=\"url\"\n value={form.webhookUrl}\n onChange={(e) => update('webhookUrl', e.target.value)}\n placeholder={t(\n 'healthybowl.weather.settings.channels.webhookPlaceholder',\n 'https://www.example.com/fluidgrids'\n )}\n aria-label={t('healthybowl.weather.settings.channels.webhookUrl', 'Webhook URL')}\n className={inputClass}\n />\n )}\n </div>\n </div>\n </div>\n </Section>\n\n {/* ── Quiet Hours & Delivery ───────────────────────────────────────── */}\n <Section\n icon={<MoonStar className=\"h-4 w-4\" />}\n title={t('healthybowl.weather.settings.quiet.title', 'Quiet Hours & Delivery')}\n description={t(\n 'healthybowl.weather.settings.quiet.description',\n 'Suppress non-critical alerts overnight and choose how far ahead to warn you.'\n )}\n >\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2\">\n <div className=\"space-y-3\">\n <Toggle\n checked={form.quietHoursEnabled}\n onChange={(v) => update('quietHoursEnabled', v)}\n label={t('healthybowl.weather.settings.quiet.doNotDisturb', 'Do not disturb')}\n labelId=\"hb-weather-quiet\"\n />\n {form.quietHoursEnabled && (\n <div className=\"grid grid-cols-2 gap-3\">\n <Field\n label={t('healthybowl.weather.settings.quiet.from', 'From')}\n htmlFor=\"hb-weather-quiet-start\"\n >\n <input\n id=\"hb-weather-quiet-start\"\n type=\"time\"\n value={form.quietHoursStart}\n onChange={(e) => update('quietHoursStart', e.target.value)}\n className={inputClass}\n />\n </Field>\n <Field label={t('healthybowl.weather.settings.quiet.to', 'To')} htmlFor=\"hb-weather-quiet-end\">\n <input\n id=\"hb-weather-quiet-end\"\n type=\"time\"\n value={form.quietHoursEnd}\n onChange={(e) => update('quietHoursEnd', e.target.value)}\n className={inputClass}\n />\n </Field>\n </div>\n )}\n </div>\n <div className=\"space-y-4\">\n <Toggle\n checked={form.escalateCriticalFrost}\n onChange={(v) => update('escalateCriticalFrost', v)}\n label={t(\n 'healthybowl.weather.settings.quiet.escalate',\n 'Escalate critical frost alerts even during quiet hours'\n )}\n labelId=\"hb-weather-escalate\"\n />\n <Field\n label={t('healthybowl.weather.settings.quiet.leadTime', 'Alert lead time')}\n htmlFor=\"hb-weather-lead\"\n >\n <select\n id=\"hb-weather-lead\"\n value={form.alertLeadTimeHours}\n onChange={(e) => update('alertLeadTimeHours', Number(e.target.value))}\n className={inputClass}\n >\n {LEAD_TIME_OPTIONS.map((h) => (\n <option key={h} value={h}>\n {t('healthybowl.weather.settings.quiet.leadTimeOption', '{{hours}} hours before', {\n hours: h,\n })}\n </option>\n ))}\n </select>\n </Field>\n </div>\n </div>\n </Section>\n\n {/* ── Anomaly Detection ────────────────────────────────────────────── */}\n <Section\n icon={<Activity className=\"h-4 w-4\" />}\n title={t('healthybowl.weather.settings.anomaly.title', 'Anomaly Detection')}\n description={t(\n 'healthybowl.weather.settings.anomaly.description',\n 'Tune how HealthyBowl decides this season is running abnormally versus the baseline.'\n )}\n >\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-3\">\n <Field\n label={t('healthybowl.weather.settings.anomaly.baseline', 'Baseline window')}\n htmlFor=\"hb-weather-baseline\"\n >\n <select\n id=\"hb-weather-baseline\"\n value={form.baselineYears}\n onChange={(e) => update('baselineYears', Number(e.target.value))}\n className={inputClass}\n >\n {BASELINE_YEAR_OPTIONS.map((y) => (\n <option key={y} value={y}>\n {t('healthybowl.weather.settings.anomaly.baselineOption', '{{years}} years', { years: y })}\n </option>\n ))}\n </select>\n </Field>\n <Field\n label={t('healthybowl.weather.settings.anomaly.deviation', 'Deviation threshold: {{pct}}%', {\n pct: form.deviationThresholdPct,\n })}\n htmlFor=\"hb-weather-deviation\"\n >\n <input\n id=\"hb-weather-deviation\"\n type=\"range\"\n min={0}\n max={100}\n step={5}\n value={form.deviationThresholdPct}\n onChange={(e) => update('deviationThresholdPct', Number(e.target.value))}\n className=\"h-2 w-full cursor-pointer appearance-none rounded-full bg-bg-sunken accent-[var(--color-primary)]\"\n />\n </Field>\n <div className=\"flex items-end\">\n <div className=\"w-full\">\n <Toggle\n checked={form.weeklyDigestEmail}\n onChange={(v) => update('weeklyDigestEmail', v)}\n label={t('healthybowl.weather.settings.anomaly.digest', 'Weekly anomaly digest email')}\n labelId=\"hb-weather-digest\"\n />\n </div>\n </div>\n </div>\n </Section>\n\n {/* ── AI Advisory ──────────────────────────────────────────────────── */}\n <Section\n icon={<Sparkles className=\"h-4 w-4\" />}\n title={t('healthybowl.weather.settings.ai.title', 'AI Advisory')}\n description={t(\n 'healthybowl.weather.settings.ai.description',\n 'Plain-language explanations and recommended actions attached to each alert.'\n )}\n >\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2\">\n <Toggle\n checked={form.aiAdvisoryEnabled}\n onChange={(v) => update('aiAdvisoryEnabled', v)}\n label={t('healthybowl.weather.settings.ai.explanations', 'Plain-English explanations')}\n labelId=\"hb-weather-ai\"\n />\n <Field label={t('healthybowl.weather.settings.ai.language', 'Language')} htmlFor=\"hb-weather-language\">\n <select\n id=\"hb-weather-language\"\n value={form.advisoryLanguage}\n onChange={(e) => update('advisoryLanguage', e.target.value)}\n className={inputClass}\n >\n {LANGUAGE_OPTIONS.map((l) => (\n <option key={l.code} value={l.code}>\n {t(l.labelKey, l.fallback)}\n </option>\n ))}\n </select>\n </Field>\n </div>\n </Section>\n\n {/* ── Actions ──────────────────────────────────────────────────────── */}\n <div className=\"flex items-center gap-3\">\n <Button onClick={() => void handleSave()} disabled={saving}>\n {saving ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <Save className=\"h-4 w-4\" />}\n {saving\n ? t('healthybowl.weather.settings.actions.saving', 'Saving…')\n : t('healthybowl.weather.settings.actions.save', 'Save changes')}\n </Button>\n <Button variant=\"ghost\" onClick={handleCancel} disabled={saving}>\n {t('healthybowl.weather.settings.actions.cancel', 'Cancel')}\n </Button>\n </div>\n </div>\n )}\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAwBA,IAAM,IACJ,uMAEI,IAAoB;CAAC;CAAI;CAAI;CAAG,EAChC,IAAwB;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