@burdenoff/microfe-brainyrich 2026.827.1 → 2026.828.2
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/brainyrich/BrainyRichRoot.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoot.js +59 -59
- package/dist/brainyrich/BrainyRichRoot.js.map +1 -1
- package/dist/brainyrich/components/viz.d.ts.map +1 -1
- package/dist/brainyrich/components/viz.js +1 -1
- package/dist/brainyrich/components/viz.js.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +3 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +6 -2
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/pages/AccountsPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/AccountsPage.js +159 -148
- package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
- package/dist/brainyrich/pages/AiAssistantPage.js +192 -192
- package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
- package/dist/brainyrich/pages/AnalyticsPage.js +9 -9
- package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
- package/dist/brainyrich/pages/DashboardPage.js +115 -115
- package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
- package/dist/brainyrich/pages/FamilyPage.js +59 -59
- package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
- package/dist/brainyrich/pages/GoalsPage.js +285 -285
- package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
- package/dist/brainyrich/pages/InvestmentsPage.js +18 -18
- package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.js +322 -322
- package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js +17 -17
- package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js +16 -16
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/pages/TaxPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/TaxPage.js +14 -14
- package/dist/brainyrich/pages/TaxPage.js.map +1 -1
- package/dist/brainyrich/types/bra.d.ts.map +1 -1
- package/dist/generated/global-operations.d.ts +31 -1
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +31 -1
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/package.json +11 -2
|
@@ -8,10 +8,10 @@ import { EmptyState as h, ErrorState as g, LoadingState as _, SectionShell as v,
|
|
|
8
8
|
import { hapticSuccess as C, showToast as w } from "../utils/nativeControls.js";
|
|
9
9
|
import { useTrackBrainyRichPageView as ee } from "../hooks/useBrainyRichAnalytics.js";
|
|
10
10
|
import { useMemo as T, useState as E } from "react";
|
|
11
|
-
import { Bell as te, Briefcase as D, Check as O, CircleCheck as k, Coins as A, Info as j, Landmark as ne, MoreHorizontal as M, PlusCircle as N, ShieldAlert as re, Target as P, TrendingUp as
|
|
12
|
-
import { useI18n as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { Badge as
|
|
11
|
+
import { Bell as te, Briefcase as D, Check as O, CircleCheck as k, Coins as A, Info as j, Landmark as ne, MoreHorizontal as M, PlusCircle as N, ShieldAlert as re, Target as P, TrendingUp as F, TriangleAlert as I, Wallet as L, X as ie } from "lucide-react";
|
|
12
|
+
import { useI18n as R } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
|
+
import { jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
14
|
+
import { Badge as V, Button as H, Card as U, CardContent as W, CardDescription as G, CardHeader as K, CardTitle as q, DropdownMenu as J, DropdownMenuContent as ae, DropdownMenuItem as Y, DropdownMenuTrigger as oe, Input as X, Label as Z, ResponsiveDialog as se, ResponsiveDialogContent as ce, ResponsiveDialogDescription as le, ResponsiveDialogFooter as ue, ResponsiveDialogHeader as de, ResponsiveDialogTitle as fe, Select as pe, SelectContent as me, SelectItem as he, SelectTrigger as ge, SelectValue as _e } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/brainyrich/pages/DashboardPage.tsx
|
|
16
16
|
var ve = [
|
|
17
17
|
"BANK",
|
|
@@ -36,13 +36,13 @@ function Q(e) {
|
|
|
36
36
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
37
37
|
}
|
|
38
38
|
function be() {
|
|
39
|
-
let { t } =
|
|
39
|
+
let { t } = R(), n = (n, r, i) => e(t, n, r, i);
|
|
40
40
|
ee("brainyrich.dashboard.viewed");
|
|
41
41
|
let r = o(), c = s(), l = i(), m = a({ status: "OPEN" }), C = r.data, w = C?.currency ?? "USD", E = C ? [
|
|
42
42
|
{
|
|
43
43
|
label: n("brainyrich.dashboard.metrics.netWorth", "Net Worth"),
|
|
44
44
|
value: y(C.totalNetWorth, w),
|
|
45
|
-
icon: /* @__PURE__ */
|
|
45
|
+
icon: /* @__PURE__ */ z(L, {
|
|
46
46
|
className: "size-4",
|
|
47
47
|
"aria-hidden": "true"
|
|
48
48
|
}),
|
|
@@ -51,7 +51,7 @@ function be() {
|
|
|
51
51
|
{
|
|
52
52
|
label: n("brainyrich.dashboard.metrics.investedAssets", "Invested Assets"),
|
|
53
53
|
value: y(C.totalMarketValue, w),
|
|
54
|
-
icon: /* @__PURE__ */
|
|
54
|
+
icon: /* @__PURE__ */ z(F, {
|
|
55
55
|
className: "size-4",
|
|
56
56
|
"aria-hidden": "true"
|
|
57
57
|
})
|
|
@@ -59,7 +59,7 @@ function be() {
|
|
|
59
59
|
{
|
|
60
60
|
label: n("brainyrich.dashboard.metrics.liquidity", "Cash & Liquidity"),
|
|
61
61
|
value: y(C.totalCash, w),
|
|
62
|
-
icon: /* @__PURE__ */
|
|
62
|
+
icon: /* @__PURE__ */ z(A, {
|
|
63
63
|
className: "size-4",
|
|
64
64
|
"aria-hidden": "true"
|
|
65
65
|
})
|
|
@@ -67,7 +67,7 @@ function be() {
|
|
|
67
67
|
{
|
|
68
68
|
label: n("brainyrich.dashboard.metrics.accounts", "Linked Accounts"),
|
|
69
69
|
value: String(C.accountCount),
|
|
70
|
-
icon: /* @__PURE__ */
|
|
70
|
+
icon: /* @__PURE__ */ z(ne, {
|
|
71
71
|
className: "size-4",
|
|
72
72
|
"aria-hidden": "true"
|
|
73
73
|
})
|
|
@@ -77,22 +77,22 @@ function be() {
|
|
|
77
77
|
value: e.marketValue,
|
|
78
78
|
tone: ye[e.assetClass]
|
|
79
79
|
})) : [], [C]), j = c.data.slice(0, 5), M = l.data.slice(0, 5), N = m.data.slice(0, 6);
|
|
80
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ z("div", {
|
|
81
81
|
"data-tour": "brainyrich-page-dashboard",
|
|
82
82
|
className: "contents",
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ B(v, {
|
|
84
84
|
title: n("brainyrich.dashboard.title", "Wealth Dashboard"),
|
|
85
85
|
description: n("brainyrich.dashboard.description", "Your consolidated financial overview at a glance"),
|
|
86
|
-
actions: /* @__PURE__ */
|
|
86
|
+
actions: /* @__PURE__ */ z(Ce, { translate: n }),
|
|
87
87
|
children: [
|
|
88
|
-
r.isLoading ? /* @__PURE__ */
|
|
88
|
+
r.isLoading ? /* @__PURE__ */ z(_, { rows: 1 }) : r.isError ? /* @__PURE__ */ z(g, {
|
|
89
89
|
title: n("brainyrich.dashboard.netWorthError", "Could not load net worth"),
|
|
90
90
|
onRetry: () => r.refetch()
|
|
91
|
-
}) : C ? /* @__PURE__ */
|
|
91
|
+
}) : C ? /* @__PURE__ */ z("div", {
|
|
92
92
|
className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
93
|
-
children: E.map((e, t) => /* @__PURE__ */
|
|
93
|
+
children: E.map((e, t) => /* @__PURE__ */ z(d, {
|
|
94
94
|
index: t,
|
|
95
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ z(p, {
|
|
96
96
|
label: e.label,
|
|
97
97
|
value: e.value,
|
|
98
98
|
icon: e.icon,
|
|
@@ -100,41 +100,41 @@ function be() {
|
|
|
100
100
|
className: "h-full"
|
|
101
101
|
})
|
|
102
102
|
}, e.label))
|
|
103
|
-
}) : /* @__PURE__ */
|
|
104
|
-
icon: /* @__PURE__ */
|
|
103
|
+
}) : /* @__PURE__ */ z(h, {
|
|
104
|
+
icon: /* @__PURE__ */ z(L, {
|
|
105
105
|
className: "size-6",
|
|
106
106
|
"aria-hidden": "true"
|
|
107
107
|
}),
|
|
108
108
|
title: n("brainyrich.dashboard.noSummary", "No financial data yet"),
|
|
109
109
|
description: n("brainyrich.dashboard.noSummaryDesc", "Link your first account to see your net worth here.")
|
|
110
110
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ B("div", {
|
|
112
112
|
className: "grid gap-6 lg:grid-cols-3",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ z(d, {
|
|
114
114
|
index: 0,
|
|
115
115
|
className: "lg:col-span-2",
|
|
116
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ B(f, {
|
|
117
117
|
className: "h-full",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ B("div", {
|
|
119
119
|
className: "mb-4 space-y-1",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ B("h2", {
|
|
121
121
|
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ z(D, {
|
|
123
123
|
className: "size-5",
|
|
124
124
|
"aria-hidden": "true"
|
|
125
125
|
}), n("brainyrich.dashboard.sections.assetAllocation", "Net worth by asset class")]
|
|
126
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ z("p", {
|
|
127
127
|
className: "text-sm text-text-secondary",
|
|
128
128
|
children: n("brainyrich.dashboard.sections.assetAllocationDescription", "Market value distributed across asset classes")
|
|
129
129
|
})]
|
|
130
|
-
}), r.isLoading ? /* @__PURE__ */
|
|
130
|
+
}), r.isLoading ? /* @__PURE__ */ z(_, { rows: 3 }) : r.isError ? /* @__PURE__ */ z(g, { onRetry: () => r.refetch() }) : O.length > 0 ? /* @__PURE__ */ z(u, {
|
|
131
131
|
data: O,
|
|
132
132
|
height: 260,
|
|
133
133
|
centerValue: y(C?.totalMarketValue ?? 0, w),
|
|
134
134
|
centerLabel: n("brainyrich.dashboard.metrics.investedAssets", "Invested"),
|
|
135
135
|
valueFormatter: (e) => x(e, w)
|
|
136
|
-
}) : /* @__PURE__ */
|
|
137
|
-
icon: /* @__PURE__ */
|
|
136
|
+
}) : /* @__PURE__ */ z(h, {
|
|
137
|
+
icon: /* @__PURE__ */ z(D, {
|
|
138
138
|
className: "size-6",
|
|
139
139
|
"aria-hidden": "true"
|
|
140
140
|
}),
|
|
@@ -142,28 +142,28 @@ function be() {
|
|
|
142
142
|
description: n("brainyrich.dashboard.noAllocationDesc", "Add holdings to your accounts to see how your wealth is allocated.")
|
|
143
143
|
})]
|
|
144
144
|
})
|
|
145
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ B("div", {
|
|
146
146
|
className: "space-y-6",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ z(d, {
|
|
148
148
|
index: 1,
|
|
149
|
-
children: /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ B(U, {
|
|
150
150
|
className: "motion-safe:transition-shadow motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))]",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ z(K, {
|
|
152
152
|
className: "pb-3",
|
|
153
|
-
children: /* @__PURE__ */
|
|
153
|
+
children: /* @__PURE__ */ B(q, {
|
|
154
154
|
className: "flex items-center gap-2 text-base",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ z(te, {
|
|
156
156
|
className: "size-4",
|
|
157
157
|
"aria-hidden": "true"
|
|
158
158
|
}), n("brainyrich.dashboard.sections.needsAttention", "Needs attention")]
|
|
159
159
|
})
|
|
160
|
-
}), /* @__PURE__ */
|
|
160
|
+
}), /* @__PURE__ */ z(W, {
|
|
161
161
|
className: "space-y-2.5",
|
|
162
|
-
children: m.isLoading ? /* @__PURE__ */
|
|
162
|
+
children: m.isLoading ? /* @__PURE__ */ z(_, { rows: 2 }) : m.isError ? /* @__PURE__ */ z(g, { onRetry: () => m.refetch() }) : N.length > 0 ? N.map((e) => /* @__PURE__ */ z(Se, {
|
|
163
163
|
insight: e,
|
|
164
164
|
translate: n
|
|
165
|
-
}, e.id)) : /* @__PURE__ */
|
|
166
|
-
icon: /* @__PURE__ */
|
|
165
|
+
}, e.id)) : /* @__PURE__ */ z(h, {
|
|
166
|
+
icon: /* @__PURE__ */ z(k, {
|
|
167
167
|
className: "size-6",
|
|
168
168
|
"aria-hidden": "true"
|
|
169
169
|
}),
|
|
@@ -172,29 +172,29 @@ function be() {
|
|
|
172
172
|
})
|
|
173
173
|
})]
|
|
174
174
|
})
|
|
175
|
-
}), /* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ z(d, {
|
|
176
176
|
index: 2,
|
|
177
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ B(U, {
|
|
178
178
|
className: "motion-safe:transition-shadow motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))]",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ z(K, {
|
|
180
180
|
className: "pb-3",
|
|
181
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ B(q, {
|
|
182
182
|
className: "flex items-center gap-2 text-base",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ z(P, {
|
|
184
184
|
className: "size-4",
|
|
185
185
|
"aria-hidden": "true"
|
|
186
186
|
}), n("brainyrich.dashboard.sections.goals", "Goals on track")]
|
|
187
187
|
})
|
|
188
|
-
}), /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ z(W, {
|
|
189
189
|
className: "space-y-2.5",
|
|
190
|
-
children: l.isLoading ? /* @__PURE__ */
|
|
190
|
+
children: l.isLoading ? /* @__PURE__ */ z(_, { rows: 3 }) : l.isError ? /* @__PURE__ */ z(g, { onRetry: () => l.refetch() }) : M.length > 0 ? M.map((e) => /* @__PURE__ */ B("div", {
|
|
191
191
|
className: "flex items-start justify-between gap-2 rounded-lg border border-border-subtle p-3 motion-safe:transition-colors hover:border-[var(--color-action-primary-border)]/50 hover:bg-bg-elevated",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ B("div", {
|
|
193
193
|
className: "min-w-0 space-y-0.5",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ z("p", {
|
|
195
195
|
className: "truncate text-sm font-medium text-text-primary",
|
|
196
196
|
children: e.name
|
|
197
|
-
}), /* @__PURE__ */
|
|
197
|
+
}), /* @__PURE__ */ B("p", {
|
|
198
198
|
className: "text-xs text-text-secondary",
|
|
199
199
|
children: [
|
|
200
200
|
x(e.targetAmount, e.currency),
|
|
@@ -202,13 +202,13 @@ function be() {
|
|
|
202
202
|
b(e.targetDate)
|
|
203
203
|
]
|
|
204
204
|
})]
|
|
205
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ z(V, {
|
|
206
206
|
variant: S(e.projection),
|
|
207
207
|
className: "shrink-0",
|
|
208
208
|
children: Q(e.projection)
|
|
209
209
|
})]
|
|
210
|
-
}, e.id)) : /* @__PURE__ */
|
|
211
|
-
icon: /* @__PURE__ */
|
|
210
|
+
}, e.id)) : /* @__PURE__ */ z(h, {
|
|
211
|
+
icon: /* @__PURE__ */ z(P, {
|
|
212
212
|
className: "size-6",
|
|
213
213
|
"aria-hidden": "true"
|
|
214
214
|
}),
|
|
@@ -220,38 +220,38 @@ function be() {
|
|
|
220
220
|
})]
|
|
221
221
|
})]
|
|
222
222
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ z(d, {
|
|
224
224
|
index: 3,
|
|
225
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ B(U, { children: [/* @__PURE__ */ B(K, { children: [/* @__PURE__ */ B(q, {
|
|
226
226
|
className: "flex items-center gap-2",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ z(L, {
|
|
228
228
|
className: "size-5",
|
|
229
229
|
"aria-hidden": "true"
|
|
230
230
|
}), n("brainyrich.dashboard.sections.portfolios", "Portfolios")]
|
|
231
|
-
}), /* @__PURE__ */
|
|
231
|
+
}), /* @__PURE__ */ z(G, { children: n("brainyrich.dashboard.sections.portfoliosDescription", "Your active investment strategies") })] }), /* @__PURE__ */ z(W, { children: c.isLoading ? /* @__PURE__ */ z(_, { rows: 3 }) : c.isError ? /* @__PURE__ */ z(g, { onRetry: () => c.refetch() }) : j.length > 0 ? /* @__PURE__ */ z("div", {
|
|
232
232
|
className: "grid gap-3 sm:grid-cols-2",
|
|
233
|
-
children: j.map((e) => /* @__PURE__ */
|
|
233
|
+
children: j.map((e) => /* @__PURE__ */ B("div", {
|
|
234
234
|
className: "flex items-start justify-between gap-2 rounded-lg border border-border-subtle p-3 motion-safe:transition-colors hover:border-[var(--color-action-primary-border)]/50 hover:bg-bg-elevated",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ B("div", {
|
|
236
236
|
className: "min-w-0 space-y-0.5",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ z("p", {
|
|
238
238
|
className: "truncate text-sm font-medium text-text-primary",
|
|
239
239
|
children: e.name
|
|
240
|
-
}), e.description ? /* @__PURE__ */
|
|
240
|
+
}), e.description ? /* @__PURE__ */ z("p", {
|
|
241
241
|
className: "truncate text-xs text-text-secondary",
|
|
242
242
|
children: e.description
|
|
243
|
-
}) : /* @__PURE__ */
|
|
243
|
+
}) : /* @__PURE__ */ z("p", {
|
|
244
244
|
className: "text-xs text-text-secondary",
|
|
245
245
|
children: e.baseCurrency
|
|
246
246
|
})]
|
|
247
|
-
}), /* @__PURE__ */
|
|
247
|
+
}), /* @__PURE__ */ z(V, {
|
|
248
248
|
variant: S(e.status),
|
|
249
249
|
className: "shrink-0",
|
|
250
250
|
children: e.status
|
|
251
251
|
})]
|
|
252
252
|
}, e.id))
|
|
253
|
-
}) : /* @__PURE__ */
|
|
254
|
-
icon: /* @__PURE__ */
|
|
253
|
+
}) : /* @__PURE__ */ z(h, {
|
|
254
|
+
icon: /* @__PURE__ */ z(L, {
|
|
255
255
|
className: "size-6",
|
|
256
256
|
"aria-hidden": "true"
|
|
257
257
|
}),
|
|
@@ -267,7 +267,7 @@ var $ = {
|
|
|
267
267
|
CRITICAL: {
|
|
268
268
|
chip: "text-status-error-text bg-status-error-bg",
|
|
269
269
|
rail: "bg-status-error",
|
|
270
|
-
icon: /* @__PURE__ */
|
|
270
|
+
icon: /* @__PURE__ */ z(re, {
|
|
271
271
|
className: "size-3",
|
|
272
272
|
"aria-hidden": "true"
|
|
273
273
|
})
|
|
@@ -275,7 +275,7 @@ var $ = {
|
|
|
275
275
|
HIGH: {
|
|
276
276
|
chip: "text-status-error-text bg-status-error-bg",
|
|
277
277
|
rail: "bg-status-error",
|
|
278
|
-
icon: /* @__PURE__ */
|
|
278
|
+
icon: /* @__PURE__ */ z(I, {
|
|
279
279
|
className: "size-3",
|
|
280
280
|
"aria-hidden": "true"
|
|
281
281
|
})
|
|
@@ -283,7 +283,7 @@ var $ = {
|
|
|
283
283
|
MEDIUM: {
|
|
284
284
|
chip: "text-status-warning-text bg-status-warning-bg",
|
|
285
285
|
rail: "bg-status-warning",
|
|
286
|
-
icon: /* @__PURE__ */
|
|
286
|
+
icon: /* @__PURE__ */ z(I, {
|
|
287
287
|
className: "size-3",
|
|
288
288
|
"aria-hidden": "true"
|
|
289
289
|
})
|
|
@@ -291,7 +291,7 @@ var $ = {
|
|
|
291
291
|
LOW: {
|
|
292
292
|
chip: "text-status-info-text bg-status-info-bg",
|
|
293
293
|
rail: "bg-status-info",
|
|
294
|
-
icon: /* @__PURE__ */
|
|
294
|
+
icon: /* @__PURE__ */ z(j, {
|
|
295
295
|
className: "size-3",
|
|
296
296
|
"aria-hidden": "true"
|
|
297
297
|
})
|
|
@@ -299,7 +299,7 @@ var $ = {
|
|
|
299
299
|
INFO: {
|
|
300
300
|
chip: "text-status-info-text bg-status-info-bg",
|
|
301
301
|
rail: "bg-status-info",
|
|
302
|
-
icon: /* @__PURE__ */
|
|
302
|
+
icon: /* @__PURE__ */ z(j, {
|
|
303
303
|
className: "size-3",
|
|
304
304
|
"aria-hidden": "true"
|
|
305
305
|
})
|
|
@@ -307,80 +307,80 @@ var $ = {
|
|
|
307
307
|
};
|
|
308
308
|
function xe({ severity: e }) {
|
|
309
309
|
let t = $[e] ?? $.INFO;
|
|
310
|
-
return /* @__PURE__ */
|
|
310
|
+
return /* @__PURE__ */ B("span", {
|
|
311
311
|
className: `inline-flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${t.chip}`,
|
|
312
312
|
children: [t.icon, e]
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
function Se({ insight: e, translate: n }) {
|
|
316
316
|
let i = t(), a = r(), o = c(), [s, u] = E(!1), d = i.isPending || a.isPending || o.isPending, f = ($[e.severity] ?? $.INFO).rail;
|
|
317
|
-
return /* @__PURE__ */
|
|
317
|
+
return /* @__PURE__ */ B("div", {
|
|
318
318
|
className: "relative flex items-start justify-between gap-3 overflow-hidden rounded-lg border border-border-subtle p-3 pl-4 motion-safe:transition-colors hover:border-[var(--color-action-primary-border)]/50 hover:bg-bg-elevated",
|
|
319
319
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ z("span", {
|
|
321
321
|
"aria-hidden": "true",
|
|
322
322
|
className: `absolute inset-y-0 left-0 w-1 ${f}`
|
|
323
323
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ B("div", {
|
|
325
325
|
className: "min-w-0 space-y-1",
|
|
326
326
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ B("div", {
|
|
328
328
|
className: "flex items-center gap-2",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ z(xe, { severity: e.severity }), /* @__PURE__ */ z("span", {
|
|
330
330
|
className: "truncate text-xs text-text-secondary",
|
|
331
331
|
children: Q(e.type)
|
|
332
332
|
})]
|
|
333
333
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ z("p", {
|
|
335
335
|
className: "text-sm font-medium text-text-primary",
|
|
336
336
|
children: e.title
|
|
337
337
|
}),
|
|
338
|
-
e.detail ? /* @__PURE__ */
|
|
338
|
+
e.detail ? /* @__PURE__ */ z("p", {
|
|
339
339
|
className: "text-xs text-text-secondary",
|
|
340
340
|
children: e.detail
|
|
341
341
|
}) : null
|
|
342
342
|
]
|
|
343
343
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ B(J, { children: [/* @__PURE__ */ z(oe, {
|
|
345
345
|
asChild: !0,
|
|
346
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ z(H, {
|
|
347
347
|
variant: "ghost",
|
|
348
348
|
size: "icon",
|
|
349
349
|
className: "shrink-0",
|
|
350
350
|
disabled: d,
|
|
351
351
|
"aria-label": n("brainyrich.dashboard.insightActions", "Insight actions"),
|
|
352
|
-
children: /* @__PURE__ */
|
|
352
|
+
children: /* @__PURE__ */ z(M, {
|
|
353
353
|
className: "size-4",
|
|
354
354
|
"aria-hidden": "true"
|
|
355
355
|
})
|
|
356
356
|
})
|
|
357
|
-
}), /* @__PURE__ */
|
|
357
|
+
}), /* @__PURE__ */ B(ae, {
|
|
358
358
|
align: "end",
|
|
359
359
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ B(Y, {
|
|
361
361
|
onSelect: () => i.mutate(e.id),
|
|
362
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ z(O, {
|
|
363
363
|
className: "size-4",
|
|
364
364
|
"aria-hidden": "true"
|
|
365
365
|
}), n("brainyrich.dashboard.insight.acknowledge", "Acknowledge")]
|
|
366
366
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ B(Y, {
|
|
368
368
|
onSelect: () => o.mutate(e.id),
|
|
369
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ z(k, {
|
|
370
370
|
className: "size-4",
|
|
371
371
|
"aria-hidden": "true"
|
|
372
372
|
}), n("brainyrich.dashboard.insight.resolve", "Resolve")]
|
|
373
373
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ B(Y, {
|
|
375
375
|
onSelect: () => u(!0),
|
|
376
|
-
children: [/* @__PURE__ */
|
|
376
|
+
children: [/* @__PURE__ */ z(ie, {
|
|
377
377
|
className: "size-4",
|
|
378
378
|
"aria-hidden": "true"
|
|
379
379
|
}), n("brainyrich.dashboard.insight.dismiss", "Dismiss")]
|
|
380
380
|
})
|
|
381
381
|
]
|
|
382
382
|
})] }),
|
|
383
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ z(l, {
|
|
384
384
|
open: s,
|
|
385
385
|
onOpenChange: u,
|
|
386
386
|
title: n("brainyrich.dashboard.insight.dismissTitle", "Dismiss this insight?"),
|
|
@@ -398,19 +398,19 @@ function Ce({ translate: e }) {
|
|
|
398
398
|
let [t, r] = E(!1), [i, a] = E(""), [o, s] = E("BROKERAGE"), [c, l] = E(""), [u, d] = E(""), [f, p] = E("USD"), [h, g] = E(null), _ = n(), v = i.trim(), y = v.length > 0 && !_.isPending, b = () => {
|
|
399
399
|
a(""), s("BROKERAGE"), l(""), d(""), p("USD"), g(null), _.reset();
|
|
400
400
|
};
|
|
401
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ B(se, {
|
|
402
402
|
open: t,
|
|
403
403
|
onOpenChange: (e) => {
|
|
404
404
|
r(e), e || b();
|
|
405
405
|
},
|
|
406
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ B(H, {
|
|
407
407
|
size: "sm",
|
|
408
408
|
onClick: () => r(!0),
|
|
409
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ z(N, {
|
|
410
410
|
className: "size-4",
|
|
411
411
|
"aria-hidden": "true"
|
|
412
412
|
}), e("brainyrich.dashboard.actions.newAccount", "New Account")]
|
|
413
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ z(ce, { children: /* @__PURE__ */ B("form", {
|
|
414
414
|
onSubmit: (t) => {
|
|
415
415
|
if (t.preventDefault(), !y) return;
|
|
416
416
|
let n = Number.parseFloat(u), i = {
|
|
@@ -428,13 +428,13 @@ function Ce({ translate: e }) {
|
|
|
428
428
|
},
|
|
429
429
|
className: "space-y-4",
|
|
430
430
|
children: [
|
|
431
|
-
/* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ B(de, { children: [/* @__PURE__ */ z(fe, { children: e("brainyrich.dashboard.newAccount.title", "New Account") }), /* @__PURE__ */ z(le, { children: e("brainyrich.dashboard.newAccount.description", "Add a manual account to track alongside your linked institutions.") })] }),
|
|
432
|
+
/* @__PURE__ */ B("div", {
|
|
433
433
|
className: "space-y-2",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
434
|
+
children: [/* @__PURE__ */ z(Z, {
|
|
435
435
|
htmlFor: "bra-account-name",
|
|
436
436
|
children: e("brainyrich.dashboard.newAccount.name", "Account name")
|
|
437
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ z(X, {
|
|
438
438
|
id: "bra-account-name",
|
|
439
439
|
value: i,
|
|
440
440
|
onChange: (e) => a(e.target.value),
|
|
@@ -443,30 +443,30 @@ function Ce({ translate: e }) {
|
|
|
443
443
|
autoFocus: !0
|
|
444
444
|
})]
|
|
445
445
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ B("div", {
|
|
447
447
|
className: "grid gap-4 sm:grid-cols-2",
|
|
448
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ B("div", {
|
|
449
449
|
className: "space-y-2",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
450
|
+
children: [/* @__PURE__ */ z(Z, {
|
|
451
451
|
htmlFor: "bra-account-type",
|
|
452
452
|
children: e("brainyrich.dashboard.newAccount.type", "Type")
|
|
453
|
-
}), /* @__PURE__ */
|
|
453
|
+
}), /* @__PURE__ */ B(pe, {
|
|
454
454
|
value: o,
|
|
455
455
|
onValueChange: (e) => s(e),
|
|
456
|
-
children: [/* @__PURE__ */
|
|
456
|
+
children: [/* @__PURE__ */ z(ge, {
|
|
457
457
|
id: "bra-account-type",
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
}), /* @__PURE__ */
|
|
458
|
+
children: /* @__PURE__ */ z(_e, {})
|
|
459
|
+
}), /* @__PURE__ */ z(me, { children: ve.map((e) => /* @__PURE__ */ z(he, {
|
|
460
460
|
value: e,
|
|
461
461
|
children: e.replace(/_/g, " ")
|
|
462
462
|
}, e)) })]
|
|
463
463
|
})]
|
|
464
|
-
}), /* @__PURE__ */
|
|
464
|
+
}), /* @__PURE__ */ B("div", {
|
|
465
465
|
className: "space-y-2",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
466
|
+
children: [/* @__PURE__ */ z(Z, {
|
|
467
467
|
htmlFor: "bra-account-currency",
|
|
468
468
|
children: e("brainyrich.dashboard.newAccount.currency", "Currency")
|
|
469
|
-
}), /* @__PURE__ */
|
|
469
|
+
}), /* @__PURE__ */ z(X, {
|
|
470
470
|
id: "bra-account-currency",
|
|
471
471
|
value: f,
|
|
472
472
|
onChange: (e) => p(e.target.value.toUpperCase()),
|
|
@@ -474,19 +474,19 @@ function Ce({ translate: e }) {
|
|
|
474
474
|
})]
|
|
475
475
|
})]
|
|
476
476
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ B("div", {
|
|
478
478
|
className: "space-y-2",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ z(Z, {
|
|
480
480
|
htmlFor: "bra-account-institution",
|
|
481
481
|
children: e("brainyrich.dashboard.newAccount.institution", "Institution (optional)")
|
|
482
|
-
}), /* @__PURE__ */
|
|
482
|
+
}), /* @__PURE__ */ z(X, {
|
|
483
483
|
id: "bra-account-institution",
|
|
484
484
|
value: c,
|
|
485
485
|
onChange: (e) => l(e.target.value),
|
|
486
486
|
placeholder: e("brainyrich.dashboard.newAccount.institutionPlaceholder", "e.g. Fidelity")
|
|
487
487
|
})]
|
|
488
488
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ z(m, {
|
|
490
490
|
id: "bra-account-household",
|
|
491
491
|
value: h,
|
|
492
492
|
onChange: g,
|
|
@@ -494,12 +494,12 @@ function Ce({ translate: e }) {
|
|
|
494
494
|
noneLabel: e("brainyrich.dashboard.newAccount.noHousehold", "No household"),
|
|
495
495
|
disabled: _.isPending
|
|
496
496
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ B("div", {
|
|
498
498
|
className: "space-y-2",
|
|
499
|
-
children: [/* @__PURE__ */
|
|
499
|
+
children: [/* @__PURE__ */ z(Z, {
|
|
500
500
|
htmlFor: "bra-account-cash",
|
|
501
501
|
children: e("brainyrich.dashboard.newAccount.cash", "Cash balance (optional)")
|
|
502
|
-
}), /* @__PURE__ */
|
|
502
|
+
}), /* @__PURE__ */ z(X, {
|
|
503
503
|
id: "bra-account-cash",
|
|
504
504
|
type: "number",
|
|
505
505
|
inputMode: "decimal",
|
|
@@ -509,17 +509,17 @@ function Ce({ translate: e }) {
|
|
|
509
509
|
placeholder: "0.00"
|
|
510
510
|
})]
|
|
511
511
|
}),
|
|
512
|
-
_.isError ? /* @__PURE__ */
|
|
512
|
+
_.isError ? /* @__PURE__ */ z("p", {
|
|
513
513
|
className: "text-sm text-status-error-text",
|
|
514
514
|
children: _.error instanceof Error ? _.error.message : e("brainyrich.dashboard.newAccount.error", "Could not create account.")
|
|
515
515
|
}) : null,
|
|
516
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ B(ue, { children: [/* @__PURE__ */ z(H, {
|
|
517
517
|
type: "button",
|
|
518
518
|
variant: "outline",
|
|
519
519
|
onClick: () => r(!1),
|
|
520
520
|
disabled: _.isPending,
|
|
521
521
|
children: e("brainyrich.common.cancel", "Cancel")
|
|
522
|
-
}), /* @__PURE__ */
|
|
522
|
+
}), /* @__PURE__ */ z(H, {
|
|
523
523
|
type: "submit",
|
|
524
524
|
disabled: !y,
|
|
525
525
|
children: _.isPending ? e("brainyrich.dashboard.newAccount.creating", "Creating…") : e("brainyrich.dashboard.newAccount.create", "Create account")
|