@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.
- package/dist/brainyrich/BrainyRichRoot.js +13 -13
- package/dist/brainyrich/components/ActorName.js +38 -0
- package/dist/brainyrich/components/ActorName.js.map +1 -0
- package/dist/brainyrich/components/ConfirmDialog.js +25 -0
- package/dist/brainyrich/components/ConfirmDialog.js.map +1 -0
- package/dist/brainyrich/components/LoadMore.js +24 -0
- package/dist/brainyrich/components/LoadMore.js.map +1 -0
- package/dist/brainyrich/components/index.js +5 -0
- package/dist/brainyrich/components/notify.js +38 -0
- package/dist/brainyrich/components/notify.js.map +1 -0
- package/dist/brainyrich/components/pickers.js +232 -0
- package/dist/brainyrich/components/pickers.js.map +1 -0
- package/dist/brainyrich/components/reuse/CommentThread.js +208 -0
- package/dist/brainyrich/components/reuse/CommentThread.js.map +1 -0
- package/dist/brainyrich/components/reuse/DocumentsPanel.js +237 -0
- package/dist/brainyrich/components/reuse/DocumentsPanel.js.map +1 -0
- package/dist/brainyrich/components/reuse/TagField.js +206 -0
- package/dist/brainyrich/components/reuse/TagField.js.map +1 -0
- package/dist/brainyrich/components/reuse/transport.js +24 -0
- package/dist/brainyrich/components/reuse/transport.js.map +1 -0
- package/dist/brainyrich/hooks/useBrainyRichApi.js +644 -372
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/pages/AccountsPage.js +346 -293
- package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
- package/dist/brainyrich/pages/AiAssistantPage.js +339 -320
- package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
- package/dist/brainyrich/pages/AnalyticsPage.js +178 -164
- package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
- package/dist/brainyrich/pages/DashboardPage.js +195 -169
- package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
- package/dist/brainyrich/pages/FamilyPage.js +247 -198
- package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
- package/dist/brainyrich/pages/GoalsPage.js +478 -442
- package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
- package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.js +438 -396
- package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js +246 -213
- package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js +321 -173
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/pages/TaxPage.js +258 -225
- package/dist/brainyrich/pages/TaxPage.js.map +1 -1
- package/dist/brainyrich/pages/_shared.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +163 -0
- package/dist/node_modules/sonner/dist/index.js.map +1 -0
- package/package.json +3 -2
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { tWithFallback as e } from "../utils/i18n.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { useAccounts as t, useAcknowledgeInsight as n, useCreateInsight as r, useDismissInsight as i, useGoals as a, useHouseholds as o, usePagedInsights as s, usePortfolios as c, useResolveInsight as l } from "../hooks/useBrainyRichApi.js";
|
|
3
|
+
import { LoadMore as u } from "../components/LoadMore.js";
|
|
4
|
+
import { ConfirmDialog as d } from "../components/ConfirmDialog.js";
|
|
5
|
+
import { SubjectPicker as f, parseSubject as p } from "../components/pickers.js";
|
|
6
|
+
import "../components/index.js";
|
|
7
|
+
import { EmptyState as m, ErrorState as ee, KpiGrid as te, LoadingState as ne, SectionShell as re, formatDate as h, statusBadgeVariant as g } from "./_shared.js";
|
|
8
|
+
import { useMemo as _, useState as v } from "react";
|
|
9
|
+
import { AlertTriangle as y, BellRing as b, CheckCircle2 as x, Info as S, Lightbulb as C, MoreHorizontal as w, Plus as ie, ShieldAlert as ae, XCircle as oe } from "lucide-react";
|
|
10
|
+
import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { Fragment as ce, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
12
|
+
import { Badge as D, Button as O, Card as le, CardContent as k, CardDescription as A, CardHeader as ue, CardTitle as de, Dialog as j, DialogContent as M, DialogDescription as N, DialogFooter as P, DialogHeader as fe, DialogTitle as F, DropdownMenu as I, DropdownMenuContent as L, DropdownMenuItem as R, DropdownMenuSeparator as z, DropdownMenuTrigger as B, Input as V, Label as H, Select as U, SelectContent as W, SelectItem as G, SelectTrigger as K, SelectValue as q, Textarea as J } from "@burdenoff/fe-libs/ui";
|
|
9
13
|
//#region src/brainyrich/pages/AiAssistantPage.tsx
|
|
10
|
-
var
|
|
14
|
+
var pe = [
|
|
11
15
|
"REBALANCE_DUE",
|
|
12
16
|
"DRIFT",
|
|
13
17
|
"CONCENTRATION_RISK",
|
|
@@ -15,411 +19,447 @@ var X = [
|
|
|
15
19
|
"FEE_ANOMALY",
|
|
16
20
|
"TAX_OPPORTUNITY",
|
|
17
21
|
"GOAL_AT_RISK"
|
|
18
|
-
],
|
|
22
|
+
], me = [
|
|
19
23
|
"INFO",
|
|
20
24
|
"LOW",
|
|
21
25
|
"MEDIUM",
|
|
22
26
|
"HIGH",
|
|
23
27
|
"CRITICAL"
|
|
24
|
-
],
|
|
28
|
+
], he = [
|
|
25
29
|
"OPEN",
|
|
26
30
|
"ACKNOWLEDGED",
|
|
27
31
|
"RESOLVED",
|
|
28
32
|
"DISMISSED"
|
|
29
|
-
],
|
|
30
|
-
function
|
|
33
|
+
], Y = "__all__";
|
|
34
|
+
function X(e) {
|
|
31
35
|
return e.toLowerCase().split("_").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
|
|
32
36
|
}
|
|
33
|
-
function
|
|
37
|
+
function ge(e) {
|
|
34
38
|
switch (e) {
|
|
35
39
|
case "CRITICAL": return {
|
|
36
|
-
icon:
|
|
40
|
+
icon: ae,
|
|
37
41
|
tone: "text-status-error-text"
|
|
38
42
|
};
|
|
39
43
|
case "HIGH": return {
|
|
40
|
-
icon:
|
|
44
|
+
icon: y,
|
|
41
45
|
tone: "text-status-error-text"
|
|
42
46
|
};
|
|
43
47
|
case "MEDIUM": return {
|
|
44
|
-
icon:
|
|
48
|
+
icon: b,
|
|
45
49
|
tone: "text-status-warning-text"
|
|
46
50
|
};
|
|
47
51
|
case "LOW": return {
|
|
48
|
-
icon:
|
|
52
|
+
icon: C,
|
|
49
53
|
tone: "text-status-warning-text"
|
|
50
54
|
};
|
|
51
55
|
default: return {
|
|
52
|
-
icon:
|
|
56
|
+
icon: S,
|
|
53
57
|
tone: "text-text-secondary"
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
function
|
|
61
|
+
function _e() {
|
|
58
62
|
return {
|
|
59
63
|
title: "",
|
|
60
64
|
type: "DRIFT",
|
|
61
65
|
severity: "MEDIUM",
|
|
62
|
-
|
|
63
|
-
subjectId: "",
|
|
66
|
+
subject: "",
|
|
64
67
|
detail: "",
|
|
65
68
|
metrics: "",
|
|
66
69
|
ownerId: ""
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
|
-
function
|
|
70
|
-
let { t: d } =
|
|
71
|
-
...h ===
|
|
72
|
-
...
|
|
73
|
-
}),
|
|
72
|
+
function Z() {
|
|
73
|
+
let { t: d } = se(), f = (t, n, r) => e(d, t, n, r), [h, g] = v(Y), [y, x] = v(Y), [S, C] = v(Y), { items: w, hasMore: ae, loadMore: oe, isLoading: D, isFetchingNextPage: A, isError: ue, refetch: de } = s({
|
|
74
|
+
...h === Y ? {} : { severity: h },
|
|
75
|
+
...y === Y ? {} : { status: y }
|
|
76
|
+
}), j = t(), M = c(), N = a(), P = o(), fe = _(() => {
|
|
77
|
+
let e = /* @__PURE__ */ new Map();
|
|
78
|
+
for (let t of j.data) e.set(t.id, t.name);
|
|
79
|
+
for (let t of M.data) e.set(t.id, t.name);
|
|
80
|
+
for (let t of N.data) e.set(t.id, t.name);
|
|
81
|
+
for (let t of P.data) e.set(t.id, t.name);
|
|
82
|
+
return e;
|
|
83
|
+
}, [
|
|
84
|
+
j.data,
|
|
85
|
+
M.data,
|
|
86
|
+
N.data,
|
|
87
|
+
P.data
|
|
88
|
+
]), F = n(), I = i(), L = l(), R = r(), [z, B] = v(!1), [V, J] = v(_e), ge = (e, t) => J((n) => ({
|
|
74
89
|
...n,
|
|
75
90
|
[e]: t
|
|
76
|
-
})),
|
|
77
|
-
open:
|
|
78
|
-
urgent:
|
|
79
|
-
resolved:
|
|
80
|
-
}), [
|
|
81
|
-
if (!
|
|
91
|
+
})), Z = _(() => S === Y ? w : w.filter((e) => e.type === S), [w, S]), Q = _(() => ({
|
|
92
|
+
open: w.filter((e) => e.status === "OPEN").length,
|
|
93
|
+
urgent: w.filter((e) => e.severity === "HIGH" || e.severity === "CRITICAL").length,
|
|
94
|
+
resolved: w.filter((e) => e.status === "RESOLVED").length
|
|
95
|
+
}), [w]), be = _(() => {
|
|
96
|
+
if (!V.metrics.trim()) return !0;
|
|
82
97
|
try {
|
|
83
|
-
return JSON.parse(
|
|
98
|
+
return JSON.parse(V.metrics), !0;
|
|
84
99
|
} catch {
|
|
85
100
|
return !1;
|
|
86
101
|
}
|
|
87
|
-
}, [
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
if (!
|
|
91
|
-
let e;
|
|
92
|
-
if (
|
|
93
|
-
|
|
102
|
+
}, [V.metrics]), xe = V.title.trim().length > 0 && p(V.subject) !== null && be, Se = () => {
|
|
103
|
+
J(_e()), B(!0);
|
|
104
|
+
}, Ce = () => {
|
|
105
|
+
if (!xe) return;
|
|
106
|
+
let e = p(V.subject);
|
|
107
|
+
if (!e) return;
|
|
108
|
+
let t;
|
|
109
|
+
if (V.metrics.trim()) try {
|
|
110
|
+
t = JSON.parse(V.metrics);
|
|
94
111
|
} catch {
|
|
95
112
|
return;
|
|
96
113
|
}
|
|
97
|
-
let
|
|
98
|
-
title:
|
|
99
|
-
type:
|
|
100
|
-
severity:
|
|
101
|
-
subjectType:
|
|
102
|
-
subjectId:
|
|
103
|
-
detail:
|
|
104
|
-
...
|
|
105
|
-
...
|
|
114
|
+
let n = {
|
|
115
|
+
title: V.title.trim(),
|
|
116
|
+
type: V.type,
|
|
117
|
+
severity: V.severity,
|
|
118
|
+
subjectType: e.subjectType,
|
|
119
|
+
subjectId: e.subjectId,
|
|
120
|
+
detail: V.detail.trim() || null,
|
|
121
|
+
...t ? { metrics: t } : {},
|
|
122
|
+
...V.ownerId.trim() ? { ownerId: V.ownerId.trim() } : {}
|
|
106
123
|
};
|
|
107
|
-
|
|
108
|
-
}, $ = h !==
|
|
109
|
-
return /* @__PURE__ */
|
|
124
|
+
R.mutate(n, { onSuccess: () => B(!1) });
|
|
125
|
+
}, $ = h !== Y || y !== Y || S !== Y;
|
|
126
|
+
return /* @__PURE__ */ E(ce, { children: [/* @__PURE__ */ T(re, {
|
|
110
127
|
title: f("brainyrich.insights.title", "Insights"),
|
|
111
128
|
description: f("brainyrich.insights.description", "Advisory insights across portfolios, accounts and goals — triage, acknowledge and resolve."),
|
|
112
129
|
badges: [f("brainyrich.insights.badges.advisory", "Advisory")],
|
|
113
130
|
actionLabel: f("brainyrich.insights.actions.create", "New insight"),
|
|
114
|
-
onAction:
|
|
115
|
-
children:
|
|
131
|
+
onAction: Se,
|
|
132
|
+
children: D ? /* @__PURE__ */ T(ne, { rows: 4 }) : ue ? /* @__PURE__ */ T(ee, {
|
|
116
133
|
title: f("brainyrich.insights.error.title", "Could not load insights"),
|
|
117
134
|
description: f("brainyrich.insights.error.description", "We could not reach the insights service. Please try again."),
|
|
118
|
-
onRetry: () =>
|
|
119
|
-
}) : /* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
135
|
+
onRetry: () => de()
|
|
136
|
+
}) : /* @__PURE__ */ E(ce, { children: [
|
|
137
|
+
/* @__PURE__ */ T(te, { items: [
|
|
121
138
|
{
|
|
122
139
|
label: f("brainyrich.insights.metrics.total", "Insights"),
|
|
123
|
-
value: String(
|
|
140
|
+
value: String(w.length),
|
|
124
141
|
trend: f("brainyrich.insights.metrics.totalTrend", "In your inbox")
|
|
125
142
|
},
|
|
126
143
|
{
|
|
127
144
|
label: f("brainyrich.insights.metrics.open", "Open"),
|
|
128
|
-
value: String(
|
|
145
|
+
value: String(Q.open),
|
|
129
146
|
trend: f("brainyrich.insights.metrics.openTrend", "Awaiting action"),
|
|
130
|
-
deltaTone:
|
|
147
|
+
deltaTone: Q.open > 0 ? "negative" : "positive"
|
|
131
148
|
},
|
|
132
149
|
{
|
|
133
150
|
label: f("brainyrich.insights.metrics.urgent", "High priority"),
|
|
134
|
-
value: String(
|
|
151
|
+
value: String(Q.urgent),
|
|
135
152
|
trend: f("brainyrich.insights.metrics.urgentTrend", "High or critical"),
|
|
136
|
-
deltaTone:
|
|
153
|
+
deltaTone: Q.urgent > 0 ? "negative" : "positive"
|
|
137
154
|
},
|
|
138
155
|
{
|
|
139
156
|
label: f("brainyrich.insights.metrics.resolved", "Resolved"),
|
|
140
|
-
value: String(
|
|
157
|
+
value: String(Q.resolved),
|
|
141
158
|
trend: f("brainyrich.insights.metrics.resolvedTrend", "Closed out"),
|
|
142
159
|
deltaTone: "positive"
|
|
143
160
|
}
|
|
144
161
|
] }),
|
|
145
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ T(le, { children: /* @__PURE__ */ E(k, {
|
|
146
163
|
className: "flex flex-col gap-3 p-4 sm:flex-row sm:items-end",
|
|
147
164
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ E("div", {
|
|
149
166
|
className: "w-full space-y-1.5 sm:w-48",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ T(H, {
|
|
151
168
|
htmlFor: "insight-filter-severity",
|
|
152
169
|
children: f("brainyrich.insights.filters.severity", "Severity")
|
|
153
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ E(U, {
|
|
154
171
|
value: h,
|
|
155
|
-
onValueChange:
|
|
156
|
-
children: [/* @__PURE__ */
|
|
172
|
+
onValueChange: g,
|
|
173
|
+
children: [/* @__PURE__ */ T(K, {
|
|
157
174
|
id: "insight-filter-severity",
|
|
158
|
-
children: /* @__PURE__ */
|
|
159
|
-
}), /* @__PURE__ */
|
|
160
|
-
value:
|
|
175
|
+
children: /* @__PURE__ */ T(q, {})
|
|
176
|
+
}), /* @__PURE__ */ E(W, { children: [/* @__PURE__ */ T(G, {
|
|
177
|
+
value: Y,
|
|
161
178
|
children: f("brainyrich.insights.filters.all", "All")
|
|
162
|
-
}),
|
|
179
|
+
}), me.map((e) => /* @__PURE__ */ T(G, {
|
|
163
180
|
value: e,
|
|
164
|
-
children:
|
|
181
|
+
children: X(e)
|
|
165
182
|
}, e))] })]
|
|
166
183
|
})]
|
|
167
184
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ E("div", {
|
|
169
186
|
className: "w-full space-y-1.5 sm:w-48",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ T(H, {
|
|
171
188
|
htmlFor: "insight-filter-status",
|
|
172
189
|
children: f("brainyrich.insights.filters.status", "Status")
|
|
173
|
-
}), /* @__PURE__ */
|
|
174
|
-
value:
|
|
175
|
-
onValueChange:
|
|
176
|
-
children: [/* @__PURE__ */
|
|
190
|
+
}), /* @__PURE__ */ E(U, {
|
|
191
|
+
value: y,
|
|
192
|
+
onValueChange: x,
|
|
193
|
+
children: [/* @__PURE__ */ T(K, {
|
|
177
194
|
id: "insight-filter-status",
|
|
178
|
-
children: /* @__PURE__ */
|
|
179
|
-
}), /* @__PURE__ */
|
|
180
|
-
value:
|
|
195
|
+
children: /* @__PURE__ */ T(q, {})
|
|
196
|
+
}), /* @__PURE__ */ E(W, { children: [/* @__PURE__ */ T(G, {
|
|
197
|
+
value: Y,
|
|
181
198
|
children: f("brainyrich.insights.filters.all", "All")
|
|
182
|
-
}),
|
|
199
|
+
}), he.map((e) => /* @__PURE__ */ T(G, {
|
|
183
200
|
value: e,
|
|
184
|
-
children:
|
|
201
|
+
children: X(e)
|
|
185
202
|
}, e))] })]
|
|
186
203
|
})]
|
|
187
204
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ E("div", {
|
|
189
206
|
className: "w-full space-y-1.5 sm:w-56",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ T(H, {
|
|
191
208
|
htmlFor: "insight-filter-type",
|
|
192
209
|
children: f("brainyrich.insights.filters.type", "Type")
|
|
193
|
-
}), /* @__PURE__ */
|
|
194
|
-
value:
|
|
195
|
-
onValueChange:
|
|
196
|
-
children: [/* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ E(U, {
|
|
211
|
+
value: S,
|
|
212
|
+
onValueChange: C,
|
|
213
|
+
children: [/* @__PURE__ */ T(K, {
|
|
197
214
|
id: "insight-filter-type",
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
-
}), /* @__PURE__ */
|
|
200
|
-
value:
|
|
215
|
+
children: /* @__PURE__ */ T(q, {})
|
|
216
|
+
}), /* @__PURE__ */ E(W, { children: [/* @__PURE__ */ T(G, {
|
|
217
|
+
value: Y,
|
|
201
218
|
children: f("brainyrich.insights.filters.all", "All")
|
|
202
|
-
}),
|
|
219
|
+
}), pe.map((e) => /* @__PURE__ */ T(G, {
|
|
203
220
|
value: e,
|
|
204
|
-
children:
|
|
221
|
+
children: X(e)
|
|
205
222
|
}, e))] })]
|
|
206
223
|
})]
|
|
207
224
|
})
|
|
208
225
|
]
|
|
209
226
|
}) }),
|
|
210
|
-
|
|
211
|
-
icon: /* @__PURE__ */
|
|
227
|
+
Z.length === 0 ? /* @__PURE__ */ T(m, {
|
|
228
|
+
icon: /* @__PURE__ */ T(b, {
|
|
212
229
|
className: "size-6",
|
|
213
230
|
"aria-hidden": "true"
|
|
214
231
|
}),
|
|
215
232
|
title: $ ? f("brainyrich.insights.empty.filteredTitle", "No matching insights") : f("brainyrich.insights.empty.title", "No advisory insights yet"),
|
|
216
233
|
description: $ ? f("brainyrich.insights.empty.filteredDescription", "No insights match the selected filters. Adjust or clear them to see more.") : f("brainyrich.insights.empty.description", "Advisory insights flag rebalancing, drift, concentration and other opportunities. Create one to get started."),
|
|
217
|
-
action: $ ? /* @__PURE__ */
|
|
234
|
+
action: $ ? /* @__PURE__ */ T(O, {
|
|
218
235
|
variant: "outline",
|
|
219
236
|
size: "sm",
|
|
220
237
|
onClick: () => {
|
|
221
|
-
|
|
238
|
+
g(Y), x(Y), C(Y);
|
|
222
239
|
},
|
|
223
240
|
children: f("brainyrich.insights.actions.clearFilters", "Clear filters")
|
|
224
|
-
}) : /* @__PURE__ */
|
|
241
|
+
}) : /* @__PURE__ */ E(O, {
|
|
225
242
|
size: "sm",
|
|
226
|
-
onClick:
|
|
227
|
-
children: [/* @__PURE__ */
|
|
243
|
+
onClick: Se,
|
|
244
|
+
children: [/* @__PURE__ */ T(ie, {
|
|
228
245
|
className: "size-4",
|
|
229
246
|
"aria-hidden": "true"
|
|
230
247
|
}), f("brainyrich.insights.actions.create", "New insight")]
|
|
231
248
|
})
|
|
232
|
-
}) : /* @__PURE__ */
|
|
249
|
+
}) : /* @__PURE__ */ T("div", {
|
|
233
250
|
className: "space-y-3",
|
|
234
|
-
children:
|
|
251
|
+
children: Z.map((e) => /* @__PURE__ */ T(ve, {
|
|
235
252
|
insight: e,
|
|
253
|
+
subjectName: fe.get(e.subjectId),
|
|
236
254
|
translate: f,
|
|
237
|
-
onAcknowledge: () =>
|
|
238
|
-
onDismiss: () =>
|
|
239
|
-
onResolve: () =>
|
|
240
|
-
acknowledgePending:
|
|
241
|
-
dismissPending:
|
|
242
|
-
resolvePending:
|
|
255
|
+
onAcknowledge: () => F.mutate(e.id),
|
|
256
|
+
onDismiss: () => I.mutate(e.id),
|
|
257
|
+
onResolve: () => L.mutate(e.id),
|
|
258
|
+
acknowledgePending: F.isPending,
|
|
259
|
+
dismissPending: I.isPending,
|
|
260
|
+
resolvePending: L.isPending
|
|
243
261
|
}, e.id))
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ T(u, {
|
|
264
|
+
hasMore: ae,
|
|
265
|
+
onClick: oe,
|
|
266
|
+
loading: A,
|
|
267
|
+
label: f("brainyrich.insights.actions.loadMore", "Load more insights")
|
|
244
268
|
})
|
|
245
269
|
] })
|
|
246
|
-
}), /* @__PURE__ */
|
|
247
|
-
open:
|
|
248
|
-
form:
|
|
249
|
-
setField:
|
|
250
|
-
metricsValid:
|
|
251
|
-
valid:
|
|
252
|
-
pending:
|
|
253
|
-
onSubmit:
|
|
254
|
-
onOpenChange: (e) =>
|
|
270
|
+
}), /* @__PURE__ */ T(ye, {
|
|
271
|
+
open: z,
|
|
272
|
+
form: V,
|
|
273
|
+
setField: ge,
|
|
274
|
+
metricsValid: be,
|
|
275
|
+
valid: xe,
|
|
276
|
+
pending: R.isPending,
|
|
277
|
+
onSubmit: Ce,
|
|
278
|
+
onOpenChange: (e) => B(e),
|
|
255
279
|
translate: f
|
|
256
280
|
})] });
|
|
257
281
|
}
|
|
258
|
-
function
|
|
259
|
-
let
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
282
|
+
function ve({ insight: e, subjectName: t, translate: n, onAcknowledge: r, onDismiss: i, onResolve: a, acknowledgePending: o, dismissPending: s, resolvePending: c }) {
|
|
283
|
+
let l = ge(e.severity), u = l.icon, f = e.status === "RESOLVED" || e.status === "DISMISSED", [p, m] = v(!1);
|
|
284
|
+
return /* @__PURE__ */ E(le, { children: [
|
|
285
|
+
/* @__PURE__ */ T(ue, {
|
|
286
|
+
className: "pb-3",
|
|
287
|
+
children: /* @__PURE__ */ E("div", {
|
|
288
|
+
className: "flex items-start justify-between gap-3",
|
|
289
|
+
children: [/* @__PURE__ */ E("div", {
|
|
290
|
+
className: "flex min-w-0 items-start gap-3",
|
|
291
|
+
children: [/* @__PURE__ */ T("span", {
|
|
292
|
+
className: `mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-full bg-bg-sunken ${l.tone}`,
|
|
293
|
+
children: /* @__PURE__ */ T(u, {
|
|
294
|
+
className: "size-5",
|
|
295
|
+
"aria-hidden": "true"
|
|
296
|
+
})
|
|
297
|
+
}), /* @__PURE__ */ E("div", {
|
|
298
|
+
className: "min-w-0",
|
|
299
|
+
children: [/* @__PURE__ */ T(de, {
|
|
300
|
+
className: "text-base",
|
|
301
|
+
children: e.title
|
|
302
|
+
}), /* @__PURE__ */ E(A, {
|
|
303
|
+
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ T(D, {
|
|
306
|
+
variant: "outline",
|
|
307
|
+
children: X(e.type)
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ T(D, {
|
|
310
|
+
variant: g(e.severity),
|
|
311
|
+
children: /* @__PURE__ */ E("span", {
|
|
312
|
+
className: `inline-flex items-center gap-1 ${l.tone}`,
|
|
313
|
+
children: [/* @__PURE__ */ T(u, {
|
|
314
|
+
className: "size-3",
|
|
315
|
+
"aria-hidden": "true"
|
|
316
|
+
}), X(e.severity)]
|
|
317
|
+
})
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ T(D, {
|
|
320
|
+
variant: g(e.status),
|
|
321
|
+
children: X(e.status)
|
|
292
322
|
})
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
variant: f(e.status),
|
|
296
|
-
children: Q(e.status)
|
|
297
|
-
})
|
|
298
|
-
]
|
|
323
|
+
]
|
|
324
|
+
})]
|
|
299
325
|
})]
|
|
300
|
-
})
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
children: /* @__PURE__ */ w(b, {
|
|
308
|
-
className: "size-4",
|
|
309
|
-
"aria-hidden": "true"
|
|
310
|
-
})
|
|
311
|
-
})
|
|
312
|
-
}), /* @__PURE__ */ T(R, {
|
|
313
|
-
align: "end",
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ T(z, {
|
|
316
|
-
disabled: a || e.status === "ACKNOWLEDGED" || u,
|
|
317
|
-
onSelect: n,
|
|
318
|
-
children: [/* @__PURE__ */ w(_, {
|
|
326
|
+
}), /* @__PURE__ */ E(I, { children: [/* @__PURE__ */ T(B, {
|
|
327
|
+
asChild: !0,
|
|
328
|
+
children: /* @__PURE__ */ T(O, {
|
|
329
|
+
variant: "ghost",
|
|
330
|
+
size: "icon",
|
|
331
|
+
"aria-label": n("brainyrich.insights.actions.menu", "Insight actions"),
|
|
332
|
+
children: /* @__PURE__ */ T(w, {
|
|
319
333
|
className: "size-4",
|
|
320
334
|
"aria-hidden": "true"
|
|
321
|
-
})
|
|
322
|
-
})
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
335
|
+
})
|
|
336
|
+
})
|
|
337
|
+
}), /* @__PURE__ */ E(L, {
|
|
338
|
+
align: "end",
|
|
339
|
+
children: [
|
|
340
|
+
/* @__PURE__ */ E(R, {
|
|
341
|
+
disabled: o || e.status === "ACKNOWLEDGED" || f,
|
|
342
|
+
onSelect: r,
|
|
343
|
+
children: [/* @__PURE__ */ T(x, {
|
|
344
|
+
className: "size-4",
|
|
345
|
+
"aria-hidden": "true"
|
|
346
|
+
}), n("brainyrich.insights.actions.acknowledge", "Acknowledge")]
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ E(R, {
|
|
349
|
+
disabled: c || e.status === "RESOLVED",
|
|
350
|
+
onSelect: a,
|
|
351
|
+
children: [/* @__PURE__ */ T(x, {
|
|
352
|
+
className: "size-4",
|
|
353
|
+
"aria-hidden": "true"
|
|
354
|
+
}), n("brainyrich.insights.actions.resolve", "Resolve")]
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ T(z, {}),
|
|
357
|
+
/* @__PURE__ */ E(R, {
|
|
358
|
+
className: "text-status-error-text focus:text-status-error-text",
|
|
359
|
+
disabled: s || e.status === "DISMISSED",
|
|
360
|
+
onSelect: (e) => {
|
|
361
|
+
e.preventDefault(), m(!0);
|
|
362
|
+
},
|
|
363
|
+
children: [/* @__PURE__ */ T(oe, {
|
|
364
|
+
className: "size-4",
|
|
365
|
+
"aria-hidden": "true"
|
|
366
|
+
}), n("brainyrich.insights.actions.dismiss", "Dismiss")]
|
|
367
|
+
})
|
|
368
|
+
]
|
|
369
|
+
})] })]
|
|
370
|
+
})
|
|
371
|
+
}),
|
|
372
|
+
/* @__PURE__ */ E(k, {
|
|
373
|
+
className: "space-y-3",
|
|
374
|
+
children: [
|
|
375
|
+
e.detail ? /* @__PURE__ */ T("p", {
|
|
376
|
+
className: "text-sm text-text-secondary",
|
|
377
|
+
children: e.detail
|
|
378
|
+
}) : null,
|
|
379
|
+
/* @__PURE__ */ E("dl", {
|
|
380
|
+
className: "grid grid-cols-2 gap-3 rounded-lg bg-bg-sunken p-3 text-sm sm:grid-cols-3",
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
|
|
383
|
+
className: "text-xs text-text-secondary",
|
|
384
|
+
children: n("brainyrich.insights.card.subjectType", "Subject")
|
|
385
|
+
}), /* @__PURE__ */ T("dd", {
|
|
386
|
+
className: "font-medium text-text-primary",
|
|
387
|
+
children: X(e.subjectType)
|
|
388
|
+
})] }),
|
|
389
|
+
/* @__PURE__ */ E("div", {
|
|
390
|
+
className: "min-w-0",
|
|
391
|
+
children: [/* @__PURE__ */ T("dt", {
|
|
392
|
+
className: "text-xs text-text-secondary",
|
|
393
|
+
children: n("brainyrich.insights.card.subject", "Reference")
|
|
394
|
+
}), /* @__PURE__ */ T("dd", {
|
|
395
|
+
className: "truncate font-medium text-text-primary",
|
|
396
|
+
title: t ? `${t} (${e.subjectId})` : e.subjectId,
|
|
397
|
+
children: t ?? e.subjectId
|
|
398
|
+
})]
|
|
399
|
+
}),
|
|
400
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
|
|
401
|
+
className: "text-xs text-text-secondary",
|
|
402
|
+
children: n("brainyrich.insights.card.created", "Created")
|
|
403
|
+
}), /* @__PURE__ */ T("dd", {
|
|
404
|
+
className: "font-medium text-text-primary",
|
|
405
|
+
children: h(e.createdAt)
|
|
406
|
+
})] })
|
|
407
|
+
]
|
|
408
|
+
}),
|
|
409
|
+
/* @__PURE__ */ E("div", {
|
|
410
|
+
className: "flex flex-wrap items-center gap-2",
|
|
411
|
+
children: [/* @__PURE__ */ E(O, {
|
|
412
|
+
variant: "outline",
|
|
413
|
+
size: "sm",
|
|
414
|
+
disabled: o || e.status === "ACKNOWLEDGED" || f,
|
|
415
|
+
onClick: r,
|
|
416
|
+
children: [/* @__PURE__ */ T(x, {
|
|
327
417
|
className: "size-4",
|
|
328
418
|
"aria-hidden": "true"
|
|
329
|
-
}),
|
|
330
|
-
}),
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
onSelect: r,
|
|
336
|
-
children: [/* @__PURE__ */ w(S, {
|
|
419
|
+
}), n("brainyrich.insights.actions.acknowledge", "Acknowledge")]
|
|
420
|
+
}), /* @__PURE__ */ E(O, {
|
|
421
|
+
size: "sm",
|
|
422
|
+
disabled: c || e.status === "RESOLVED",
|
|
423
|
+
onClick: a,
|
|
424
|
+
children: [/* @__PURE__ */ T(x, {
|
|
337
425
|
className: "size-4",
|
|
338
426
|
"aria-hidden": "true"
|
|
339
|
-
}),
|
|
340
|
-
})
|
|
341
|
-
|
|
342
|
-
|
|
427
|
+
}), n("brainyrich.insights.actions.resolve", "Resolve")]
|
|
428
|
+
})]
|
|
429
|
+
})
|
|
430
|
+
]
|
|
431
|
+
}),
|
|
432
|
+
/* @__PURE__ */ T(d, {
|
|
433
|
+
open: p,
|
|
434
|
+
onOpenChange: m,
|
|
435
|
+
title: n("brainyrich.insights.dismiss.title", "Dismiss this insight?"),
|
|
436
|
+
description: n("brainyrich.insights.dismiss.description", "Dismissing removes this insight from active triage. You can still find it by filtering for dismissed insights."),
|
|
437
|
+
confirmLabel: n("brainyrich.insights.actions.dismiss", "Dismiss"),
|
|
438
|
+
pendingLabel: n("brainyrich.insights.dismiss.pending", "Dismissing…"),
|
|
439
|
+
destructive: !0,
|
|
440
|
+
pending: s,
|
|
441
|
+
onConfirm: i
|
|
343
442
|
})
|
|
344
|
-
})
|
|
345
|
-
className: "space-y-3",
|
|
346
|
-
children: [
|
|
347
|
-
e.detail ? /* @__PURE__ */ w("p", {
|
|
348
|
-
className: "text-sm text-text-secondary",
|
|
349
|
-
children: e.detail
|
|
350
|
-
}) : null,
|
|
351
|
-
/* @__PURE__ */ T("dl", {
|
|
352
|
-
className: "grid grid-cols-2 gap-3 rounded-lg bg-bg-sunken p-3 text-sm sm:grid-cols-3",
|
|
353
|
-
children: [
|
|
354
|
-
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
|
|
355
|
-
className: "text-xs text-text-secondary",
|
|
356
|
-
children: t("brainyrich.insights.card.subjectType", "Subject")
|
|
357
|
-
}), /* @__PURE__ */ w("dd", {
|
|
358
|
-
className: "font-medium text-text-primary",
|
|
359
|
-
children: Q(e.subjectType)
|
|
360
|
-
})] }),
|
|
361
|
-
/* @__PURE__ */ T("div", {
|
|
362
|
-
className: "min-w-0",
|
|
363
|
-
children: [/* @__PURE__ */ w("dt", {
|
|
364
|
-
className: "text-xs text-text-secondary",
|
|
365
|
-
children: t("brainyrich.insights.card.subjectId", "Subject ID")
|
|
366
|
-
}), /* @__PURE__ */ w("dd", {
|
|
367
|
-
className: "truncate font-medium text-text-primary",
|
|
368
|
-
title: e.subjectId,
|
|
369
|
-
children: e.subjectId
|
|
370
|
-
})]
|
|
371
|
-
}),
|
|
372
|
-
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
|
|
373
|
-
className: "text-xs text-text-secondary",
|
|
374
|
-
children: t("brainyrich.insights.card.created", "Created")
|
|
375
|
-
}), /* @__PURE__ */ w("dd", {
|
|
376
|
-
className: "font-medium text-text-primary",
|
|
377
|
-
children: d(e.createdAt)
|
|
378
|
-
})] })
|
|
379
|
-
]
|
|
380
|
-
}),
|
|
381
|
-
/* @__PURE__ */ T("div", {
|
|
382
|
-
className: "flex flex-wrap items-center gap-2",
|
|
383
|
-
children: [/* @__PURE__ */ T(D, {
|
|
384
|
-
variant: "outline",
|
|
385
|
-
size: "sm",
|
|
386
|
-
disabled: a || e.status === "ACKNOWLEDGED" || u,
|
|
387
|
-
onClick: n,
|
|
388
|
-
children: [/* @__PURE__ */ w(_, {
|
|
389
|
-
className: "size-4",
|
|
390
|
-
"aria-hidden": "true"
|
|
391
|
-
}), t("brainyrich.insights.actions.acknowledge", "Acknowledge")]
|
|
392
|
-
}), /* @__PURE__ */ T(D, {
|
|
393
|
-
size: "sm",
|
|
394
|
-
disabled: s || e.status === "RESOLVED",
|
|
395
|
-
onClick: i,
|
|
396
|
-
children: [/* @__PURE__ */ w(_, {
|
|
397
|
-
className: "size-4",
|
|
398
|
-
"aria-hidden": "true"
|
|
399
|
-
}), t("brainyrich.insights.actions.resolve", "Resolve")]
|
|
400
|
-
})]
|
|
401
|
-
})
|
|
402
|
-
]
|
|
403
|
-
})] });
|
|
443
|
+
] });
|
|
404
444
|
}
|
|
405
|
-
function
|
|
406
|
-
return /* @__PURE__ */
|
|
445
|
+
function ye({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending: a, onSubmit: o, onOpenChange: s, translate: c }) {
|
|
446
|
+
return /* @__PURE__ */ T(j, {
|
|
407
447
|
open: e,
|
|
408
448
|
onOpenChange: s,
|
|
409
|
-
children: /* @__PURE__ */
|
|
449
|
+
children: /* @__PURE__ */ E(M, {
|
|
410
450
|
className: "max-h-[90vh] overflow-y-auto sm:max-w-lg",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ E(fe, { children: [/* @__PURE__ */ T(F, { children: c("brainyrich.insights.form.createTitle", "New insight") }), /* @__PURE__ */ T(N, { children: c("brainyrich.insights.form.subtitle", "Flag an advisory insight against a portfolio, account, goal or household.") })] }), /* @__PURE__ */ E("form", {
|
|
412
452
|
className: "space-y-4",
|
|
413
453
|
onSubmit: (e) => {
|
|
414
454
|
e.preventDefault(), o();
|
|
415
455
|
},
|
|
416
456
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ E("div", {
|
|
418
458
|
className: "space-y-1.5",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ T(H, {
|
|
420
460
|
htmlFor: "insight-title",
|
|
421
461
|
children: c("brainyrich.insights.form.title", "Title")
|
|
422
|
-
}), /* @__PURE__ */
|
|
462
|
+
}), /* @__PURE__ */ T(V, {
|
|
423
463
|
id: "insight-title",
|
|
424
464
|
value: t.title,
|
|
425
465
|
onChange: (e) => n("title", e.target.value),
|
|
@@ -427,88 +467,67 @@ function le({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
427
467
|
required: !0
|
|
428
468
|
})]
|
|
429
469
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ E("div", {
|
|
431
471
|
className: "grid grid-cols-2 gap-3",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
472
|
+
children: [/* @__PURE__ */ E("div", {
|
|
433
473
|
className: "space-y-1.5",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
474
|
+
children: [/* @__PURE__ */ T(H, {
|
|
435
475
|
htmlFor: "insight-type",
|
|
436
476
|
children: c("brainyrich.insights.form.type", "Type")
|
|
437
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ E(U, {
|
|
438
478
|
value: t.type,
|
|
439
479
|
onValueChange: (e) => n("type", e),
|
|
440
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ T(K, {
|
|
441
481
|
id: "insight-type",
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
}), /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ T(q, {})
|
|
483
|
+
}), /* @__PURE__ */ T(W, { children: pe.map((e) => /* @__PURE__ */ T(G, {
|
|
444
484
|
value: e,
|
|
445
|
-
children:
|
|
485
|
+
children: X(e)
|
|
446
486
|
}, e)) })]
|
|
447
487
|
})]
|
|
448
|
-
}), /* @__PURE__ */
|
|
488
|
+
}), /* @__PURE__ */ E("div", {
|
|
449
489
|
className: "space-y-1.5",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ T(H, {
|
|
451
491
|
htmlFor: "insight-severity",
|
|
452
492
|
children: c("brainyrich.insights.form.severity", "Severity")
|
|
453
|
-
}), /* @__PURE__ */
|
|
493
|
+
}), /* @__PURE__ */ E(U, {
|
|
454
494
|
value: t.severity,
|
|
455
495
|
onValueChange: (e) => n("severity", e),
|
|
456
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ T(K, {
|
|
457
497
|
id: "insight-severity",
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
}), /* @__PURE__ */
|
|
498
|
+
children: /* @__PURE__ */ T(q, {})
|
|
499
|
+
}), /* @__PURE__ */ T(W, { children: me.map((e) => /* @__PURE__ */ T(G, {
|
|
460
500
|
value: e,
|
|
461
|
-
children:
|
|
501
|
+
children: X(e)
|
|
462
502
|
}, e)) })]
|
|
463
503
|
})]
|
|
464
504
|
})]
|
|
465
505
|
}),
|
|
466
|
-
/* @__PURE__ */ T(
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
children: c("brainyrich.insights.form.subjectType", "Subject type")
|
|
473
|
-
}), /* @__PURE__ */ w(H, {
|
|
474
|
-
id: "insight-subject-type",
|
|
475
|
-
value: t.subjectType,
|
|
476
|
-
onChange: (e) => n("subjectType", e.target.value),
|
|
477
|
-
placeholder: c("brainyrich.insights.form.subjectTypePlaceholder", "e.g. PORTFOLIO"),
|
|
478
|
-
required: !0
|
|
479
|
-
})]
|
|
480
|
-
}), /* @__PURE__ */ T("div", {
|
|
481
|
-
className: "space-y-1.5",
|
|
482
|
-
children: [/* @__PURE__ */ w(U, {
|
|
483
|
-
htmlFor: "insight-subject-id",
|
|
484
|
-
children: c("brainyrich.insights.form.subjectId", "Subject ID")
|
|
485
|
-
}), /* @__PURE__ */ w(H, {
|
|
486
|
-
id: "insight-subject-id",
|
|
487
|
-
value: t.subjectId,
|
|
488
|
-
onChange: (e) => n("subjectId", e.target.value),
|
|
489
|
-
placeholder: c("brainyrich.insights.form.subjectIdPlaceholder", "Referenced entity ID"),
|
|
490
|
-
required: !0
|
|
491
|
-
})]
|
|
492
|
-
})]
|
|
506
|
+
/* @__PURE__ */ T(f, {
|
|
507
|
+
id: "insight-subject",
|
|
508
|
+
label: c("brainyrich.insights.form.subject", "Subject"),
|
|
509
|
+
placeholder: c("brainyrich.insights.form.subjectPlaceholder", "Select an account, portfolio, goal or household"),
|
|
510
|
+
value: t.subject,
|
|
511
|
+
onChange: (e) => n("subject", e)
|
|
493
512
|
}),
|
|
494
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ E("div", {
|
|
495
514
|
className: "space-y-1.5",
|
|
496
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ T(H, {
|
|
497
516
|
htmlFor: "insight-owner",
|
|
498
517
|
children: c("brainyrich.insights.form.ownerId", "Owner ID (optional)")
|
|
499
|
-
}), /* @__PURE__ */
|
|
518
|
+
}), /* @__PURE__ */ T(V, {
|
|
500
519
|
id: "insight-owner",
|
|
501
520
|
value: t.ownerId,
|
|
502
521
|
onChange: (e) => n("ownerId", e.target.value),
|
|
503
522
|
placeholder: c("brainyrich.insights.form.ownerIdPlaceholder", "Defaults to the current owner")
|
|
504
523
|
})]
|
|
505
524
|
}),
|
|
506
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ E("div", {
|
|
507
526
|
className: "space-y-1.5",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
527
|
+
children: [/* @__PURE__ */ T(H, {
|
|
509
528
|
htmlFor: "insight-detail",
|
|
510
529
|
children: c("brainyrich.insights.form.detail", "Detail")
|
|
511
|
-
}), /* @__PURE__ */
|
|
530
|
+
}), /* @__PURE__ */ T(J, {
|
|
512
531
|
id: "insight-detail",
|
|
513
532
|
value: t.detail,
|
|
514
533
|
onChange: (e) => n("detail", e.target.value),
|
|
@@ -516,14 +535,14 @@ function le({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
516
535
|
placeholder: c("brainyrich.insights.form.detailPlaceholder", "Explain the finding and recommended action.")
|
|
517
536
|
})]
|
|
518
537
|
}),
|
|
519
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ E("div", {
|
|
520
539
|
className: "space-y-1.5",
|
|
521
540
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ T(H, {
|
|
523
542
|
htmlFor: "insight-metrics",
|
|
524
543
|
children: c("brainyrich.insights.form.metrics", "Metrics JSON (optional)")
|
|
525
544
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ T(J, {
|
|
527
546
|
id: "insight-metrics",
|
|
528
547
|
value: t.metrics,
|
|
529
548
|
onChange: (e) => n("metrics", e.target.value),
|
|
@@ -532,22 +551,22 @@ function le({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
532
551
|
placeholder: "{ \"driftPct\": 8.2 }",
|
|
533
552
|
"aria-invalid": !r
|
|
534
553
|
}),
|
|
535
|
-
r ? null : /* @__PURE__ */
|
|
554
|
+
r ? null : /* @__PURE__ */ E("p", {
|
|
536
555
|
className: "flex items-center gap-1 text-xs text-status-error-text",
|
|
537
|
-
children: [/* @__PURE__ */
|
|
556
|
+
children: [/* @__PURE__ */ T(y, {
|
|
538
557
|
className: "size-3.5",
|
|
539
558
|
"aria-hidden": "true"
|
|
540
559
|
}), c("brainyrich.insights.form.metricsInvalid", "Enter valid JSON or leave blank.")]
|
|
541
560
|
})
|
|
542
561
|
]
|
|
543
562
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ E(P, { children: [/* @__PURE__ */ T(O, {
|
|
545
564
|
type: "button",
|
|
546
565
|
variant: "outline",
|
|
547
566
|
onClick: () => s(!1),
|
|
548
567
|
disabled: a,
|
|
549
568
|
children: c("brainyrich.insights.form.cancel", "Cancel")
|
|
550
|
-
}), /* @__PURE__ */
|
|
569
|
+
}), /* @__PURE__ */ T(O, {
|
|
551
570
|
type: "submit",
|
|
552
571
|
disabled: !i || a,
|
|
553
572
|
children: a ? c("brainyrich.insights.form.saving", "Saving…") : c("brainyrich.insights.form.create", "Create insight")
|
|
@@ -558,6 +577,6 @@ function le({ open: e, form: t, setField: n, metricsValid: r, valid: i, pending:
|
|
|
558
577
|
});
|
|
559
578
|
}
|
|
560
579
|
//#endregion
|
|
561
|
-
export {
|
|
580
|
+
export { Z as AiAssistantPage };
|
|
562
581
|
|
|
563
582
|
//# sourceMappingURL=AiAssistantPage.js.map
|