@burdenoff/microfe-brainyrich 2026.705.1 → 2026.706.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/brainyrich/BrainyRichRoot.js +13 -13
  2. package/dist/brainyrich/components/ActorName.js +38 -0
  3. package/dist/brainyrich/components/ActorName.js.map +1 -0
  4. package/dist/brainyrich/components/ConfirmDialog.js +25 -0
  5. package/dist/brainyrich/components/ConfirmDialog.js.map +1 -0
  6. package/dist/brainyrich/components/LoadMore.js +24 -0
  7. package/dist/brainyrich/components/LoadMore.js.map +1 -0
  8. package/dist/brainyrich/components/index.js +5 -0
  9. package/dist/brainyrich/components/notify.js +38 -0
  10. package/dist/brainyrich/components/notify.js.map +1 -0
  11. package/dist/brainyrich/components/pickers.js +232 -0
  12. package/dist/brainyrich/components/pickers.js.map +1 -0
  13. package/dist/brainyrich/components/reuse/CommentThread.js +208 -0
  14. package/dist/brainyrich/components/reuse/CommentThread.js.map +1 -0
  15. package/dist/brainyrich/components/reuse/DocumentsPanel.js +237 -0
  16. package/dist/brainyrich/components/reuse/DocumentsPanel.js.map +1 -0
  17. package/dist/brainyrich/components/reuse/TagField.js +206 -0
  18. package/dist/brainyrich/components/reuse/TagField.js.map +1 -0
  19. package/dist/brainyrich/components/reuse/transport.js +24 -0
  20. package/dist/brainyrich/components/reuse/transport.js.map +1 -0
  21. package/dist/brainyrich/hooks/useBrainyRichApi.js +644 -372
  22. package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
  23. package/dist/brainyrich/pages/AccountsPage.js +346 -293
  24. package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
  25. package/dist/brainyrich/pages/AiAssistantPage.js +339 -320
  26. package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
  27. package/dist/brainyrich/pages/AnalyticsPage.js +178 -164
  28. package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
  29. package/dist/brainyrich/pages/DashboardPage.js +195 -169
  30. package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
  31. package/dist/brainyrich/pages/FamilyPage.js +247 -198
  32. package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
  33. package/dist/brainyrich/pages/GoalsPage.js +478 -442
  34. package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
  35. package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
  36. package/dist/brainyrich/pages/PortfoliosPage.js +438 -396
  37. package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
  38. package/dist/brainyrich/pages/ReportsPage.js +246 -213
  39. package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
  40. package/dist/brainyrich/pages/RiskPage.js +321 -173
  41. package/dist/brainyrich/pages/RiskPage.js.map +1 -1
  42. package/dist/brainyrich/pages/TaxPage.js +258 -225
  43. package/dist/brainyrich/pages/TaxPage.js.map +1 -1
  44. package/dist/brainyrich/pages/_shared.js.map +1 -1
  45. package/dist/node_modules/sonner/dist/index.js +163 -0
  46. package/dist/node_modules/sonner/dist/index.js.map +1 -0
  47. package/package.json +3 -2
@@ -1,249 +1,282 @@
1
- import { tWithFallback as e } from "../utils/i18n.js";
2
- import { useNetWorthSummary as t, usePortfolios as n, useTransactions as r } from "../hooks/useBrainyRichApi.js";
3
- import { AllocationBars as i, EmptyState as a, ErrorState as o, KpiGrid as s, LoadingState as c, SectionShell as l, deltaToneClass as u, formatDate as d, formatMoney as f } from "./_shared.js";
4
- import { useMemo as p, useState as m } from "react";
5
- import { ChevronDown as h, Download as g, FileText as _, Layers as v, Printer as y, Receipt as b, Wallet as x } from "lucide-react";
6
- import { useI18n as S } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
8
- import { Badge as T, Button as E, Card as D, CardContent as O, CardDescription as k, CardHeader as A, CardTitle as j, DropdownMenu as M, DropdownMenuContent as N, DropdownMenuItem as P, DropdownMenuTrigger as F, Table as I, TableBody as L, TableCell as R, TableHead as z, TableHeader as B, TableRow as V, Tabs as H, TabsList as U, TabsTrigger as W } from "@burdenoff/fe-libs/ui";
1
+ import { useBrainyRich as e } from "../providers/BrainyRichProvider.js";
2
+ import { tWithFallback as t } from "../utils/i18n.js";
3
+ import { fetchAllAccounts as n, useAllTransactions as r, useNetWorthSummary as i } from "../hooks/useBrainyRichApi.js";
4
+ import { AllocationBars as a, EmptyState as o, ErrorState as s, KpiGrid as c, LoadingState as l, SectionShell as u, deltaToneClass as d, formatDate as f, formatMoney as p } from "./_shared.js";
5
+ import { useMemo as m, useState as h } from "react";
6
+ import { ChevronDown as g, Download as _, FileText as v, Layers as y, Printer as b, Receipt as x, Wallet as S } from "lucide-react";
7
+ import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { useQuery as w } from "@tanstack/react-query";
9
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
10
+ import { Badge as D, Button as ee, Card as O, CardContent as k, CardDescription as A, CardHeader as j, CardTitle as M, DropdownMenu as N, DropdownMenuContent as P, DropdownMenuItem as F, DropdownMenuTrigger as I, Table as L, TableBody as R, TableCell as z, TableHead as B, TableHeader as V, TableRow as H, Tabs as U, TabsList as W, TabsTrigger as G } from "@burdenoff/fe-libs/ui";
11
+ import { graphqlFetch as K } from "@burdenoff/fe-libs/shared/graphql";
9
12
  //#region src/brainyrich/pages/ReportsPage.tsx
10
- function G(e, t) {
13
+ function q(e, t) {
11
14
  let n = (e) => {
12
15
  let t = String(e ?? "");
13
16
  return /[",\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
14
17
  };
15
18
  return [e, ...t].map((e) => e.map(n).join(",")).join("\n");
16
19
  }
17
- function K(e, t) {
20
+ function J(e, t) {
18
21
  let n = new Blob([t], { type: "text/csv;charset=utf-8;" }), r = URL.createObjectURL(n), i = document.createElement("a");
19
22
  i.href = r, i.download = e, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
20
23
  }
21
- function q() {
22
- let { t: i } = S(), a = (t, n, r) => e(i, t, n, r), [o, c] = m("networth"), u = t(), _ = n(), T = r(), D = u.data, O = D?.currency ?? "USD", k = p(() => _.data.flatMap((e) => e.holdings ?? []).slice().sort((e, t) => t.marketValue - e.marketValue), [_.data]), A = p(() => T.data.slice().sort((e, t) => new Date(t.tradeDate).getTime() - new Date(e.tradeDate).getTime()), [T.data]), j = D ? [
24
+ var Y = "query BraReportHoldings($accountId: ID) {\n braListHoldings(accountId: $accountId) {\n id workspaceId accountId portfolioId symbol name assetClass quantity lastPrice\n costBasis marketValue currency asOf createdAt updatedAt\n }\n}";
25
+ function X() {
26
+ let { apiGatewayUrl: t } = e(), r = w({
27
+ queryKey: [
28
+ "brainyrich",
29
+ "holdings",
30
+ "report-all"
31
+ ],
32
+ queryFn: async () => {
33
+ let e = await n(t);
34
+ return (await Promise.all(e.map(async (e) => {
35
+ let n = await K({
36
+ gateway: "workspace",
37
+ baseUrl: t,
38
+ query: Y,
39
+ variables: { accountId: e.id },
40
+ workspaceToken: !0
41
+ });
42
+ if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Failed to load holdings");
43
+ return n.data?.braListHoldings ?? [];
44
+ }))).flat();
45
+ }
46
+ });
47
+ return {
48
+ ...r,
49
+ data: r.data ?? []
50
+ };
51
+ }
52
+ function Z() {
53
+ let { t: e } = C(), n = (n, r, i) => t(e, n, r, i), [a, o] = h("networth"), s = i(), l = X(), d = r(), v = s.data, w = v?.currency ?? "USD", D = m(() => l.data.slice().sort((e, t) => t.marketValue - e.marketValue), [l.data]), O = m(() => d.data.slice().sort((e, t) => new Date(t.tradeDate).getTime() - new Date(e.tradeDate).getTime()), [d.data]), k = v ? [
23
54
  {
24
- label: a("brainyrich.reports.kpis.netWorth", "Net Worth"),
25
- value: f(D.totalNetWorth, O)
55
+ label: n("brainyrich.reports.kpis.netWorth", "Net Worth"),
56
+ value: p(v.totalNetWorth, w)
26
57
  },
27
58
  {
28
- label: a("brainyrich.reports.kpis.marketValue", "Invested Value"),
29
- value: f(D.totalMarketValue, O)
59
+ label: n("brainyrich.reports.kpis.marketValue", "Invested Value"),
60
+ value: p(v.totalMarketValue, w)
30
61
  },
31
62
  {
32
- label: a("brainyrich.reports.kpis.holdings", "Holdings on Schedule"),
33
- value: String(k.length)
63
+ label: n("brainyrich.reports.kpis.holdings", "Holdings on Schedule"),
64
+ value: String(D.length)
34
65
  },
35
66
  {
36
- label: a("brainyrich.reports.kpis.transactions", "Ledger Entries"),
37
- value: String(A.length)
67
+ label: n("brainyrich.reports.kpis.transactions", "Ledger Entries"),
68
+ value: String(O.length)
38
69
  }
39
70
  ] : [{
40
- label: a("brainyrich.reports.kpis.holdings", "Holdings on Schedule"),
41
- value: String(k.length)
71
+ label: n("brainyrich.reports.kpis.holdings", "Holdings on Schedule"),
72
+ value: String(D.length)
42
73
  }, {
43
- label: a("brainyrich.reports.kpis.transactions", "Ledger Entries"),
44
- value: String(A.length)
45
- }];
46
- return /* @__PURE__ */ w(l, {
47
- title: a("brainyrich.reports.title", "Reports & Statements"),
48
- description: a("brainyrich.reports.description", "Generate statements directly from your live portfolio data — no fabricated schedules."),
49
- actions: /* @__PURE__ */ w(M, { children: [/* @__PURE__ */ C(F, {
74
+ label: n("brainyrich.reports.kpis.transactions", "Ledger Entries"),
75
+ value: String(O.length)
76
+ }], A = () => {
77
+ if (a === "networth") {
78
+ if (!v) return;
79
+ J("brainyrich-net-worth-statement.csv", q([
80
+ "Metric",
81
+ "Amount",
82
+ "Currency"
83
+ ], [
84
+ [
85
+ "Total Net Worth",
86
+ v.totalNetWorth,
87
+ w
88
+ ],
89
+ [
90
+ "Total Market Value",
91
+ v.totalMarketValue,
92
+ w
93
+ ],
94
+ [
95
+ "Total Cash",
96
+ v.totalCash,
97
+ w
98
+ ],
99
+ [
100
+ "Account Count",
101
+ v.accountCount,
102
+ ""
103
+ ],
104
+ ...v.byAssetClass.map((e) => [
105
+ `Asset Class: ${e.assetClass.replace(/_/g, " ")}`,
106
+ e.marketValue,
107
+ w
108
+ ])
109
+ ]));
110
+ return;
111
+ }
112
+ if (a === "holdings") {
113
+ J("brainyrich-holdings-schedule.csv", q([
114
+ "Symbol",
115
+ "Name",
116
+ "Asset Class",
117
+ "Quantity",
118
+ "Cost Basis",
119
+ "Market Value",
120
+ "Currency"
121
+ ], D.map((e) => [
122
+ e.symbol,
123
+ e.name ?? "",
124
+ e.assetClass.replace(/_/g, " "),
125
+ e.quantity,
126
+ e.costBasis,
127
+ e.marketValue,
128
+ e.currency
129
+ ])));
130
+ return;
131
+ }
132
+ J("brainyrich-transaction-ledger.csv", q([
133
+ "Trade Date",
134
+ "Type",
135
+ "Symbol",
136
+ "Quantity",
137
+ "Price",
138
+ "Amount",
139
+ "Fee",
140
+ "Currency"
141
+ ], O.map((e) => [
142
+ f(e.tradeDate),
143
+ e.type,
144
+ e.symbol ?? "",
145
+ e.quantity,
146
+ e.price,
147
+ e.amount,
148
+ e.fee,
149
+ e.currency
150
+ ])));
151
+ }, j = a === "networth" && (s.isLoading || !v) || a === "holdings" && (l.isLoading || D.length === 0) || a === "transactions" && (d.isLoading || O.length === 0);
152
+ return /* @__PURE__ */ E(u, {
153
+ title: n("brainyrich.reports.title", "Reports & Statements"),
154
+ description: n("brainyrich.reports.description", "Generate statements directly from your live portfolio data — no fabricated schedules."),
155
+ actions: /* @__PURE__ */ E(N, { children: [/* @__PURE__ */ T(I, {
50
156
  asChild: !0,
51
- children: /* @__PURE__ */ w(E, {
157
+ children: /* @__PURE__ */ E(ee, {
52
158
  size: "sm",
159
+ disabled: j,
160
+ "aria-label": n("brainyrich.reports.actions.export", "Print / Export"),
53
161
  children: [
54
- /* @__PURE__ */ C(g, {
162
+ /* @__PURE__ */ T(_, {
55
163
  className: "size-4",
56
164
  "aria-hidden": "true"
57
165
  }),
58
- a("brainyrich.reports.actions.export", "Print / Export"),
59
- /* @__PURE__ */ C(h, {
166
+ n("brainyrich.reports.actions.export", "Print / Export"),
167
+ /* @__PURE__ */ T(g, {
60
168
  className: "size-4",
61
169
  "aria-hidden": "true"
62
170
  })
63
171
  ]
64
172
  })
65
- }), /* @__PURE__ */ w(N, {
173
+ }), /* @__PURE__ */ E(P, {
66
174
  align: "end",
67
- children: [/* @__PURE__ */ w(P, {
68
- onSelect: () => {
69
- if (o === "networth") {
70
- if (!D) return;
71
- K("brainyrich-net-worth-statement.csv", G([
72
- "Metric",
73
- "Amount",
74
- "Currency"
75
- ], [
76
- [
77
- "Total Net Worth",
78
- D.totalNetWorth,
79
- O
80
- ],
81
- [
82
- "Total Market Value",
83
- D.totalMarketValue,
84
- O
85
- ],
86
- [
87
- "Total Cash",
88
- D.totalCash,
89
- O
90
- ],
91
- [
92
- "Account Count",
93
- D.accountCount,
94
- ""
95
- ],
96
- ...D.byAssetClass.map((e) => [
97
- `Asset Class: ${e.assetClass.replace(/_/g, " ")}`,
98
- e.marketValue,
99
- O
100
- ])
101
- ]));
102
- return;
103
- }
104
- if (o === "holdings") {
105
- K("brainyrich-holdings-schedule.csv", G([
106
- "Symbol",
107
- "Name",
108
- "Asset Class",
109
- "Quantity",
110
- "Cost Basis",
111
- "Market Value",
112
- "Currency"
113
- ], k.map((e) => [
114
- e.symbol,
115
- e.name ?? "",
116
- e.assetClass.replace(/_/g, " "),
117
- e.quantity,
118
- e.costBasis,
119
- e.marketValue,
120
- e.currency
121
- ])));
122
- return;
123
- }
124
- K("brainyrich-transaction-ledger.csv", G([
125
- "Trade Date",
126
- "Type",
127
- "Symbol",
128
- "Quantity",
129
- "Price",
130
- "Amount",
131
- "Fee",
132
- "Currency"
133
- ], A.map((e) => [
134
- d(e.tradeDate),
135
- e.type,
136
- e.symbol ?? "",
137
- e.quantity,
138
- e.price,
139
- e.amount,
140
- e.fee,
141
- e.currency
142
- ])));
143
- },
144
- children: [/* @__PURE__ */ C(g, {
175
+ children: [/* @__PURE__ */ E(F, {
176
+ onSelect: A,
177
+ children: [/* @__PURE__ */ T(_, {
145
178
  className: "size-4",
146
179
  "aria-hidden": "true"
147
- }), a("brainyrich.reports.actions.downloadCsv", "Download CSV")]
148
- }), /* @__PURE__ */ w(P, {
180
+ }), n("brainyrich.reports.actions.downloadCsv", "Download CSV")]
181
+ }), /* @__PURE__ */ E(F, {
149
182
  onSelect: () => window.print(),
150
- children: [/* @__PURE__ */ C(y, {
183
+ children: [/* @__PURE__ */ T(b, {
151
184
  className: "size-4",
152
185
  "aria-hidden": "true"
153
- }), a("brainyrich.reports.actions.print", "Print statement")]
186
+ }), n("brainyrich.reports.actions.print", "Print statement")]
154
187
  })]
155
188
  })] }),
156
189
  children: [
157
- /* @__PURE__ */ C(s, { items: j }),
158
- /* @__PURE__ */ C(H, {
159
- value: o,
160
- onValueChange: (e) => c(e),
161
- children: /* @__PURE__ */ w(U, { children: [
162
- /* @__PURE__ */ w(W, {
190
+ /* @__PURE__ */ T(c, { items: k }),
191
+ /* @__PURE__ */ T(U, {
192
+ value: a,
193
+ onValueChange: (e) => o(e),
194
+ children: /* @__PURE__ */ E(W, { children: [
195
+ /* @__PURE__ */ E(G, {
163
196
  value: "networth",
164
- children: [/* @__PURE__ */ C(x, {
197
+ children: [/* @__PURE__ */ T(S, {
165
198
  className: "size-4",
166
199
  "aria-hidden": "true"
167
- }), a("brainyrich.reports.tabs.netWorth", "Net Worth")]
200
+ }), n("brainyrich.reports.tabs.netWorth", "Net Worth")]
168
201
  }),
169
- /* @__PURE__ */ w(W, {
202
+ /* @__PURE__ */ E(G, {
170
203
  value: "holdings",
171
- children: [/* @__PURE__ */ C(v, {
204
+ children: [/* @__PURE__ */ T(y, {
172
205
  className: "size-4",
173
206
  "aria-hidden": "true"
174
- }), a("brainyrich.reports.tabs.holdings", "Holdings")]
207
+ }), n("brainyrich.reports.tabs.holdings", "Holdings")]
175
208
  }),
176
- /* @__PURE__ */ w(W, {
209
+ /* @__PURE__ */ E(G, {
177
210
  value: "transactions",
178
- children: [/* @__PURE__ */ C(b, {
211
+ children: [/* @__PURE__ */ T(x, {
179
212
  className: "size-4",
180
213
  "aria-hidden": "true"
181
- }), a("brainyrich.reports.tabs.ledger", "Ledger")]
214
+ }), n("brainyrich.reports.tabs.ledger", "Ledger")]
182
215
  })
183
216
  ] })
184
217
  }),
185
- o === "networth" ? /* @__PURE__ */ C(J, {
186
- query: u,
187
- translate: a
188
- }) : o === "holdings" ? /* @__PURE__ */ C(X, {
189
- query: _,
190
- holdings: k,
191
- translate: a
192
- }) : /* @__PURE__ */ C(Z, {
193
- query: T,
194
- transactions: A,
195
- translate: a
218
+ a === "networth" ? /* @__PURE__ */ T(Q, {
219
+ query: s,
220
+ translate: n
221
+ }) : a === "holdings" ? /* @__PURE__ */ T(te, {
222
+ query: l,
223
+ holdings: D,
224
+ translate: n
225
+ }) : /* @__PURE__ */ T(ne, {
226
+ query: d,
227
+ transactions: O,
228
+ translate: n
196
229
  })
197
230
  ]
198
231
  });
199
232
  }
200
- function J({ query: e, translate: t }) {
201
- let n = e.data, r = n?.currency ?? "USD", s = p(() => {
233
+ function Q({ query: e, translate: t }) {
234
+ let n = e.data, r = n?.currency ?? "USD", i = m(() => {
202
235
  if (!n) return [];
203
236
  let e = n.byAssetClass.reduce((e, t) => e + t.marketValue, 0);
204
237
  return e <= 0 ? [] : n.byAssetClass.slice().sort((e, t) => t.marketValue - e.marketValue).map((t) => ({
205
238
  label: t.assetClass.replace(/_/g, " "),
206
239
  value: t.marketValue / e * 100,
207
- caption: f(t.marketValue, r)
240
+ caption: p(t.marketValue, r)
208
241
  }));
209
242
  }, [n, r]);
210
- return /* @__PURE__ */ w(D, { children: [/* @__PURE__ */ w(A, { children: [/* @__PURE__ */ w(j, {
243
+ return /* @__PURE__ */ E(O, { children: [/* @__PURE__ */ E(j, { children: [/* @__PURE__ */ E(M, {
211
244
  className: "flex items-center gap-2",
212
- children: [/* @__PURE__ */ C(x, {
245
+ children: [/* @__PURE__ */ T(S, {
213
246
  className: "size-5",
214
247
  "aria-hidden": "true"
215
248
  }), t("brainyrich.reports.netWorth.title", "Net Worth Statement")]
216
- }), /* @__PURE__ */ C(k, { children: t("brainyrich.reports.netWorth.description", "Consolidated assets, cash, and asset-class allocation as of today.") })] }), /* @__PURE__ */ C(O, { children: e.isLoading ? /* @__PURE__ */ C(c, { rows: 3 }) : e.isError ? /* @__PURE__ */ C(o, { onRetry: () => e.refetch() }) : n ? /* @__PURE__ */ w("div", {
249
+ }), /* @__PURE__ */ T(A, { children: t("brainyrich.reports.netWorth.description", "Consolidated assets, cash, and asset-class allocation as of today.") })] }), /* @__PURE__ */ T(k, { children: e.isLoading ? /* @__PURE__ */ T(l, { rows: 3 }) : e.isError ? /* @__PURE__ */ T(s, { onRetry: () => e.refetch() }) : n ? /* @__PURE__ */ E("div", {
217
250
  className: "space-y-6",
218
- children: [/* @__PURE__ */ w("div", {
251
+ children: [/* @__PURE__ */ E("div", {
219
252
  className: "grid gap-4 sm:grid-cols-3",
220
253
  children: [
221
- /* @__PURE__ */ C(Y, {
254
+ /* @__PURE__ */ T($, {
222
255
  label: t("brainyrich.reports.netWorth.total", "Total Net Worth"),
223
- value: f(n.totalNetWorth, r),
256
+ value: p(n.totalNetWorth, r),
224
257
  emphasis: !0
225
258
  }),
226
- /* @__PURE__ */ C(Y, {
259
+ /* @__PURE__ */ T($, {
227
260
  label: t("brainyrich.reports.netWorth.invested", "Invested Value"),
228
- value: f(n.totalMarketValue, r)
261
+ value: p(n.totalMarketValue, r)
229
262
  }),
230
- /* @__PURE__ */ C(Y, {
263
+ /* @__PURE__ */ T($, {
231
264
  label: t("brainyrich.reports.netWorth.cash", "Cash & Liquidity"),
232
- value: f(n.totalCash, r)
265
+ value: p(n.totalCash, r)
233
266
  })
234
267
  ]
235
- }), /* @__PURE__ */ w("div", {
268
+ }), /* @__PURE__ */ E("div", {
236
269
  className: "space-y-3",
237
- children: [/* @__PURE__ */ C("p", {
270
+ children: [/* @__PURE__ */ T("p", {
238
271
  className: "text-sm font-medium text-text-primary",
239
272
  children: t("brainyrich.reports.netWorth.allocation", "Allocation by Asset Class")
240
- }), s.length > 0 ? /* @__PURE__ */ C(i, { data: s }) : /* @__PURE__ */ C("p", {
273
+ }), i.length > 0 ? /* @__PURE__ */ T(a, { data: i }) : /* @__PURE__ */ T("p", {
241
274
  className: "text-sm text-text-secondary",
242
275
  children: t("brainyrich.reports.netWorth.noAllocation", "No holdings to allocate yet.")
243
276
  })]
244
277
  })]
245
- }) : /* @__PURE__ */ C(a, {
246
- icon: /* @__PURE__ */ C(x, {
278
+ }) : /* @__PURE__ */ T(o, {
279
+ icon: /* @__PURE__ */ T(S, {
247
280
  className: "size-6",
248
281
  "aria-hidden": "true"
249
282
  }),
@@ -251,80 +284,80 @@ function J({ query: e, translate: t }) {
251
284
  description: t("brainyrich.reports.netWorth.emptyDesc", "Link an account and add holdings to generate a net-worth statement.")
252
285
  }) })] });
253
286
  }
254
- function Y({ label: e, value: t, emphasis: n }) {
255
- return /* @__PURE__ */ w("div", {
287
+ function $({ label: e, value: t, emphasis: n }) {
288
+ return /* @__PURE__ */ E("div", {
256
289
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
257
- children: [/* @__PURE__ */ C("p", {
290
+ children: [/* @__PURE__ */ T("p", {
258
291
  className: "text-xs text-text-secondary",
259
292
  children: e
260
- }), /* @__PURE__ */ C("p", {
293
+ }), /* @__PURE__ */ T("p", {
261
294
  className: n ? "mt-1 text-2xl font-semibold text-text-primary" : "mt-1 text-xl font-semibold text-text-primary",
262
295
  children: t
263
296
  })]
264
297
  });
265
298
  }
266
- function X({ query: e, holdings: t, translate: n }) {
267
- return /* @__PURE__ */ w(D, { children: [/* @__PURE__ */ w(A, { children: [/* @__PURE__ */ w(j, {
299
+ function te({ query: e, holdings: t, translate: n }) {
300
+ return /* @__PURE__ */ E(O, { children: [/* @__PURE__ */ E(j, { children: [/* @__PURE__ */ E(M, {
268
301
  className: "flex items-center gap-2",
269
- children: [/* @__PURE__ */ C(v, {
302
+ children: [/* @__PURE__ */ T(y, {
270
303
  className: "size-5",
271
304
  "aria-hidden": "true"
272
305
  }), n("brainyrich.reports.holdings.title", "Holdings Schedule")]
273
- }), /* @__PURE__ */ C(k, { children: n("brainyrich.reports.holdings.description", "Every position across your portfolios with cost basis and market value.") })] }), /* @__PURE__ */ C(O, { children: e.isLoading ? /* @__PURE__ */ C(c, { rows: 4 }) : e.isError ? /* @__PURE__ */ C(o, { onRetry: () => e.refetch() }) : t.length > 0 ? /* @__PURE__ */ C("div", {
306
+ }), /* @__PURE__ */ T(A, { children: n("brainyrich.reports.holdings.description", "Every position across your portfolios with cost basis and market value.") })] }), /* @__PURE__ */ T(k, { children: e.isLoading ? /* @__PURE__ */ T(l, { rows: 4 }) : e.isError ? /* @__PURE__ */ T(s, { onRetry: () => e.refetch() }) : t.length > 0 ? /* @__PURE__ */ T("div", {
274
307
  className: "overflow-x-auto",
275
- children: /* @__PURE__ */ w(I, { children: [/* @__PURE__ */ C(B, { children: /* @__PURE__ */ w(V, { children: [
276
- /* @__PURE__ */ C(z, { children: n("brainyrich.reports.holdings.symbol", "Symbol") }),
277
- /* @__PURE__ */ C(z, { children: n("brainyrich.reports.holdings.assetClass", "Asset Class") }),
278
- /* @__PURE__ */ C(z, {
308
+ children: /* @__PURE__ */ E(L, { children: [/* @__PURE__ */ T(V, { children: /* @__PURE__ */ E(H, { children: [
309
+ /* @__PURE__ */ T(B, { children: n("brainyrich.reports.holdings.symbol", "Symbol") }),
310
+ /* @__PURE__ */ T(B, { children: n("brainyrich.reports.holdings.assetClass", "Asset Class") }),
311
+ /* @__PURE__ */ T(B, {
279
312
  className: "text-right",
280
313
  children: n("brainyrich.reports.holdings.quantity", "Quantity")
281
314
  }),
282
- /* @__PURE__ */ C(z, {
315
+ /* @__PURE__ */ T(B, {
283
316
  className: "text-right",
284
317
  children: n("brainyrich.reports.holdings.costBasis", "Cost Basis")
285
318
  }),
286
- /* @__PURE__ */ C(z, {
319
+ /* @__PURE__ */ T(B, {
287
320
  className: "text-right",
288
321
  children: n("brainyrich.reports.holdings.marketValue", "Market Value")
289
322
  }),
290
- /* @__PURE__ */ C(z, {
323
+ /* @__PURE__ */ T(B, {
291
324
  className: "text-right",
292
325
  children: n("brainyrich.reports.holdings.gainLoss", "Unrealized")
293
326
  })
294
- ] }) }), /* @__PURE__ */ C(L, { children: t.map((e) => {
327
+ ] }) }), /* @__PURE__ */ T(R, { children: t.map((e) => {
295
328
  let t = e.marketValue - e.costBasis;
296
- return /* @__PURE__ */ w(V, { children: [
297
- /* @__PURE__ */ w(R, { children: [/* @__PURE__ */ C("div", {
329
+ return /* @__PURE__ */ E(H, { children: [
330
+ /* @__PURE__ */ E(z, { children: [/* @__PURE__ */ T("div", {
298
331
  className: "font-medium text-text-primary",
299
332
  children: e.symbol
300
- }), e.name ? /* @__PURE__ */ C("div", {
333
+ }), e.name ? /* @__PURE__ */ T("div", {
301
334
  className: "text-xs text-text-secondary",
302
335
  children: e.name
303
336
  }) : null] }),
304
- /* @__PURE__ */ C(R, { children: /* @__PURE__ */ C(T, {
337
+ /* @__PURE__ */ T(z, { children: /* @__PURE__ */ T(D, {
305
338
  variant: "outline",
306
339
  children: e.assetClass.replace(/_/g, " ")
307
340
  }) }),
308
- /* @__PURE__ */ C(R, {
341
+ /* @__PURE__ */ T(z, {
309
342
  className: "text-right tabular-nums text-text-primary",
310
343
  children: e.quantity
311
344
  }),
312
- /* @__PURE__ */ C(R, {
345
+ /* @__PURE__ */ T(z, {
313
346
  className: "text-right tabular-nums text-text-primary",
314
- children: f(e.costBasis, e.currency)
347
+ children: p(e.costBasis, e.currency)
315
348
  }),
316
- /* @__PURE__ */ C(R, {
349
+ /* @__PURE__ */ T(z, {
317
350
  className: "text-right tabular-nums text-text-primary",
318
- children: f(e.marketValue, e.currency)
351
+ children: p(e.marketValue, e.currency)
319
352
  }),
320
- /* @__PURE__ */ w(R, {
321
- className: `text-right tabular-nums font-medium ${u(t)}`,
322
- children: [t > 0 ? "+" : "", f(t, e.currency)]
353
+ /* @__PURE__ */ E(z, {
354
+ className: `text-right tabular-nums font-medium ${d(t)}`,
355
+ children: [t > 0 ? "+" : "", p(t, e.currency)]
323
356
  })
324
357
  ] }, e.id);
325
358
  }) })] })
326
- }) : /* @__PURE__ */ C(a, {
327
- icon: /* @__PURE__ */ C(v, {
359
+ }) : /* @__PURE__ */ T(o, {
360
+ icon: /* @__PURE__ */ T(y, {
328
361
  className: "size-6",
329
362
  "aria-hidden": "true"
330
363
  }),
@@ -332,59 +365,59 @@ function X({ query: e, holdings: t, translate: n }) {
332
365
  description: n("brainyrich.reports.holdings.emptyDesc", "Add holdings to your portfolios to generate a holdings schedule.")
333
366
  }) })] });
334
367
  }
335
- function Z({ query: e, transactions: t, translate: n }) {
336
- return /* @__PURE__ */ w(D, { children: [/* @__PURE__ */ w(A, { children: [/* @__PURE__ */ w(j, {
368
+ function ne({ query: e, transactions: t, translate: n }) {
369
+ return /* @__PURE__ */ E(O, { children: [/* @__PURE__ */ E(j, { children: [/* @__PURE__ */ E(M, {
337
370
  className: "flex items-center gap-2",
338
- children: [/* @__PURE__ */ C(b, {
371
+ children: [/* @__PURE__ */ T(x, {
339
372
  className: "size-5",
340
373
  "aria-hidden": "true"
341
374
  }), n("brainyrich.reports.ledger.title", "Transaction Ledger")]
342
- }), /* @__PURE__ */ C(k, { children: n("brainyrich.reports.ledger.description", "Every recorded transaction across your accounts, newest first.") })] }), /* @__PURE__ */ C(O, { children: e.isLoading ? /* @__PURE__ */ C(c, { rows: 4 }) : e.isError ? /* @__PURE__ */ C(o, { onRetry: () => e.refetch() }) : t.length > 0 ? /* @__PURE__ */ C("div", {
375
+ }), /* @__PURE__ */ T(A, { children: n("brainyrich.reports.ledger.description", "Every recorded transaction across your accounts, newest first.") })] }), /* @__PURE__ */ T(k, { children: e.isLoading ? /* @__PURE__ */ T(l, { rows: 4 }) : e.isError ? /* @__PURE__ */ T(s, { onRetry: () => e.refetch() }) : t.length > 0 ? /* @__PURE__ */ T("div", {
343
376
  className: "overflow-x-auto",
344
- children: /* @__PURE__ */ w(I, { children: [/* @__PURE__ */ C(B, { children: /* @__PURE__ */ w(V, { children: [
345
- /* @__PURE__ */ C(z, { children: n("brainyrich.reports.ledger.date", "Trade Date") }),
346
- /* @__PURE__ */ C(z, { children: n("brainyrich.reports.ledger.type", "Type") }),
347
- /* @__PURE__ */ C(z, { children: n("brainyrich.reports.ledger.symbol", "Symbol") }),
348
- /* @__PURE__ */ C(z, {
377
+ children: /* @__PURE__ */ E(L, { children: [/* @__PURE__ */ T(V, { children: /* @__PURE__ */ E(H, { children: [
378
+ /* @__PURE__ */ T(B, { children: n("brainyrich.reports.ledger.date", "Trade Date") }),
379
+ /* @__PURE__ */ T(B, { children: n("brainyrich.reports.ledger.type", "Type") }),
380
+ /* @__PURE__ */ T(B, { children: n("brainyrich.reports.ledger.symbol", "Symbol") }),
381
+ /* @__PURE__ */ T(B, {
349
382
  className: "text-right",
350
383
  children: n("brainyrich.reports.ledger.quantity", "Quantity")
351
384
  }),
352
- /* @__PURE__ */ C(z, {
385
+ /* @__PURE__ */ T(B, {
353
386
  className: "text-right",
354
387
  children: n("brainyrich.reports.ledger.price", "Price")
355
388
  }),
356
- /* @__PURE__ */ C(z, {
389
+ /* @__PURE__ */ T(B, {
357
390
  className: "text-right",
358
391
  children: n("brainyrich.reports.ledger.amount", "Amount")
359
392
  })
360
- ] }) }), /* @__PURE__ */ C(L, { children: t.map((e) => /* @__PURE__ */ w(V, { children: [
361
- /* @__PURE__ */ C(R, {
393
+ ] }) }), /* @__PURE__ */ T(R, { children: t.map((e) => /* @__PURE__ */ E(H, { children: [
394
+ /* @__PURE__ */ T(z, {
362
395
  className: "text-text-primary",
363
- children: d(e.tradeDate)
396
+ children: f(e.tradeDate)
364
397
  }),
365
- /* @__PURE__ */ C(R, { children: /* @__PURE__ */ C(T, {
398
+ /* @__PURE__ */ T(z, { children: /* @__PURE__ */ T(D, {
366
399
  variant: "outline",
367
400
  children: e.type
368
401
  }) }),
369
- /* @__PURE__ */ C(R, {
402
+ /* @__PURE__ */ T(z, {
370
403
  className: "text-text-primary",
371
404
  children: e.symbol ?? "—"
372
405
  }),
373
- /* @__PURE__ */ C(R, {
406
+ /* @__PURE__ */ T(z, {
374
407
  className: "text-right tabular-nums text-text-primary",
375
408
  children: e.quantity
376
409
  }),
377
- /* @__PURE__ */ C(R, {
410
+ /* @__PURE__ */ T(z, {
378
411
  className: "text-right tabular-nums text-text-primary",
379
- children: f(e.price, e.currency)
412
+ children: p(e.price, e.currency)
380
413
  }),
381
- /* @__PURE__ */ C(R, {
414
+ /* @__PURE__ */ T(z, {
382
415
  className: "text-right tabular-nums text-text-primary",
383
- children: f(e.amount, e.currency)
416
+ children: p(e.amount, e.currency)
384
417
  })
385
418
  ] }, e.id)) })] })
386
- }) : /* @__PURE__ */ C(a, {
387
- icon: /* @__PURE__ */ C(_, {
419
+ }) : /* @__PURE__ */ T(o, {
420
+ icon: /* @__PURE__ */ T(v, {
388
421
  className: "size-6",
389
422
  "aria-hidden": "true"
390
423
  }),
@@ -393,6 +426,6 @@ function Z({ query: e, transactions: t, translate: n }) {
393
426
  }) })] });
394
427
  }
395
428
  //#endregion
396
- export { q as ReportsPage };
429
+ export { Z as ReportsPage };
397
430
 
398
431
  //# sourceMappingURL=ReportsPage.js.map