@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,13 +1,16 @@
1
1
  import { tWithFallback as e } from "../utils/i18n.js";
2
2
  import { useAcknowledgeInsight as t, useCreateAccount as n, useDismissInsight as r, useGoals as i, useInsights as a, useNetWorthSummary as o, usePortfolios as s, useResolveInsight as c } from "../hooks/useBrainyRichApi.js";
3
- import { AllocationBars as l, EmptyState as u, ErrorState as d, KpiGrid as f, LoadingState as p, SectionShell as m, formatDate as h, formatMoney as g, statusBadgeVariant as _ } from "./_shared.js";
4
- import { useMemo as v, useState as y } from "react";
5
- import { Bell as b, Briefcase as x, Check as S, CircleCheck as C, MoreHorizontal as w, PlusCircle as T, Target as E, Wallet as D, X as O } from "lucide-react";
6
- import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
- import { jsx as A, jsxs as j } from "react/jsx-runtime";
8
- import { Badge as M, Button as N, Card as P, CardContent as F, CardDescription as I, CardHeader as L, CardTitle as R, Dialog as z, DialogContent as B, DialogDescription as V, DialogFooter as H, DialogHeader as U, DialogTitle as W, DropdownMenu as G, DropdownMenuContent as K, DropdownMenuItem as q, DropdownMenuTrigger as J, Input as Y, Label as X, Select as Z, SelectContent as Q, SelectItem as $, SelectTrigger as ee, SelectValue as te } from "@burdenoff/fe-libs/ui";
3
+ import { ConfirmDialog as l } from "../components/ConfirmDialog.js";
4
+ import { HouseholdPicker as u } from "../components/pickers.js";
5
+ import "../components/index.js";
6
+ import { AllocationBars as d, EmptyState as f, ErrorState as p, KpiGrid as m, LoadingState as h, SectionShell as g, formatDate as _, formatMoney as v, statusBadgeVariant as y } from "./_shared.js";
7
+ import { useMemo as b, useState as x } from "react";
8
+ import { Bell as S, Briefcase as C, Check as w, CircleCheck as T, MoreHorizontal as E, PlusCircle as D, Target as O, Wallet as k, X as A } from "lucide-react";
9
+ import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import { jsx as M, jsxs as N } from "react/jsx-runtime";
11
+ import { Badge as P, Button as F, Card as I, CardContent as L, CardDescription as R, CardHeader as z, CardTitle as B, Dialog as V, DialogContent as H, DialogDescription as U, DialogFooter as W, DialogHeader as G, DialogTitle as K, DropdownMenu as q, DropdownMenuContent as J, DropdownMenuItem as Y, DropdownMenuTrigger as X, Input as Z, Label as Q, Select as $, SelectContent as ee, SelectItem as te, SelectTrigger as ne, SelectValue as re } from "@burdenoff/fe-libs/ui";
9
12
  //#region src/brainyrich/pages/DashboardPage.tsx
10
- var ne = [
13
+ var ie = [
11
14
  "BANK",
12
15
  "BROKERAGE",
13
16
  "RETIREMENT",
@@ -17,100 +20,100 @@ var ne = [
17
20
  "ALTERNATIVE",
18
21
  "LIABILITY"
19
22
  ];
20
- function re() {
21
- let { t } = k(), n = (n, r, i) => e(t, n, r, i), r = o(), c = s(), y = i(), S = a({ status: "OPEN" }), w = r.data, T = w?.currency ?? "USD", O = w ? [
23
+ function ae() {
24
+ let { t } = j(), n = (n, r, i) => e(t, n, r, i), r = o(), c = s(), l = i(), u = a({ status: "OPEN" }), x = r.data, w = x?.currency ?? "USD", E = x ? [
22
25
  {
23
26
  label: n("brainyrich.dashboard.metrics.netWorth", "Net Worth"),
24
- value: g(w.totalNetWorth, T)
27
+ value: v(x.totalNetWorth, w)
25
28
  },
26
29
  {
27
30
  label: n("brainyrich.dashboard.metrics.investedAssets", "Invested Assets"),
28
- value: g(w.totalMarketValue, T)
31
+ value: v(x.totalMarketValue, w)
29
32
  },
30
33
  {
31
34
  label: n("brainyrich.dashboard.metrics.liquidity", "Cash & Liquidity"),
32
- value: g(w.totalCash, T)
35
+ value: v(x.totalCash, w)
33
36
  },
34
37
  {
35
38
  label: n("brainyrich.dashboard.metrics.accounts", "Linked Accounts"),
36
- value: String(w.accountCount)
39
+ value: String(x.accountCount)
37
40
  }
38
- ] : [], N = v(() => {
39
- if (!w) return [];
40
- let e = w.byAssetClass.reduce((e, t) => e + t.marketValue, 0);
41
- return e <= 0 ? [] : w.byAssetClass.slice().sort((e, t) => t.marketValue - e.marketValue).map((t) => ({
41
+ ] : [], D = b(() => {
42
+ if (!x) return [];
43
+ let e = x.byAssetClass.reduce((e, t) => e + t.marketValue, 0);
44
+ return e <= 0 ? [] : x.byAssetClass.slice().sort((e, t) => t.marketValue - e.marketValue).map((t) => ({
42
45
  label: t.assetClass.replace(/_/g, " "),
43
46
  value: t.marketValue / e * 100,
44
- caption: g(t.marketValue, T)
47
+ caption: v(t.marketValue, w)
45
48
  }));
46
- }, [w, T]), z = c.data.slice(0, 5), B = y.data.slice(0, 5), V = S.data.slice(0, 6);
47
- return /* @__PURE__ */ j(m, {
49
+ }, [x, w]), A = c.data.slice(0, 5), F = l.data.slice(0, 5), V = u.data.slice(0, 6);
50
+ return /* @__PURE__ */ N(g, {
48
51
  title: n("brainyrich.dashboard.title", "Wealth Dashboard"),
49
52
  description: n("brainyrich.dashboard.description", "Your consolidated financial overview at a glance"),
50
- actions: /* @__PURE__ */ A(ae, { translate: n }),
53
+ actions: /* @__PURE__ */ M(se, { translate: n }),
51
54
  children: [
52
- r.isLoading ? /* @__PURE__ */ A(p, { rows: 1 }) : r.isError ? /* @__PURE__ */ A(d, {
55
+ r.isLoading ? /* @__PURE__ */ M(h, { rows: 1 }) : r.isError ? /* @__PURE__ */ M(p, {
53
56
  title: n("brainyrich.dashboard.netWorthError", "Could not load net worth"),
54
57
  onRetry: () => r.refetch()
55
- }) : w ? /* @__PURE__ */ A(f, { items: O }) : /* @__PURE__ */ A(u, {
56
- icon: /* @__PURE__ */ A(D, {
58
+ }) : x ? /* @__PURE__ */ M(m, { items: E }) : /* @__PURE__ */ M(f, {
59
+ icon: /* @__PURE__ */ M(k, {
57
60
  className: "size-6",
58
61
  "aria-hidden": "true"
59
62
  }),
60
63
  title: n("brainyrich.dashboard.noSummary", "No financial data yet"),
61
64
  description: n("brainyrich.dashboard.noSummaryDesc", "Link your first account to see your net worth here.")
62
65
  }),
63
- /* @__PURE__ */ j("div", {
66
+ /* @__PURE__ */ N("div", {
64
67
  className: "grid gap-6 lg:grid-cols-3",
65
- children: [/* @__PURE__ */ j(P, {
68
+ children: [/* @__PURE__ */ N(I, {
66
69
  className: "lg:col-span-2",
67
- children: [/* @__PURE__ */ j(L, { children: [/* @__PURE__ */ j(R, {
70
+ children: [/* @__PURE__ */ N(z, { children: [/* @__PURE__ */ N(B, {
68
71
  className: "flex items-center gap-2",
69
- children: [/* @__PURE__ */ A(x, {
72
+ children: [/* @__PURE__ */ M(C, {
70
73
  className: "h-5 w-5",
71
74
  "aria-hidden": "true"
72
75
  }), n("brainyrich.dashboard.sections.assetAllocation", "Asset Allocation")]
73
- }), /* @__PURE__ */ A(I, { children: n("brainyrich.dashboard.sections.assetAllocationDescription", "Market value distributed across asset classes") })] }), /* @__PURE__ */ A(F, { children: r.isLoading ? /* @__PURE__ */ A(p, { rows: 3 }) : r.isError ? /* @__PURE__ */ A(d, { onRetry: () => r.refetch() }) : N.length > 0 ? /* @__PURE__ */ A(l, { data: N }) : /* @__PURE__ */ A(u, {
74
- icon: /* @__PURE__ */ A(x, {
76
+ }), /* @__PURE__ */ M(R, { children: n("brainyrich.dashboard.sections.assetAllocationDescription", "Market value distributed across asset classes") })] }), /* @__PURE__ */ M(L, { children: r.isLoading ? /* @__PURE__ */ M(h, { rows: 3 }) : r.isError ? /* @__PURE__ */ M(p, { onRetry: () => r.refetch() }) : D.length > 0 ? /* @__PURE__ */ M(d, { data: D }) : /* @__PURE__ */ M(f, {
77
+ icon: /* @__PURE__ */ M(C, {
75
78
  className: "size-6",
76
79
  "aria-hidden": "true"
77
80
  }),
78
81
  title: n("brainyrich.dashboard.noAllocation", "No holdings to allocate"),
79
82
  description: n("brainyrich.dashboard.noAllocationDesc", "Add holdings to your accounts to see how your wealth is allocated.")
80
83
  }) })]
81
- }), /* @__PURE__ */ j(P, { children: [/* @__PURE__ */ A(L, {
84
+ }), /* @__PURE__ */ N(I, { children: [/* @__PURE__ */ M(z, {
82
85
  className: "pb-3",
83
- children: /* @__PURE__ */ j(R, {
86
+ children: /* @__PURE__ */ N(B, {
84
87
  className: "flex items-center gap-2 text-base",
85
- children: [/* @__PURE__ */ A(E, {
88
+ children: [/* @__PURE__ */ M(O, {
86
89
  className: "h-4 w-4",
87
90
  "aria-hidden": "true"
88
91
  }), n("brainyrich.dashboard.sections.goals", "Goals")]
89
92
  })
90
- }), /* @__PURE__ */ A(F, {
93
+ }), /* @__PURE__ */ M(L, {
91
94
  className: "space-y-3",
92
- children: y.isLoading ? /* @__PURE__ */ A(p, { rows: 3 }) : y.isError ? /* @__PURE__ */ A(d, { onRetry: () => y.refetch() }) : B.length > 0 ? B.map((e) => /* @__PURE__ */ j("div", {
95
+ children: l.isLoading ? /* @__PURE__ */ M(h, { rows: 3 }) : l.isError ? /* @__PURE__ */ M(p, { onRetry: () => l.refetch() }) : F.length > 0 ? F.map((e) => /* @__PURE__ */ N("div", {
93
96
  className: "flex items-start justify-between gap-2 rounded-lg border border-border-subtle p-3",
94
- children: [/* @__PURE__ */ j("div", {
97
+ children: [/* @__PURE__ */ N("div", {
95
98
  className: "min-w-0 space-y-0.5",
96
- children: [/* @__PURE__ */ A("p", {
99
+ children: [/* @__PURE__ */ M("p", {
97
100
  className: "truncate text-sm font-medium text-text-primary",
98
101
  children: e.name
99
- }), /* @__PURE__ */ j("p", {
102
+ }), /* @__PURE__ */ N("p", {
100
103
  className: "text-xs text-text-secondary",
101
104
  children: [
102
- g(e.targetAmount, e.currency),
105
+ v(e.targetAmount, e.currency),
103
106
  " · ",
104
- h(e.targetDate)
107
+ _(e.targetDate)
105
108
  ]
106
109
  })]
107
- }), /* @__PURE__ */ A(M, {
108
- variant: _(e.projection),
110
+ }), /* @__PURE__ */ M(P, {
111
+ variant: y(e.projection),
109
112
  className: "shrink-0",
110
113
  children: e.projection.replace(/_/g, " ")
111
114
  })]
112
- }, e.id)) : /* @__PURE__ */ A(u, {
113
- icon: /* @__PURE__ */ A(E, {
115
+ }, e.id)) : /* @__PURE__ */ M(f, {
116
+ icon: /* @__PURE__ */ M(O, {
114
117
  className: "size-6",
115
118
  "aria-hidden": "true"
116
119
  }),
@@ -119,55 +122,55 @@ function re() {
119
122
  })
120
123
  })] })]
121
124
  }),
122
- /* @__PURE__ */ j(P, { children: [/* @__PURE__ */ j(L, { children: [/* @__PURE__ */ j(R, {
125
+ /* @__PURE__ */ N(I, { children: [/* @__PURE__ */ N(z, { children: [/* @__PURE__ */ N(B, {
123
126
  className: "flex items-center gap-2",
124
- children: [/* @__PURE__ */ A(D, {
127
+ children: [/* @__PURE__ */ M(k, {
125
128
  className: "h-5 w-5",
126
129
  "aria-hidden": "true"
127
130
  }), n("brainyrich.dashboard.sections.portfolios", "Portfolios")]
128
- }), /* @__PURE__ */ A(I, { children: n("brainyrich.dashboard.sections.portfoliosDescription", "Your active investment strategies") })] }), /* @__PURE__ */ A(F, { children: c.isLoading ? /* @__PURE__ */ A(p, { rows: 3 }) : c.isError ? /* @__PURE__ */ A(d, { onRetry: () => c.refetch() }) : z.length > 0 ? /* @__PURE__ */ A("div", {
131
+ }), /* @__PURE__ */ M(R, { children: n("brainyrich.dashboard.sections.portfoliosDescription", "Your active investment strategies") })] }), /* @__PURE__ */ M(L, { children: c.isLoading ? /* @__PURE__ */ M(h, { rows: 3 }) : c.isError ? /* @__PURE__ */ M(p, { onRetry: () => c.refetch() }) : A.length > 0 ? /* @__PURE__ */ M("div", {
129
132
  className: "grid gap-3 sm:grid-cols-2",
130
- children: z.map((e) => /* @__PURE__ */ j("div", {
133
+ children: A.map((e) => /* @__PURE__ */ N("div", {
131
134
  className: "flex items-start justify-between gap-2 rounded-lg border border-border-subtle p-3",
132
- children: [/* @__PURE__ */ j("div", {
135
+ children: [/* @__PURE__ */ N("div", {
133
136
  className: "min-w-0 space-y-0.5",
134
- children: [/* @__PURE__ */ A("p", {
137
+ children: [/* @__PURE__ */ M("p", {
135
138
  className: "truncate text-sm font-medium text-text-primary",
136
139
  children: e.name
137
- }), e.description ? /* @__PURE__ */ A("p", {
140
+ }), e.description ? /* @__PURE__ */ M("p", {
138
141
  className: "truncate text-xs text-text-secondary",
139
142
  children: e.description
140
- }) : /* @__PURE__ */ A("p", {
143
+ }) : /* @__PURE__ */ M("p", {
141
144
  className: "text-xs text-text-secondary",
142
145
  children: e.baseCurrency
143
146
  })]
144
- }), /* @__PURE__ */ A(M, {
145
- variant: _(e.status),
147
+ }), /* @__PURE__ */ M(P, {
148
+ variant: y(e.status),
146
149
  className: "shrink-0",
147
150
  children: e.status
148
151
  })]
149
152
  }, e.id))
150
- }) : /* @__PURE__ */ A(u, {
151
- icon: /* @__PURE__ */ A(D, {
153
+ }) : /* @__PURE__ */ M(f, {
154
+ icon: /* @__PURE__ */ M(k, {
152
155
  className: "size-6",
153
156
  "aria-hidden": "true"
154
157
  }),
155
158
  title: n("brainyrich.dashboard.noPortfolios", "No portfolios yet"),
156
159
  description: n("brainyrich.dashboard.noPortfoliosDesc", "Create a portfolio to organize your investment strategy.")
157
160
  }) })] }),
158
- /* @__PURE__ */ j(P, { children: [/* @__PURE__ */ j(L, { children: [/* @__PURE__ */ j(R, {
161
+ /* @__PURE__ */ N(I, { children: [/* @__PURE__ */ N(z, { children: [/* @__PURE__ */ N(B, {
159
162
  className: "flex items-center gap-2",
160
- children: [/* @__PURE__ */ A(b, {
163
+ children: [/* @__PURE__ */ M(S, {
161
164
  className: "h-5 w-5",
162
165
  "aria-hidden": "true"
163
166
  }), n("brainyrich.dashboard.sections.needsAttention", "Needs Attention")]
164
- }), /* @__PURE__ */ A(I, { children: n("brainyrich.dashboard.sections.needsAttentionDescription", "Open insights that may require action") })] }), /* @__PURE__ */ A(F, {
167
+ }), /* @__PURE__ */ M(R, { children: n("brainyrich.dashboard.sections.needsAttentionDescription", "Open insights that may require action") })] }), /* @__PURE__ */ M(L, {
165
168
  className: "space-y-3",
166
- children: S.isLoading ? /* @__PURE__ */ A(p, { rows: 3 }) : S.isError ? /* @__PURE__ */ A(d, { onRetry: () => S.refetch() }) : V.length > 0 ? V.map((e) => /* @__PURE__ */ A(ie, {
169
+ children: u.isLoading ? /* @__PURE__ */ M(h, { rows: 3 }) : u.isError ? /* @__PURE__ */ M(p, { onRetry: () => u.refetch() }) : V.length > 0 ? V.map((e) => /* @__PURE__ */ M(oe, {
167
170
  insight: e,
168
171
  translate: n
169
- }, e.id)) : /* @__PURE__ */ A(u, {
170
- icon: /* @__PURE__ */ A(C, {
172
+ }, e.id)) : /* @__PURE__ */ M(f, {
173
+ icon: /* @__PURE__ */ M(T, {
171
174
  className: "size-6",
172
175
  "aria-hidden": "true"
173
176
  }),
@@ -178,113 +181,128 @@ function re() {
178
181
  ]
179
182
  });
180
183
  }
181
- function ie({ insight: e, translate: n }) {
182
- let i = t(), a = r(), o = c(), s = i.isPending || a.isPending || o.isPending;
183
- return /* @__PURE__ */ j("div", {
184
+ function oe({ insight: e, translate: n }) {
185
+ let i = t(), a = r(), o = c(), [s, u] = x(!1), d = i.isPending || a.isPending || o.isPending;
186
+ return /* @__PURE__ */ N("div", {
184
187
  className: "flex items-start justify-between gap-3 rounded-lg border border-border-subtle p-3",
185
- children: [/* @__PURE__ */ j("div", {
186
- className: "min-w-0 space-y-1",
187
- children: [
188
- /* @__PURE__ */ j("div", {
189
- className: "flex items-center gap-2",
190
- children: [/* @__PURE__ */ A(M, {
191
- variant: _(e.severity),
192
- children: e.severity
193
- }), /* @__PURE__ */ A("span", {
188
+ children: [
189
+ /* @__PURE__ */ N("div", {
190
+ className: "min-w-0 space-y-1",
191
+ children: [
192
+ /* @__PURE__ */ N("div", {
193
+ className: "flex items-center gap-2",
194
+ children: [/* @__PURE__ */ M(P, {
195
+ variant: y(e.severity),
196
+ children: e.severity
197
+ }), /* @__PURE__ */ M("span", {
198
+ className: "text-xs text-text-secondary",
199
+ children: e.type.replace(/_/g, " ")
200
+ })]
201
+ }),
202
+ /* @__PURE__ */ M("p", {
203
+ className: "text-sm font-medium text-text-primary",
204
+ children: e.title
205
+ }),
206
+ e.detail ? /* @__PURE__ */ M("p", {
194
207
  className: "text-xs text-text-secondary",
195
- children: e.type.replace(/_/g, " ")
196
- })]
197
- }),
198
- /* @__PURE__ */ A("p", {
199
- className: "text-sm font-medium text-text-primary",
200
- children: e.title
201
- }),
202
- e.detail ? /* @__PURE__ */ A("p", {
203
- className: "text-xs text-text-secondary",
204
- children: e.detail
205
- }) : null
206
- ]
207
- }), /* @__PURE__ */ j(G, { children: [/* @__PURE__ */ A(J, {
208
- asChild: !0,
209
- children: /* @__PURE__ */ A(N, {
210
- variant: "ghost",
211
- size: "icon",
212
- className: "shrink-0",
213
- disabled: s,
214
- "aria-label": n("brainyrich.dashboard.insightActions", "Insight actions"),
215
- children: /* @__PURE__ */ A(w, {
216
- className: "size-4",
217
- "aria-hidden": "true"
218
- })
219
- })
220
- }), /* @__PURE__ */ j(K, {
221
- align: "end",
222
- children: [
223
- /* @__PURE__ */ j(q, {
224
- onSelect: () => i.mutate(e.id),
225
- children: [/* @__PURE__ */ A(S, {
226
- className: "size-4",
227
- "aria-hidden": "true"
228
- }), n("brainyrich.dashboard.insight.acknowledge", "Acknowledge")]
229
- }),
230
- /* @__PURE__ */ j(q, {
231
- onSelect: () => o.mutate(e.id),
232
- children: [/* @__PURE__ */ A(C, {
233
- className: "size-4",
234
- "aria-hidden": "true"
235
- }), n("brainyrich.dashboard.insight.resolve", "Resolve")]
236
- }),
237
- /* @__PURE__ */ j(q, {
238
- onSelect: () => a.mutate(e.id),
239
- children: [/* @__PURE__ */ A(O, {
208
+ children: e.detail
209
+ }) : null
210
+ ]
211
+ }),
212
+ /* @__PURE__ */ N(q, { children: [/* @__PURE__ */ M(X, {
213
+ asChild: !0,
214
+ children: /* @__PURE__ */ M(F, {
215
+ variant: "ghost",
216
+ size: "icon",
217
+ className: "shrink-0",
218
+ disabled: d,
219
+ "aria-label": n("brainyrich.dashboard.insightActions", "Insight actions"),
220
+ children: /* @__PURE__ */ M(E, {
240
221
  className: "size-4",
241
222
  "aria-hidden": "true"
242
- }), n("brainyrich.dashboard.insight.dismiss", "Dismiss")]
223
+ })
243
224
  })
244
- ]
245
- })] })]
225
+ }), /* @__PURE__ */ N(J, {
226
+ align: "end",
227
+ children: [
228
+ /* @__PURE__ */ N(Y, {
229
+ onSelect: () => i.mutate(e.id),
230
+ children: [/* @__PURE__ */ M(w, {
231
+ className: "size-4",
232
+ "aria-hidden": "true"
233
+ }), n("brainyrich.dashboard.insight.acknowledge", "Acknowledge")]
234
+ }),
235
+ /* @__PURE__ */ N(Y, {
236
+ onSelect: () => o.mutate(e.id),
237
+ children: [/* @__PURE__ */ M(T, {
238
+ className: "size-4",
239
+ "aria-hidden": "true"
240
+ }), n("brainyrich.dashboard.insight.resolve", "Resolve")]
241
+ }),
242
+ /* @__PURE__ */ N(Y, {
243
+ onSelect: () => u(!0),
244
+ children: [/* @__PURE__ */ M(A, {
245
+ className: "size-4",
246
+ "aria-hidden": "true"
247
+ }), n("brainyrich.dashboard.insight.dismiss", "Dismiss")]
248
+ })
249
+ ]
250
+ })] }),
251
+ /* @__PURE__ */ M(l, {
252
+ open: s,
253
+ onOpenChange: u,
254
+ title: n("brainyrich.dashboard.insight.dismissTitle", "Dismiss this insight?"),
255
+ description: n("brainyrich.dashboard.insight.dismissDescription", "It will be removed from Needs Attention. You can still find it in the full insights list."),
256
+ confirmLabel: n("brainyrich.dashboard.insight.dismiss", "Dismiss"),
257
+ pendingLabel: n("brainyrich.dashboard.insight.dismissing", "Dismissing…"),
258
+ destructive: !0,
259
+ pending: a.isPending,
260
+ onConfirm: () => a.mutate(e.id, { onSuccess: () => u(!1) })
261
+ })
262
+ ]
246
263
  });
247
264
  }
248
- function ae({ translate: e }) {
249
- let [t, r] = y(!1), [i, a] = y(""), [o, s] = y("BROKERAGE"), [c, l] = y(""), [u, d] = y(""), [f, p] = y("USD"), m = n(), h = i.trim(), g = h.length > 0 && !m.isPending, _ = () => {
250
- a(""), s("BROKERAGE"), l(""), d(""), p("USD"), m.reset();
265
+ function se({ translate: e }) {
266
+ let [t, r] = x(!1), [i, a] = x(""), [o, s] = x("BROKERAGE"), [c, l] = x(""), [d, f] = x(""), [p, m] = x("USD"), [h, g] = x(null), _ = n(), v = i.trim(), y = v.length > 0 && !_.isPending, b = () => {
267
+ a(""), s("BROKERAGE"), l(""), f(""), m("USD"), g(null), _.reset();
251
268
  };
252
- return /* @__PURE__ */ j(z, {
269
+ return /* @__PURE__ */ N(V, {
253
270
  open: t,
254
271
  onOpenChange: (e) => {
255
- r(e), e || _();
272
+ r(e), e || b();
256
273
  },
257
- children: [/* @__PURE__ */ j(N, {
274
+ children: [/* @__PURE__ */ N(F, {
258
275
  size: "sm",
259
276
  onClick: () => r(!0),
260
- children: [/* @__PURE__ */ A(T, {
277
+ children: [/* @__PURE__ */ M(D, {
261
278
  className: "size-4",
262
279
  "aria-hidden": "true"
263
280
  }), e("brainyrich.dashboard.actions.newAccount", "New Account")]
264
- }), /* @__PURE__ */ A(B, { children: /* @__PURE__ */ j("form", {
281
+ }), /* @__PURE__ */ M(H, { children: /* @__PURE__ */ N("form", {
265
282
  onSubmit: (e) => {
266
- if (e.preventDefault(), !g) return;
267
- let t = Number.parseFloat(u), n = {
268
- name: h,
283
+ if (e.preventDefault(), !y) return;
284
+ let t = Number.parseFloat(d), n = {
285
+ name: v,
269
286
  type: o,
270
- currency: f.trim() || "USD",
287
+ currency: p.trim() || "USD",
271
288
  isManual: !0,
272
289
  ...c.trim() ? { institution: c.trim() } : {},
273
- ...Number.isFinite(t) ? { cashBalance: t } : {}
290
+ ...Number.isFinite(t) ? { cashBalance: t } : {},
291
+ ...h ? { householdId: h } : {}
274
292
  };
275
- m.mutate(n, { onSuccess: () => {
276
- _(), r(!1);
293
+ _.mutate(n, { onSuccess: () => {
294
+ b(), r(!1);
277
295
  } });
278
296
  },
279
297
  className: "space-y-4",
280
298
  children: [
281
- /* @__PURE__ */ j(U, { children: [/* @__PURE__ */ A(W, { children: e("brainyrich.dashboard.newAccount.title", "New Account") }), /* @__PURE__ */ A(V, { children: e("brainyrich.dashboard.newAccount.description", "Add a manual account to track alongside your linked institutions.") })] }),
282
- /* @__PURE__ */ j("div", {
299
+ /* @__PURE__ */ N(G, { children: [/* @__PURE__ */ M(K, { children: e("brainyrich.dashboard.newAccount.title", "New Account") }), /* @__PURE__ */ M(U, { children: e("brainyrich.dashboard.newAccount.description", "Add a manual account to track alongside your linked institutions.") })] }),
300
+ /* @__PURE__ */ N("div", {
283
301
  className: "space-y-2",
284
- children: [/* @__PURE__ */ A(X, {
302
+ children: [/* @__PURE__ */ M(Q, {
285
303
  htmlFor: "bra-account-name",
286
304
  children: e("brainyrich.dashboard.newAccount.name", "Account name")
287
- }), /* @__PURE__ */ A(Y, {
305
+ }), /* @__PURE__ */ M(Z, {
288
306
  id: "bra-account-name",
289
307
  value: i,
290
308
  onChange: (e) => a(e.target.value),
@@ -293,84 +311,92 @@ function ae({ translate: e }) {
293
311
  autoFocus: !0
294
312
  })]
295
313
  }),
296
- /* @__PURE__ */ j("div", {
314
+ /* @__PURE__ */ N("div", {
297
315
  className: "grid gap-4 sm:grid-cols-2",
298
- children: [/* @__PURE__ */ j("div", {
316
+ children: [/* @__PURE__ */ N("div", {
299
317
  className: "space-y-2",
300
- children: [/* @__PURE__ */ A(X, {
318
+ children: [/* @__PURE__ */ M(Q, {
301
319
  htmlFor: "bra-account-type",
302
320
  children: e("brainyrich.dashboard.newAccount.type", "Type")
303
- }), /* @__PURE__ */ j(Z, {
321
+ }), /* @__PURE__ */ N($, {
304
322
  value: o,
305
323
  onValueChange: (e) => s(e),
306
- children: [/* @__PURE__ */ A(ee, {
324
+ children: [/* @__PURE__ */ M(ne, {
307
325
  id: "bra-account-type",
308
- children: /* @__PURE__ */ A(te, {})
309
- }), /* @__PURE__ */ A(Q, { children: ne.map((e) => /* @__PURE__ */ A($, {
326
+ children: /* @__PURE__ */ M(re, {})
327
+ }), /* @__PURE__ */ M(ee, { children: ie.map((e) => /* @__PURE__ */ M(te, {
310
328
  value: e,
311
329
  children: e.replace(/_/g, " ")
312
330
  }, e)) })]
313
331
  })]
314
- }), /* @__PURE__ */ j("div", {
332
+ }), /* @__PURE__ */ N("div", {
315
333
  className: "space-y-2",
316
- children: [/* @__PURE__ */ A(X, {
334
+ children: [/* @__PURE__ */ M(Q, {
317
335
  htmlFor: "bra-account-currency",
318
336
  children: e("brainyrich.dashboard.newAccount.currency", "Currency")
319
- }), /* @__PURE__ */ A(Y, {
337
+ }), /* @__PURE__ */ M(Z, {
320
338
  id: "bra-account-currency",
321
- value: f,
322
- onChange: (e) => p(e.target.value.toUpperCase()),
339
+ value: p,
340
+ onChange: (e) => m(e.target.value.toUpperCase()),
323
341
  maxLength: 3
324
342
  })]
325
343
  })]
326
344
  }),
327
- /* @__PURE__ */ j("div", {
345
+ /* @__PURE__ */ N("div", {
328
346
  className: "space-y-2",
329
- children: [/* @__PURE__ */ A(X, {
347
+ children: [/* @__PURE__ */ M(Q, {
330
348
  htmlFor: "bra-account-institution",
331
349
  children: e("brainyrich.dashboard.newAccount.institution", "Institution (optional)")
332
- }), /* @__PURE__ */ A(Y, {
350
+ }), /* @__PURE__ */ M(Z, {
333
351
  id: "bra-account-institution",
334
352
  value: c,
335
353
  onChange: (e) => l(e.target.value),
336
354
  placeholder: e("brainyrich.dashboard.newAccount.institutionPlaceholder", "e.g. Fidelity")
337
355
  })]
338
356
  }),
339
- /* @__PURE__ */ j("div", {
357
+ /* @__PURE__ */ M(u, {
358
+ id: "bra-account-household",
359
+ value: h,
360
+ onChange: g,
361
+ label: e("brainyrich.dashboard.newAccount.household", "Household (optional)"),
362
+ noneLabel: e("brainyrich.dashboard.newAccount.noHousehold", "No household"),
363
+ disabled: _.isPending
364
+ }),
365
+ /* @__PURE__ */ N("div", {
340
366
  className: "space-y-2",
341
- children: [/* @__PURE__ */ A(X, {
367
+ children: [/* @__PURE__ */ M(Q, {
342
368
  htmlFor: "bra-account-cash",
343
369
  children: e("brainyrich.dashboard.newAccount.cash", "Cash balance (optional)")
344
- }), /* @__PURE__ */ A(Y, {
370
+ }), /* @__PURE__ */ M(Z, {
345
371
  id: "bra-account-cash",
346
372
  type: "number",
347
373
  inputMode: "decimal",
348
374
  step: "0.01",
349
- value: u,
350
- onChange: (e) => d(e.target.value),
375
+ value: d,
376
+ onChange: (e) => f(e.target.value),
351
377
  placeholder: "0.00"
352
378
  })]
353
379
  }),
354
- m.isError ? /* @__PURE__ */ A("p", {
380
+ _.isError ? /* @__PURE__ */ M("p", {
355
381
  className: "text-sm text-status-error-text",
356
- children: m.error instanceof Error ? m.error.message : e("brainyrich.dashboard.newAccount.error", "Could not create account.")
382
+ children: _.error instanceof Error ? _.error.message : e("brainyrich.dashboard.newAccount.error", "Could not create account.")
357
383
  }) : null,
358
- /* @__PURE__ */ j(H, { children: [/* @__PURE__ */ A(N, {
384
+ /* @__PURE__ */ N(W, { children: [/* @__PURE__ */ M(F, {
359
385
  type: "button",
360
386
  variant: "outline",
361
387
  onClick: () => r(!1),
362
- disabled: m.isPending,
388
+ disabled: _.isPending,
363
389
  children: e("brainyrich.common.cancel", "Cancel")
364
- }), /* @__PURE__ */ A(N, {
390
+ }), /* @__PURE__ */ M(F, {
365
391
  type: "submit",
366
- disabled: !g,
367
- children: m.isPending ? e("brainyrich.dashboard.newAccount.creating", "Creating…") : e("brainyrich.dashboard.newAccount.create", "Create account")
392
+ disabled: !y,
393
+ children: _.isPending ? e("brainyrich.dashboard.newAccount.creating", "Creating…") : e("brainyrich.dashboard.newAccount.create", "Create account")
368
394
  })] })
369
395
  ]
370
396
  }) })]
371
397
  });
372
398
  }
373
399
  //#endregion
374
- export { re as DashboardPage };
400
+ export { ae as DashboardPage };
375
401
 
376
402
  //# sourceMappingURL=DashboardPage.js.map