@burdenoff/microfe-brainyrich 2026.825.1 → 2026.828.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/brainyrich/components/reuse/DocumentsPanel.d.ts +4 -0
- package/dist/brainyrich/components/reuse/DocumentsPanel.d.ts.map +1 -1
- package/dist/brainyrich/components/reuse/DocumentsPanel.js +150 -99
- package/dist/brainyrich/components/reuse/DocumentsPanel.js.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +179 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +101 -83
- 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/AdminFirmPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/AdminFirmPage.js +115 -83
- package/dist/brainyrich/pages/AdminFirmPage.js.map +1 -1
- package/dist/brainyrich/pages/AiAssistantPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/AiAssistantPage.js +251 -230
- package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
- package/dist/brainyrich/pages/FirmPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/FirmPage.js +148 -116
- package/dist/brainyrich/pages/FirmPage.js.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.d.ts +14 -0
- package/dist/brainyrich/pages/PortfoliosPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.js +530 -353
- package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js +381 -396
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/pages/_shared.d.ts +21 -0
- package/dist/brainyrich/pages/_shared.d.ts.map +1 -1
- package/dist/brainyrich/pages/_shared.js +66 -31
- package/dist/brainyrich/pages/_shared.js.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
|
@@ -5,14 +5,14 @@ import { ConfirmDialog as ee } from "../components/ConfirmDialog.js";
|
|
|
5
5
|
import { DonutChart as d, FadeIn as f, GlassCard as p, LifecycleStepper as m, StatTile as h } from "../components/viz.js";
|
|
6
6
|
import { SubjectPicker as g, parseSubject as _ } from "../components/pickers.js";
|
|
7
7
|
import "../components/index.js";
|
|
8
|
-
import { EmptyState as
|
|
9
|
-
import { useMemo as
|
|
10
|
-
import { AlertTriangle as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { Badge as
|
|
8
|
+
import { EmptyState as v, ErrorState as te, LoadingState as ne, MetricGrid as y, SectionShell as re, formatDate as b, readEngineMetrics as x, statusBadgeVariant as S } from "./_shared.js";
|
|
9
|
+
import { useMemo as C, useState as w } from "react";
|
|
10
|
+
import { AlertTriangle as T, BellRing as ie, CheckCircle2 as E, Info as ae, Lightbulb as D, MoreHorizontal as oe, Plus as se, ShieldAlert as ce, XCircle as O } from "lucide-react";
|
|
11
|
+
import { useI18n as le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { Fragment as ue, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
13
|
+
import { Badge as j, Button as M, Card as de, CardContent as fe, CardDescription as pe, CardHeader as me, CardTitle as he, Dialog as N, DialogContent as P, DialogDescription as F, DialogFooter as I, DialogHeader as ge, DialogTitle as L, DropdownMenu as R, DropdownMenuContent as z, DropdownMenuItem as B, DropdownMenuSeparator as _e, DropdownMenuTrigger as V, Input as H, Label as U, Select as W, SelectContent as G, SelectItem as K, SelectTrigger as q, SelectValue as J, Textarea as Y } from "@burdenoff/fe-libs/ui";
|
|
14
14
|
//#region src/brainyrich/pages/AiAssistantPage.tsx
|
|
15
|
-
var
|
|
15
|
+
var ve = [
|
|
16
16
|
"REBALANCE_DUE",
|
|
17
17
|
"DRIFT",
|
|
18
18
|
"CONCENTRATION_RISK",
|
|
@@ -20,37 +20,37 @@ var ye = [
|
|
|
20
20
|
"FEE_ANOMALY",
|
|
21
21
|
"TAX_OPPORTUNITY",
|
|
22
22
|
"GOAL_AT_RISK"
|
|
23
|
-
],
|
|
23
|
+
], X = [
|
|
24
24
|
"INFO",
|
|
25
25
|
"LOW",
|
|
26
26
|
"MEDIUM",
|
|
27
27
|
"HIGH",
|
|
28
28
|
"CRITICAL"
|
|
29
|
-
],
|
|
29
|
+
], ye = [
|
|
30
30
|
"OPEN",
|
|
31
31
|
"ACKNOWLEDGED",
|
|
32
32
|
"RESOLVED",
|
|
33
33
|
"DISMISSED"
|
|
34
|
-
],
|
|
35
|
-
function
|
|
34
|
+
], Z = "__all__";
|
|
35
|
+
function Q(e) {
|
|
36
36
|
return e.toLowerCase().split("_").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function be(e) {
|
|
39
39
|
switch (e) {
|
|
40
40
|
case "CRITICAL": return {
|
|
41
|
-
icon:
|
|
41
|
+
icon: ce,
|
|
42
42
|
tone: "text-status-error-text"
|
|
43
43
|
};
|
|
44
44
|
case "HIGH": return {
|
|
45
|
-
icon:
|
|
45
|
+
icon: T,
|
|
46
46
|
tone: "text-status-error-text"
|
|
47
47
|
};
|
|
48
48
|
case "MEDIUM": return {
|
|
49
|
-
icon:
|
|
49
|
+
icon: ie,
|
|
50
50
|
tone: "text-status-warning-text"
|
|
51
51
|
};
|
|
52
52
|
case "LOW": return {
|
|
53
|
-
icon:
|
|
53
|
+
icon: D,
|
|
54
54
|
tone: "text-status-warning-text"
|
|
55
55
|
};
|
|
56
56
|
default: return {
|
|
@@ -68,12 +68,12 @@ function xe(e) {
|
|
|
68
68
|
default: return "info";
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
var
|
|
71
|
+
var Se = [
|
|
72
72
|
"Open",
|
|
73
73
|
"Acknowledged",
|
|
74
74
|
"Resolved"
|
|
75
75
|
];
|
|
76
|
-
function
|
|
76
|
+
function Ce() {
|
|
77
77
|
return {
|
|
78
78
|
title: "",
|
|
79
79
|
type: "DRIFT",
|
|
@@ -84,403 +84,403 @@ function Se() {
|
|
|
84
84
|
ownerId: ""
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
let { t: ee } =
|
|
89
|
-
...g ===
|
|
90
|
-
...
|
|
91
|
-
}),
|
|
87
|
+
function $() {
|
|
88
|
+
let { t: ee } = le(), m = (t, n, r) => e(ee, t, n, r), [g, y] = w(Z), [b, x] = w(Z), [S, T] = w(Z), { items: D, hasMore: oe, loadMore: O, isLoading: j, isFetchingNextPage: pe, isError: me, refetch: he } = s({
|
|
89
|
+
...g === Z ? {} : { severity: g },
|
|
90
|
+
...b === Z ? {} : { status: b }
|
|
91
|
+
}), N = t(), P = c(), F = a(), I = o(), ge = C(() => {
|
|
92
92
|
let e = /* @__PURE__ */ new Map();
|
|
93
|
-
for (let t of M.data) e.set(t.id, t.name);
|
|
94
93
|
for (let t of N.data) e.set(t.id, t.name);
|
|
95
94
|
for (let t of P.data) e.set(t.id, t.name);
|
|
96
95
|
for (let t of F.data) e.set(t.id, t.name);
|
|
96
|
+
for (let t of I.data) e.set(t.id, t.name);
|
|
97
97
|
return e;
|
|
98
98
|
}, [
|
|
99
|
-
M.data,
|
|
100
99
|
N.data,
|
|
101
100
|
P.data,
|
|
102
|
-
F.data
|
|
103
|
-
|
|
101
|
+
F.data,
|
|
102
|
+
I.data
|
|
103
|
+
]), L = n(), R = i(), z = l(), B = r(), [_e, V] = w(!1), [H, Y] = w(Ce), be = (e, t) => Y((n) => ({
|
|
104
104
|
...n,
|
|
105
105
|
[e]: t
|
|
106
|
-
})),
|
|
106
|
+
})), Se = C(() => S === Z ? D : D.filter((e) => e.type === S), [D, S]), $ = C(() => ({
|
|
107
107
|
open: D.filter((e) => e.status === "OPEN").length,
|
|
108
108
|
critical: D.filter((e) => e.severity === "CRITICAL").length,
|
|
109
109
|
urgent: D.filter((e) => e.severity === "HIGH" || e.severity === "CRITICAL").length,
|
|
110
110
|
resolved: D.filter((e) => e.status === "RESOLVED").length
|
|
111
|
-
}), [D]), De =
|
|
112
|
-
label:
|
|
111
|
+
}), [D]), De = C(() => X.map((e) => ({
|
|
112
|
+
label: Q(e),
|
|
113
113
|
value: D.filter((t) => t.severity === e).length,
|
|
114
114
|
tone: xe(e)
|
|
115
|
-
})).filter((e) => e.value > 0), [D]), Oe =
|
|
116
|
-
if (!
|
|
115
|
+
})).filter((e) => e.value > 0), [D]), Oe = C(() => {
|
|
116
|
+
if (!H.metrics.trim()) return !0;
|
|
117
117
|
try {
|
|
118
|
-
return JSON.parse(
|
|
118
|
+
return JSON.parse(H.metrics), !0;
|
|
119
119
|
} catch {
|
|
120
120
|
return !1;
|
|
121
121
|
}
|
|
122
|
-
}, [
|
|
123
|
-
|
|
122
|
+
}, [H.metrics]), ke = H.title.trim().length > 0 && _(H.subject) !== null && Oe, Ae = () => {
|
|
123
|
+
Y(Ce()), V(!0);
|
|
124
124
|
}, je = () => {
|
|
125
125
|
if (!ke) return;
|
|
126
|
-
let e = _(
|
|
126
|
+
let e = _(H.subject);
|
|
127
127
|
if (!e) return;
|
|
128
128
|
let t;
|
|
129
|
-
if (
|
|
130
|
-
t = JSON.parse(
|
|
129
|
+
if (H.metrics.trim()) try {
|
|
130
|
+
t = JSON.parse(H.metrics);
|
|
131
131
|
} catch {
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
let n = {
|
|
135
|
-
title:
|
|
136
|
-
type:
|
|
137
|
-
severity:
|
|
135
|
+
title: H.title.trim(),
|
|
136
|
+
type: H.type,
|
|
137
|
+
severity: H.severity,
|
|
138
138
|
subjectType: e.subjectType,
|
|
139
139
|
subjectId: e.subjectId,
|
|
140
|
-
detail:
|
|
140
|
+
detail: H.detail.trim() || null,
|
|
141
141
|
...t ? { metrics: t } : {},
|
|
142
|
-
...
|
|
142
|
+
...H.ownerId.trim() ? { ownerId: H.ownerId.trim() } : {}
|
|
143
143
|
};
|
|
144
|
-
|
|
145
|
-
}, Me = g !==
|
|
146
|
-
return /* @__PURE__ */
|
|
144
|
+
B.mutate(n, { onSuccess: () => V(!1) });
|
|
145
|
+
}, Me = g !== Z || b !== Z || S !== Z;
|
|
146
|
+
return /* @__PURE__ */ A(ue, { children: [/* @__PURE__ */ k(re, {
|
|
147
147
|
title: m("brainyrich.insights.title", "Insights"),
|
|
148
148
|
description: m("brainyrich.insights.description", "Advisory insights across portfolios, accounts and goals — triage, acknowledge and resolve."),
|
|
149
149
|
badges: [m("brainyrich.insights.badges.advisory", "Advisory")],
|
|
150
150
|
actionLabel: m("brainyrich.insights.actions.create", "New insight"),
|
|
151
151
|
onAction: Ae,
|
|
152
|
-
children:
|
|
152
|
+
children: j ? /* @__PURE__ */ k(ne, { rows: 4 }) : me ? /* @__PURE__ */ k(te, {
|
|
153
153
|
title: m("brainyrich.insights.error.title", "Could not load insights"),
|
|
154
154
|
description: m("brainyrich.insights.error.description", "We could not reach the insights service. Please try again."),
|
|
155
|
-
onRetry: () =>
|
|
156
|
-
}) : /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
155
|
+
onRetry: () => he()
|
|
156
|
+
}) : /* @__PURE__ */ A(ue, { children: [
|
|
157
|
+
/* @__PURE__ */ A(f, {
|
|
158
158
|
className: "grid gap-4 lg:grid-cols-[minmax(0,1.55fr)_minmax(0,1fr)]",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ A("div", {
|
|
160
160
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4 lg:grid-cols-2 xl:grid-cols-4",
|
|
161
161
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ k(h, {
|
|
163
163
|
label: m("brainyrich.insights.metrics.total", "Signals"),
|
|
164
164
|
value: String(D.length),
|
|
165
165
|
glow: !0,
|
|
166
|
-
icon: /* @__PURE__ */
|
|
166
|
+
icon: /* @__PURE__ */ k(ie, {
|
|
167
167
|
className: "size-4",
|
|
168
168
|
"aria-hidden": "true"
|
|
169
169
|
})
|
|
170
170
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ k(h, {
|
|
172
172
|
label: m("brainyrich.insights.metrics.open", "Open"),
|
|
173
173
|
value: String($.open),
|
|
174
|
-
icon: /* @__PURE__ */
|
|
174
|
+
icon: /* @__PURE__ */ k(ae, {
|
|
175
175
|
className: "size-4",
|
|
176
176
|
"aria-hidden": "true"
|
|
177
177
|
})
|
|
178
178
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ k(h, {
|
|
180
180
|
label: m("brainyrich.insights.metrics.critical", "Critical"),
|
|
181
181
|
value: String($.critical),
|
|
182
182
|
deltaTone: $.critical > 0 ? "negative" : "positive",
|
|
183
|
-
icon: /* @__PURE__ */
|
|
183
|
+
icon: /* @__PURE__ */ k(ce, {
|
|
184
184
|
className: "size-4",
|
|
185
185
|
"aria-hidden": "true"
|
|
186
186
|
})
|
|
187
187
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ k(h, {
|
|
189
189
|
label: m("brainyrich.insights.metrics.resolved", "Resolved"),
|
|
190
190
|
value: String($.resolved),
|
|
191
191
|
deltaTone: "positive",
|
|
192
|
-
icon: /* @__PURE__ */
|
|
192
|
+
icon: /* @__PURE__ */ k(E, {
|
|
193
193
|
className: "size-4",
|
|
194
194
|
"aria-hidden": "true"
|
|
195
195
|
})
|
|
196
196
|
})
|
|
197
197
|
]
|
|
198
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ A(p, {
|
|
199
199
|
className: "flex min-w-0 flex-col p-5",
|
|
200
200
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ k("p", {
|
|
202
202
|
className: "text-sm font-medium text-text-primary",
|
|
203
203
|
children: m("brainyrich.insights.hero.severityMix", "Severity mix")
|
|
204
204
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ k("p", {
|
|
206
206
|
className: "text-xs text-text-secondary",
|
|
207
207
|
children: m("brainyrich.insights.hero.severityMixHint", "Distribution across the loaded inbox")
|
|
208
208
|
}),
|
|
209
|
-
De.length > 0 ? /* @__PURE__ */
|
|
209
|
+
De.length > 0 ? /* @__PURE__ */ k("div", {
|
|
210
210
|
className: "mt-2 min-w-0",
|
|
211
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ k(d, {
|
|
212
212
|
data: De,
|
|
213
213
|
centerLabel: m("brainyrich.insights.hero.center", "Signals"),
|
|
214
214
|
centerValue: String(D.length),
|
|
215
215
|
height: 200
|
|
216
216
|
})
|
|
217
|
-
}) : /* @__PURE__ */
|
|
217
|
+
}) : /* @__PURE__ */ k("p", {
|
|
218
218
|
className: "mt-6 text-sm text-text-secondary",
|
|
219
219
|
children: m("brainyrich.insights.hero.noData", "No signals to chart yet.")
|
|
220
220
|
})
|
|
221
221
|
]
|
|
222
222
|
})]
|
|
223
223
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ A(f, {
|
|
225
225
|
index: 1,
|
|
226
226
|
className: "flex flex-wrap gap-2",
|
|
227
227
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ k(we, {
|
|
229
229
|
label: m("brainyrich.insights.metrics.open", "Open"),
|
|
230
230
|
count: $.open,
|
|
231
231
|
tone: "info",
|
|
232
|
-
active:
|
|
232
|
+
active: b === "OPEN",
|
|
233
233
|
onClick: () => {
|
|
234
|
-
|
|
234
|
+
x(b === "OPEN" ? Z : "OPEN"), y(Z);
|
|
235
235
|
}
|
|
236
236
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ k(we, {
|
|
238
238
|
label: m("brainyrich.insights.metrics.critical", "Critical"),
|
|
239
239
|
count: $.critical,
|
|
240
240
|
tone: "error",
|
|
241
241
|
active: g === "CRITICAL",
|
|
242
242
|
onClick: () => {
|
|
243
|
-
|
|
243
|
+
y(g === "CRITICAL" ? Z : "CRITICAL"), x(Z);
|
|
244
244
|
}
|
|
245
245
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ k(we, {
|
|
247
247
|
label: m("brainyrich.insights.metrics.resolved", "Resolved"),
|
|
248
248
|
count: $.resolved,
|
|
249
249
|
tone: "success",
|
|
250
|
-
active:
|
|
250
|
+
active: b === "RESOLVED",
|
|
251
251
|
onClick: () => {
|
|
252
|
-
|
|
252
|
+
x(b === "RESOLVED" ? Z : "RESOLVED"), y(Z);
|
|
253
253
|
}
|
|
254
254
|
})
|
|
255
255
|
]
|
|
256
256
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ k(de, { children: /* @__PURE__ */ A(fe, {
|
|
258
258
|
className: "flex flex-col gap-3 p-4 sm:flex-row sm:items-end",
|
|
259
259
|
children: [
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ A("div", {
|
|
261
261
|
className: "w-full space-y-1.5 sm:w-48",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ k(U, {
|
|
263
263
|
htmlFor: "insight-filter-severity",
|
|
264
264
|
children: m("brainyrich.insights.filters.severity", "Severity")
|
|
265
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ A(W, {
|
|
266
266
|
value: g,
|
|
267
|
-
onValueChange:
|
|
268
|
-
children: [/* @__PURE__ */
|
|
267
|
+
onValueChange: y,
|
|
268
|
+
children: [/* @__PURE__ */ k(q, {
|
|
269
269
|
id: "insight-filter-severity",
|
|
270
|
-
children: /* @__PURE__ */
|
|
271
|
-
}), /* @__PURE__ */
|
|
272
|
-
value:
|
|
270
|
+
children: /* @__PURE__ */ k(J, {})
|
|
271
|
+
}), /* @__PURE__ */ A(G, { children: [/* @__PURE__ */ k(K, {
|
|
272
|
+
value: Z,
|
|
273
273
|
children: m("brainyrich.insights.filters.all", "All")
|
|
274
|
-
}),
|
|
274
|
+
}), X.map((e) => /* @__PURE__ */ k(K, {
|
|
275
275
|
value: e,
|
|
276
|
-
children:
|
|
276
|
+
children: Q(e)
|
|
277
277
|
}, e))] })]
|
|
278
278
|
})]
|
|
279
279
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ A("div", {
|
|
281
281
|
className: "w-full space-y-1.5 sm:w-48",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ k(U, {
|
|
283
283
|
htmlFor: "insight-filter-status",
|
|
284
284
|
children: m("brainyrich.insights.filters.status", "Status")
|
|
285
|
-
}), /* @__PURE__ */
|
|
286
|
-
value:
|
|
287
|
-
onValueChange:
|
|
288
|
-
children: [/* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ A(W, {
|
|
286
|
+
value: b,
|
|
287
|
+
onValueChange: x,
|
|
288
|
+
children: [/* @__PURE__ */ k(q, {
|
|
289
289
|
id: "insight-filter-status",
|
|
290
|
-
children: /* @__PURE__ */
|
|
291
|
-
}), /* @__PURE__ */
|
|
292
|
-
value:
|
|
290
|
+
children: /* @__PURE__ */ k(J, {})
|
|
291
|
+
}), /* @__PURE__ */ A(G, { children: [/* @__PURE__ */ k(K, {
|
|
292
|
+
value: Z,
|
|
293
293
|
children: m("brainyrich.insights.filters.all", "All")
|
|
294
|
-
}),
|
|
294
|
+
}), ye.map((e) => /* @__PURE__ */ k(K, {
|
|
295
295
|
value: e,
|
|
296
|
-
children:
|
|
296
|
+
children: Q(e)
|
|
297
297
|
}, e))] })]
|
|
298
298
|
})]
|
|
299
299
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ A("div", {
|
|
301
301
|
className: "w-full space-y-1.5 sm:w-56",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ k(U, {
|
|
303
303
|
htmlFor: "insight-filter-type",
|
|
304
304
|
children: m("brainyrich.insights.filters.type", "Type")
|
|
305
|
-
}), /* @__PURE__ */
|
|
306
|
-
value:
|
|
307
|
-
onValueChange:
|
|
308
|
-
children: [/* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ A(W, {
|
|
306
|
+
value: S,
|
|
307
|
+
onValueChange: T,
|
|
308
|
+
children: [/* @__PURE__ */ k(q, {
|
|
309
309
|
id: "insight-filter-type",
|
|
310
|
-
children: /* @__PURE__ */
|
|
311
|
-
}), /* @__PURE__ */
|
|
312
|
-
value:
|
|
310
|
+
children: /* @__PURE__ */ k(J, {})
|
|
311
|
+
}), /* @__PURE__ */ A(G, { children: [/* @__PURE__ */ k(K, {
|
|
312
|
+
value: Z,
|
|
313
313
|
children: m("brainyrich.insights.filters.all", "All")
|
|
314
|
-
}),
|
|
314
|
+
}), ve.map((e) => /* @__PURE__ */ k(K, {
|
|
315
315
|
value: e,
|
|
316
|
-
children:
|
|
316
|
+
children: Q(e)
|
|
317
317
|
}, e))] })]
|
|
318
318
|
})]
|
|
319
319
|
})
|
|
320
320
|
]
|
|
321
321
|
}) }),
|
|
322
|
-
|
|
323
|
-
icon: /* @__PURE__ */
|
|
322
|
+
Se.length === 0 ? /* @__PURE__ */ k(v, {
|
|
323
|
+
icon: /* @__PURE__ */ k(ie, {
|
|
324
324
|
className: "size-6",
|
|
325
325
|
"aria-hidden": "true"
|
|
326
326
|
}),
|
|
327
327
|
title: Me ? m("brainyrich.insights.empty.filteredTitle", "No matching insights") : m("brainyrich.insights.empty.title", "No advisory insights yet"),
|
|
328
328
|
description: Me ? m("brainyrich.insights.empty.filteredDescription", "No insights match the selected filters. Adjust or clear them to see more.") : m("brainyrich.insights.empty.description", "Advisory insights flag rebalancing, drift, concentration and other opportunities. Create one to get started."),
|
|
329
|
-
action: Me ? /* @__PURE__ */
|
|
329
|
+
action: Me ? /* @__PURE__ */ k(M, {
|
|
330
330
|
variant: "outline",
|
|
331
331
|
size: "sm",
|
|
332
332
|
onClick: () => {
|
|
333
|
-
|
|
333
|
+
y(Z), x(Z), T(Z);
|
|
334
334
|
},
|
|
335
335
|
children: m("brainyrich.insights.actions.clearFilters", "Clear filters")
|
|
336
|
-
}) : /* @__PURE__ */
|
|
336
|
+
}) : /* @__PURE__ */ A(M, {
|
|
337
337
|
size: "sm",
|
|
338
338
|
onClick: Ae,
|
|
339
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ k(se, {
|
|
340
340
|
className: "size-4",
|
|
341
341
|
"aria-hidden": "true"
|
|
342
342
|
}), m("brainyrich.insights.actions.create", "New insight")]
|
|
343
343
|
})
|
|
344
|
-
}) : /* @__PURE__ */
|
|
344
|
+
}) : /* @__PURE__ */ k("div", {
|
|
345
345
|
className: "space-y-3",
|
|
346
|
-
children:
|
|
346
|
+
children: Se.map((e, t) => /* @__PURE__ */ k(Te, {
|
|
347
347
|
index: t,
|
|
348
348
|
insight: e,
|
|
349
|
-
subjectName:
|
|
349
|
+
subjectName: ge.get(e.subjectId),
|
|
350
350
|
translate: m,
|
|
351
|
-
onAcknowledge: () =>
|
|
352
|
-
onDismiss: () =>
|
|
353
|
-
onResolve: () =>
|
|
354
|
-
acknowledgePending:
|
|
355
|
-
dismissPending:
|
|
356
|
-
resolvePending:
|
|
351
|
+
onAcknowledge: () => L.mutate(e.id),
|
|
352
|
+
onDismiss: () => R.mutate(e.id),
|
|
353
|
+
onResolve: () => z.mutate(e.id),
|
|
354
|
+
acknowledgePending: L.isPending,
|
|
355
|
+
dismissPending: R.isPending,
|
|
356
|
+
resolvePending: z.isPending
|
|
357
357
|
}, e.id))
|
|
358
358
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
hasMore:
|
|
361
|
-
onClick:
|
|
362
|
-
loading:
|
|
359
|
+
/* @__PURE__ */ k(u, {
|
|
360
|
+
hasMore: oe,
|
|
361
|
+
onClick: O,
|
|
362
|
+
loading: pe,
|
|
363
363
|
label: m("brainyrich.insights.actions.loadMore", "Load more insights")
|
|
364
364
|
})
|
|
365
365
|
] })
|
|
366
|
-
}), /* @__PURE__ */
|
|
367
|
-
open:
|
|
368
|
-
form:
|
|
369
|
-
setField:
|
|
366
|
+
}), /* @__PURE__ */ k(Ee, {
|
|
367
|
+
open: _e,
|
|
368
|
+
form: H,
|
|
369
|
+
setField: be,
|
|
370
370
|
metricsValid: Oe,
|
|
371
371
|
valid: ke,
|
|
372
|
-
pending:
|
|
372
|
+
pending: B.isPending,
|
|
373
373
|
onSubmit: je,
|
|
374
|
-
onOpenChange: (e) =>
|
|
374
|
+
onOpenChange: (e) => V(e),
|
|
375
375
|
translate: m
|
|
376
376
|
})] });
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
return /* @__PURE__ */
|
|
378
|
+
function we({ label: e, count: t, tone: n, active: r, onClick: i }) {
|
|
379
|
+
return /* @__PURE__ */ A("button", {
|
|
380
380
|
type: "button",
|
|
381
381
|
onClick: i,
|
|
382
382
|
"aria-pressed": r,
|
|
383
383
|
className: `group inline-flex items-center gap-2 rounded-full border px-3.5 py-1.5 text-sm font-medium transition-colors motion-safe:transition-shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-action-primary-border)] ${r ? "border-[var(--color-action-primary-border)] bg-bg-elevated text-text-primary shadow-[var(--shadow-elevation-1)]" : "border-border-subtle bg-bg-surface text-text-secondary hover:border-[var(--color-action-primary-border)] hover:text-text-primary"}`,
|
|
384
384
|
children: [
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ k("span", {
|
|
386
386
|
className: `size-2 rounded-full ${n === "error" ? "bg-status-error-text" : n === "success" ? "bg-status-success-text" : "bg-status-info-text"}`,
|
|
387
387
|
"aria-hidden": "true"
|
|
388
388
|
}),
|
|
389
389
|
e,
|
|
390
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ k("span", {
|
|
391
391
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs tabular-nums text-text-primary",
|
|
392
392
|
children: t
|
|
393
393
|
})
|
|
394
394
|
]
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
let u =
|
|
399
|
-
return /* @__PURE__ */
|
|
397
|
+
function Te({ index: e, insight: t, subjectName: n, translate: r, onAcknowledge: i, onDismiss: a, onResolve: o, acknowledgePending: s, dismissPending: c, resolvePending: l }) {
|
|
398
|
+
let u = be(t.severity), d = u.icon, p = t.status === "RESOLVED" || t.status === "DISMISSED", h = t.status === "DISMISSED", [g, _] = w(!1), v = x(t.metrics);
|
|
399
|
+
return /* @__PURE__ */ k(f, {
|
|
400
400
|
as: "div",
|
|
401
401
|
index: e,
|
|
402
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ A(de, {
|
|
403
403
|
className: "overflow-hidden transition-shadow motion-safe:hover:shadow-[var(--shadow-elevation-2)]",
|
|
404
404
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ k(me, {
|
|
406
406
|
className: "pb-3",
|
|
407
|
-
children: /* @__PURE__ */
|
|
407
|
+
children: /* @__PURE__ */ A("div", {
|
|
408
408
|
className: "flex items-start justify-between gap-3",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ A("div", {
|
|
410
410
|
className: "flex min-w-0 items-start gap-3",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ k("span", {
|
|
412
412
|
className: `mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-full bg-bg-sunken ${u.tone}`,
|
|
413
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ k(d, {
|
|
414
414
|
className: "size-5",
|
|
415
415
|
"aria-hidden": "true"
|
|
416
416
|
})
|
|
417
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ A("div", {
|
|
418
418
|
className: "min-w-0",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ k(he, {
|
|
420
420
|
className: "text-base",
|
|
421
421
|
children: t.title
|
|
422
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ A(pe, {
|
|
423
423
|
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
424
424
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ k(j, {
|
|
426
426
|
variant: "outline",
|
|
427
|
-
children:
|
|
427
|
+
children: Q(t.type)
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
variant:
|
|
431
|
-
children: /* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ k(j, {
|
|
430
|
+
variant: S(t.severity),
|
|
431
|
+
children: /* @__PURE__ */ A("span", {
|
|
432
432
|
className: `inline-flex items-center gap-1 ${u.tone}`,
|
|
433
|
-
children: [/* @__PURE__ */
|
|
433
|
+
children: [/* @__PURE__ */ k(d, {
|
|
434
434
|
className: "size-3",
|
|
435
435
|
"aria-hidden": "true"
|
|
436
|
-
}),
|
|
436
|
+
}), Q(t.severity)]
|
|
437
437
|
})
|
|
438
438
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
variant:
|
|
441
|
-
children:
|
|
439
|
+
/* @__PURE__ */ k(j, {
|
|
440
|
+
variant: S(t.status),
|
|
441
|
+
children: Q(t.status)
|
|
442
442
|
})
|
|
443
443
|
]
|
|
444
444
|
})]
|
|
445
445
|
})]
|
|
446
|
-
}), /* @__PURE__ */
|
|
446
|
+
}), /* @__PURE__ */ A(R, { children: [/* @__PURE__ */ k(V, {
|
|
447
447
|
asChild: !0,
|
|
448
|
-
children: /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ k(M, {
|
|
449
449
|
variant: "ghost",
|
|
450
450
|
size: "icon",
|
|
451
451
|
"aria-label": r("brainyrich.insights.actions.menu", "Insight actions"),
|
|
452
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ k(oe, {
|
|
453
453
|
className: "size-4",
|
|
454
454
|
"aria-hidden": "true"
|
|
455
455
|
})
|
|
456
456
|
})
|
|
457
|
-
}), /* @__PURE__ */
|
|
457
|
+
}), /* @__PURE__ */ A(z, {
|
|
458
458
|
align: "end",
|
|
459
459
|
children: [
|
|
460
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ A(B, {
|
|
461
461
|
disabled: s || t.status === "ACKNOWLEDGED" || p,
|
|
462
462
|
onSelect: i,
|
|
463
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ k(E, {
|
|
464
464
|
className: "size-4",
|
|
465
465
|
"aria-hidden": "true"
|
|
466
466
|
}), r("brainyrich.insights.actions.acknowledge", "Acknowledge")]
|
|
467
467
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ A(B, {
|
|
469
469
|
disabled: l || t.status === "RESOLVED",
|
|
470
470
|
onSelect: o,
|
|
471
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ k(E, {
|
|
472
472
|
className: "size-4",
|
|
473
473
|
"aria-hidden": "true"
|
|
474
474
|
}), r("brainyrich.insights.actions.resolve", "Resolve")]
|
|
475
475
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ k(_e, {}),
|
|
477
|
+
/* @__PURE__ */ A(B, {
|
|
478
478
|
className: "text-status-error-text focus:text-status-error-text",
|
|
479
479
|
disabled: c || t.status === "DISMISSED",
|
|
480
480
|
onSelect: (e) => {
|
|
481
481
|
e.preventDefault(), _(!0);
|
|
482
482
|
},
|
|
483
|
-
children: [/* @__PURE__ */ O
|
|
483
|
+
children: [/* @__PURE__ */ k(O, {
|
|
484
484
|
className: "size-4",
|
|
485
485
|
"aria-hidden": "true"
|
|
486
486
|
}), r("brainyrich.insights.actions.dismiss", "Dismiss")]
|
|
@@ -489,69 +489,90 @@ function we({ index: e, insight: t, subjectName: n, translate: r, onAcknowledge:
|
|
|
489
489
|
})] })]
|
|
490
490
|
})
|
|
491
491
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ A(fe, {
|
|
493
493
|
className: "space-y-3",
|
|
494
494
|
children: [
|
|
495
|
-
t.detail ? /* @__PURE__ */
|
|
495
|
+
t.detail ? /* @__PURE__ */ k("p", {
|
|
496
496
|
className: "text-sm text-text-secondary",
|
|
497
497
|
children: t.detail
|
|
498
498
|
}) : null,
|
|
499
|
-
/* @__PURE__ */
|
|
499
|
+
v ? /* @__PURE__ */ A("div", {
|
|
500
|
+
className: "space-y-2 rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ k("p", {
|
|
503
|
+
className: "text-[11px] font-medium uppercase tracking-wide text-text-secondary",
|
|
504
|
+
children: r("brainyrich.insights.card.rationale", "Rationale")
|
|
505
|
+
}),
|
|
506
|
+
v.formula ? /* @__PURE__ */ k("p", {
|
|
507
|
+
className: "break-words text-xs text-text-secondary",
|
|
508
|
+
children: v.formula
|
|
509
|
+
}) : null,
|
|
510
|
+
/* @__PURE__ */ k(y, { entries: v.entries })
|
|
511
|
+
]
|
|
512
|
+
}) : null,
|
|
513
|
+
/* @__PURE__ */ A("dl", {
|
|
500
514
|
className: "grid grid-cols-2 gap-3 rounded-lg bg-bg-sunken p-3 text-sm sm:grid-cols-3",
|
|
501
515
|
children: [
|
|
502
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
503
517
|
className: "text-xs text-text-secondary",
|
|
504
518
|
children: r("brainyrich.insights.card.subjectType", "Subject")
|
|
505
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ k("dd", {
|
|
506
520
|
className: "font-medium text-text-primary",
|
|
507
|
-
children:
|
|
521
|
+
children: Q(t.subjectType)
|
|
508
522
|
})] }),
|
|
509
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ A("div", {
|
|
510
524
|
className: "min-w-0",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ k("dt", {
|
|
512
526
|
className: "text-xs text-text-secondary",
|
|
513
527
|
children: r("brainyrich.insights.card.subject", "Reference")
|
|
514
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ k("dd", {
|
|
515
529
|
className: "truncate font-medium text-text-primary",
|
|
516
530
|
title: n ? `${n} (${t.subjectId})` : t.subjectId,
|
|
517
531
|
children: n ?? t.subjectId
|
|
518
532
|
})]
|
|
519
533
|
}),
|
|
520
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
521
535
|
className: "text-xs text-text-secondary",
|
|
522
536
|
children: r("brainyrich.insights.card.created", "Created")
|
|
523
|
-
}), /* @__PURE__ */
|
|
537
|
+
}), /* @__PURE__ */ k("dd", {
|
|
538
|
+
className: "font-medium text-text-primary",
|
|
539
|
+
children: b(t.createdAt)
|
|
540
|
+
})] }),
|
|
541
|
+
t.resolvedAt ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
542
|
+
className: "text-xs text-text-secondary",
|
|
543
|
+
children: r("brainyrich.insights.card.resolved", "Resolved")
|
|
544
|
+
}), /* @__PURE__ */ k("dd", {
|
|
524
545
|
className: "font-medium text-text-primary",
|
|
525
|
-
children:
|
|
526
|
-
})] })
|
|
546
|
+
children: b(t.resolvedAt)
|
|
547
|
+
})] }) : null
|
|
527
548
|
]
|
|
528
549
|
}),
|
|
529
|
-
h ? /* @__PURE__ */
|
|
550
|
+
h ? /* @__PURE__ */ A("div", {
|
|
530
551
|
className: "flex items-center gap-2 rounded-lg bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
|
|
531
|
-
children: [/* @__PURE__ */ O
|
|
552
|
+
children: [/* @__PURE__ */ k(O, {
|
|
532
553
|
className: "size-4 text-status-error-text",
|
|
533
554
|
"aria-hidden": "true"
|
|
534
555
|
}), r("brainyrich.insights.card.dismissed", "Dismissed from active triage")]
|
|
535
|
-
}) : /* @__PURE__ */
|
|
536
|
-
steps:
|
|
537
|
-
current:
|
|
556
|
+
}) : /* @__PURE__ */ k(m, {
|
|
557
|
+
steps: Se,
|
|
558
|
+
current: Q(t.status)
|
|
538
559
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ A("div", {
|
|
540
561
|
className: "flex flex-wrap items-center gap-2",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ A(M, {
|
|
542
563
|
variant: "outline",
|
|
543
564
|
size: "sm",
|
|
544
565
|
disabled: s || t.status === "ACKNOWLEDGED" || p,
|
|
545
566
|
onClick: i,
|
|
546
|
-
children: [/* @__PURE__ */
|
|
567
|
+
children: [/* @__PURE__ */ k(E, {
|
|
547
568
|
className: "size-4",
|
|
548
569
|
"aria-hidden": "true"
|
|
549
570
|
}), r("brainyrich.insights.actions.acknowledge", "Acknowledge")]
|
|
550
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ A(M, {
|
|
551
572
|
size: "sm",
|
|
552
573
|
disabled: l || t.status === "RESOLVED",
|
|
553
574
|
onClick: o,
|
|
554
|
-
children: [/* @__PURE__ */
|
|
575
|
+
children: [/* @__PURE__ */ k(E, {
|
|
555
576
|
className: "size-4",
|
|
556
577
|
"aria-hidden": "true"
|
|
557
578
|
}), r("brainyrich.insights.actions.resolve", "Resolve")]
|
|
@@ -559,7 +580,7 @@ function we({ index: e, insight: t, subjectName: n, translate: r, onAcknowledge:
|
|
|
559
580
|
})
|
|
560
581
|
]
|
|
561
582
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ k(ee, {
|
|
563
584
|
open: g,
|
|
564
585
|
onOpenChange: _,
|
|
565
586
|
title: r("brainyrich.insights.dismiss.title", "Dismiss this insight?"),
|
|
@@ -574,24 +595,24 @@ function we({ index: e, insight: t, subjectName: n, translate: r, onAcknowledge:
|
|
|
574
595
|
})
|
|
575
596
|
});
|
|
576
597
|
}
|
|
577
|
-
function
|
|
578
|
-
return /* @__PURE__ */
|
|
598
|
+
function Ee({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending: a, onSubmit: o, onOpenChange: s, translate: c }) {
|
|
599
|
+
return /* @__PURE__ */ k(N, {
|
|
579
600
|
open: e,
|
|
580
601
|
onOpenChange: s,
|
|
581
|
-
children: /* @__PURE__ */
|
|
602
|
+
children: /* @__PURE__ */ A(P, {
|
|
582
603
|
className: "max-h-[90vh] overflow-y-auto sm:max-w-lg",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ A(ge, { children: [/* @__PURE__ */ k(L, { children: c("brainyrich.insights.form.createTitle", "New insight") }), /* @__PURE__ */ k(F, { children: c("brainyrich.insights.form.subtitle", "Flag an advisory insight against a portfolio, account, goal or household.") })] }), /* @__PURE__ */ A("form", {
|
|
584
605
|
className: "space-y-4",
|
|
585
606
|
onSubmit: (e) => {
|
|
586
607
|
e.preventDefault(), o();
|
|
587
608
|
},
|
|
588
609
|
children: [
|
|
589
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ A("div", {
|
|
590
611
|
className: "space-y-1.5",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
612
|
+
children: [/* @__PURE__ */ k(U, {
|
|
592
613
|
htmlFor: "insight-title",
|
|
593
614
|
children: c("brainyrich.insights.form.title", "Title")
|
|
594
|
-
}), /* @__PURE__ */
|
|
615
|
+
}), /* @__PURE__ */ k(H, {
|
|
595
616
|
id: "insight-title",
|
|
596
617
|
value: t.title,
|
|
597
618
|
onChange: (e) => n("title", e.target.value),
|
|
@@ -599,67 +620,67 @@ function Te({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
599
620
|
required: !0
|
|
600
621
|
})]
|
|
601
622
|
}),
|
|
602
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ A("div", {
|
|
603
624
|
className: "grid grid-cols-2 gap-3",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ A("div", {
|
|
605
626
|
className: "space-y-1.5",
|
|
606
|
-
children: [/* @__PURE__ */
|
|
627
|
+
children: [/* @__PURE__ */ k(U, {
|
|
607
628
|
htmlFor: "insight-type",
|
|
608
629
|
children: c("brainyrich.insights.form.type", "Type")
|
|
609
|
-
}), /* @__PURE__ */
|
|
630
|
+
}), /* @__PURE__ */ A(W, {
|
|
610
631
|
value: t.type,
|
|
611
632
|
onValueChange: (e) => n("type", e),
|
|
612
|
-
children: [/* @__PURE__ */
|
|
633
|
+
children: [/* @__PURE__ */ k(q, {
|
|
613
634
|
id: "insight-type",
|
|
614
|
-
children: /* @__PURE__ */
|
|
615
|
-
}), /* @__PURE__ */
|
|
635
|
+
children: /* @__PURE__ */ k(J, {})
|
|
636
|
+
}), /* @__PURE__ */ k(G, { children: ve.map((e) => /* @__PURE__ */ k(K, {
|
|
616
637
|
value: e,
|
|
617
|
-
children:
|
|
638
|
+
children: Q(e)
|
|
618
639
|
}, e)) })]
|
|
619
640
|
})]
|
|
620
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ A("div", {
|
|
621
642
|
className: "space-y-1.5",
|
|
622
|
-
children: [/* @__PURE__ */
|
|
643
|
+
children: [/* @__PURE__ */ k(U, {
|
|
623
644
|
htmlFor: "insight-severity",
|
|
624
645
|
children: c("brainyrich.insights.form.severity", "Severity")
|
|
625
|
-
}), /* @__PURE__ */
|
|
646
|
+
}), /* @__PURE__ */ A(W, {
|
|
626
647
|
value: t.severity,
|
|
627
648
|
onValueChange: (e) => n("severity", e),
|
|
628
|
-
children: [/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ k(q, {
|
|
629
650
|
id: "insight-severity",
|
|
630
|
-
children: /* @__PURE__ */
|
|
631
|
-
}), /* @__PURE__ */
|
|
651
|
+
children: /* @__PURE__ */ k(J, {})
|
|
652
|
+
}), /* @__PURE__ */ k(G, { children: X.map((e) => /* @__PURE__ */ k(K, {
|
|
632
653
|
value: e,
|
|
633
|
-
children:
|
|
654
|
+
children: Q(e)
|
|
634
655
|
}, e)) })]
|
|
635
656
|
})]
|
|
636
657
|
})]
|
|
637
658
|
}),
|
|
638
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ k(g, {
|
|
639
660
|
id: "insight-subject",
|
|
640
661
|
label: c("brainyrich.insights.form.subject", "Subject"),
|
|
641
662
|
placeholder: c("brainyrich.insights.form.subjectPlaceholder", "Select an account, portfolio, goal or household"),
|
|
642
663
|
value: t.subject,
|
|
643
664
|
onChange: (e) => n("subject", e)
|
|
644
665
|
}),
|
|
645
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ A("div", {
|
|
646
667
|
className: "space-y-1.5",
|
|
647
|
-
children: [/* @__PURE__ */
|
|
668
|
+
children: [/* @__PURE__ */ k(U, {
|
|
648
669
|
htmlFor: "insight-owner",
|
|
649
670
|
children: c("brainyrich.insights.form.ownerId", "Owner ID (optional)")
|
|
650
|
-
}), /* @__PURE__ */
|
|
671
|
+
}), /* @__PURE__ */ k(H, {
|
|
651
672
|
id: "insight-owner",
|
|
652
673
|
value: t.ownerId,
|
|
653
674
|
onChange: (e) => n("ownerId", e.target.value),
|
|
654
675
|
placeholder: c("brainyrich.insights.form.ownerIdPlaceholder", "Defaults to the current owner")
|
|
655
676
|
})]
|
|
656
677
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ A("div", {
|
|
658
679
|
className: "space-y-1.5",
|
|
659
|
-
children: [/* @__PURE__ */
|
|
680
|
+
children: [/* @__PURE__ */ k(U, {
|
|
660
681
|
htmlFor: "insight-detail",
|
|
661
682
|
children: c("brainyrich.insights.form.detail", "Detail")
|
|
662
|
-
}), /* @__PURE__ */
|
|
683
|
+
}), /* @__PURE__ */ k(Y, {
|
|
663
684
|
id: "insight-detail",
|
|
664
685
|
value: t.detail,
|
|
665
686
|
onChange: (e) => n("detail", e.target.value),
|
|
@@ -667,14 +688,14 @@ function Te({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
667
688
|
placeholder: c("brainyrich.insights.form.detailPlaceholder", "Explain the finding and recommended action.")
|
|
668
689
|
})]
|
|
669
690
|
}),
|
|
670
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ A("div", {
|
|
671
692
|
className: "space-y-1.5",
|
|
672
693
|
children: [
|
|
673
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ k(U, {
|
|
674
695
|
htmlFor: "insight-metrics",
|
|
675
696
|
children: c("brainyrich.insights.form.metrics", "Metrics JSON (optional)")
|
|
676
697
|
}),
|
|
677
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ k(Y, {
|
|
678
699
|
id: "insight-metrics",
|
|
679
700
|
value: t.metrics,
|
|
680
701
|
onChange: (e) => n("metrics", e.target.value),
|
|
@@ -683,22 +704,22 @@ function Te({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
683
704
|
placeholder: "{ \"driftPct\": 8.2 }",
|
|
684
705
|
"aria-invalid": !r
|
|
685
706
|
}),
|
|
686
|
-
r ? null : /* @__PURE__ */
|
|
707
|
+
r ? null : /* @__PURE__ */ A("p", {
|
|
687
708
|
className: "flex items-center gap-1 text-xs text-status-error-text",
|
|
688
|
-
children: [/* @__PURE__ */
|
|
709
|
+
children: [/* @__PURE__ */ k(T, {
|
|
689
710
|
className: "size-3.5",
|
|
690
711
|
"aria-hidden": "true"
|
|
691
712
|
}), c("brainyrich.insights.form.metricsInvalid", "Enter valid JSON or leave blank.")]
|
|
692
713
|
})
|
|
693
714
|
]
|
|
694
715
|
}),
|
|
695
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ A(I, { children: [/* @__PURE__ */ k(M, {
|
|
696
717
|
type: "button",
|
|
697
718
|
variant: "outline",
|
|
698
719
|
onClick: () => s(!1),
|
|
699
720
|
disabled: a,
|
|
700
721
|
children: c("brainyrich.insights.form.cancel", "Cancel")
|
|
701
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ k(M, {
|
|
702
723
|
type: "submit",
|
|
703
724
|
disabled: !i || a,
|
|
704
725
|
children: a ? c("brainyrich.insights.form.saving", "Saving…") : c("brainyrich.insights.form.create", "Create insight")
|
|
@@ -709,6 +730,6 @@ function Te({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
709
730
|
});
|
|
710
731
|
}
|
|
711
732
|
//#endregion
|
|
712
|
-
export {
|
|
733
|
+
export { $ as AiAssistantPage };
|
|
713
734
|
|
|
714
735
|
//# sourceMappingURL=AiAssistantPage.js.map
|