@wealthx/shadcn 1.5.37 → 1.5.38
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/.turbo/turbo-build.log +99 -93
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-734FOOJC.mjs → chunk-B5PSUONN.mjs} +25 -58
- package/dist/chunk-EFHPSKVF.mjs +192 -0
- package/dist/{chunk-NB3ZL36B.mjs → chunk-MZI77ZMX.mjs} +17 -2
- package/dist/chunk-R7M657QL.mjs +587 -0
- package/dist/{chunk-DIH2NZZ3.mjs → chunk-RRROLESJ.mjs} +33 -23
- package/dist/components/ui/ai-assistant-drawer.js +269 -121
- package/dist/components/ui/ai-assistant-drawer.mjs +2 -1
- package/dist/components/ui/ai-conversations/index.js +474 -286
- package/dist/components/ui/ai-conversations/index.mjs +2 -1
- package/dist/components/ui/chat-input-area.js +429 -0
- package/dist/components/ui/chat-input-area.mjs +11 -0
- package/dist/components/ui/page-top-bar.js +182 -5
- package/dist/components/ui/page-top-bar.mjs +3 -1
- package/dist/components/ui/support-agent/index.js +1131 -0
- package/dist/components/ui/support-agent/index.mjs +27 -0
- package/dist/index.js +4760 -4027
- package/dist/index.mjs +54 -36
- package/dist/styles.css +1 -1
- package/package.json +11 -1
- package/src/components/index.tsx +24 -0
- package/src/components/ui/ai-assistant-drawer.tsx +24 -51
- package/src/components/ui/ai-conversations/index.tsx +16 -8
- package/src/components/ui/ai-conversations/thread.tsx +38 -27
- package/src/components/ui/chat-input-area.tsx +244 -0
- package/src/components/ui/page-top-bar.tsx +31 -5
- package/src/components/ui/support-agent/index.tsx +25 -0
- package/src/components/ui/support-agent/support-agent-fab.tsx +116 -0
- package/src/components/ui/support-agent/support-agent-panel.tsx +498 -0
- package/src/components/ui/support-agent/support-agent-primitives.tsx +354 -0
- package/src/styles/globals.css +1 -0
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +2 -0
|
@@ -72,7 +72,7 @@ __export(ai_conversations_exports, {
|
|
|
72
72
|
});
|
|
73
73
|
module.exports = __toCommonJS(ai_conversations_exports);
|
|
74
74
|
var import_react5 = require("react");
|
|
75
|
-
var
|
|
75
|
+
var import_lucide_react9 = require("lucide-react");
|
|
76
76
|
|
|
77
77
|
// src/lib/utils.ts
|
|
78
78
|
var import_clsx = require("clsx");
|
|
@@ -1047,7 +1047,7 @@ var import_react4 = require("@tiptap/react");
|
|
|
1047
1047
|
var import_starter_kit = __toESM(require("@tiptap/starter-kit"));
|
|
1048
1048
|
var import_extension_underline = __toESM(require("@tiptap/extension-underline"));
|
|
1049
1049
|
var import_extension_link = __toESM(require("@tiptap/extension-link"));
|
|
1050
|
-
var
|
|
1050
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1051
1051
|
|
|
1052
1052
|
// src/components/ui/dropdown-menu.tsx
|
|
1053
1053
|
var import_lucide_react4 = require("lucide-react");
|
|
@@ -1194,6 +1194,10 @@ function Separator(_a2) {
|
|
|
1194
1194
|
);
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
|
+
// src/components/ui/chat-input-area.tsx
|
|
1198
|
+
var React5 = __toESM(require("react"));
|
|
1199
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1200
|
+
|
|
1197
1201
|
// src/components/ui/textarea.tsx
|
|
1198
1202
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1199
1203
|
function Textarea(_a2) {
|
|
@@ -1211,12 +1215,189 @@ function Textarea(_a2) {
|
|
|
1211
1215
|
);
|
|
1212
1216
|
}
|
|
1213
1217
|
|
|
1218
|
+
// src/components/ui/chat-input-area.tsx
|
|
1219
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1220
|
+
var DEFAULT_HINT = "Enter to send \xB7 Shift+Enter for new line";
|
|
1221
|
+
function ChatInputArea({
|
|
1222
|
+
value,
|
|
1223
|
+
onChange,
|
|
1224
|
+
onSend,
|
|
1225
|
+
onAttachFile,
|
|
1226
|
+
onAttachImage,
|
|
1227
|
+
disabled = false,
|
|
1228
|
+
placeholder = "Type your message\u2026",
|
|
1229
|
+
hint = DEFAULT_HINT,
|
|
1230
|
+
maxHeight = 160,
|
|
1231
|
+
autoFocus = false,
|
|
1232
|
+
className
|
|
1233
|
+
}) {
|
|
1234
|
+
const textareaRef = React5.useRef(null);
|
|
1235
|
+
const fileInputRef = React5.useRef(null);
|
|
1236
|
+
const imageInputRef = React5.useRef(null);
|
|
1237
|
+
React5.useEffect(() => {
|
|
1238
|
+
if (autoFocus) {
|
|
1239
|
+
setTimeout(() => {
|
|
1240
|
+
var _a2;
|
|
1241
|
+
return (_a2 = textareaRef.current) == null ? void 0 : _a2.focus();
|
|
1242
|
+
}, 50);
|
|
1243
|
+
}
|
|
1244
|
+
}, [autoFocus]);
|
|
1245
|
+
const handleSend = React5.useCallback(() => {
|
|
1246
|
+
const text = value.trim();
|
|
1247
|
+
if (!text || disabled) return;
|
|
1248
|
+
onSend(text);
|
|
1249
|
+
if (textareaRef.current) {
|
|
1250
|
+
textareaRef.current.style.height = "auto";
|
|
1251
|
+
}
|
|
1252
|
+
}, [value, disabled, onSend]);
|
|
1253
|
+
const handleKeyDown = React5.useCallback(
|
|
1254
|
+
(e) => {
|
|
1255
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
1256
|
+
e.preventDefault();
|
|
1257
|
+
handleSend();
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
[handleSend]
|
|
1261
|
+
);
|
|
1262
|
+
const handleTextareaChange = React5.useCallback(
|
|
1263
|
+
(e) => {
|
|
1264
|
+
onChange(e.target.value);
|
|
1265
|
+
const el = e.target;
|
|
1266
|
+
el.style.height = "auto";
|
|
1267
|
+
el.style.height = `${Math.min(el.scrollHeight, maxHeight)}px`;
|
|
1268
|
+
},
|
|
1269
|
+
[onChange, maxHeight]
|
|
1270
|
+
);
|
|
1271
|
+
const handleFileChange = React5.useCallback(
|
|
1272
|
+
(e) => {
|
|
1273
|
+
var _a2;
|
|
1274
|
+
if ((_a2 = e.target.files) == null ? void 0 : _a2.length) {
|
|
1275
|
+
onAttachFile == null ? void 0 : onAttachFile(e.target.files);
|
|
1276
|
+
e.target.value = "";
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
[onAttachFile]
|
|
1280
|
+
);
|
|
1281
|
+
const handleImageChange = React5.useCallback(
|
|
1282
|
+
(e) => {
|
|
1283
|
+
var _a2;
|
|
1284
|
+
if ((_a2 = e.target.files) == null ? void 0 : _a2.length) {
|
|
1285
|
+
onAttachImage == null ? void 0 : onAttachImage(e.target.files);
|
|
1286
|
+
e.target.value = "";
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
[onAttachImage]
|
|
1290
|
+
);
|
|
1291
|
+
const showFileButton = typeof onAttachFile === "function";
|
|
1292
|
+
const showImageButton = typeof onAttachImage === "function";
|
|
1293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1294
|
+
"div",
|
|
1295
|
+
{
|
|
1296
|
+
"data-slot": "chat-input-area",
|
|
1297
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
1298
|
+
children: [
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "border border-border bg-background flex flex-col focus-within:ring-1 focus-within:ring-ring", children: [
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1301
|
+
Textarea,
|
|
1302
|
+
{
|
|
1303
|
+
ref: textareaRef,
|
|
1304
|
+
value,
|
|
1305
|
+
onChange: handleTextareaChange,
|
|
1306
|
+
onKeyDown: handleKeyDown,
|
|
1307
|
+
placeholder,
|
|
1308
|
+
disabled,
|
|
1309
|
+
rows: 3,
|
|
1310
|
+
className: "resize-none text-sm border-0 shadow-none focus-visible:ring-0 px-3 pt-3 pb-1 min-h-[72px]",
|
|
1311
|
+
"aria-label": placeholder
|
|
1312
|
+
}
|
|
1313
|
+
),
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between px-2 pb-2", children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
1316
|
+
showFileButton && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1317
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1318
|
+
Button,
|
|
1319
|
+
{
|
|
1320
|
+
variant: "ghost",
|
|
1321
|
+
size: "icon-sm",
|
|
1322
|
+
type: "button",
|
|
1323
|
+
title: "Attach file",
|
|
1324
|
+
"aria-label": "Attach file",
|
|
1325
|
+
disabled,
|
|
1326
|
+
onClick: () => {
|
|
1327
|
+
var _a2;
|
|
1328
|
+
return (_a2 = fileInputRef.current) == null ? void 0 : _a2.click();
|
|
1329
|
+
},
|
|
1330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Paperclip, { className: "size-3.5", "aria-hidden": "true" })
|
|
1331
|
+
}
|
|
1332
|
+
),
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1334
|
+
"input",
|
|
1335
|
+
{
|
|
1336
|
+
ref: fileInputRef,
|
|
1337
|
+
type: "file",
|
|
1338
|
+
multiple: true,
|
|
1339
|
+
className: "sr-only",
|
|
1340
|
+
tabIndex: -1,
|
|
1341
|
+
onChange: handleFileChange
|
|
1342
|
+
}
|
|
1343
|
+
)
|
|
1344
|
+
] }),
|
|
1345
|
+
showImageButton && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1347
|
+
Button,
|
|
1348
|
+
{
|
|
1349
|
+
variant: "ghost",
|
|
1350
|
+
size: "icon-sm",
|
|
1351
|
+
type: "button",
|
|
1352
|
+
title: "Upload image",
|
|
1353
|
+
"aria-label": "Upload image",
|
|
1354
|
+
disabled,
|
|
1355
|
+
onClick: () => {
|
|
1356
|
+
var _a2;
|
|
1357
|
+
return (_a2 = imageInputRef.current) == null ? void 0 : _a2.click();
|
|
1358
|
+
},
|
|
1359
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.ImagePlus, { className: "size-3.5", "aria-hidden": "true" })
|
|
1360
|
+
}
|
|
1361
|
+
),
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1363
|
+
"input",
|
|
1364
|
+
{
|
|
1365
|
+
ref: imageInputRef,
|
|
1366
|
+
type: "file",
|
|
1367
|
+
multiple: true,
|
|
1368
|
+
accept: "image/*",
|
|
1369
|
+
className: "sr-only",
|
|
1370
|
+
tabIndex: -1,
|
|
1371
|
+
onChange: handleImageChange
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
] })
|
|
1375
|
+
] }),
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1377
|
+
Button,
|
|
1378
|
+
{
|
|
1379
|
+
size: "icon-sm",
|
|
1380
|
+
type: "button",
|
|
1381
|
+
"aria-label": "Send message",
|
|
1382
|
+
disabled: !value.trim() || disabled,
|
|
1383
|
+
onClick: handleSend,
|
|
1384
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Send, { className: "size-3.5", "aria-hidden": "true" })
|
|
1385
|
+
}
|
|
1386
|
+
)
|
|
1387
|
+
] })
|
|
1388
|
+
] }),
|
|
1389
|
+
hint !== false && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-muted-foreground", children: hint })
|
|
1390
|
+
]
|
|
1391
|
+
}
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1214
1395
|
// src/components/ui/ai-conversations/bubble.tsx
|
|
1215
1396
|
var import_react_markdown = __toESM(require("react-markdown"));
|
|
1216
1397
|
var import_rehype_raw = __toESM(require("rehype-raw"));
|
|
1217
1398
|
var import_rehype_sanitize = __toESM(require("rehype-sanitize"));
|
|
1218
|
-
var
|
|
1219
|
-
var
|
|
1399
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1400
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1220
1401
|
var _a;
|
|
1221
1402
|
var EMAIL_SANITIZE_SCHEMA = __spreadProps(__spreadValues({}, import_rehype_sanitize.defaultSchema), {
|
|
1222
1403
|
strip: ["script", "style", "head", ...(_a = import_rehype_sanitize.defaultSchema.strip) != null ? _a : []]
|
|
@@ -1226,21 +1407,21 @@ function BubbleAvatar2({
|
|
|
1226
1407
|
senderName
|
|
1227
1408
|
}) {
|
|
1228
1409
|
if (role === "bot") {
|
|
1229
|
-
return /* @__PURE__ */ (0,
|
|
1410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AvatarFallback, { className: "border border-border bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.Bot, { className: "size-3.5 text-muted-foreground" }) }) });
|
|
1230
1411
|
}
|
|
1231
1412
|
if (role === "advisor") {
|
|
1232
|
-
return /* @__PURE__ */ (0,
|
|
1413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AvatarFallback, { className: "font-semibold", children: getInitials(senderName != null ? senderName : "Advisor") }) });
|
|
1233
1414
|
}
|
|
1234
|
-
return /* @__PURE__ */ (0,
|
|
1415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AvatarFallback, { children: getInitials(senderName != null ? senderName : "?") }) });
|
|
1235
1416
|
}
|
|
1236
1417
|
function SystemDivider({
|
|
1237
1418
|
content,
|
|
1238
1419
|
className
|
|
1239
1420
|
}) {
|
|
1240
|
-
return /* @__PURE__ */ (0,
|
|
1241
|
-
/* @__PURE__ */ (0,
|
|
1242
|
-
/* @__PURE__ */ (0,
|
|
1243
|
-
/* @__PURE__ */ (0,
|
|
1421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("my-2 flex items-center gap-3 px-2", className), children: [
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Separator, { className: "flex-1" }),
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "shrink-0 text-caption text-muted-foreground", children: content }),
|
|
1424
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Separator, { className: "flex-1" })
|
|
1244
1425
|
] });
|
|
1245
1426
|
}
|
|
1246
1427
|
function ChatMessageBubble({
|
|
@@ -1252,7 +1433,7 @@ function ChatMessageBubble({
|
|
|
1252
1433
|
const isBot = role === "bot";
|
|
1253
1434
|
const isVisitor = role === "visitor";
|
|
1254
1435
|
const displayName = isBot ? "AI Assistant" : isAdvisor ? senderName != null ? senderName : "Advisor" : senderName != null ? senderName : "Lead";
|
|
1255
|
-
return /* @__PURE__ */ (0,
|
|
1436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1256
1437
|
"div",
|
|
1257
1438
|
{
|
|
1258
1439
|
className: cn(
|
|
@@ -1261,8 +1442,8 @@ function ChatMessageBubble({
|
|
|
1261
1442
|
className
|
|
1262
1443
|
),
|
|
1263
1444
|
children: [
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BubbleAvatar2, { role, senderName }),
|
|
1446
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1266
1447
|
"div",
|
|
1267
1448
|
{
|
|
1268
1449
|
className: cn(
|
|
@@ -1270,8 +1451,8 @@ function ChatMessageBubble({
|
|
|
1270
1451
|
isAdvisor && "items-end"
|
|
1271
1452
|
),
|
|
1272
1453
|
children: [
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1274
|
-
/* @__PURE__ */ (0,
|
|
1454
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-caption text-muted-foreground", children: displayName }),
|
|
1455
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1275
1456
|
"div",
|
|
1276
1457
|
{
|
|
1277
1458
|
className: cn(
|
|
@@ -1280,7 +1461,7 @@ function ChatMessageBubble({
|
|
|
1280
1461
|
isVisitor && "border border-border bg-background text-foreground [&_a]:text-primary",
|
|
1281
1462
|
isAdvisor && "bg-primary text-primary-foreground [&_a]:text-primary-foreground"
|
|
1282
1463
|
),
|
|
1283
|
-
children: /* @__PURE__ */ (0,
|
|
1464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1284
1465
|
import_react_markdown.default,
|
|
1285
1466
|
{
|
|
1286
1467
|
rehypePlugins: [import_rehype_raw.default, [import_rehype_sanitize.default, import_rehype_sanitize.defaultSchema]],
|
|
@@ -1289,7 +1470,7 @@ function ChatMessageBubble({
|
|
|
1289
1470
|
)
|
|
1290
1471
|
}
|
|
1291
1472
|
),
|
|
1292
|
-
timestamp && /* @__PURE__ */ (0,
|
|
1473
|
+
timestamp && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-caption text-muted-foreground", children: timestamp })
|
|
1293
1474
|
]
|
|
1294
1475
|
}
|
|
1295
1476
|
)
|
|
@@ -1305,7 +1486,7 @@ function EmailMessageBubble({
|
|
|
1305
1486
|
const isAdvisor = role === "advisor";
|
|
1306
1487
|
const isBot = role === "bot";
|
|
1307
1488
|
const displayName = isBot ? "AI Assistant" : isAdvisor ? senderName != null ? senderName : "Advisor" : senderName != null ? senderName : "Lead";
|
|
1308
|
-
return /* @__PURE__ */ (0,
|
|
1489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1309
1490
|
"div",
|
|
1310
1491
|
{
|
|
1311
1492
|
className: cn(
|
|
@@ -1314,8 +1495,8 @@ function EmailMessageBubble({
|
|
|
1314
1495
|
className
|
|
1315
1496
|
),
|
|
1316
1497
|
children: [
|
|
1317
|
-
/* @__PURE__ */ (0,
|
|
1318
|
-
/* @__PURE__ */ (0,
|
|
1498
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BubbleAvatar2, { role, senderName }),
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1319
1500
|
"div",
|
|
1320
1501
|
{
|
|
1321
1502
|
className: cn(
|
|
@@ -1323,8 +1504,8 @@ function EmailMessageBubble({
|
|
|
1323
1504
|
isAdvisor && "items-end"
|
|
1324
1505
|
),
|
|
1325
1506
|
children: [
|
|
1326
|
-
/* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-caption text-muted-foreground", children: displayName }),
|
|
1508
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1328
1509
|
"div",
|
|
1329
1510
|
{
|
|
1330
1511
|
className: cn(
|
|
@@ -1345,12 +1526,12 @@ function EmailMessageBubble({
|
|
|
1345
1526
|
isAdvisor && "bg-muted/30"
|
|
1346
1527
|
),
|
|
1347
1528
|
children: [
|
|
1348
|
-
subject && /* @__PURE__ */ (0,
|
|
1349
|
-
/* @__PURE__ */ (0,
|
|
1529
|
+
subject && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mb-2.5 border-b border-border pb-2", children: [
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs font-medium text-muted-foreground", children: "Subject:" }),
|
|
1350
1531
|
" ",
|
|
1351
|
-
/* @__PURE__ */ (0,
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-semibold text-foreground", children: subject })
|
|
1352
1533
|
] }),
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1534
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1354
1535
|
import_react_markdown.default,
|
|
1355
1536
|
{
|
|
1356
1537
|
rehypePlugins: [import_rehype_raw.default, [import_rehype_sanitize.default, EMAIL_SANITIZE_SCHEMA]],
|
|
@@ -1360,7 +1541,7 @@ function EmailMessageBubble({
|
|
|
1360
1541
|
]
|
|
1361
1542
|
}
|
|
1362
1543
|
),
|
|
1363
|
-
timestamp && /* @__PURE__ */ (0,
|
|
1544
|
+
timestamp && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-caption text-muted-foreground", children: timestamp })
|
|
1364
1545
|
]
|
|
1365
1546
|
}
|
|
1366
1547
|
)
|
|
@@ -1370,23 +1551,23 @@ function EmailMessageBubble({
|
|
|
1370
1551
|
}
|
|
1371
1552
|
function ChatBubble({ message, channel, className }) {
|
|
1372
1553
|
if (message.role === "system") {
|
|
1373
|
-
return /* @__PURE__ */ (0,
|
|
1554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SystemDivider, { content: message.content, className });
|
|
1374
1555
|
}
|
|
1375
1556
|
if (channel === "email") {
|
|
1376
|
-
return /* @__PURE__ */ (0,
|
|
1557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EmailMessageBubble, { message, className });
|
|
1377
1558
|
}
|
|
1378
|
-
return /* @__PURE__ */ (0,
|
|
1559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChatMessageBubble, { message, className });
|
|
1379
1560
|
}
|
|
1380
1561
|
|
|
1381
1562
|
// src/components/ui/ai-conversations/thread.tsx
|
|
1382
|
-
var
|
|
1563
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1383
1564
|
function ComposerToolbarButton({
|
|
1384
1565
|
label,
|
|
1385
1566
|
icon: Icon,
|
|
1386
1567
|
pressed,
|
|
1387
1568
|
onToggle
|
|
1388
1569
|
}) {
|
|
1389
|
-
return /* @__PURE__ */ (0,
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1390
1571
|
"button",
|
|
1391
1572
|
{
|
|
1392
1573
|
type: "button",
|
|
@@ -1397,7 +1578,7 @@ function ComposerToolbarButton({
|
|
|
1397
1578
|
"flex size-7 items-center justify-center transition-colors",
|
|
1398
1579
|
pressed ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1399
1580
|
),
|
|
1400
|
-
children: /* @__PURE__ */ (0,
|
|
1581
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { className: "size-3.5" })
|
|
1401
1582
|
}
|
|
1402
1583
|
);
|
|
1403
1584
|
}
|
|
@@ -1413,7 +1594,7 @@ function ComposerLinkPopover({
|
|
|
1413
1594
|
setOpen(false);
|
|
1414
1595
|
setUrl("");
|
|
1415
1596
|
};
|
|
1416
|
-
return /* @__PURE__ */ (0,
|
|
1597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1417
1598
|
Popover,
|
|
1418
1599
|
{
|
|
1419
1600
|
open,
|
|
@@ -1426,7 +1607,7 @@ function ComposerLinkPopover({
|
|
|
1426
1607
|
setOpen(newOpen);
|
|
1427
1608
|
},
|
|
1428
1609
|
children: [
|
|
1429
|
-
/* @__PURE__ */ (0,
|
|
1610
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1430
1611
|
PopoverTrigger,
|
|
1431
1612
|
{
|
|
1432
1613
|
"aria-label": "Insert link",
|
|
@@ -1434,11 +1615,11 @@ function ComposerLinkPopover({
|
|
|
1434
1615
|
"flex size-7 items-center justify-center transition-colors",
|
|
1435
1616
|
(editor == null ? void 0 : editor.isActive("link")) ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1436
1617
|
),
|
|
1437
|
-
children: /* @__PURE__ */ (0,
|
|
1618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Link2, { className: "size-3.5" })
|
|
1438
1619
|
}
|
|
1439
1620
|
),
|
|
1440
|
-
/* @__PURE__ */ (0,
|
|
1441
|
-
/* @__PURE__ */ (0,
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverContent, { className: "w-72 p-2", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1442
1623
|
"input",
|
|
1443
1624
|
{
|
|
1444
1625
|
type: "url",
|
|
@@ -1450,7 +1631,7 @@ function ComposerLinkPopover({
|
|
|
1450
1631
|
autoFocus: true
|
|
1451
1632
|
}
|
|
1452
1633
|
),
|
|
1453
|
-
/* @__PURE__ */ (0,
|
|
1634
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { size: "sm", className: "h-8 px-3", onClick: handleApply, children: "Apply" })
|
|
1454
1635
|
] }) })
|
|
1455
1636
|
]
|
|
1456
1637
|
}
|
|
@@ -1460,8 +1641,8 @@ function ComposerEmailFieldRow({
|
|
|
1460
1641
|
label,
|
|
1461
1642
|
children
|
|
1462
1643
|
}) {
|
|
1463
|
-
return /* @__PURE__ */ (0,
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
1644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [
|
|
1645
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w-14 shrink-0 text-sm text-muted-foreground", children: label }),
|
|
1465
1646
|
children
|
|
1466
1647
|
] });
|
|
1467
1648
|
}
|
|
@@ -1477,6 +1658,8 @@ function ChatComposer({
|
|
|
1477
1658
|
onSendEmail,
|
|
1478
1659
|
onTakeOver,
|
|
1479
1660
|
onLetAiHandle,
|
|
1661
|
+
onAttachFile,
|
|
1662
|
+
onAttachImage,
|
|
1480
1663
|
emailReplySubject,
|
|
1481
1664
|
className
|
|
1482
1665
|
}) {
|
|
@@ -1526,7 +1709,7 @@ function ChatComposer({
|
|
|
1526
1709
|
setEmailSubject(emailReplySubject ? `Re: ${emailReplySubject}` : "");
|
|
1527
1710
|
}
|
|
1528
1711
|
};
|
|
1529
|
-
return /* @__PURE__ */ (0,
|
|
1712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1530
1713
|
"div",
|
|
1531
1714
|
{
|
|
1532
1715
|
className: cn(
|
|
@@ -1534,27 +1717,27 @@ function ChatComposer({
|
|
|
1534
1717
|
className
|
|
1535
1718
|
),
|
|
1536
1719
|
children: [
|
|
1537
|
-
isEmailIntegrated && /* @__PURE__ */ (0,
|
|
1720
|
+
isEmailIntegrated && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "border-b border-border px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1538
1721
|
Tabs,
|
|
1539
1722
|
{
|
|
1540
1723
|
value: channel,
|
|
1541
1724
|
onValueChange: (v) => v && handleChannelChange(v),
|
|
1542
|
-
children: /* @__PURE__ */ (0,
|
|
1543
|
-
/* @__PURE__ */ (0,
|
|
1544
|
-
/* @__PURE__ */ (0,
|
|
1725
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TabsList, { variant: "default", className: "w-full", children: [
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TabsTrigger, { value: "chat", className: "flex-1 gap-1.5", children: [
|
|
1727
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.MessageSquare, { className: "size-3.5" }),
|
|
1545
1728
|
"Chat"
|
|
1546
1729
|
] }),
|
|
1547
|
-
/* @__PURE__ */ (0,
|
|
1548
|
-
/* @__PURE__ */ (0,
|
|
1730
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TabsTrigger, { value: "email", className: "flex-1 gap-1.5", children: [
|
|
1731
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Mail, { className: "size-3.5" }),
|
|
1549
1732
|
"Email"
|
|
1550
1733
|
] })
|
|
1551
1734
|
] })
|
|
1552
1735
|
}
|
|
1553
1736
|
) }),
|
|
1554
|
-
mode === "ai" ? /* @__PURE__ */ (0,
|
|
1555
|
-
/* @__PURE__ */ (0,
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1557
|
-
/* @__PURE__ */ (0,
|
|
1737
|
+
mode === "ai" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2 bg-muted/30 px-4 py-2.5 text-[12px] text-muted-foreground", children: [
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Bot, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "AI is handling this conversation." }),
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1558
1741
|
Button,
|
|
1559
1742
|
{
|
|
1560
1743
|
variant: "link",
|
|
@@ -1564,12 +1747,12 @@ function ChatComposer({
|
|
|
1564
1747
|
children: "Take Over"
|
|
1565
1748
|
}
|
|
1566
1749
|
),
|
|
1567
|
-
/* @__PURE__ */ (0,
|
|
1750
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "to reply directly." })
|
|
1568
1751
|
] }) : (
|
|
1569
1752
|
/* Email panel stays in normal flow to anchor container height;
|
|
1570
1753
|
chat panel is an absolute overlay so both tabs share identical dimensions */
|
|
1571
|
-
/* @__PURE__ */ (0,
|
|
1572
|
-
/* @__PURE__ */ (0,
|
|
1754
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative", children: [
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1573
1756
|
"div",
|
|
1574
1757
|
{
|
|
1575
1758
|
className: cn(
|
|
@@ -1578,8 +1761,8 @@ function ChatComposer({
|
|
|
1578
1761
|
),
|
|
1579
1762
|
"aria-hidden": channel !== "email",
|
|
1580
1763
|
children: [
|
|
1581
|
-
/* @__PURE__ */ (0,
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ComposerEmailFieldRow, { label: "To", children: [
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1583
1766
|
"input",
|
|
1584
1767
|
{
|
|
1585
1768
|
type: "email",
|
|
@@ -1589,7 +1772,7 @@ function ChatComposer({
|
|
|
1589
1772
|
className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
|
|
1590
1773
|
}
|
|
1591
1774
|
),
|
|
1592
|
-
/* @__PURE__ */ (0,
|
|
1775
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1593
1776
|
"button",
|
|
1594
1777
|
{
|
|
1595
1778
|
type: "button",
|
|
@@ -1597,12 +1780,12 @@ function ChatComposer({
|
|
|
1597
1780
|
className: "flex shrink-0 items-center gap-0.5 text-sm text-muted-foreground hover:text-foreground",
|
|
1598
1781
|
children: [
|
|
1599
1782
|
"CC",
|
|
1600
|
-
/* @__PURE__ */ (0,
|
|
1783
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronDown, { className: "size-3.5" })
|
|
1601
1784
|
]
|
|
1602
1785
|
}
|
|
1603
1786
|
)
|
|
1604
1787
|
] }),
|
|
1605
|
-
showCc && /* @__PURE__ */ (0,
|
|
1788
|
+
showCc && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ComposerEmailFieldRow, { label: "CC", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1606
1789
|
"input",
|
|
1607
1790
|
{
|
|
1608
1791
|
type: "email",
|
|
@@ -1612,7 +1795,7 @@ function ChatComposer({
|
|
|
1612
1795
|
className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
|
|
1613
1796
|
}
|
|
1614
1797
|
) }),
|
|
1615
|
-
emailMode !== "reply" && /* @__PURE__ */ (0,
|
|
1798
|
+
emailMode !== "reply" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ComposerEmailFieldRow, { label: "Subject", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1616
1799
|
"input",
|
|
1617
1800
|
{
|
|
1618
1801
|
type: "text",
|
|
@@ -1622,11 +1805,11 @@ function ChatComposer({
|
|
|
1622
1805
|
className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
|
|
1623
1806
|
}
|
|
1624
1807
|
) }),
|
|
1625
|
-
/* @__PURE__ */ (0,
|
|
1626
|
-
/* @__PURE__ */ (0,
|
|
1627
|
-
/* @__PURE__ */ (0,
|
|
1628
|
-
emailReplySubject && /* @__PURE__ */ (0,
|
|
1629
|
-
/* @__PURE__ */ (0,
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react4.EditorContent, { editor }),
|
|
1809
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
1811
|
+
emailReplySubject && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1812
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1630
1813
|
ToggleGroup,
|
|
1631
1814
|
{
|
|
1632
1815
|
type: "single",
|
|
@@ -1640,45 +1823,45 @@ function ChatComposer({
|
|
|
1640
1823
|
},
|
|
1641
1824
|
className: "mr-1.5",
|
|
1642
1825
|
children: [
|
|
1643
|
-
/* @__PURE__ */ (0,
|
|
1644
|
-
/* @__PURE__ */ (0,
|
|
1826
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ToggleGroupItem, { value: "reply", children: "Reply" }),
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ToggleGroupItem, { value: "new", children: "New email" })
|
|
1645
1828
|
]
|
|
1646
1829
|
}
|
|
1647
1830
|
),
|
|
1648
|
-
/* @__PURE__ */ (0,
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Separator, { orientation: "vertical", className: "mr-1.5 h-4" })
|
|
1649
1832
|
] }),
|
|
1650
|
-
/* @__PURE__ */ (0,
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1651
1834
|
ComposerToolbarButton,
|
|
1652
1835
|
{
|
|
1653
1836
|
label: "Bold",
|
|
1654
|
-
icon:
|
|
1837
|
+
icon: import_lucide_react7.Bold,
|
|
1655
1838
|
pressed: editor == null ? void 0 : editor.isActive("bold"),
|
|
1656
1839
|
onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleBold().run()
|
|
1657
1840
|
}
|
|
1658
1841
|
),
|
|
1659
|
-
/* @__PURE__ */ (0,
|
|
1842
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1660
1843
|
ComposerToolbarButton,
|
|
1661
1844
|
{
|
|
1662
1845
|
label: "Italic",
|
|
1663
|
-
icon:
|
|
1846
|
+
icon: import_lucide_react7.Italic,
|
|
1664
1847
|
pressed: editor == null ? void 0 : editor.isActive("italic"),
|
|
1665
1848
|
onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleItalic().run()
|
|
1666
1849
|
}
|
|
1667
1850
|
),
|
|
1668
|
-
/* @__PURE__ */ (0,
|
|
1851
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1669
1852
|
ComposerToolbarButton,
|
|
1670
1853
|
{
|
|
1671
1854
|
label: "Underline",
|
|
1672
|
-
icon:
|
|
1855
|
+
icon: import_lucide_react7.Underline,
|
|
1673
1856
|
pressed: editor == null ? void 0 : editor.isActive("underline"),
|
|
1674
1857
|
onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleUnderline().run()
|
|
1675
1858
|
}
|
|
1676
1859
|
),
|
|
1677
|
-
/* @__PURE__ */ (0,
|
|
1678
|
-
/* @__PURE__ */ (0,
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Separator, { orientation: "vertical", className: "mx-1.5 h-4" }),
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ComposerLinkPopover, { editor }),
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ComposerToolbarButton, { label: "Attach file", icon: import_lucide_react7.Paperclip })
|
|
1680
1863
|
] }),
|
|
1681
|
-
/* @__PURE__ */ (0,
|
|
1864
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1682
1865
|
Button,
|
|
1683
1866
|
{
|
|
1684
1867
|
size: "sm",
|
|
@@ -1696,7 +1879,7 @@ function ChatComposer({
|
|
|
1696
1879
|
},
|
|
1697
1880
|
disabled: !editor || editor.isEmpty || !emailTo.trim(),
|
|
1698
1881
|
children: [
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Send, { className: "mr-1.5 size-3.5" }),
|
|
1700
1883
|
"Send Email"
|
|
1701
1884
|
]
|
|
1702
1885
|
}
|
|
@@ -1705,35 +1888,32 @@ function ChatComposer({
|
|
|
1705
1888
|
]
|
|
1706
1889
|
}
|
|
1707
1890
|
),
|
|
1708
|
-
channel === "chat" && /* @__PURE__ */ (0,
|
|
1709
|
-
/* @__PURE__ */ (0,
|
|
1710
|
-
|
|
1891
|
+
channel === "chat" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "absolute inset-0 flex flex-col gap-3 p-4", children: [
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1893
|
+
ChatInputArea,
|
|
1711
1894
|
{
|
|
1712
1895
|
value: inputValue,
|
|
1713
|
-
onChange: (
|
|
1714
|
-
|
|
1715
|
-
|
|
1896
|
+
onChange: (v) => onInputChange == null ? void 0 : onInputChange(v),
|
|
1897
|
+
onSend: (text) => onSend == null ? void 0 : onSend(text),
|
|
1898
|
+
onAttachFile,
|
|
1899
|
+
onAttachImage,
|
|
1900
|
+
placeholder: "Reply to lead\u2026",
|
|
1901
|
+
hint: false
|
|
1716
1902
|
}
|
|
1717
1903
|
),
|
|
1718
|
-
/* @__PURE__ */ (0,
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.Send, { className: "mr-1.5 size-3.5" }),
|
|
1732
|
-
"Send"
|
|
1733
|
-
]
|
|
1734
|
-
}
|
|
1735
|
-
)
|
|
1736
|
-
] })
|
|
1904
|
+
initialChannelRef.current !== "email" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1905
|
+
Button,
|
|
1906
|
+
{
|
|
1907
|
+
variant: "outline",
|
|
1908
|
+
size: "sm",
|
|
1909
|
+
className: "self-start",
|
|
1910
|
+
onClick: onLetAiHandle,
|
|
1911
|
+
children: [
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Bot, { className: "mr-1.5 size-3.5" }),
|
|
1913
|
+
"Let AI Handle"
|
|
1914
|
+
]
|
|
1915
|
+
}
|
|
1916
|
+
)
|
|
1737
1917
|
] })
|
|
1738
1918
|
] })
|
|
1739
1919
|
)
|
|
@@ -1756,6 +1936,8 @@ function ChatThread({
|
|
|
1756
1936
|
onSendEmail,
|
|
1757
1937
|
onTakeOver,
|
|
1758
1938
|
onLetAiHandle,
|
|
1939
|
+
onAttachFile,
|
|
1940
|
+
onAttachImage,
|
|
1759
1941
|
emailReplySubject,
|
|
1760
1942
|
onReopen,
|
|
1761
1943
|
onMarkUrgent,
|
|
@@ -1809,8 +1991,8 @@ function ChatThread({
|
|
|
1809
1991
|
const el = scrollRef.current;
|
|
1810
1992
|
if (el) el.scrollTop = el.scrollHeight;
|
|
1811
1993
|
}, [isAiTyping]);
|
|
1812
|
-
return /* @__PURE__ */ (0,
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: cn("flex flex-col bg-background", className), children: [
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1814
1996
|
"div",
|
|
1815
1997
|
{
|
|
1816
1998
|
className: cn(
|
|
@@ -1818,7 +2000,7 @@ function ChatThread({
|
|
|
1818
2000
|
"flex items-center gap-3 border-b border-border px-4"
|
|
1819
2001
|
),
|
|
1820
2002
|
children: [
|
|
1821
|
-
onBack && /* @__PURE__ */ (0,
|
|
2003
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1822
2004
|
Button,
|
|
1823
2005
|
{
|
|
1824
2006
|
variant: "ghost",
|
|
@@ -1826,28 +2008,28 @@ function ChatThread({
|
|
|
1826
2008
|
className: "size-8 shrink-0 md:hidden",
|
|
1827
2009
|
onClick: onBack,
|
|
1828
2010
|
"aria-label": "Back to conversations",
|
|
1829
|
-
children: /* @__PURE__ */ (0,
|
|
2011
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ArrowLeft, { className: "size-4" })
|
|
1830
2012
|
}
|
|
1831
2013
|
),
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1833
|
-
/* @__PURE__ */ (0,
|
|
1834
|
-
/* @__PURE__ */ (0,
|
|
1835
|
-
/* @__PURE__ */ (0,
|
|
1836
|
-
/* @__PURE__ */ (0,
|
|
2014
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContactAvatar, { name: contact.name, size: "md" }),
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2017
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
|
|
2018
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ConversationStatusChip, { status, showDot: true })
|
|
1837
2019
|
] }),
|
|
1838
|
-
contact.email && /* @__PURE__ */ (0,
|
|
2020
|
+
contact.email && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-muted-foreground", children: contact.email })
|
|
1839
2021
|
] }),
|
|
1840
|
-
/* @__PURE__ */ (0,
|
|
1841
|
-
/* @__PURE__ */ (0,
|
|
1842
|
-
isClosed && /* @__PURE__ */ (0,
|
|
1843
|
-
!isClosed && aiIsHandling && /* @__PURE__ */ (0,
|
|
1844
|
-
!isClosed && !aiIsHandling && channel !== "email" && /* @__PURE__ */ (0,
|
|
1845
|
-
/* @__PURE__ */ (0,
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "hidden items-center gap-2 md:flex", children: [
|
|
2024
|
+
isClosed && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "outline", size: "sm", onClick: onReopen, children: "Reopen" }),
|
|
2025
|
+
!isClosed && aiIsHandling && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { size: "sm", onClick: onTakeOver, children: "Take Over" }),
|
|
2026
|
+
!isClosed && !aiIsHandling && channel !== "email" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Bot, { className: "mr-1.5 size-3.5" }),
|
|
1846
2028
|
"Let AI Handle"
|
|
1847
2029
|
] })
|
|
1848
2030
|
] }),
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
2031
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenu, { children: [
|
|
2032
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1851
2033
|
DropdownMenuTrigger,
|
|
1852
2034
|
{
|
|
1853
2035
|
className: cn(
|
|
@@ -1855,38 +2037,38 @@ function ChatThread({
|
|
|
1855
2037
|
"size-8"
|
|
1856
2038
|
),
|
|
1857
2039
|
"aria-label": "More actions",
|
|
1858
|
-
children: /* @__PURE__ */ (0,
|
|
2040
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.MoreHorizontal, { className: "size-4" })
|
|
1859
2041
|
}
|
|
1860
2042
|
),
|
|
1861
|
-
/* @__PURE__ */ (0,
|
|
1862
|
-
onShowLeadInfo && /* @__PURE__ */ (0,
|
|
1863
|
-
/* @__PURE__ */ (0,
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenuContent, { children: [
|
|
2044
|
+
onShowLeadInfo && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1864
2046
|
DropdownMenuItem,
|
|
1865
2047
|
{
|
|
1866
2048
|
className: "md:hidden",
|
|
1867
2049
|
onClick: onShowLeadInfo,
|
|
1868
2050
|
children: [
|
|
1869
|
-
/* @__PURE__ */ (0,
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronRight, { className: "mr-2 size-4" }),
|
|
1870
2052
|
"Lead Info"
|
|
1871
2053
|
]
|
|
1872
2054
|
}
|
|
1873
2055
|
),
|
|
1874
|
-
/* @__PURE__ */ (0,
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenuSeparator, { className: "md:hidden" })
|
|
1875
2057
|
] }),
|
|
1876
|
-
status === "needs-attention" ? /* @__PURE__ */ (0,
|
|
1877
|
-
/* @__PURE__ */ (0,
|
|
2058
|
+
status === "needs-attention" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenuItem, { onClick: onUnmarkUrgent, children: [
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Flag, { className: "mr-2 size-4" }),
|
|
1878
2060
|
"Unmark Urgent"
|
|
1879
|
-
] }) : /* @__PURE__ */ (0,
|
|
1880
|
-
/* @__PURE__ */ (0,
|
|
2061
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenuItem, { onClick: onMarkUrgent, children: [
|
|
2062
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Flag, { className: "mr-2 size-4" }),
|
|
1881
2063
|
"Mark as Urgent"
|
|
1882
2064
|
] }),
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
1884
|
-
/* @__PURE__ */ (0,
|
|
2065
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenuItem, { onClick: onAssignToAdvisor, children: [
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.UserCheck, { className: "mr-2 size-4" }),
|
|
1885
2067
|
"Assign to advisor"
|
|
1886
2068
|
] }),
|
|
1887
|
-
/* @__PURE__ */ (0,
|
|
1888
|
-
/* @__PURE__ */ (0,
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenuSeparator, {}),
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenuItem, { onClick: onArchive, children: [
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Archive, { className: "mr-2 size-4" }),
|
|
1890
2072
|
"Archive"
|
|
1891
2073
|
] })
|
|
1892
2074
|
] })
|
|
@@ -1895,7 +2077,7 @@ function ChatThread({
|
|
|
1895
2077
|
]
|
|
1896
2078
|
}
|
|
1897
2079
|
),
|
|
1898
|
-
/* @__PURE__ */ (0,
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1899
2081
|
"div",
|
|
1900
2082
|
{
|
|
1901
2083
|
ref: scrollRef,
|
|
@@ -1903,29 +2085,29 @@ function ChatThread({
|
|
|
1903
2085
|
className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4",
|
|
1904
2086
|
tabIndex: 0,
|
|
1905
2087
|
children: [
|
|
1906
|
-
isLoadingMoreMessages && /* @__PURE__ */ (0,
|
|
1907
|
-
messages.length === 0 ? /* @__PURE__ */ (0,
|
|
1908
|
-
/* @__PURE__ */ (0,
|
|
1909
|
-
/* @__PURE__ */ (0,
|
|
1910
|
-
] }) : messages.map((msg) => /* @__PURE__ */ (0,
|
|
1911
|
-
isAiTyping && !isClosed && /* @__PURE__ */ (0,
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1915
|
-
/* @__PURE__ */ (0,
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1917
|
-
/* @__PURE__ */ (0,
|
|
1918
|
-
/* @__PURE__ */ (0,
|
|
2088
|
+
isLoadingMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex justify-center py-1 text-caption text-muted-foreground", children: "Loading older messages..." }),
|
|
2089
|
+
messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground", children: [
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.MessageSquare, { className: "size-8 opacity-30" }),
|
|
2091
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm", children: "No messages yet" })
|
|
2092
|
+
] }) : messages.map((msg) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChatBubble, { message: msg, channel }, msg.id)),
|
|
2093
|
+
isAiTyping && !isClosed && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-2.5", children: [
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BubbleAvatar, { role: "bot" }),
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-caption text-muted-foreground", children: "AI Assistant" }),
|
|
2097
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1 border border-border bg-muted/60 px-3 py-2.5", children: [
|
|
2098
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:0ms]" }),
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:150ms]" }),
|
|
2100
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:300ms]" })
|
|
1919
2101
|
] })
|
|
1920
2102
|
] })
|
|
1921
2103
|
] })
|
|
1922
2104
|
]
|
|
1923
2105
|
}
|
|
1924
2106
|
),
|
|
1925
|
-
isClosed ? /* @__PURE__ */ (0,
|
|
1926
|
-
/* @__PURE__ */ (0,
|
|
1927
|
-
/* @__PURE__ */ (0,
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
2107
|
+
isClosed ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-3 border-t border-border bg-muted/30 px-4 py-3 text-sm text-muted-foreground", children: [
|
|
2108
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Lock, { className: "size-3.5 shrink-0" }),
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "This conversation is closed." }),
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1929
2111
|
Button,
|
|
1930
2112
|
{
|
|
1931
2113
|
variant: "outline",
|
|
@@ -1935,7 +2117,7 @@ function ChatThread({
|
|
|
1935
2117
|
children: "Reopen"
|
|
1936
2118
|
}
|
|
1937
2119
|
)
|
|
1938
|
-
] }) : /* @__PURE__ */ (0,
|
|
2120
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1939
2121
|
ChatComposer,
|
|
1940
2122
|
{
|
|
1941
2123
|
mode,
|
|
@@ -1949,6 +2131,8 @@ function ChatThread({
|
|
|
1949
2131
|
onSendEmail,
|
|
1950
2132
|
onTakeOver,
|
|
1951
2133
|
onLetAiHandle,
|
|
2134
|
+
onAttachFile,
|
|
2135
|
+
onAttachImage,
|
|
1952
2136
|
emailReplySubject
|
|
1953
2137
|
}
|
|
1954
2138
|
)
|
|
@@ -1956,21 +2140,21 @@ function ChatThread({
|
|
|
1956
2140
|
}
|
|
1957
2141
|
|
|
1958
2142
|
// src/components/ui/ai-conversations/lead-panel.tsx
|
|
1959
|
-
var
|
|
1960
|
-
var
|
|
2143
|
+
var import_lucide_react8 = require("lucide-react");
|
|
2144
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1961
2145
|
function AICollectedDataSection({
|
|
1962
2146
|
fields,
|
|
1963
2147
|
className
|
|
1964
2148
|
}) {
|
|
1965
|
-
return /* @__PURE__ */ (0,
|
|
2149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("flex flex-col", className), children: fields.map((field, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1966
2150
|
"div",
|
|
1967
2151
|
{
|
|
1968
2152
|
className: "flex items-center justify-between gap-2 border-b border-border/40 py-1.5 last:border-b-0",
|
|
1969
2153
|
children: [
|
|
1970
|
-
/* @__PURE__ */ (0,
|
|
1971
|
-
/* @__PURE__ */ (0,
|
|
1972
|
-
/* @__PURE__ */ (0,
|
|
1973
|
-
field.confidence === "confirmed" ? /* @__PURE__ */ (0,
|
|
2154
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "shrink-0 text-sm text-muted-foreground", children: field.label }),
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
2156
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-right text-sm font-medium text-foreground", children: field.value }),
|
|
2157
|
+
field.confidence === "confirmed" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.CheckCircle2, { className: "size-3 shrink-0 text-success-text" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.HelpCircle, { className: "size-3 shrink-0 text-warning-text" })
|
|
1974
2158
|
] })
|
|
1975
2159
|
]
|
|
1976
2160
|
},
|
|
@@ -1984,9 +2168,9 @@ var APPOINTMENT_STATUS_LABEL = {
|
|
|
1984
2168
|
cancelled: "Cancelled"
|
|
1985
2169
|
};
|
|
1986
2170
|
var MEETING_ICON = {
|
|
1987
|
-
video:
|
|
1988
|
-
phone:
|
|
1989
|
-
"in-person":
|
|
2171
|
+
video: import_lucide_react8.Video,
|
|
2172
|
+
phone: import_lucide_react8.Phone,
|
|
2173
|
+
"in-person": import_lucide_react8.MapPin
|
|
1990
2174
|
};
|
|
1991
2175
|
var MEETING_LABEL = {
|
|
1992
2176
|
video: "Video Call",
|
|
@@ -1994,9 +2178,9 @@ var MEETING_LABEL = {
|
|
|
1994
2178
|
"in-person": "In Person"
|
|
1995
2179
|
};
|
|
1996
2180
|
var MEETING_DETAIL_ICON = {
|
|
1997
|
-
video:
|
|
1998
|
-
phone:
|
|
1999
|
-
"in-person":
|
|
2181
|
+
video: import_lucide_react8.Link2,
|
|
2182
|
+
phone: import_lucide_react8.PhoneCall,
|
|
2183
|
+
"in-person": import_lucide_react8.Navigation
|
|
2000
2184
|
};
|
|
2001
2185
|
function MeetingDetailRow({
|
|
2002
2186
|
meetingType,
|
|
@@ -2004,9 +2188,9 @@ function MeetingDetailRow({
|
|
|
2004
2188
|
}) {
|
|
2005
2189
|
const DetailIcon = MEETING_DETAIL_ICON[meetingType];
|
|
2006
2190
|
const isLink = detail.startsWith("http");
|
|
2007
|
-
return /* @__PURE__ */ (0,
|
|
2008
|
-
/* @__PURE__ */ (0,
|
|
2009
|
-
isLink ? /* @__PURE__ */ (0,
|
|
2191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2192
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DetailIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
2193
|
+
isLink ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2010
2194
|
"a",
|
|
2011
2195
|
{
|
|
2012
2196
|
href: detail,
|
|
@@ -2015,7 +2199,7 @@ function MeetingDetailRow({
|
|
|
2015
2199
|
className: "text-sm text-primary underline underline-offset-2 break-all hover:text-primary/80",
|
|
2016
2200
|
children: detail
|
|
2017
2201
|
}
|
|
2018
|
-
) : /* @__PURE__ */ (0,
|
|
2202
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm text-muted-foreground break-all", children: detail })
|
|
2019
2203
|
] });
|
|
2020
2204
|
}
|
|
2021
2205
|
function AppointmentSection({
|
|
@@ -2028,23 +2212,23 @@ function AppointmentSection({
|
|
|
2028
2212
|
}) {
|
|
2029
2213
|
const AppointmentIcon = MEETING_ICON[appointment.meetingType];
|
|
2030
2214
|
const canReschedule = !isAnonymous && !!onRescheduleAppointment;
|
|
2031
|
-
return /* @__PURE__ */ (0,
|
|
2032
|
-
/* @__PURE__ */ (0,
|
|
2033
|
-
/* @__PURE__ */ (0,
|
|
2034
|
-
/* @__PURE__ */ (0,
|
|
2215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2216
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2217
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.Calendar, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
2218
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium text-foreground", children: appointment.datetime })
|
|
2035
2219
|
] }),
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2037
|
-
/* @__PURE__ */ (0,
|
|
2038
|
-
/* @__PURE__ */ (0,
|
|
2220
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AppointmentIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm text-muted-foreground", children: MEETING_LABEL[appointment.meetingType] })
|
|
2039
2223
|
] }),
|
|
2040
|
-
appointment.meetingDetail && /* @__PURE__ */ (0,
|
|
2224
|
+
appointment.meetingDetail && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2041
2225
|
MeetingDetailRow,
|
|
2042
2226
|
{
|
|
2043
2227
|
meetingType: appointment.meetingType,
|
|
2044
2228
|
detail: appointment.meetingDetail
|
|
2045
2229
|
}
|
|
2046
2230
|
),
|
|
2047
|
-
/* @__PURE__ */ (0,
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2048
2232
|
"span",
|
|
2049
2233
|
{
|
|
2050
2234
|
className: cn("text-sm font-medium", {
|
|
@@ -2056,9 +2240,9 @@ function AppointmentSection({
|
|
|
2056
2240
|
children: APPOINTMENT_STATUS_LABEL[appointment.status]
|
|
2057
2241
|
}
|
|
2058
2242
|
),
|
|
2059
|
-
appointment.status === "requested" && /* @__PURE__ */ (0,
|
|
2060
|
-
/* @__PURE__ */ (0,
|
|
2061
|
-
/* @__PURE__ */ (0,
|
|
2243
|
+
appointment.status === "requested" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex gap-2 pt-1", children: [
|
|
2244
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { size: "sm", className: "flex-1", onClick: onApproveAppointment, children: "Approve" }),
|
|
2245
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2062
2246
|
Button,
|
|
2063
2247
|
{
|
|
2064
2248
|
variant: "outline",
|
|
@@ -2068,7 +2252,7 @@ function AppointmentSection({
|
|
|
2068
2252
|
children: "Decline"
|
|
2069
2253
|
}
|
|
2070
2254
|
),
|
|
2071
|
-
canReschedule && /* @__PURE__ */ (0,
|
|
2255
|
+
canReschedule && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2072
2256
|
Button,
|
|
2073
2257
|
{
|
|
2074
2258
|
variant: "ghost",
|
|
@@ -2079,7 +2263,7 @@ function AppointmentSection({
|
|
|
2079
2263
|
}
|
|
2080
2264
|
)
|
|
2081
2265
|
] }),
|
|
2082
|
-
(appointment.status === "confirmed" || appointment.status === "cancelled") && canReschedule && /* @__PURE__ */ (0,
|
|
2266
|
+
(appointment.status === "confirmed" || appointment.status === "cancelled") && canReschedule && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2083
2267
|
Button,
|
|
2084
2268
|
{
|
|
2085
2269
|
variant: "outline",
|
|
@@ -2092,13 +2276,13 @@ function AppointmentSection({
|
|
|
2092
2276
|
] });
|
|
2093
2277
|
}
|
|
2094
2278
|
function PanelSectionHeader({ children }) {
|
|
2095
|
-
return /* @__PURE__ */ (0,
|
|
2279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mb-2.5 text-overline text-muted-foreground", children });
|
|
2096
2280
|
}
|
|
2097
2281
|
function PanelSection({
|
|
2098
2282
|
children,
|
|
2099
2283
|
last = false
|
|
2100
2284
|
}) {
|
|
2101
|
-
return /* @__PURE__ */ (0,
|
|
2285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("px-4 py-4", !last && "border-b border-border"), children });
|
|
2102
2286
|
}
|
|
2103
2287
|
function LeadInfoPanel({
|
|
2104
2288
|
contact,
|
|
@@ -2124,8 +2308,8 @@ function LeadInfoPanel({
|
|
|
2124
2308
|
}) {
|
|
2125
2309
|
const isAnonymous = !contact.name.trim();
|
|
2126
2310
|
const addToContactsDisabled = isAnonymous || isKnownContact;
|
|
2127
|
-
return /* @__PURE__ */ (0,
|
|
2128
|
-
/* @__PURE__ */ (0,
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("flex flex-col bg-background", className), children: [
|
|
2312
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2129
2313
|
"div",
|
|
2130
2314
|
{
|
|
2131
2315
|
className: cn(
|
|
@@ -2133,7 +2317,7 @@ function LeadInfoPanel({
|
|
|
2133
2317
|
"flex items-center justify-between border-b border-border px-4"
|
|
2134
2318
|
),
|
|
2135
2319
|
children: [
|
|
2136
|
-
onBack && /* @__PURE__ */ (0,
|
|
2320
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2137
2321
|
Button,
|
|
2138
2322
|
{
|
|
2139
2323
|
variant: "ghost",
|
|
@@ -2141,15 +2325,15 @@ function LeadInfoPanel({
|
|
|
2141
2325
|
className: "size-8 shrink-0 md:hidden",
|
|
2142
2326
|
onClick: onBack,
|
|
2143
2327
|
"aria-label": "Back to conversation",
|
|
2144
|
-
children: /* @__PURE__ */ (0,
|
|
2328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.ArrowLeft, { className: "size-4" })
|
|
2145
2329
|
}
|
|
2146
2330
|
),
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2148
|
-
onToggleCollapse && /* @__PURE__ */ (0,
|
|
2149
|
-
/* @__PURE__ */ (0,
|
|
2331
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-semibold text-foreground", children: "Lead Info" }),
|
|
2332
|
+
onToggleCollapse && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Tooltip, { children: [
|
|
2333
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2150
2334
|
TooltipTrigger,
|
|
2151
2335
|
{
|
|
2152
|
-
render: /* @__PURE__ */ (0,
|
|
2336
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2153
2337
|
Button,
|
|
2154
2338
|
{
|
|
2155
2339
|
variant: "ghost",
|
|
@@ -2157,8 +2341,8 @@ function LeadInfoPanel({
|
|
|
2157
2341
|
className: "size-7",
|
|
2158
2342
|
onClick: onToggleCollapse,
|
|
2159
2343
|
"aria-label": isCollapsed ? "Expand panel" : "Collapse panel",
|
|
2160
|
-
children: /* @__PURE__ */ (0,
|
|
2161
|
-
|
|
2344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2345
|
+
import_lucide_react8.ChevronRight,
|
|
2162
2346
|
{
|
|
2163
2347
|
className: cn(
|
|
2164
2348
|
"size-4 transition-transform duration-150",
|
|
@@ -2170,26 +2354,26 @@ function LeadInfoPanel({
|
|
|
2170
2354
|
)
|
|
2171
2355
|
}
|
|
2172
2356
|
),
|
|
2173
|
-
/* @__PURE__ */ (0,
|
|
2357
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipContent, { children: isCollapsed ? "Expand panel" : "Collapse panel" })
|
|
2174
2358
|
] })
|
|
2175
2359
|
]
|
|
2176
2360
|
}
|
|
2177
2361
|
),
|
|
2178
|
-
!isCollapsed && /* @__PURE__ */ (0,
|
|
2179
|
-
/* @__PURE__ */ (0,
|
|
2180
|
-
/* @__PURE__ */ (0,
|
|
2181
|
-
/* @__PURE__ */ (0,
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2183
|
-
/* @__PURE__ */ (0,
|
|
2184
|
-
/* @__PURE__ */ (0,
|
|
2185
|
-
/* @__PURE__ */ (0,
|
|
2186
|
-
topic && /* @__PURE__ */ (0,
|
|
2362
|
+
!isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: [
|
|
2363
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(PanelSection, { children: [
|
|
2364
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelSectionHeader, { children: "Contact" }),
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2366
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContactAvatar, { name: contact.name, size: "lg" }),
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2368
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-muted-foreground", children: source }),
|
|
2370
|
+
topic && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Badge, { variant: "secondary", className: "mt-1 text-xs", children: topic })
|
|
2187
2371
|
] })
|
|
2188
2372
|
] }),
|
|
2189
|
-
(contact.email || contact.phone || firstSeen) && /* @__PURE__ */ (0,
|
|
2190
|
-
contact.email && /* @__PURE__ */ (0,
|
|
2191
|
-
/* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2373
|
+
(contact.email || contact.phone || firstSeen) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mt-3 flex flex-col gap-1.5", children: [
|
|
2374
|
+
contact.email && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
2375
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.Mail, { className: "size-4 shrink-0" }),
|
|
2376
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2193
2377
|
"a",
|
|
2194
2378
|
{
|
|
2195
2379
|
href: `mailto:${contact.email}`,
|
|
@@ -2198,9 +2382,9 @@ function LeadInfoPanel({
|
|
|
2198
2382
|
}
|
|
2199
2383
|
)
|
|
2200
2384
|
] }),
|
|
2201
|
-
contact.phone && /* @__PURE__ */ (0,
|
|
2202
|
-
/* @__PURE__ */ (0,
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
2385
|
+
contact.phone && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.PhoneCall, { className: "size-4 shrink-0" }),
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2204
2388
|
"a",
|
|
2205
2389
|
{
|
|
2206
2390
|
href: `tel:${contact.phone}`,
|
|
@@ -2209,31 +2393,31 @@ function LeadInfoPanel({
|
|
|
2209
2393
|
}
|
|
2210
2394
|
)
|
|
2211
2395
|
] }),
|
|
2212
|
-
firstSeen && /* @__PURE__ */ (0,
|
|
2396
|
+
firstSeen && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
2213
2397
|
"First seen: ",
|
|
2214
2398
|
firstSeen
|
|
2215
2399
|
] })
|
|
2216
2400
|
] })
|
|
2217
2401
|
] }),
|
|
2218
|
-
/* @__PURE__ */ (0,
|
|
2219
|
-
/* @__PURE__ */ (0,
|
|
2220
|
-
aiFields.length > 0 ? /* @__PURE__ */ (0,
|
|
2221
|
-
/* @__PURE__ */ (0,
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
2223
|
-
/* @__PURE__ */ (0,
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(PanelSection, { children: [
|
|
2403
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelSectionHeader, { children: "AI-Collected Data" }),
|
|
2404
|
+
aiFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
2405
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AICollectedDataSection, { fields: aiFields }),
|
|
2406
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mt-2.5 flex items-center gap-3 text-xs text-muted-foreground", children: [
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
2408
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.CheckCircle2, { className: "size-3 text-success-text" }),
|
|
2225
2409
|
"confirmed"
|
|
2226
2410
|
] }),
|
|
2227
|
-
/* @__PURE__ */ (0,
|
|
2228
|
-
/* @__PURE__ */ (0,
|
|
2411
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.HelpCircle, { className: "size-3 text-warning-text" }),
|
|
2229
2413
|
"estimated"
|
|
2230
2414
|
] })
|
|
2231
2415
|
] })
|
|
2232
|
-
] }) : /* @__PURE__ */ (0,
|
|
2416
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-muted-foreground", children: "AI is still gathering information..." })
|
|
2233
2417
|
] }),
|
|
2234
|
-
/* @__PURE__ */ (0,
|
|
2235
|
-
/* @__PURE__ */ (0,
|
|
2236
|
-
appointment ? /* @__PURE__ */ (0,
|
|
2418
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(PanelSection, { children: [
|
|
2419
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelSectionHeader, { children: "Appointment" }),
|
|
2420
|
+
appointment ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2237
2421
|
AppointmentSection,
|
|
2238
2422
|
{
|
|
2239
2423
|
appointment,
|
|
@@ -2243,7 +2427,7 @@ function LeadInfoPanel({
|
|
|
2243
2427
|
onDeclineAppointment,
|
|
2244
2428
|
onRescheduleAppointment
|
|
2245
2429
|
}
|
|
2246
|
-
) : /* @__PURE__ */ (0,
|
|
2430
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2247
2431
|
Button,
|
|
2248
2432
|
{
|
|
2249
2433
|
variant: "outline",
|
|
@@ -2252,20 +2436,20 @@ function LeadInfoPanel({
|
|
|
2252
2436
|
disabled: isAnonymous,
|
|
2253
2437
|
onClick: onBookAppointment,
|
|
2254
2438
|
children: [
|
|
2255
|
-
/* @__PURE__ */ (0,
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.Plus, { className: "mr-1.5 size-3.5" }),
|
|
2256
2440
|
"Book Appointment"
|
|
2257
2441
|
]
|
|
2258
2442
|
}
|
|
2259
2443
|
)
|
|
2260
2444
|
] }),
|
|
2261
|
-
/* @__PURE__ */ (0,
|
|
2262
|
-
/* @__PURE__ */ (0,
|
|
2263
|
-
/* @__PURE__ */ (0,
|
|
2264
|
-
/* @__PURE__ */ (0,
|
|
2265
|
-
/* @__PURE__ */ (0,
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(PanelSection, { children: [
|
|
2446
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelSectionHeader, { children: "CRM Actions" }),
|
|
2447
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2448
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Tooltip, { children: [
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2266
2450
|
TooltipTrigger,
|
|
2267
2451
|
{
|
|
2268
|
-
render: /* @__PURE__ */ (0,
|
|
2452
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2269
2453
|
Button,
|
|
2270
2454
|
{
|
|
2271
2455
|
variant: "outline",
|
|
@@ -2274,16 +2458,16 @@ function LeadInfoPanel({
|
|
|
2274
2458
|
disabled: addToContactsDisabled,
|
|
2275
2459
|
onClick: onAddToContacts,
|
|
2276
2460
|
children: [
|
|
2277
|
-
/* @__PURE__ */ (0,
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.UserPlus, { className: "mr-1.5 size-3.5" }),
|
|
2278
2462
|
"Add to Contacts"
|
|
2279
2463
|
]
|
|
2280
2464
|
}
|
|
2281
2465
|
)
|
|
2282
2466
|
}
|
|
2283
2467
|
),
|
|
2284
|
-
isKnownContact && /* @__PURE__ */ (0,
|
|
2468
|
+
isKnownContact && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipContent, { children: "Already in contacts" })
|
|
2285
2469
|
] }),
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2470
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2287
2471
|
Button,
|
|
2288
2472
|
{
|
|
2289
2473
|
variant: "outline",
|
|
@@ -2292,23 +2476,23 @@ function LeadInfoPanel({
|
|
|
2292
2476
|
disabled: isAnonymous,
|
|
2293
2477
|
onClick: onCreateOpportunity,
|
|
2294
2478
|
children: [
|
|
2295
|
-
/* @__PURE__ */ (0,
|
|
2479
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.Briefcase, { className: "mr-1.5 size-3.5" }),
|
|
2296
2480
|
"Add to CRM"
|
|
2297
2481
|
]
|
|
2298
2482
|
}
|
|
2299
2483
|
)
|
|
2300
2484
|
] })
|
|
2301
2485
|
] }),
|
|
2302
|
-
/* @__PURE__ */ (0,
|
|
2303
|
-
/* @__PURE__ */ (0,
|
|
2304
|
-
/* @__PURE__ */ (0,
|
|
2305
|
-
notesSaveStatus === "saving" && /* @__PURE__ */ (0,
|
|
2306
|
-
notesSaveStatus === "saved" && /* @__PURE__ */ (0,
|
|
2307
|
-
/* @__PURE__ */ (0,
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(PanelSection, { last: true, children: [
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mb-2.5 flex items-center justify-between", children: [
|
|
2488
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-overline text-muted-foreground", children: "Internal Notes" }),
|
|
2489
|
+
notesSaveStatus === "saving" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-muted-foreground", children: "Saving..." }),
|
|
2490
|
+
notesSaveStatus === "saved" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1 text-xs text-success-text", children: [
|
|
2491
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.CheckCircle2, { className: "size-3" }),
|
|
2308
2492
|
"Saved"
|
|
2309
2493
|
] })
|
|
2310
2494
|
] }),
|
|
2311
|
-
/* @__PURE__ */ (0,
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2312
2496
|
Textarea,
|
|
2313
2497
|
{
|
|
2314
2498
|
value: internalNotes,
|
|
@@ -2324,7 +2508,7 @@ function LeadInfoPanel({
|
|
|
2324
2508
|
}
|
|
2325
2509
|
|
|
2326
2510
|
// src/components/ui/ai-conversations/index.tsx
|
|
2327
|
-
var
|
|
2511
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2328
2512
|
function ConversationsPage({
|
|
2329
2513
|
conversations,
|
|
2330
2514
|
activeConversationId,
|
|
@@ -2363,6 +2547,8 @@ function ConversationsPage({
|
|
|
2363
2547
|
onSendEmail,
|
|
2364
2548
|
onTakeOver,
|
|
2365
2549
|
onLetAiHandle,
|
|
2550
|
+
onAttachFile,
|
|
2551
|
+
onAttachImage,
|
|
2366
2552
|
emailReplySubject,
|
|
2367
2553
|
onReopen,
|
|
2368
2554
|
onMarkUrgent,
|
|
@@ -2392,12 +2578,12 @@ function ConversationsPage({
|
|
|
2392
2578
|
onToggleLeadPanel == null ? void 0 : onToggleLeadPanel();
|
|
2393
2579
|
setMobilePanel(showLeadPanel ? "chat" : "lead");
|
|
2394
2580
|
};
|
|
2395
|
-
return /* @__PURE__ */ (0,
|
|
2581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2396
2582
|
"div",
|
|
2397
2583
|
{
|
|
2398
2584
|
className: cn("flex h-full overflow-hidden bg-background", className),
|
|
2399
2585
|
children: [
|
|
2400
|
-
/* @__PURE__ */ (0,
|
|
2586
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2401
2587
|
ConversationList,
|
|
2402
2588
|
{
|
|
2403
2589
|
conversations,
|
|
@@ -2419,7 +2605,7 @@ function ConversationsPage({
|
|
|
2419
2605
|
)
|
|
2420
2606
|
}
|
|
2421
2607
|
),
|
|
2422
|
-
contact ? /* @__PURE__ */ (0,
|
|
2608
|
+
contact ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2423
2609
|
ChatThread,
|
|
2424
2610
|
{
|
|
2425
2611
|
contact,
|
|
@@ -2436,6 +2622,8 @@ function ConversationsPage({
|
|
|
2436
2622
|
onSendEmail,
|
|
2437
2623
|
onTakeOver,
|
|
2438
2624
|
onLetAiHandle,
|
|
2625
|
+
onAttachFile,
|
|
2626
|
+
onAttachImage,
|
|
2439
2627
|
emailReplySubject,
|
|
2440
2628
|
onReopen,
|
|
2441
2629
|
onMarkUrgent,
|
|
@@ -2453,21 +2641,21 @@ function ConversationsPage({
|
|
|
2453
2641
|
)
|
|
2454
2642
|
},
|
|
2455
2643
|
contact.id
|
|
2456
|
-
) : /* @__PURE__ */ (0,
|
|
2644
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2457
2645
|
"div",
|
|
2458
2646
|
{
|
|
2459
2647
|
className: cn(
|
|
2460
2648
|
"min-w-0 flex-1 items-center justify-center border-r border-border bg-muted/10",
|
|
2461
2649
|
mobilePanel === "chat" ? "flex md:flex" : "hidden md:flex"
|
|
2462
2650
|
),
|
|
2463
|
-
children: /* @__PURE__ */ (0,
|
|
2464
|
-
/* @__PURE__ */ (0,
|
|
2465
|
-
/* @__PURE__ */ (0,
|
|
2651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
|
|
2652
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.MessageSquare, { className: "size-10 opacity-30" }),
|
|
2653
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm", children: "Select a conversation" })
|
|
2466
2654
|
] })
|
|
2467
2655
|
}
|
|
2468
2656
|
),
|
|
2469
|
-
contact && /* @__PURE__ */ (0,
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
2657
|
+
contact && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2471
2659
|
"div",
|
|
2472
2660
|
{
|
|
2473
2661
|
className: cn(
|
|
@@ -2475,7 +2663,7 @@ function ConversationsPage({
|
|
|
2475
2663
|
"md:block md:shrink-0 md:overflow-hidden md:transition-[width] md:duration-200 md:ease-in-out",
|
|
2476
2664
|
showLeadPanel ? "md:w-[320px]" : "md:w-0"
|
|
2477
2665
|
),
|
|
2478
|
-
children: /* @__PURE__ */ (0,
|
|
2666
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2479
2667
|
LeadInfoPanel,
|
|
2480
2668
|
{
|
|
2481
2669
|
contact,
|
|
@@ -2501,11 +2689,11 @@ function ConversationsPage({
|
|
|
2501
2689
|
)
|
|
2502
2690
|
}
|
|
2503
2691
|
),
|
|
2504
|
-
!showLeadPanel && onToggleLeadPanel && /* @__PURE__ */ (0,
|
|
2505
|
-
/* @__PURE__ */ (0,
|
|
2692
|
+
!showLeadPanel && onToggleLeadPanel && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "hidden shrink-0 items-start border-l border-border pt-[29px] md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Tooltip, { children: [
|
|
2693
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2506
2694
|
TooltipTrigger,
|
|
2507
2695
|
{
|
|
2508
|
-
render: /* @__PURE__ */ (0,
|
|
2696
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2509
2697
|
Button,
|
|
2510
2698
|
{
|
|
2511
2699
|
variant: "ghost",
|
|
@@ -2513,12 +2701,12 @@ function ConversationsPage({
|
|
|
2513
2701
|
className: "size-8",
|
|
2514
2702
|
"aria-label": "Show lead info",
|
|
2515
2703
|
onClick: handleToggleLeadPanel,
|
|
2516
|
-
children: /* @__PURE__ */ (0,
|
|
2704
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.ChevronLeft, { className: "size-4" })
|
|
2517
2705
|
}
|
|
2518
2706
|
)
|
|
2519
2707
|
}
|
|
2520
2708
|
),
|
|
2521
|
-
/* @__PURE__ */ (0,
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipContent, { children: "Show lead info" })
|
|
2522
2710
|
] }) })
|
|
2523
2711
|
] })
|
|
2524
2712
|
]
|
|
@@ -2548,13 +2736,13 @@ function AiConvAssignAdvisorDialog({
|
|
|
2548
2736
|
setRoleFilter("");
|
|
2549
2737
|
}
|
|
2550
2738
|
};
|
|
2551
|
-
return /* @__PURE__ */ (0,
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
2553
|
-
/* @__PURE__ */ (0,
|
|
2554
|
-
/* @__PURE__ */ (0,
|
|
2739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogContent, { children: [
|
|
2740
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogHeader, { children: [
|
|
2741
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogTitle, { children: "Assign to advisor" }),
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogDescription, { children: "Choose an advisor to handle this conversation." })
|
|
2555
2743
|
] }),
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2557
|
-
roles.length > 0 && /* @__PURE__ */ (0,
|
|
2744
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
2745
|
+
roles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2558
2746
|
ToggleGroup,
|
|
2559
2747
|
{
|
|
2560
2748
|
type: "single",
|
|
@@ -2567,14 +2755,14 @@ function AiConvAssignAdvisorDialog({
|
|
|
2567
2755
|
setRoleFilter(!v || v === "__all__" ? "" : v);
|
|
2568
2756
|
},
|
|
2569
2757
|
children: [
|
|
2570
|
-
/* @__PURE__ */ (0,
|
|
2571
|
-
roles.map((role) => /* @__PURE__ */ (0,
|
|
2758
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToggleGroupItem, { value: "__all__", children: "All" }),
|
|
2759
|
+
roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToggleGroupItem, { value: role, children: role }, role))
|
|
2572
2760
|
]
|
|
2573
2761
|
}
|
|
2574
2762
|
) }),
|
|
2575
|
-
/* @__PURE__ */ (0,
|
|
2576
|
-
/* @__PURE__ */ (0,
|
|
2577
|
-
/* @__PURE__ */ (0,
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2 border border-input px-3", children: [
|
|
2764
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.Search, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
2765
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2578
2766
|
"input",
|
|
2579
2767
|
{
|
|
2580
2768
|
type: "text",
|
|
@@ -2585,7 +2773,7 @@ function AiConvAssignAdvisorDialog({
|
|
|
2585
2773
|
}
|
|
2586
2774
|
)
|
|
2587
2775
|
] }),
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
2776
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "max-h-52 overflow-y-auto border border-t-0 border-input", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "No advisors found." }) : filtered.map((advisor) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2589
2777
|
"button",
|
|
2590
2778
|
{
|
|
2591
2779
|
type: "button",
|
|
@@ -2595,19 +2783,19 @@ function AiConvAssignAdvisorDialog({
|
|
|
2595
2783
|
value === advisor.id && "bg-muted font-medium"
|
|
2596
2784
|
),
|
|
2597
2785
|
children: [
|
|
2598
|
-
/* @__PURE__ */ (0,
|
|
2599
|
-
/* @__PURE__ */ (0,
|
|
2600
|
-
/* @__PURE__ */ (0,
|
|
2601
|
-
advisor.role && /* @__PURE__ */ (0,
|
|
2786
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AvatarFallback, { className: "font-semibold", children: advisor.initials }) }),
|
|
2787
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2788
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "truncate text-sm", children: advisor.name }),
|
|
2789
|
+
advisor.role && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: advisor.role })
|
|
2602
2790
|
] })
|
|
2603
2791
|
]
|
|
2604
2792
|
},
|
|
2605
2793
|
advisor.id
|
|
2606
2794
|
)) })
|
|
2607
2795
|
] }),
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2609
|
-
/* @__PURE__ */ (0,
|
|
2610
|
-
/* @__PURE__ */ (0,
|
|
2796
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogFooter, { children: [
|
|
2797
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
|
|
2798
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { onClick: onConfirm, children: "Assign" })
|
|
2611
2799
|
] })
|
|
2612
2800
|
] }) });
|
|
2613
2801
|
}
|