@burdenoff/microfe-mybodyshield 2026.827.1 → 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.
- package/dist/mybodyshield/MyBodyShieldRoot.d.ts.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoot.js +54 -56
- package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoutes.js +121 -62
- package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
- package/dist/mybodyshield/components/EvidenceUpload.d.ts.map +1 -1
- package/dist/mybodyshield/components/EvidenceUpload.js +46 -45
- package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -1
- package/dist/mybodyshield/components/FileLink.d.ts.map +1 -1
- package/dist/mybodyshield/components/FileLink.js +27 -18
- package/dist/mybodyshield/components/FileLink.js.map +1 -1
- package/dist/mybodyshield/components/MybDiscussion.d.ts +1 -1
- package/dist/mybodyshield/components/MybDiscussion.d.ts.map +1 -1
- package/dist/mybodyshield/components/MybDiscussion.js +59 -58
- package/dist/mybodyshield/components/MybDiscussion.js.map +1 -1
- package/dist/mybodyshield/components/MybTags.d.ts +1 -1
- package/dist/mybodyshield/components/MybTags.d.ts.map +1 -1
- package/dist/mybodyshield/components/MybTags.js +83 -74
- package/dist/mybodyshield/components/MybTags.js.map +1 -1
- package/dist/mybodyshield/components/PageDisabled.d.ts.map +1 -1
- package/dist/mybodyshield/components/PageDisabled.js +16 -11
- package/dist/mybodyshield/components/PageDisabled.js.map +1 -1
- package/dist/mybodyshield/components/Pagination.d.ts.map +1 -1
- package/dist/mybodyshield/components/Pagination.js +36 -27
- package/dist/mybodyshield/components/Pagination.js.map +1 -1
- package/dist/mybodyshield/components/StateViews.d.ts.map +1 -1
- package/dist/mybodyshield/components/StateViews.js +42 -34
- package/dist/mybodyshield/components/StateViews.js.map +1 -1
- package/dist/mybodyshield/components/UserSearchSelect.d.ts.map +1 -1
- package/dist/mybodyshield/components/UserSearchSelect.js +66 -68
- package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -1
- package/dist/mybodyshield/hooks/index.d.ts +1 -0
- package/dist/mybodyshield/hooks/index.d.ts.map +1 -1
- package/dist/mybodyshield/hooks/index.js +1 -0
- package/dist/mybodyshield/hooks/useTr.d.ts +5 -0
- package/dist/mybodyshield/hooks/useTr.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/useTr.js +12 -0
- package/dist/mybodyshield/hooks/useTr.js.map +1 -0
- package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/DashboardPage.js +157 -136
- package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
- package/dist/mybodyshield/pages/SettingsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/SettingsPage.js +50 -59
- package/dist/mybodyshield/pages/SettingsPage.js.map +1 -1
- package/dist/mybodyshield/pages/_shared/visuals.d.ts +2 -1
- package/dist/mybodyshield/pages/_shared/visuals.d.ts.map +1 -1
- package/dist/mybodyshield/pages/_shared/visuals.js +91 -81
- package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
- package/dist/mybodyshield/pages/ai/AiControlsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/ai/AiControlsPage.js +255 -266
- package/dist/mybodyshield/pages/ai/AiControlsPage.js.map +1 -1
- package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/coaching/CoachingPage.js +321 -301
- package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
- package/dist/mybodyshield/pages/goals/GoalsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/goals/GoalsPage.js +247 -251
- package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsCharts.d.ts.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsCharts.js +216 -213
- package/dist/mybodyshield/pages/insights/InsightsCharts.js.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/insights/InsightsPage.js +290 -284
- package/dist/mybodyshield/pages/insights/InsightsPage.js.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js +575 -529
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +333 -275
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramsPage.js +258 -253
- package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
- package/dist/mybodyshield/pages/progress/ProgressPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/progress/ProgressPage.js +271 -254
- package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
- package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js +206 -200
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.js +327 -294
- package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.js +180 -163
- package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
- package/dist/mybodyshield/utils/i18n.d.ts +1 -2
- package/dist/mybodyshield/utils/i18n.d.ts.map +1 -1
- package/dist/mybodyshield/utils/i18n.js +15 -0
- package/dist/mybodyshield/utils/i18n.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
2
|
import { MetricsCard as t } from "../../components/MetricsCard.js";
|
|
3
|
-
import { formatDate as
|
|
3
|
+
import { formatDate as n, formatDateTime as ee, formatNumber as r, formatRelativeTime as te } from "../../utils/formatters.js";
|
|
4
4
|
import { EmptyState as i } from "../../components/EmptyState.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Pagination as se } from "../../components/Pagination.js";
|
|
9
|
-
import { useMybBodyMetrics as o, useMybRecordBodyMetric as ce } from "../../hooks/useMyBodyShieldApi.js";
|
|
10
|
-
import { useOffsetPager as le } from "../../hooks/usePager.js";
|
|
5
|
+
import { useMybBodyMetrics as a, useMybRecordBodyMetric as ne } from "../../hooks/useMyBodyShieldApi.js";
|
|
6
|
+
import { useOffsetPager as re } from "../../hooks/usePager.js";
|
|
7
|
+
import { useTr as ie } from "../../hooks/useTr.js";
|
|
11
8
|
import "../../hooks/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { ErrorView as o, LoadingView as ae, Section as oe } from "../../components/StateViews.js";
|
|
10
|
+
import { DataTable as se } from "../../components/DataTable.js";
|
|
11
|
+
import { FilterTabs as s } from "../../components/FilterTabs.js";
|
|
12
|
+
import { Pagination as ce } from "../../components/Pagination.js";
|
|
13
|
+
import { EvidenceUpload as le } from "../../components/EvidenceUpload.js";
|
|
14
|
+
import { FileLink as ue } from "../../components/FileLink.js";
|
|
14
15
|
import "../../components/index.js";
|
|
15
|
-
import { motion as
|
|
16
|
-
import { useReducedMotion as
|
|
17
|
-
import { IconChip as
|
|
18
|
-
import { Tooltip as
|
|
19
|
-
import { ResponsiveContainer as
|
|
20
|
-
import { ReferenceDot as
|
|
21
|
-
import { CartesianGrid as
|
|
22
|
-
import { Area as
|
|
23
|
-
import { XAxis as
|
|
24
|
-
import { YAxis as
|
|
25
|
-
import { AreaChart as
|
|
26
|
-
import { useEffect as
|
|
27
|
-
import { Activity as
|
|
28
|
-
import { Fragment as
|
|
29
|
-
import { Button as
|
|
16
|
+
import { motion as c } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
17
|
+
import { useReducedMotion as de } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
|
|
18
|
+
import { IconChip as l, METRIC_META as u, TrendPill as fe } from "../_shared/visuals.js";
|
|
19
|
+
import { Tooltip as pe } from "../../../node_modules/recharts/es6/component/Tooltip.js";
|
|
20
|
+
import { ResponsiveContainer as me } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
21
|
+
import { ReferenceDot as d } from "../../../node_modules/recharts/es6/cartesian/ReferenceDot.js";
|
|
22
|
+
import { CartesianGrid as he } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
23
|
+
import { Area as ge } from "../../../node_modules/recharts/es6/cartesian/Area.js";
|
|
24
|
+
import { XAxis as _e } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
25
|
+
import { YAxis as ve } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
26
|
+
import { AreaChart as ye } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
|
|
27
|
+
import { useEffect as be, useMemo as f, useState as p } from "react";
|
|
28
|
+
import { Activity as xe, ArrowDownUp as Se, Plus as m, Sigma as Ce } from "lucide-react";
|
|
29
|
+
import { Fragment as we, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
30
|
+
import { Button as _, GlassCard as Te, Input as v, Label as y, ResponsiveDialog as Ee, ResponsiveDialogContent as De, ResponsiveDialogDescription as Oe, ResponsiveDialogFooter as ke, ResponsiveDialogHeader as Ae, ResponsiveDialogTitle as je, Select as Me, SelectContent as Ne, SelectItem as Pe, SelectTrigger as Fe, SelectValue as Ie, Textarea as Le } from "@burdenoff/fe-libs/ui";
|
|
30
31
|
//#region src/mybodyshield/pages/progress/ProgressPage.tsx
|
|
31
|
-
var
|
|
32
|
+
var b = [
|
|
32
33
|
"WEIGHT",
|
|
33
34
|
"BODY_FAT",
|
|
34
35
|
"RESTING_HEART_RATE",
|
|
@@ -37,7 +38,7 @@ var C = [
|
|
|
37
38
|
"HIPS",
|
|
38
39
|
"ARM",
|
|
39
40
|
"THIGH"
|
|
40
|
-
],
|
|
41
|
+
], Re = {
|
|
41
42
|
WEIGHT: "down",
|
|
42
43
|
BODY_FAT: "down",
|
|
43
44
|
RESTING_HEART_RATE: "down",
|
|
@@ -46,32 +47,45 @@ var C = [
|
|
|
46
47
|
CHEST: "up",
|
|
47
48
|
ARM: "up",
|
|
48
49
|
THIGH: "up"
|
|
49
|
-
},
|
|
50
|
+
}, x = 100, S = 25, C = "var(--color-action-primary-bg)", w = (e) => {
|
|
50
51
|
let t = (e) => String(e).padStart(2, "0");
|
|
51
52
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`;
|
|
52
|
-
},
|
|
53
|
+
}, T = (e) => ({
|
|
53
54
|
type: e,
|
|
54
55
|
value: "",
|
|
55
|
-
unit:
|
|
56
|
-
measuredAt:
|
|
56
|
+
unit: u[e].unit,
|
|
57
|
+
measuredAt: w(/* @__PURE__ */ new Date()),
|
|
57
58
|
notes: "",
|
|
58
59
|
photo: null
|
|
59
60
|
});
|
|
60
|
-
function
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
function E(e, t) {
|
|
62
|
+
let n = "mybodyshield.pages.progress.metricNames";
|
|
63
|
+
switch (t) {
|
|
64
|
+
case "WEIGHT": return e(`${n}.weight`, "Weight");
|
|
65
|
+
case "BODY_FAT": return e(`${n}.bodyFat`, "Body fat");
|
|
66
|
+
case "RESTING_HEART_RATE": return e(`${n}.restingHeartRate`, "Resting heart rate");
|
|
67
|
+
case "WAIST": return e(`${n}.waist`, "Waist");
|
|
68
|
+
case "CHEST": return e(`${n}.chest`, "Chest");
|
|
69
|
+
case "HIPS": return e(`${n}.hips`, "Hips");
|
|
70
|
+
case "ARM": return e(`${n}.arm`, "Arm");
|
|
71
|
+
case "THIGH": return e(`${n}.thigh`, "Thigh");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function D() {
|
|
75
|
+
let w = ie(), [D, O] = p("WEIGHT"), [ze, k] = p(!1), [A, j] = p(() => T("WEIGHT")), [M, N] = p(null), P = re(S), F = P.reset;
|
|
76
|
+
be(() => {
|
|
77
|
+
F();
|
|
78
|
+
}, [D, F]);
|
|
79
|
+
let I = a({
|
|
66
80
|
type: D,
|
|
67
|
-
pagination: { limit:
|
|
68
|
-
}),
|
|
81
|
+
pagination: { limit: x }
|
|
82
|
+
}), L = a({
|
|
69
83
|
type: D,
|
|
70
84
|
pagination: {
|
|
71
|
-
limit:
|
|
72
|
-
offset:
|
|
85
|
+
limit: S,
|
|
86
|
+
offset: P.offset
|
|
73
87
|
}
|
|
74
|
-
}),
|
|
88
|
+
}), R = ne(), z = de(), B = (e, t = !0) => z ? { initial: !1 } : {
|
|
75
89
|
initial: {
|
|
76
90
|
opacity: 0,
|
|
77
91
|
y: 14
|
|
@@ -93,10 +107,10 @@ function k() {
|
|
|
93
107
|
damping: 22
|
|
94
108
|
}
|
|
95
109
|
} } : {}
|
|
96
|
-
},
|
|
97
|
-
label:
|
|
110
|
+
}, V = u[D], H = V.icon, Be = Re[D], U = E(w, D), W = f(() => I.data?.items ?? [], [I.data]), G = f(() => [...W].sort((e, t) => new Date(e.measuredAt).getTime() - new Date(t.measuredAt).getTime()), [W]), K = G[G.length - 1], q = G[G.length - 2], J = K && q ? K.value - q.value : void 0, Y = f(() => G.map((e) => ({
|
|
111
|
+
label: n(e.measuredAt),
|
|
98
112
|
value: e.value
|
|
99
|
-
})), [G]), X = Y.length > 0 ? Y[Y.length - 1] : void 0, Z =
|
|
113
|
+
})), [G]), X = Y.length > 0 ? Y[Y.length - 1] : void 0, Z = f(() => {
|
|
100
114
|
if (G.length === 0) return null;
|
|
101
115
|
let e = G.map((e) => e.value);
|
|
102
116
|
return {
|
|
@@ -105,40 +119,40 @@ function k() {
|
|
|
105
119
|
max: Math.max(...e),
|
|
106
120
|
avg: e.reduce((e, t) => e + t, 0) / e.length
|
|
107
121
|
};
|
|
108
|
-
}, [G]),
|
|
122
|
+
}, [G]), Ve = b.map((e) => ({
|
|
109
123
|
value: e,
|
|
110
|
-
label:
|
|
124
|
+
label: E(w, e)
|
|
111
125
|
})), Q = () => {
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
let e = Number(
|
|
115
|
-
if (
|
|
116
|
-
|
|
126
|
+
j(T(D)), N(null), k(!0);
|
|
127
|
+
}, He = async () => {
|
|
128
|
+
let e = Number(A.value);
|
|
129
|
+
if (A.value.trim() === "" || !Number.isFinite(e)) {
|
|
130
|
+
N(w("mybodyshield.pages.progress.invalidValue", "Enter a valid measurement value."));
|
|
117
131
|
return;
|
|
118
132
|
}
|
|
119
|
-
|
|
133
|
+
N(null);
|
|
120
134
|
let t = {
|
|
121
|
-
type:
|
|
135
|
+
type: A.type,
|
|
122
136
|
value: e,
|
|
123
|
-
unit:
|
|
124
|
-
measuredAt:
|
|
125
|
-
notes:
|
|
126
|
-
photoFileId:
|
|
137
|
+
unit: A.unit.trim() || u[A.type].unit,
|
|
138
|
+
measuredAt: A.measuredAt ? new Date(A.measuredAt).toISOString() : (/* @__PURE__ */ new Date()).toISOString(),
|
|
139
|
+
notes: A.notes.trim() ? A.notes.trim() : null,
|
|
140
|
+
photoFileId: A.photo?.fileId ?? null
|
|
127
141
|
};
|
|
128
142
|
try {
|
|
129
|
-
await
|
|
143
|
+
await R.mutateAsync(t), k(!1), O(A.type), P.reset();
|
|
130
144
|
} catch (e) {
|
|
131
|
-
|
|
145
|
+
N(e instanceof Error ? e.message : w("mybodyshield.pages.progress.failedToRecord", "Failed to record measurement."));
|
|
132
146
|
}
|
|
133
|
-
}, $ =
|
|
147
|
+
}, $ = L.data?.items ?? [], Ue = [
|
|
134
148
|
{
|
|
135
149
|
key: "value",
|
|
136
|
-
header: "Value",
|
|
150
|
+
header: w("mybodyshield.pages.progress.valueColumn", "Value"),
|
|
137
151
|
align: "right",
|
|
138
152
|
sortValue: (e) => e.value,
|
|
139
|
-
render: (e) => /* @__PURE__ */
|
|
153
|
+
render: (e) => /* @__PURE__ */ g("span", {
|
|
140
154
|
className: "font-medium tabular-nums text-text-primary",
|
|
141
|
-
children: [r(e.value), /* @__PURE__ */
|
|
155
|
+
children: [r(e.value), /* @__PURE__ */ h("span", {
|
|
142
156
|
className: "ml-1 text-xs font-normal text-text-tertiary",
|
|
143
157
|
children: e.unit
|
|
144
158
|
})]
|
|
@@ -146,110 +160,118 @@ function k() {
|
|
|
146
160
|
},
|
|
147
161
|
{
|
|
148
162
|
key: "measuredAt",
|
|
149
|
-
header: "Measured",
|
|
163
|
+
header: w("mybodyshield.pages.progress.measuredColumn", "Measured"),
|
|
150
164
|
sortValue: (e) => new Date(e.measuredAt).getTime(),
|
|
151
|
-
render: (e) => /* @__PURE__ */
|
|
165
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
152
166
|
className: "whitespace-nowrap text-text-secondary",
|
|
153
|
-
children:
|
|
167
|
+
children: ee(e.measuredAt)
|
|
154
168
|
})
|
|
155
169
|
},
|
|
156
170
|
{
|
|
157
171
|
key: "notes",
|
|
158
|
-
header: "Notes",
|
|
172
|
+
header: w("mybodyshield.pages.progress.notesColumn", "Notes"),
|
|
159
173
|
hideOnMobile: !0,
|
|
160
|
-
render: (e) => e.notes ? /* @__PURE__ */
|
|
174
|
+
render: (e) => e.notes ? /* @__PURE__ */ h("span", {
|
|
161
175
|
className: "text-text-secondary",
|
|
162
176
|
children: e.notes
|
|
163
|
-
}) : /* @__PURE__ */
|
|
177
|
+
}) : /* @__PURE__ */ h("span", {
|
|
164
178
|
className: "text-text-tertiary",
|
|
165
179
|
children: "—"
|
|
166
180
|
})
|
|
167
181
|
},
|
|
168
182
|
{
|
|
169
183
|
key: "photo",
|
|
170
|
-
header: "Photo",
|
|
171
|
-
render: (e) => e.photo?.id ? /* @__PURE__ */
|
|
184
|
+
header: w("mybodyshield.pages.progress.photoColumn", "Photo"),
|
|
185
|
+
render: (e) => e.photo?.id ? /* @__PURE__ */ h(ue, { fileId: e.photo.id }) : /* @__PURE__ */ h("span", {
|
|
172
186
|
className: "text-text-tertiary",
|
|
173
187
|
children: "—"
|
|
174
188
|
})
|
|
175
189
|
}
|
|
176
|
-
]
|
|
177
|
-
|
|
178
|
-
title: "Progress",
|
|
179
|
-
description: "Body metrics over time — weight, composition & measurements.",
|
|
180
|
-
actions: /* @__PURE__ */ h(g, {
|
|
181
|
-
onClick: Q,
|
|
182
|
-
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " Record measurement"]
|
|
183
|
-
}),
|
|
190
|
+
], We = /* @__PURE__ */ g(_, {
|
|
191
|
+
onClick: Q,
|
|
184
192
|
children: [
|
|
185
|
-
/* @__PURE__ */ m
|
|
193
|
+
/* @__PURE__ */ h(m, { className: "mr-1.5 h-4 w-4" }),
|
|
194
|
+
" ",
|
|
195
|
+
w("mybodyshield.pages.progress.recordMeasurement", "Record measurement")
|
|
196
|
+
]
|
|
197
|
+
});
|
|
198
|
+
return /* @__PURE__ */ g(e, {
|
|
199
|
+
title: w("mybodyshield.pages.progress.title", "Progress"),
|
|
200
|
+
description: w("mybodyshield.pages.progress.description", "Body metrics over time — weight, composition & measurements."),
|
|
201
|
+
actions: We,
|
|
202
|
+
children: [
|
|
203
|
+
/* @__PURE__ */ h("div", {
|
|
186
204
|
className: "mb-6 overflow-x-auto",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
-
options:
|
|
205
|
+
children: /* @__PURE__ */ h(s, {
|
|
206
|
+
options: Ve,
|
|
189
207
|
value: D,
|
|
190
|
-
onChange:
|
|
208
|
+
onChange: O
|
|
191
209
|
})
|
|
192
210
|
}),
|
|
193
|
-
|
|
194
|
-
message: "We couldn't load your body-metric history.",
|
|
195
|
-
onRetry: () =>
|
|
196
|
-
}) : W.length === 0 ? /* @__PURE__ */
|
|
211
|
+
I.isLoading && W.length === 0 ? /* @__PURE__ */ h(ae, { label: w("mybodyshield.pages.progress.loading", "Loading {{metric}} history…", { metric: U.toLowerCase() }) }) : I.isError ? /* @__PURE__ */ h(o, {
|
|
212
|
+
message: w("mybodyshield.pages.progress.error", "We couldn't load your body-metric history."),
|
|
213
|
+
onRetry: () => I.refetch()
|
|
214
|
+
}) : W.length === 0 ? /* @__PURE__ */ h(i, {
|
|
197
215
|
illustration: "empty-data",
|
|
198
|
-
icon: /* @__PURE__ */
|
|
199
|
-
title:
|
|
200
|
-
description: "Record a measurement to start tracking this metric over time.",
|
|
201
|
-
action: /* @__PURE__ */
|
|
216
|
+
icon: /* @__PURE__ */ h(H, { className: "h-10 w-10" }),
|
|
217
|
+
title: w("mybodyshield.pages.progress.emptyTitle", "No {{metric}} readings yet", { metric: U.toLowerCase() }),
|
|
218
|
+
description: w("mybodyshield.pages.progress.emptyDescription", "Record a measurement to start tracking this metric over time."),
|
|
219
|
+
action: /* @__PURE__ */ g(_, {
|
|
202
220
|
onClick: Q,
|
|
203
|
-
children: [
|
|
221
|
+
children: [
|
|
222
|
+
/* @__PURE__ */ h(m, { className: "mr-1.5 h-4 w-4" }),
|
|
223
|
+
" ",
|
|
224
|
+
w("mybodyshield.pages.progress.recordMeasurement", "Record measurement")
|
|
225
|
+
]
|
|
204
226
|
})
|
|
205
|
-
}) : /* @__PURE__ */
|
|
227
|
+
}) : /* @__PURE__ */ g("div", {
|
|
206
228
|
className: "space-y-6",
|
|
207
229
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
...
|
|
210
|
-
children: /* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ h(c.div, {
|
|
231
|
+
...B(0),
|
|
232
|
+
children: /* @__PURE__ */ g(Te, {
|
|
211
233
|
treatment: "glass",
|
|
212
234
|
className: "rounded-2xl p-6 transition-shadow duration-300 hover:shadow-2xl",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ g("div", {
|
|
214
236
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ g("div", {
|
|
216
238
|
className: "flex items-center gap-3",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
-
icon: /* @__PURE__ */
|
|
219
|
-
tint:
|
|
220
|
-
}), /* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ h(l, {
|
|
240
|
+
icon: /* @__PURE__ */ h(H, { className: "h-5 w-5" }),
|
|
241
|
+
tint: V.tint
|
|
242
|
+
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
|
|
221
243
|
className: "text-base font-semibold text-text-primary",
|
|
222
|
-
children:
|
|
223
|
-
}), /* @__PURE__ */
|
|
244
|
+
children: U
|
|
245
|
+
}), /* @__PURE__ */ h("p", {
|
|
224
246
|
className: "text-sm text-text-secondary",
|
|
225
|
-
children: K ?
|
|
247
|
+
children: K ? w("mybodyshield.pages.progress.lastMeasured", "Last measured {{time}}", { time: te(K.measuredAt) }) : w("mybodyshield.pages.progress.noMeasurements", "No measurements yet")
|
|
226
248
|
})] })]
|
|
227
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ g("div", {
|
|
228
250
|
className: "text-right",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ g("p", {
|
|
230
252
|
className: "text-3xl font-bold leading-none tracking-tight tabular-nums text-text-primary sm:text-4xl",
|
|
231
|
-
children: [K ? r(K.value) : "—", K && /* @__PURE__ */
|
|
253
|
+
children: [K ? r(K.value) : "—", K && /* @__PURE__ */ h("span", {
|
|
232
254
|
className: "ml-1 text-base font-medium text-text-tertiary",
|
|
233
|
-
children:
|
|
255
|
+
children: V.unit
|
|
234
256
|
})]
|
|
235
|
-
}), J != null && /* @__PURE__ */
|
|
257
|
+
}), J != null && /* @__PURE__ */ h("div", {
|
|
236
258
|
className: "mt-2 flex justify-end",
|
|
237
|
-
children: /* @__PURE__ */
|
|
259
|
+
children: /* @__PURE__ */ h("span", {
|
|
238
260
|
className: "inline-flex items-center rounded-full bg-bg-sunken px-2.5 py-1 ring-1 ring-border-seam",
|
|
239
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ h(fe, {
|
|
240
262
|
delta: J,
|
|
241
|
-
unit: ` ${
|
|
242
|
-
goodDirection:
|
|
263
|
+
unit: ` ${V.unit}`,
|
|
264
|
+
goodDirection: Be
|
|
243
265
|
})
|
|
244
266
|
})
|
|
245
267
|
})]
|
|
246
268
|
})]
|
|
247
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ h("div", {
|
|
248
270
|
className: "mt-6 h-64 w-full",
|
|
249
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ h(me, {
|
|
250
272
|
width: "100%",
|
|
251
273
|
height: "100%",
|
|
252
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ g(ye, {
|
|
253
275
|
data: Y,
|
|
254
276
|
margin: {
|
|
255
277
|
top: 8,
|
|
@@ -258,36 +280,36 @@ function k() {
|
|
|
258
280
|
left: -8
|
|
259
281
|
},
|
|
260
282
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ h("defs", { children: /* @__PURE__ */ g("linearGradient", {
|
|
262
284
|
id: "myb-progress-fill",
|
|
263
285
|
x1: "0",
|
|
264
286
|
y1: "0",
|
|
265
287
|
x2: "0",
|
|
266
288
|
y2: "1",
|
|
267
289
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ h("stop", {
|
|
269
291
|
offset: "0%",
|
|
270
|
-
stopColor:
|
|
292
|
+
stopColor: C,
|
|
271
293
|
stopOpacity: .38
|
|
272
294
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ h("stop", {
|
|
274
296
|
offset: "55%",
|
|
275
|
-
stopColor:
|
|
297
|
+
stopColor: C,
|
|
276
298
|
stopOpacity: .12
|
|
277
299
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ h("stop", {
|
|
279
301
|
offset: "100%",
|
|
280
|
-
stopColor:
|
|
302
|
+
stopColor: C,
|
|
281
303
|
stopOpacity: 0
|
|
282
304
|
})
|
|
283
305
|
]
|
|
284
306
|
}) }),
|
|
285
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ h(he, {
|
|
286
308
|
stroke: "var(--color-border-seam)",
|
|
287
309
|
strokeDasharray: "4 4",
|
|
288
310
|
vertical: !1
|
|
289
311
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ h(_e, {
|
|
291
313
|
dataKey: "label",
|
|
292
314
|
stroke: "var(--color-border-seam)",
|
|
293
315
|
tickLine: !1,
|
|
@@ -299,7 +321,7 @@ function k() {
|
|
|
299
321
|
tickMargin: 8,
|
|
300
322
|
minTickGap: 24
|
|
301
323
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ h(ve, {
|
|
303
325
|
stroke: "var(--color-border-seam)",
|
|
304
326
|
tickLine: !1,
|
|
305
327
|
axisLine: !1,
|
|
@@ -310,7 +332,7 @@ function k() {
|
|
|
310
332
|
width: 44,
|
|
311
333
|
domain: ["auto", "auto"]
|
|
312
334
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ h(pe, {
|
|
314
336
|
cursor: {
|
|
315
337
|
stroke: "var(--color-border-seam)",
|
|
316
338
|
strokeDasharray: "4 4"
|
|
@@ -323,13 +345,13 @@ function k() {
|
|
|
323
345
|
},
|
|
324
346
|
labelStyle: { color: "var(--color-text-tertiary)" },
|
|
325
347
|
itemStyle: { color: "var(--color-text-primary)" },
|
|
326
|
-
formatter: (e) => [`${r(Number(e))} ${
|
|
348
|
+
formatter: (e) => [`${r(Number(e))} ${V.unit}`, U]
|
|
327
349
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ h(ge, {
|
|
329
351
|
type: "monotone",
|
|
330
352
|
dataKey: "value",
|
|
331
|
-
name:
|
|
332
|
-
stroke:
|
|
353
|
+
name: U,
|
|
354
|
+
stroke: C,
|
|
333
355
|
strokeWidth: 2.5,
|
|
334
356
|
fill: "url(#myb-progress-fill)",
|
|
335
357
|
fillOpacity: 1,
|
|
@@ -338,28 +360,28 @@ function k() {
|
|
|
338
360
|
r: 5,
|
|
339
361
|
strokeWidth: 2,
|
|
340
362
|
stroke: "var(--color-bg-surface)",
|
|
341
|
-
fill:
|
|
363
|
+
fill: C
|
|
342
364
|
},
|
|
343
|
-
isAnimationActive: !
|
|
365
|
+
isAnimationActive: !z,
|
|
344
366
|
animationDuration: 900
|
|
345
367
|
}),
|
|
346
|
-
X && /* @__PURE__ */
|
|
368
|
+
X && /* @__PURE__ */ h(d, {
|
|
347
369
|
x: X.label,
|
|
348
370
|
y: X.value,
|
|
349
371
|
r: 12,
|
|
350
372
|
isFront: !0,
|
|
351
373
|
ifOverflow: "visible",
|
|
352
|
-
fill:
|
|
374
|
+
fill: C,
|
|
353
375
|
fillOpacity: .16,
|
|
354
376
|
stroke: "none"
|
|
355
377
|
}),
|
|
356
|
-
X && /* @__PURE__ */
|
|
378
|
+
X && /* @__PURE__ */ h(d, {
|
|
357
379
|
x: X.label,
|
|
358
380
|
y: X.value,
|
|
359
381
|
r: 5,
|
|
360
382
|
isFront: !0,
|
|
361
383
|
ifOverflow: "visible",
|
|
362
|
-
fill:
|
|
384
|
+
fill: C,
|
|
363
385
|
stroke: "var(--color-bg-surface)",
|
|
364
386
|
strokeWidth: 2
|
|
365
387
|
})
|
|
@@ -369,220 +391,215 @@ function k() {
|
|
|
369
391
|
})]
|
|
370
392
|
})
|
|
371
393
|
}),
|
|
372
|
-
Z && /* @__PURE__ */
|
|
394
|
+
Z && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", {
|
|
373
395
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
374
396
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
...
|
|
377
|
-
children: /* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ h(c.div, {
|
|
398
|
+
...B(.08),
|
|
399
|
+
children: /* @__PURE__ */ h(t, {
|
|
378
400
|
className: "h-full rounded-2xl transition-shadow duration-300 hover:shadow-xl",
|
|
379
|
-
icon: /* @__PURE__ */
|
|
380
|
-
icon: /* @__PURE__ */
|
|
381
|
-
tint:
|
|
401
|
+
icon: /* @__PURE__ */ h(l, {
|
|
402
|
+
icon: /* @__PURE__ */ h(xe, { className: "h-5 w-5" }),
|
|
403
|
+
tint: C
|
|
382
404
|
}),
|
|
383
405
|
value: r(Z.count),
|
|
384
|
-
label: "Recent readings"
|
|
406
|
+
label: w("mybodyshield.pages.progress.recentReadings", "Recent readings")
|
|
385
407
|
})
|
|
386
408
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
...
|
|
389
|
-
children: /* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ h(c.div, {
|
|
410
|
+
...B(.14),
|
|
411
|
+
children: /* @__PURE__ */ h(t, {
|
|
390
412
|
className: "h-full rounded-2xl transition-shadow duration-300 hover:shadow-xl",
|
|
391
|
-
icon: /* @__PURE__ */
|
|
392
|
-
icon: /* @__PURE__ */
|
|
393
|
-
tint:
|
|
413
|
+
icon: /* @__PURE__ */ h(l, {
|
|
414
|
+
icon: /* @__PURE__ */ h(Ce, { className: "h-5 w-5" }),
|
|
415
|
+
tint: C
|
|
394
416
|
}),
|
|
395
|
-
value: `${r(Z.avg, { maximumFractionDigits: 1 })} ${
|
|
396
|
-
label:
|
|
417
|
+
value: `${r(Z.avg, { maximumFractionDigits: 1 })} ${V.unit}`,
|
|
418
|
+
label: w("mybodyshield.pages.progress.windowAverage", "Window average {{metric}}", { metric: U.toLowerCase() })
|
|
397
419
|
})
|
|
398
420
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
...
|
|
401
|
-
children: /* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ h(c.div, {
|
|
422
|
+
...B(.2),
|
|
423
|
+
children: /* @__PURE__ */ h(t, {
|
|
402
424
|
className: "h-full rounded-2xl transition-shadow duration-300 hover:shadow-xl",
|
|
403
|
-
icon: /* @__PURE__ */
|
|
404
|
-
icon: /* @__PURE__ */
|
|
405
|
-
tint:
|
|
425
|
+
icon: /* @__PURE__ */ h(l, {
|
|
426
|
+
icon: /* @__PURE__ */ h(Se, { className: "h-5 w-5" }),
|
|
427
|
+
tint: C
|
|
406
428
|
}),
|
|
407
429
|
value: `${r(Z.min)}–${r(Z.max)}`,
|
|
408
|
-
label:
|
|
430
|
+
label: w("mybodyshield.pages.progress.windowRange", "Window range ({{unit}})", { unit: V.unit })
|
|
409
431
|
})
|
|
410
432
|
})
|
|
411
433
|
]
|
|
412
434
|
}), /* @__PURE__ */ h("p", {
|
|
413
435
|
className: "mt-2 text-xs text-text-tertiary",
|
|
414
|
-
children:
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
" ",
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
Z.count === 1 ? "" : "s",
|
|
421
|
-
" (up to ",
|
|
422
|
-
r(w),
|
|
423
|
-
") — not a full-history total."
|
|
424
|
-
]
|
|
436
|
+
children: w("mybodyshield.pages.progress.basedOnReadings", "Based on your most recent {{count}} {{metric}} reading{{plural}} (up to {{limit}}) — not a full-history total.", {
|
|
437
|
+
count: r(Z.count),
|
|
438
|
+
metric: U.toLowerCase(),
|
|
439
|
+
plural: Z.count === 1 ? "" : "s",
|
|
440
|
+
limit: r(x)
|
|
441
|
+
})
|
|
425
442
|
})] }),
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
...
|
|
428
|
-
children: /* @__PURE__ */
|
|
429
|
-
title: "Measurement log",
|
|
430
|
-
description: "Every recorded reading for this metric.",
|
|
431
|
-
children:
|
|
432
|
-
message: "We couldn't load this page of measurements.",
|
|
433
|
-
onRetry: () =>
|
|
434
|
-
}) :
|
|
443
|
+
/* @__PURE__ */ h(c.div, {
|
|
444
|
+
...B(.26, !1),
|
|
445
|
+
children: /* @__PURE__ */ h(oe, {
|
|
446
|
+
title: w("mybodyshield.pages.progress.measurementLog", "Measurement log"),
|
|
447
|
+
description: w("mybodyshield.pages.progress.measurementLogDescription", "Every recorded reading for this metric."),
|
|
448
|
+
children: L.isError ? /* @__PURE__ */ h(o, {
|
|
449
|
+
message: w("mybodyshield.pages.progress.pageError", "We couldn't load this page of measurements."),
|
|
450
|
+
onRetry: () => L.refetch()
|
|
451
|
+
}) : L.isLoading && $.length === 0 ? /* @__PURE__ */ h("div", {
|
|
435
452
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
436
|
-
children: "Loading measurements…"
|
|
437
|
-
}) : $.length === 0 ? /* @__PURE__ */
|
|
453
|
+
children: w("mybodyshield.pages.progress.pageLoading", "Loading measurements…")
|
|
454
|
+
}) : $.length === 0 ? /* @__PURE__ */ h(i, {
|
|
438
455
|
illustration: "empty-data",
|
|
439
|
-
icon: /* @__PURE__ */
|
|
440
|
-
title: "No measurements on this page",
|
|
441
|
-
description: "Go back a page or record a new measurement."
|
|
442
|
-
}) : /* @__PURE__ */
|
|
443
|
-
columns:
|
|
456
|
+
icon: /* @__PURE__ */ h(H, { className: "h-10 w-10" }),
|
|
457
|
+
title: w("mybodyshield.pages.progress.pageEmptyTitle", "No measurements on this page"),
|
|
458
|
+
description: w("mybodyshield.pages.progress.pageEmptyDescription", "Go back a page or record a new measurement.")
|
|
459
|
+
}) : /* @__PURE__ */ g(we, { children: [/* @__PURE__ */ h(se, {
|
|
460
|
+
columns: Ue,
|
|
444
461
|
rows: $,
|
|
445
462
|
rowKey: (e) => e.id,
|
|
446
463
|
defaultSort: {
|
|
447
464
|
key: "measuredAt",
|
|
448
465
|
dir: "desc"
|
|
449
466
|
}
|
|
450
|
-
}), /* @__PURE__ */
|
|
451
|
-
page:
|
|
452
|
-
pageSize:
|
|
467
|
+
}), /* @__PURE__ */ h(ce, {
|
|
468
|
+
page: P.page,
|
|
469
|
+
pageSize: S,
|
|
453
470
|
itemCount: $.length,
|
|
454
|
-
hasMore:
|
|
455
|
-
onPageChange: (e) =>
|
|
471
|
+
hasMore: L.data?.pageInfo?.hasMore ?? !1,
|
|
472
|
+
onPageChange: (e) => P.onPageChange(e)
|
|
456
473
|
})] })
|
|
457
474
|
})
|
|
458
475
|
})
|
|
459
476
|
]
|
|
460
477
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
open:
|
|
463
|
-
onOpenChange:
|
|
464
|
-
children: /* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ h(Ee, {
|
|
479
|
+
open: ze,
|
|
480
|
+
onOpenChange: k,
|
|
481
|
+
children: /* @__PURE__ */ g(De, { children: [
|
|
482
|
+
/* @__PURE__ */ g(Ae, { children: [/* @__PURE__ */ h(je, { children: w("mybodyshield.pages.progress.dialogTitle", "Record measurement") }), /* @__PURE__ */ h(Oe, { children: w("mybodyshield.pages.progress.dialogDescription", "Log a new body-metric reading to track your progress over time.") })] }),
|
|
483
|
+
/* @__PURE__ */ g("div", {
|
|
467
484
|
className: "space-y-4 py-2",
|
|
468
485
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ g("div", {
|
|
470
487
|
className: "space-y-1.5",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
488
|
+
children: [/* @__PURE__ */ h(y, {
|
|
472
489
|
htmlFor: "myb-metric-type",
|
|
473
|
-
children: "Metric"
|
|
474
|
-
}), /* @__PURE__ */
|
|
475
|
-
value:
|
|
490
|
+
children: w("mybodyshield.pages.progress.metric", "Metric")
|
|
491
|
+
}), /* @__PURE__ */ g(Me, {
|
|
492
|
+
value: A.type,
|
|
476
493
|
onValueChange: (e) => {
|
|
477
494
|
let t = e;
|
|
478
|
-
|
|
495
|
+
j((e) => ({
|
|
479
496
|
...e,
|
|
480
497
|
type: t,
|
|
481
|
-
unit:
|
|
498
|
+
unit: u[t].unit
|
|
482
499
|
}));
|
|
483
500
|
},
|
|
484
|
-
children: [/* @__PURE__ */
|
|
501
|
+
children: [/* @__PURE__ */ h(Fe, {
|
|
485
502
|
id: "myb-metric-type",
|
|
486
|
-
children: /* @__PURE__ */
|
|
487
|
-
}), /* @__PURE__ */
|
|
503
|
+
children: /* @__PURE__ */ h(Ie, { placeholder: w("mybodyshield.pages.progress.selectMetricPlaceholder", "Select a metric") })
|
|
504
|
+
}), /* @__PURE__ */ h(Ne, { children: b.map((e) => /* @__PURE__ */ h(Pe, {
|
|
488
505
|
value: e,
|
|
489
|
-
children:
|
|
506
|
+
children: E(w, e)
|
|
490
507
|
}, e)) })]
|
|
491
508
|
})]
|
|
492
509
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ g("div", {
|
|
494
511
|
className: "grid grid-cols-2 gap-3",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ g("div", {
|
|
496
513
|
className: "space-y-1.5",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
514
|
+
children: [/* @__PURE__ */ h(y, {
|
|
498
515
|
htmlFor: "myb-metric-value",
|
|
499
|
-
children: "Value"
|
|
500
|
-
}), /* @__PURE__ */
|
|
516
|
+
children: w("mybodyshield.pages.progress.value", "Value")
|
|
517
|
+
}), /* @__PURE__ */ h(v, {
|
|
501
518
|
id: "myb-metric-value",
|
|
502
519
|
type: "number",
|
|
503
520
|
inputMode: "decimal",
|
|
504
521
|
step: "any",
|
|
505
|
-
value:
|
|
506
|
-
onChange: (e) =>
|
|
522
|
+
value: A.value,
|
|
523
|
+
onChange: (e) => j((t) => ({
|
|
507
524
|
...t,
|
|
508
525
|
value: e.target.value
|
|
509
526
|
})),
|
|
510
527
|
placeholder: "0"
|
|
511
528
|
})]
|
|
512
|
-
}), /* @__PURE__ */
|
|
529
|
+
}), /* @__PURE__ */ g("div", {
|
|
513
530
|
className: "space-y-1.5",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ h(y, {
|
|
515
532
|
htmlFor: "myb-metric-unit",
|
|
516
|
-
children: "Unit"
|
|
517
|
-
}), /* @__PURE__ */
|
|
533
|
+
children: w("mybodyshield.common.unit", "Unit")
|
|
534
|
+
}), /* @__PURE__ */ h(v, {
|
|
518
535
|
id: "myb-metric-unit",
|
|
519
|
-
value:
|
|
520
|
-
onChange: (e) =>
|
|
536
|
+
value: A.unit,
|
|
537
|
+
onChange: (e) => j((t) => ({
|
|
521
538
|
...t,
|
|
522
539
|
unit: e.target.value
|
|
523
540
|
})),
|
|
524
|
-
placeholder:
|
|
541
|
+
placeholder: u[A.type].unit
|
|
525
542
|
})]
|
|
526
543
|
})]
|
|
527
544
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ g("div", {
|
|
529
546
|
className: "space-y-1.5",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ h(y, {
|
|
531
548
|
htmlFor: "myb-metric-measured",
|
|
532
|
-
children: "Measured at"
|
|
533
|
-
}), /* @__PURE__ */
|
|
549
|
+
children: w("mybodyshield.pages.progress.measuredAt", "Measured at")
|
|
550
|
+
}), /* @__PURE__ */ h(v, {
|
|
534
551
|
id: "myb-metric-measured",
|
|
535
552
|
type: "datetime-local",
|
|
536
|
-
value:
|
|
537
|
-
onChange: (e) =>
|
|
553
|
+
value: A.measuredAt,
|
|
554
|
+
onChange: (e) => j((t) => ({
|
|
538
555
|
...t,
|
|
539
556
|
measuredAt: e.target.value
|
|
540
557
|
}))
|
|
541
558
|
})]
|
|
542
559
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ g("div", {
|
|
544
561
|
className: "space-y-1.5",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ h(y, {
|
|
546
563
|
htmlFor: "myb-metric-notes",
|
|
547
|
-
children: "Notes"
|
|
548
|
-
}), /* @__PURE__ */
|
|
564
|
+
children: w("mybodyshield.common.notes", "Notes")
|
|
565
|
+
}), /* @__PURE__ */ h(Le, {
|
|
549
566
|
id: "myb-metric-notes",
|
|
550
|
-
value:
|
|
551
|
-
onChange: (e) =>
|
|
567
|
+
value: A.notes,
|
|
568
|
+
onChange: (e) => j((t) => ({
|
|
552
569
|
...t,
|
|
553
570
|
notes: e.target.value
|
|
554
571
|
})),
|
|
555
|
-
placeholder: "Optional context (fasted, post-workout, morning…)",
|
|
572
|
+
placeholder: w("mybodyshield.pages.progress.notesPlaceholder", "Optional context (fasted, post-workout, morning…)"),
|
|
556
573
|
rows: 3
|
|
557
574
|
})]
|
|
558
575
|
}),
|
|
559
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ h(le, {
|
|
560
577
|
id: "myb-metric-photo",
|
|
561
|
-
label: "Progress photo (optional)",
|
|
562
|
-
value:
|
|
563
|
-
onChange: (e) =>
|
|
578
|
+
label: w("mybodyshield.pages.progress.progressPhoto", "Progress photo (optional)"),
|
|
579
|
+
value: A.photo,
|
|
580
|
+
onChange: (e) => j((t) => ({
|
|
564
581
|
...t,
|
|
565
582
|
photo: e
|
|
566
583
|
})),
|
|
567
584
|
accept: "image/*",
|
|
568
|
-
disabled:
|
|
569
|
-
hint: "Attach a progress photo for this reading."
|
|
585
|
+
disabled: R.isPending,
|
|
586
|
+
hint: w("mybodyshield.pages.progress.progressPhotoHint", "Attach a progress photo for this reading.")
|
|
570
587
|
}),
|
|
571
|
-
|
|
588
|
+
M && /* @__PURE__ */ h("p", {
|
|
572
589
|
className: "text-sm text-status-error-text",
|
|
573
|
-
children:
|
|
590
|
+
children: M
|
|
574
591
|
})
|
|
575
592
|
]
|
|
576
593
|
}),
|
|
577
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ g(ke, { children: [/* @__PURE__ */ h(_, {
|
|
578
595
|
variant: "outline",
|
|
579
|
-
onClick: () =>
|
|
580
|
-
disabled:
|
|
581
|
-
children: "Cancel"
|
|
582
|
-
}), /* @__PURE__ */
|
|
583
|
-
onClick:
|
|
584
|
-
disabled:
|
|
585
|
-
children:
|
|
596
|
+
onClick: () => k(!1),
|
|
597
|
+
disabled: R.isPending,
|
|
598
|
+
children: w("mybodyshield.common.cancel", "Cancel")
|
|
599
|
+
}), /* @__PURE__ */ h(_, {
|
|
600
|
+
onClick: He,
|
|
601
|
+
disabled: R.isPending,
|
|
602
|
+
children: R.isPending ? w("mybodyshield.common.recording", "Recording…") : w("mybodyshield.pages.progress.record", "Record")
|
|
586
603
|
})] })
|
|
587
604
|
] })
|
|
588
605
|
})
|
|
@@ -590,6 +607,6 @@ function k() {
|
|
|
590
607
|
});
|
|
591
608
|
}
|
|
592
609
|
//#endregion
|
|
593
|
-
export {
|
|
610
|
+
export { D as ProgressPage };
|
|
594
611
|
|
|
595
612
|
//# sourceMappingURL=ProgressPage.js.map
|