@burdenoff/microfe-healthybowl 2026.904.21 → 2026.904.22
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/components/assistant/AssistantChatArea.js +7 -9
- package/dist/components/assistant/AssistantChatArea.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoot.js +56 -57
- package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
- package/dist/healthybowl/HealthyBowlRoutes.js +36 -48
- package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
- package/dist/healthybowl/components/CreateFarmTaskButton.js.map +1 -1
- package/dist/healthybowl/components/PageLayout.js +10 -11
- package/dist/healthybowl/components/PageLayout.js.map +1 -1
- package/dist/healthybowl/context/HealthyBowlContext.js +7 -7
- package/dist/healthybowl/context/HealthyBowlContext.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlCompliance.js +141 -157
- package/dist/healthybowl/hooks/useHealthyBowlCompliance.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlData.js +0 -18
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js +37 -52
- package/dist/healthybowl/hooks/useHealthyBowlDistribution.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js +78 -135
- package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js.map +1 -1
- package/dist/healthybowl/hooks/useIrrigationAutomation.js +1 -1
- package/dist/healthybowl/hooks/useIrrigationAutomation.js.map +1 -1
- package/dist/healthybowl/hooks/useSuccessionPlanning.js +1 -1
- package/dist/healthybowl/hooks/useSuccessionPlanning.js.map +1 -1
- package/dist/healthybowl/hooks/useWeatherIntelligence.js +1 -1
- package/dist/healthybowl/hooks/useWeatherIntelligence.js.map +1 -1
- package/dist/healthybowl/offline/OfflineStatusPill.js +21 -40
- package/dist/healthybowl/offline/OfflineStatusPill.js.map +1 -1
- package/dist/healthybowl/offline/OfflineSyncProvider.js +130 -153
- package/dist/healthybowl/offline/OfflineSyncProvider.js.map +1 -1
- package/dist/healthybowl/offline/graphql.js.map +1 -1
- package/dist/healthybowl/offline/store.js +1 -1
- package/dist/healthybowl/offline/syncEngine.js +1 -2
- package/dist/healthybowl/offline/syncEngine.js.map +1 -1
- package/dist/healthybowl/offline/types.js.map +1 -1
- package/dist/healthybowl/pages/GettingStartedPage.js +0 -1
- package/dist/healthybowl/pages/GettingStartedPage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/InsightsPage.js +2 -2
- package/dist/healthybowl/pages/analytics/InsightsPage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/ReportsPage.js +99 -136
- package/dist/healthybowl/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js +162 -204
- package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js +178 -196
- package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +141 -142
- package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropFieldsPage.js +0 -2
- package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropHarvestPage.js +272 -316
- package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +0 -6
- package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +846 -871
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +334 -376
- package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js +188 -415
- package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js.map +1 -1
- package/dist/healthybowl/pages/distribution/labels.js +2 -10
- package/dist/healthybowl/pages/distribution/labels.js.map +1 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js +0 -1
- package/dist/healthybowl/pages/farm/FarmProfilePage.js.map +1 -1
- package/dist/healthybowl/pages/field-capture/CaptureObservationForm.js +8 -8
- package/dist/healthybowl/pages/fields/FieldMapPage.js +0 -2
- package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js +107 -92
- package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +188 -228
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +191 -261
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js +14 -14
- package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js.map +1 -1
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js +307 -338
- package/dist/healthybowl/pages/irrigation/IrrigationPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +102 -126
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js +215 -257
- package/dist/healthybowl/pages/livestock/AnimalDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/GrazingPage.js +0 -1
- package/dist/healthybowl/pages/livestock/GrazingPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js +0 -4
- package/dist/healthybowl/pages/livestock/HerdDepthPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js +9 -8
- package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +419 -520
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +130 -129
- package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js.map +1 -1
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +237 -285
- package/dist/healthybowl/pages/weather/WeatherSettingsPage.js.map +1 -1
- package/dist/healthybowl/utils/plantingCapacity.js +10 -10
- package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +86 -74
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/services/assistantApi.js +30 -59
- package/dist/services/assistantApi.js.map +1 -1
- package/dist/utils/pageContext.js +1 -15
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
- package/dist/healthybowl/hooks/useAgronomyDecisions.js +0 -79
- package/dist/healthybowl/hooks/useAgronomyDecisions.js.map +0 -1
- package/dist/healthybowl/hooks/useAnalyticsReports.js +0 -173
- package/dist/healthybowl/hooks/useAnalyticsReports.js.map +0 -1
- package/dist/healthybowl/hooks/useComplianceExports.js +0 -74
- package/dist/healthybowl/hooks/useComplianceExports.js.map +0 -1
- package/dist/healthybowl/hooks/useConsultationPayments.js +0 -59
- package/dist/healthybowl/hooks/useConsultationPayments.js.map +0 -1
- package/dist/healthybowl/hooks/usePlantingEstimate.js +0 -88
- package/dist/healthybowl/hooks/usePlantingEstimate.js.map +0 -1
- package/dist/healthybowl/offline/HeaderOfflinePill.js +0 -28
- package/dist/healthybowl/offline/HeaderOfflinePill.js.map +0 -1
- package/dist/healthybowl/offline/captureCache.js +0 -30
- package/dist/healthybowl/offline/captureCache.js.map +0 -1
- package/dist/healthybowl/offline/headerSlot.js +0 -24
- package/dist/healthybowl/offline/headerSlot.js.map +0 -1
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js +0 -287
- package/dist/healthybowl/pages/ai/AiDecisionsPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +0 -291
- package/dist/healthybowl/pages/compliance/ResidueTestsPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js +0 -300
- package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js.map +0 -1
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js +0 -135
- package/dist/healthybowl/pages/compliance/substanceRuleForm.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +0 -49
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +0 -48
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +0 -54
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +0 -1
- package/dist/healthybowl/pages/livestock/PedigreeTree.js +0 -154
- package/dist/healthybowl/pages/livestock/PedigreeTree.js.map +0 -1
- package/dist/healthybowl/pages/livestock/eidTagInput.js +0 -39
- package/dist/healthybowl/pages/livestock/eidTagInput.js.map +0 -1
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js +0 -68
- package/dist/healthybowl/pages/livestock/pedigreeLayout.js.map +0 -1
- package/dist/healthybowl/pages/weather/alertDelivery.js +0 -105
- package/dist/healthybowl/pages/weather/alertDelivery.js.map +0 -1
- package/dist/healthybowl/utils/icsInspection.js +0 -18
- package/dist/healthybowl/utils/icsInspection.js.map +0 -1
|
@@ -5,22 +5,21 @@ import { PageLoader as r } from "../../components/PageLoader.js";
|
|
|
5
5
|
import { useToast as i } from "../../hooks/useToast.js";
|
|
6
6
|
import "../../components/index.js";
|
|
7
7
|
import { useWeatherIntelligence as a } from "../../hooks/useWeatherIntelligence.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { Button as T } from "@burdenoff/fe-libs/ui";
|
|
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";
|
|
14
13
|
//#region src/healthybowl/pages/weather/WeatherSettingsPage.tsx
|
|
15
|
-
var
|
|
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 = [
|
|
16
15
|
12,
|
|
17
16
|
24,
|
|
18
17
|
48
|
|
19
|
-
],
|
|
18
|
+
], C = [
|
|
20
19
|
5,
|
|
21
20
|
7,
|
|
22
21
|
10
|
|
23
|
-
],
|
|
22
|
+
], w = ["metric", "imperial"], T = [
|
|
24
23
|
{
|
|
25
24
|
code: "en",
|
|
26
25
|
labelKey: "healthybowl.weather.settings.language.en",
|
|
@@ -46,18 +45,16 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
|
|
|
46
45
|
labelKey: "healthybowl.weather.settings.language.te",
|
|
47
46
|
fallback: "Telugu"
|
|
48
47
|
}
|
|
49
|
-
],
|
|
48
|
+
], E = (e) => ({
|
|
50
49
|
inAppEnabled: e.inAppEnabled,
|
|
51
50
|
smsEnabled: e.smsEnabled,
|
|
52
51
|
smsNumber: e.smsNumber ?? "",
|
|
53
52
|
emailEnabled: e.emailEnabled,
|
|
54
|
-
alertEmail: e.alertEmail ?? "",
|
|
55
53
|
webhookEnabled: e.webhookEnabled,
|
|
56
54
|
webhookUrl: e.webhookUrl ?? "",
|
|
57
55
|
quietHoursEnabled: e.quietHoursEnabled,
|
|
58
56
|
quietHoursStart: e.quietHoursStart ?? "22:00",
|
|
59
57
|
quietHoursEnd: e.quietHoursEnd ?? "06:00",
|
|
60
|
-
quietHoursTimezone: e.quietHoursTimezone ?? s(),
|
|
61
58
|
escalateCriticalFrost: e.escalateCriticalFrost,
|
|
62
59
|
alertLeadTimeHours: e.alertLeadTimeHours,
|
|
63
60
|
baselineYears: e.baselineYears,
|
|
@@ -66,386 +63,341 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
|
|
|
66
63
|
aiAdvisoryEnabled: e.aiAdvisoryEnabled,
|
|
67
64
|
advisoryLanguage: e.advisoryLanguage ?? "en",
|
|
68
65
|
units: e.units ?? "metric"
|
|
69
|
-
}),
|
|
66
|
+
}), D = ({ icon: e, title: t, description: n, children: r }) => /* @__PURE__ */ y("section", {
|
|
70
67
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ y("div", {
|
|
72
69
|
className: "mb-4 flex items-start gap-2",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ v("span", {
|
|
74
71
|
className: "mt-0.5 text-text-secondary",
|
|
75
72
|
children: e
|
|
76
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ y("div", {
|
|
77
74
|
className: "space-y-0.5",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
79
76
|
className: "text-sm font-semibold text-text-primary",
|
|
80
77
|
children: t
|
|
81
|
-
}), n && /* @__PURE__ */
|
|
78
|
+
}), n && /* @__PURE__ */ v("p", {
|
|
82
79
|
className: "text-xs text-text-secondary",
|
|
83
80
|
children: n
|
|
84
81
|
})]
|
|
85
82
|
})]
|
|
86
83
|
}), r]
|
|
87
|
-
}),
|
|
88
|
-
let { t: i } =
|
|
89
|
-
return /* @__PURE__ */
|
|
84
|
+
}), O = ({ checked: e, onChange: t, label: n, labelId: r }) => {
|
|
85
|
+
let { t: i } = l();
|
|
86
|
+
return /* @__PURE__ */ y("div", {
|
|
90
87
|
className: "flex items-center justify-between gap-3",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ y("span", {
|
|
92
89
|
id: r,
|
|
93
90
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
94
|
-
children: [n, /* @__PURE__ */
|
|
91
|
+
children: [n, /* @__PURE__ */ y("span", {
|
|
95
92
|
className: "inline-flex items-center gap-1 text-xs text-text-secondary",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
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")]
|
|
97
94
|
})]
|
|
98
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ v("button", {
|
|
99
96
|
type: "button",
|
|
100
97
|
role: "switch",
|
|
101
98
|
"aria-checked": e,
|
|
102
99
|
"aria-labelledby": r,
|
|
103
100
|
onClick: () => t(!e),
|
|
104
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"}`,
|
|
105
|
-
children: /* @__PURE__ */
|
|
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"}` })
|
|
106
103
|
})]
|
|
107
104
|
});
|
|
108
|
-
},
|
|
105
|
+
}, k = ({ label: e, htmlFor: t, children: n }) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
109
106
|
htmlFor: t,
|
|
110
107
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
111
108
|
children: e
|
|
112
|
-
}), n] }),
|
|
113
|
-
let { t:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}, [
|
|
117
|
-
let
|
|
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 && {
|
|
118
115
|
...n,
|
|
119
116
|
[e]: t
|
|
120
|
-
}),
|
|
121
|
-
if (!
|
|
122
|
-
let e = new Date(
|
|
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);
|
|
123
120
|
return Number.isNaN(e.getTime()) ? null : e.toLocaleString();
|
|
124
|
-
}, [
|
|
125
|
-
|
|
121
|
+
}, [M]), q = async () => {
|
|
122
|
+
U(!0);
|
|
126
123
|
try {
|
|
127
|
-
await
|
|
128
|
-
title:
|
|
129
|
-
description:
|
|
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."),
|
|
130
127
|
variant: "success"
|
|
131
128
|
});
|
|
132
129
|
} catch (e) {
|
|
133
|
-
|
|
134
|
-
title:
|
|
130
|
+
j({
|
|
131
|
+
title: A("healthybowl.weather.settings.toast.resyncError.title", "Could not re-sync history"),
|
|
135
132
|
description: e instanceof Error ? e.message : void 0,
|
|
136
133
|
variant: "error"
|
|
137
134
|
});
|
|
138
135
|
} finally {
|
|
139
|
-
|
|
136
|
+
U(!1);
|
|
140
137
|
}
|
|
141
|
-
},
|
|
142
|
-
if (!
|
|
138
|
+
}, J = async () => {
|
|
139
|
+
if (!R) return;
|
|
143
140
|
let e = {
|
|
144
|
-
inAppEnabled:
|
|
145
|
-
smsEnabled:
|
|
146
|
-
smsNumber:
|
|
147
|
-
emailEnabled:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
advisoryLanguage: V.advisoryLanguage || null,
|
|
162
|
-
units: V.units || null
|
|
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
|
|
163
158
|
};
|
|
164
|
-
|
|
159
|
+
V(!0);
|
|
165
160
|
try {
|
|
166
|
-
await
|
|
167
|
-
title:
|
|
168
|
-
description:
|
|
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."),
|
|
169
164
|
variant: "success"
|
|
170
165
|
});
|
|
171
166
|
} catch (e) {
|
|
172
|
-
|
|
173
|
-
title:
|
|
167
|
+
j({
|
|
168
|
+
title: A("healthybowl.weather.settings.toast.saveError.title", "Could not save settings"),
|
|
174
169
|
description: e instanceof Error ? e.message : void 0,
|
|
175
170
|
variant: "error"
|
|
176
171
|
});
|
|
177
172
|
} finally {
|
|
178
|
-
|
|
173
|
+
V(!1);
|
|
179
174
|
}
|
|
180
175
|
};
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
-
title:
|
|
183
|
-
description:
|
|
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"),
|
|
184
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.",
|
|
185
|
-
children:
|
|
186
|
-
title:
|
|
187
|
-
description:
|
|
188
|
-
}) : /* @__PURE__ */
|
|
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", {
|
|
189
184
|
className: "space-y-6",
|
|
190
185
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
icon: /* @__PURE__ */
|
|
193
|
-
title:
|
|
194
|
-
description:
|
|
195
|
-
children: /* @__PURE__ */
|
|
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", {
|
|
196
191
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ y("div", {
|
|
198
193
|
className: "space-y-3",
|
|
199
194
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ y("div", {
|
|
201
196
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ v("span", {
|
|
203
198
|
className: "text-text-secondary",
|
|
204
|
-
children:
|
|
205
|
-
}), /* @__PURE__ */
|
|
199
|
+
children: A("healthybowl.weather.settings.location.archive", "Historical archive")
|
|
200
|
+
}), /* @__PURE__ */ v("span", {
|
|
206
201
|
className: "font-medium text-text-primary",
|
|
207
|
-
children:
|
|
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)")
|
|
208
203
|
})]
|
|
209
204
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ y("div", {
|
|
211
206
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ v("span", {
|
|
213
208
|
className: "text-text-secondary",
|
|
214
|
-
children:
|
|
215
|
-
}), /* @__PURE__ */
|
|
209
|
+
children: A("healthybowl.weather.settings.location.lastSynced", "Last synced")
|
|
210
|
+
}), /* @__PURE__ */ v("span", {
|
|
216
211
|
className: "font-medium text-text-primary",
|
|
217
|
-
children:
|
|
212
|
+
children: K ?? A("healthybowl.weather.settings.location.never", "Never")
|
|
218
213
|
})]
|
|
219
214
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ y(b, {
|
|
221
216
|
variant: "outline",
|
|
222
217
|
size: "sm",
|
|
223
|
-
onClick: () => void
|
|
224
|
-
disabled:
|
|
225
|
-
children: [
|
|
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")]
|
|
226
221
|
})
|
|
227
222
|
]
|
|
228
|
-
}), /* @__PURE__ */
|
|
229
|
-
label:
|
|
223
|
+
}), /* @__PURE__ */ v(k, {
|
|
224
|
+
label: A("healthybowl.weather.settings.location.units", "Units"),
|
|
230
225
|
htmlFor: "hb-weather-units",
|
|
231
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ v("select", {
|
|
232
227
|
id: "hb-weather-units",
|
|
233
|
-
value:
|
|
234
|
-
onChange: (e) =>
|
|
235
|
-
className:
|
|
236
|
-
children:
|
|
228
|
+
value: R.units,
|
|
229
|
+
onChange: (e) => W("units", e.target.value),
|
|
230
|
+
className: x,
|
|
231
|
+
children: w.map((e) => /* @__PURE__ */ v("option", {
|
|
237
232
|
value: e,
|
|
238
|
-
children: e === "metric" ?
|
|
233
|
+
children: e === "metric" ? A("healthybowl.weather.settings.units.metric", "Metric (°C, mm)") : A("healthybowl.weather.settings.units.imperial", "Imperial (°F, in)")
|
|
239
234
|
}, e))
|
|
240
235
|
})
|
|
241
236
|
})]
|
|
242
237
|
})
|
|
243
238
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
icon: /* @__PURE__ */
|
|
246
|
-
title:
|
|
247
|
-
description:
|
|
248
|
-
children:
|
|
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", {
|
|
249
244
|
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ y("div", {
|
|
251
246
|
className: "space-y-4",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
253
|
-
checked:
|
|
254
|
-
onChange: (e) =>
|
|
255
|
-
label:
|
|
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"),
|
|
256
251
|
labelId: "hb-weather-inapp"
|
|
257
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ v("div", {
|
|
258
253
|
className: "space-y-2",
|
|
259
|
-
children:
|
|
260
|
-
checked:
|
|
261
|
-
onChange: (e) =>
|
|
262
|
-
label:
|
|
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"),
|
|
263
258
|
labelId: "hb-weather-email"
|
|
264
|
-
})
|
|
265
|
-
type: "email",
|
|
266
|
-
value: V.alertEmail,
|
|
267
|
-
onChange: (e) => q("alertEmail", e.target.value),
|
|
268
|
-
placeholder: s("healthybowl.weather.settings.channels.emailPlaceholder", "alerts@yourfarm.com"),
|
|
269
|
-
"aria-label": s("healthybowl.weather.settings.channels.alertEmail", "Alert email address"),
|
|
270
|
-
"aria-invalid": $,
|
|
271
|
-
className: E
|
|
272
|
-
}), $ && /* @__PURE__ */ C("p", {
|
|
273
|
-
className: "text-xs text-error",
|
|
274
|
-
children: s("healthybowl.weather.settings.channels.emailInvalid", "Enter a valid email address, or email alerts will not be sent.")
|
|
275
|
-
})] })]
|
|
259
|
+
})
|
|
276
260
|
})]
|
|
277
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ y("div", {
|
|
278
262
|
className: "space-y-4",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ y("div", {
|
|
280
264
|
className: "space-y-2",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
282
|
-
checked:
|
|
283
|
-
onChange: (e) =>
|
|
284
|
-
label:
|
|
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"),
|
|
285
269
|
labelId: "hb-weather-sms"
|
|
286
|
-
}),
|
|
270
|
+
}), R.smsEnabled && /* @__PURE__ */ v("input", {
|
|
287
271
|
type: "tel",
|
|
288
|
-
value:
|
|
289
|
-
onChange: (e) =>
|
|
290
|
-
placeholder:
|
|
291
|
-
"aria-label":
|
|
292
|
-
className:
|
|
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
|
|
293
277
|
})]
|
|
294
|
-
}), /* @__PURE__ */
|
|
278
|
+
}), /* @__PURE__ */ y("div", {
|
|
295
279
|
className: "space-y-2",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
297
|
-
checked:
|
|
298
|
-
onChange: (e) =>
|
|
299
|
-
label:
|
|
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)"),
|
|
300
284
|
labelId: "hb-weather-webhook"
|
|
301
|
-
}),
|
|
285
|
+
}), R.webhookEnabled && /* @__PURE__ */ v("input", {
|
|
302
286
|
type: "url",
|
|
303
|
-
value:
|
|
304
|
-
onChange: (e) =>
|
|
305
|
-
placeholder:
|
|
306
|
-
"aria-label":
|
|
307
|
-
className:
|
|
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
|
|
308
292
|
})]
|
|
309
293
|
})]
|
|
310
294
|
})]
|
|
311
|
-
})
|
|
312
|
-
className: "mt-4 space-y-2 rounded-md border border-warning/40 bg-warning/10 p-3",
|
|
313
|
-
children: [Q && /* @__PURE__ */ w("p", {
|
|
314
|
-
className: "flex items-start gap-2 text-xs text-text-primary",
|
|
315
|
-
children: [/* @__PURE__ */ C(h, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), s("healthybowl.weather.settings.channels.warning.none", "No channel can reach you. Weather alerts will be recorded but not delivered.")]
|
|
316
|
-
}), Z.map((e) => /* @__PURE__ */ w("p", {
|
|
317
|
-
className: "flex items-start gap-2 text-xs text-text-primary",
|
|
318
|
-
children: [/* @__PURE__ */ C(h, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), s(e.messageKey, e.messageFallback)]
|
|
319
|
-
}, e.channel))]
|
|
320
|
-
})]
|
|
295
|
+
})
|
|
321
296
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
icon: /* @__PURE__ */
|
|
324
|
-
title:
|
|
325
|
-
description:
|
|
326
|
-
children: /* @__PURE__ */
|
|
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", {
|
|
327
302
|
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ y("div", {
|
|
329
304
|
className: "space-y-3",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
331
|
-
checked:
|
|
332
|
-
onChange: (e) =>
|
|
333
|
-
label:
|
|
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"),
|
|
334
309
|
labelId: "hb-weather-quiet"
|
|
335
|
-
}),
|
|
310
|
+
}), R.quietHoursEnabled && /* @__PURE__ */ y("div", {
|
|
336
311
|
className: "grid grid-cols-2 gap-3",
|
|
337
|
-
children: [
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
className: E
|
|
347
|
-
})
|
|
348
|
-
}),
|
|
349
|
-
/* @__PURE__ */ C(N, {
|
|
350
|
-
label: s("healthybowl.weather.settings.quiet.to", "To"),
|
|
351
|
-
htmlFor: "hb-weather-quiet-end",
|
|
352
|
-
children: /* @__PURE__ */ C("input", {
|
|
353
|
-
id: "hb-weather-quiet-end",
|
|
354
|
-
type: "time",
|
|
355
|
-
value: V.quietHoursEnd,
|
|
356
|
-
onChange: (e) => q("quietHoursEnd", e.target.value),
|
|
357
|
-
className: E
|
|
358
|
-
})
|
|
359
|
-
}),
|
|
360
|
-
/* @__PURE__ */ w("div", {
|
|
361
|
-
className: "col-span-2",
|
|
362
|
-
children: [/* @__PURE__ */ C(N, {
|
|
363
|
-
label: s("healthybowl.weather.settings.quiet.timezone", "Timezone"),
|
|
364
|
-
htmlFor: "hb-weather-quiet-tz",
|
|
365
|
-
children: /* @__PURE__ */ C("select", {
|
|
366
|
-
id: "hb-weather-quiet-tz",
|
|
367
|
-
value: V.quietHoursTimezone,
|
|
368
|
-
onChange: (e) => q("quietHoursTimezone", e.target.value),
|
|
369
|
-
className: E,
|
|
370
|
-
children: ee(V.quietHoursTimezone).map((e) => /* @__PURE__ */ C("option", {
|
|
371
|
-
value: e,
|
|
372
|
-
children: e
|
|
373
|
-
}, e))
|
|
374
|
-
})
|
|
375
|
-
}), /* @__PURE__ */ C("p", {
|
|
376
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
377
|
-
children: s("healthybowl.weather.settings.quiet.timezoneHint", "Quiet hours are read in this zone. Without it they are read as UTC.")
|
|
378
|
-
})]
|
|
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
|
|
379
321
|
})
|
|
380
|
-
|
|
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
|
+
})]
|
|
381
333
|
})]
|
|
382
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ y("div", {
|
|
383
335
|
className: "space-y-4",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
385
|
-
checked:
|
|
386
|
-
onChange: (e) =>
|
|
387
|
-
label:
|
|
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"),
|
|
388
340
|
labelId: "hb-weather-escalate"
|
|
389
|
-
}), /* @__PURE__ */
|
|
390
|
-
label:
|
|
341
|
+
}), /* @__PURE__ */ v(k, {
|
|
342
|
+
label: A("healthybowl.weather.settings.quiet.leadTime", "Alert lead time"),
|
|
391
343
|
htmlFor: "hb-weather-lead",
|
|
392
|
-
children: /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ v("select", {
|
|
393
345
|
id: "hb-weather-lead",
|
|
394
|
-
value:
|
|
395
|
-
onChange: (e) =>
|
|
396
|
-
className:
|
|
397
|
-
children:
|
|
346
|
+
value: R.alertLeadTimeHours,
|
|
347
|
+
onChange: (e) => W("alertLeadTimeHours", Number(e.target.value)),
|
|
348
|
+
className: x,
|
|
349
|
+
children: S.map((e) => /* @__PURE__ */ v("option", {
|
|
398
350
|
value: e,
|
|
399
|
-
children:
|
|
351
|
+
children: A("healthybowl.weather.settings.quiet.leadTimeOption", "{{hours}} hours before", { hours: e })
|
|
400
352
|
}, e))
|
|
401
353
|
})
|
|
402
354
|
})]
|
|
403
355
|
})]
|
|
404
356
|
})
|
|
405
357
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
icon: /* @__PURE__ */
|
|
408
|
-
title:
|
|
409
|
-
description:
|
|
410
|
-
children: /* @__PURE__ */
|
|
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", {
|
|
411
363
|
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-3",
|
|
412
364
|
children: [
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
label:
|
|
365
|
+
/* @__PURE__ */ v(k, {
|
|
366
|
+
label: A("healthybowl.weather.settings.anomaly.baseline", "Baseline window"),
|
|
415
367
|
htmlFor: "hb-weather-baseline",
|
|
416
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ v("select", {
|
|
417
369
|
id: "hb-weather-baseline",
|
|
418
|
-
value:
|
|
419
|
-
onChange: (e) =>
|
|
420
|
-
className:
|
|
421
|
-
children:
|
|
370
|
+
value: R.baselineYears,
|
|
371
|
+
onChange: (e) => W("baselineYears", Number(e.target.value)),
|
|
372
|
+
className: x,
|
|
373
|
+
children: C.map((e) => /* @__PURE__ */ v("option", {
|
|
422
374
|
value: e,
|
|
423
|
-
children:
|
|
375
|
+
children: A("healthybowl.weather.settings.anomaly.baselineOption", "{{years}} years", { years: e })
|
|
424
376
|
}, e))
|
|
425
377
|
})
|
|
426
378
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
label:
|
|
379
|
+
/* @__PURE__ */ v(k, {
|
|
380
|
+
label: A("healthybowl.weather.settings.anomaly.deviation", "Deviation threshold: {{pct}}%", { pct: R.deviationThresholdPct }),
|
|
429
381
|
htmlFor: "hb-weather-deviation",
|
|
430
|
-
children: /* @__PURE__ */
|
|
382
|
+
children: /* @__PURE__ */ v("input", {
|
|
431
383
|
id: "hb-weather-deviation",
|
|
432
384
|
type: "range",
|
|
433
385
|
min: 0,
|
|
434
386
|
max: 100,
|
|
435
387
|
step: 5,
|
|
436
|
-
value:
|
|
437
|
-
onChange: (e) =>
|
|
388
|
+
value: R.deviationThresholdPct,
|
|
389
|
+
onChange: (e) => W("deviationThresholdPct", Number(e.target.value)),
|
|
438
390
|
className: "h-2 w-full cursor-pointer appearance-none rounded-full bg-bg-sunken accent-[var(--color-primary)]"
|
|
439
391
|
})
|
|
440
392
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ v("div", {
|
|
442
394
|
className: "flex items-end",
|
|
443
|
-
children: /* @__PURE__ */
|
|
395
|
+
children: /* @__PURE__ */ v("div", {
|
|
444
396
|
className: "w-full",
|
|
445
|
-
children: /* @__PURE__ */
|
|
446
|
-
checked:
|
|
447
|
-
onChange: (e) =>
|
|
448
|
-
label:
|
|
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"),
|
|
449
401
|
labelId: "hb-weather-digest"
|
|
450
402
|
})
|
|
451
403
|
})
|
|
@@ -453,46 +405,46 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
|
|
|
453
405
|
]
|
|
454
406
|
})
|
|
455
407
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
icon: /* @__PURE__ */
|
|
458
|
-
title:
|
|
459
|
-
description:
|
|
460
|
-
children: /* @__PURE__ */
|
|
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", {
|
|
461
413
|
className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
463
|
-
checked:
|
|
464
|
-
onChange: (e) =>
|
|
465
|
-
label:
|
|
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"),
|
|
466
418
|
labelId: "hb-weather-ai"
|
|
467
|
-
}), /* @__PURE__ */
|
|
468
|
-
label:
|
|
419
|
+
}), /* @__PURE__ */ v(k, {
|
|
420
|
+
label: A("healthybowl.weather.settings.ai.language", "Language"),
|
|
469
421
|
htmlFor: "hb-weather-language",
|
|
470
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ v("select", {
|
|
471
423
|
id: "hb-weather-language",
|
|
472
|
-
value:
|
|
473
|
-
onChange: (e) =>
|
|
474
|
-
className:
|
|
475
|
-
children:
|
|
424
|
+
value: R.advisoryLanguage,
|
|
425
|
+
onChange: (e) => W("advisoryLanguage", e.target.value),
|
|
426
|
+
className: x,
|
|
427
|
+
children: T.map((e) => /* @__PURE__ */ v("option", {
|
|
476
428
|
value: e.code,
|
|
477
|
-
children:
|
|
429
|
+
children: A(e.labelKey, e.fallback)
|
|
478
430
|
}, e.code))
|
|
479
431
|
})
|
|
480
432
|
})]
|
|
481
433
|
})
|
|
482
434
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ y("div", {
|
|
484
436
|
className: "flex items-center gap-3",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
486
|
-
onClick: () => void
|
|
487
|
-
disabled:
|
|
488
|
-
children: [
|
|
489
|
-
}), /* @__PURE__ */
|
|
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, {
|
|
490
442
|
variant: "ghost",
|
|
491
443
|
onClick: () => {
|
|
492
|
-
|
|
444
|
+
M && z(E(M));
|
|
493
445
|
},
|
|
494
|
-
disabled:
|
|
495
|
-
children:
|
|
446
|
+
disabled: B,
|
|
447
|
+
children: A("healthybowl.weather.settings.actions.cancel", "Cancel")
|
|
496
448
|
})]
|
|
497
449
|
})
|
|
498
450
|
]
|
|
@@ -500,6 +452,6 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
|
|
|
500
452
|
});
|
|
501
453
|
};
|
|
502
454
|
//#endregion
|
|
503
|
-
export {
|
|
455
|
+
export { A as WeatherSettingsPage };
|
|
504
456
|
|
|
505
457
|
//# sourceMappingURL=WeatherSettingsPage.js.map
|