@wealthx/shadcn 1.5.17 → 1.5.19
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 +154 -154
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-UJMVXREM.mjs → chunk-2UA4CPE5.mjs} +1 -1
- package/dist/{chunk-DYSVJ473.mjs → chunk-2VTOF7PW.mjs} +1 -1
- package/dist/{chunk-6MDNL5I2.mjs → chunk-45V7X563.mjs} +3 -3
- package/dist/{chunk-RKHKBEE6.mjs → chunk-5BU7TNB4.mjs} +2 -2
- package/dist/{chunk-B7DD3ODQ.mjs → chunk-7T4TYUO3.mjs} +2 -2
- package/dist/{chunk-JGBV3XMQ.mjs → chunk-ANERULZS.mjs} +2 -2
- package/dist/{chunk-LRQSY3TP.mjs → chunk-C4ESZLGT.mjs} +142 -69
- package/dist/{chunk-5YVJSKFH.mjs → chunk-DKH35J4U.mjs} +2 -2
- package/dist/{chunk-ZAXZBOWI.mjs → chunk-EHQ35FYA.mjs} +4 -1
- package/dist/{chunk-MXP2RX2V.mjs → chunk-ET4MTPIY.mjs} +1 -1
- package/dist/{chunk-QHAMVWDG.mjs → chunk-G7YCLJ53.mjs} +2 -2
- package/dist/{chunk-R6U246E4.mjs → chunk-GDBM2GL5.mjs} +2 -2
- package/dist/{chunk-NCMV3LTP.mjs → chunk-H3PTREG6.mjs} +4 -1
- package/dist/{chunk-7II6QRCZ.mjs → chunk-H5NI6ZIU.mjs} +1 -1
- package/dist/{chunk-XAS6KBIG.mjs → chunk-JJSA772M.mjs} +1 -1
- package/dist/{chunk-MNMSHB2J.mjs → chunk-K3XP5ETH.mjs} +2 -2
- package/dist/{chunk-I4P7RXAE.mjs → chunk-KJQ3BVTB.mjs} +1 -1
- package/dist/{chunk-MUV4EGDW.mjs → chunk-KPGARKFC.mjs} +1 -1
- package/dist/{chunk-P7CEBZM6.mjs → chunk-LSRGA5BI.mjs} +19 -5
- package/dist/{chunk-GMF7INNS.mjs → chunk-LWYMZHN7.mjs} +2 -2
- package/dist/{chunk-XMP24PWA.mjs → chunk-NXZ2F4JA.mjs} +1 -1
- package/dist/{chunk-TLLD5IU6.mjs → chunk-PSBQ4I3M.mjs} +1 -1
- package/dist/{chunk-4X4MGYHE.mjs → chunk-PUGQVHQL.mjs} +1 -1
- package/dist/{chunk-LPVXO3TD.mjs → chunk-RFWP2325.mjs} +2 -2
- package/dist/{chunk-3KLJ4XRE.mjs → chunk-RPOIXMHW.mjs} +1 -1
- package/dist/{chunk-IFSQWDRN.mjs → chunk-SH5L5VG6.mjs} +1 -1
- package/dist/{chunk-FW4U543X.mjs → chunk-STDCXTUU.mjs} +2 -2
- package/dist/{chunk-2KNQZG5S.mjs → chunk-SU6TPDEU.mjs} +1 -1
- package/dist/{chunk-K4WDPVFY.mjs → chunk-WZFBLRNP.mjs} +1 -1
- package/dist/{chunk-UYRHYJPX.mjs → chunk-XNX3XJ2F.mjs} +1 -1
- package/dist/components/ui/about-you-form.js +17 -4
- package/dist/components/ui/about-you-form.mjs +3 -3
- package/dist/components/ui/add-column-modal.js +17 -4
- package/dist/components/ui/add-column-modal.mjs +2 -2
- package/dist/components/ui/ai-assistant-drawer.mjs +2 -2
- package/dist/components/ui/ai-conversations.js +458 -345
- package/dist/components/ui/ai-conversations.mjs +2 -1
- package/dist/components/ui/appointment-action-dialogs.js +17 -4
- package/dist/components/ui/appointment-action-dialogs.mjs +2 -2
- package/dist/components/ui/appointment-availability-settings.js +17 -4
- package/dist/components/ui/appointment-availability-settings.mjs +4 -4
- package/dist/components/ui/appointment-book-dialog.js +17 -4
- package/dist/components/ui/appointment-book-dialog.mjs +3 -3
- package/dist/components/ui/appointment-detail-sheet.js +17 -4
- package/dist/components/ui/appointment-detail-sheet.mjs +4 -4
- package/dist/components/ui/appointment-upcoming-card.js +17 -4
- package/dist/components/ui/appointment-upcoming-card.mjs +2 -2
- package/dist/components/ui/backoffice-signup-steps.js +17 -4
- package/dist/components/ui/backoffice-signup-steps.mjs +4 -4
- package/dist/components/ui/bank-statement-generate-dialog.js +17 -4
- package/dist/components/ui/bank-statement-generate-dialog.mjs +5 -5
- package/dist/components/ui/chat-widget.js +17 -4
- package/dist/components/ui/chat-widget.mjs +3 -3
- package/dist/components/ui/contact-alert-dialog/index.js +17 -4
- package/dist/components/ui/contact-alert-dialog/index.mjs +3 -3
- package/dist/components/ui/create-contact-modal.js +17 -4
- package/dist/components/ui/create-contact-modal.mjs +3 -3
- package/dist/components/ui/date-picker.mjs +2 -2
- package/dist/components/ui/drawer.js +4 -1
- package/dist/components/ui/drawer.mjs +1 -1
- package/dist/components/ui/expense-detail-item.mjs +3 -3
- package/dist/components/ui/expense-work-details.mjs +3 -3
- package/dist/components/ui/field.js +17 -4
- package/dist/components/ui/field.mjs +2 -2
- package/dist/components/ui/financial-drawers.mjs +2 -2
- package/dist/components/ui/form-primitives.js +17 -4
- package/dist/components/ui/form-primitives.mjs +2 -2
- package/dist/components/ui/frontend-signup-steps.js +17 -4
- package/dist/components/ui/frontend-signup-steps.mjs +6 -6
- package/dist/components/ui/income-work-details.mjs +3 -3
- package/dist/components/ui/label.js +20 -4
- package/dist/components/ui/label.mjs +1 -1
- package/dist/components/ui/opportunity-edit-modals.js +17 -4
- package/dist/components/ui/opportunity-edit-modals.mjs +5 -5
- package/dist/components/ui/opportunity-summary-tab.js +17 -4
- package/dist/components/ui/opportunity-summary-tab.mjs +6 -6
- package/dist/components/ui/pipeline-dialogs.mjs +3 -3
- package/dist/components/ui/property-report-dialog.js +17 -4
- package/dist/components/ui/property-report-dialog.mjs +4 -4
- package/dist/components/ui/review-alerts-dialog.js +17 -4
- package/dist/components/ui/review-alerts-dialog.mjs +2 -2
- package/dist/components/ui/savings-goal-modal.mjs +2 -2
- package/dist/components/ui/scenario-drawer.mjs +1 -1
- package/dist/components/ui/share-details-dialog.js +17 -4
- package/dist/components/ui/share-details-dialog.mjs +2 -2
- package/dist/components/ui/sheet.js +4 -1
- package/dist/components/ui/sheet.mjs +1 -1
- package/dist/components/ui/signup-form-primitives.js +17 -4
- package/dist/components/ui/signup-form-primitives.mjs +3 -3
- package/dist/components/ui/two-fa-setup-form.js +17 -4
- package/dist/components/ui/two-fa-setup-form.mjs +3 -3
- package/dist/index.js +1368 -1283
- package/dist/index.mjs +39 -39
- package/dist/styles.css +1 -1
- package/package.json +9 -1
- package/src/components/ui/ai-conversations.tsx +161 -83
- package/src/components/ui/drawer.tsx +4 -1
- package/src/components/ui/label.tsx +18 -3
- package/src/components/ui/sheet.tsx +4 -1
- package/src/styles/globals.css +6 -0
- package/src/styles/styles-css.ts +1 -1
- package/dist/{chunk-TRM3KIHT.mjs → chunk-UMF6LLQK.mjs} +3 -3
|
@@ -72,6 +72,13 @@ __export(ai_conversations_exports, {
|
|
|
72
72
|
});
|
|
73
73
|
module.exports = __toCommonJS(ai_conversations_exports);
|
|
74
74
|
var import_react3 = __toESM(require("react"));
|
|
75
|
+
var import_react4 = require("@tiptap/react");
|
|
76
|
+
var import_starter_kit = __toESM(require("@tiptap/starter-kit"));
|
|
77
|
+
var import_extension_underline = __toESM(require("@tiptap/extension-underline"));
|
|
78
|
+
var import_extension_link = __toESM(require("@tiptap/extension-link"));
|
|
79
|
+
var import_react_markdown = __toESM(require("react-markdown"));
|
|
80
|
+
var import_rehype_raw = __toESM(require("rehype-raw"));
|
|
81
|
+
var import_rehype_sanitize = __toESM(require("rehype-sanitize"));
|
|
75
82
|
var import_lucide_react4 = require("lucide-react");
|
|
76
83
|
|
|
77
84
|
// src/lib/utils.ts
|
|
@@ -605,9 +612,54 @@ function DialogDescription(_a) {
|
|
|
605
612
|
);
|
|
606
613
|
}
|
|
607
614
|
|
|
615
|
+
// src/components/ui/popover.tsx
|
|
616
|
+
var import_popover = require("@base-ui/react/popover");
|
|
617
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
618
|
+
function Popover(_a) {
|
|
619
|
+
var props = __objRest(_a, []);
|
|
620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
621
|
+
}
|
|
622
|
+
function PopoverTrigger(_a) {
|
|
623
|
+
var props = __objRest(_a, []);
|
|
624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
|
|
625
|
+
}
|
|
626
|
+
function PopoverContent(_a) {
|
|
627
|
+
var _b = _a, {
|
|
628
|
+
className,
|
|
629
|
+
align = "center",
|
|
630
|
+
sideOffset = 4,
|
|
631
|
+
style
|
|
632
|
+
} = _b, props = __objRest(_b, [
|
|
633
|
+
"className",
|
|
634
|
+
"align",
|
|
635
|
+
"sideOffset",
|
|
636
|
+
"style"
|
|
637
|
+
]);
|
|
638
|
+
const themeVars = useThemeVars();
|
|
639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
640
|
+
import_popover.Popover.Positioner,
|
|
641
|
+
{
|
|
642
|
+
className: "z-[200]",
|
|
643
|
+
align,
|
|
644
|
+
sideOffset,
|
|
645
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
646
|
+
import_popover.Popover.Popup,
|
|
647
|
+
__spreadValues({
|
|
648
|
+
className: cn(
|
|
649
|
+
"z-50 w-72 border border-border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
650
|
+
className
|
|
651
|
+
),
|
|
652
|
+
"data-slot": "popover-content",
|
|
653
|
+
style: __spreadValues(__spreadValues({}, themeVars), style)
|
|
654
|
+
}, props)
|
|
655
|
+
)
|
|
656
|
+
}
|
|
657
|
+
) });
|
|
658
|
+
}
|
|
659
|
+
|
|
608
660
|
// src/components/ui/separator.tsx
|
|
609
661
|
var import_separator = require("@base-ui/react/separator");
|
|
610
|
-
var
|
|
662
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
611
663
|
function Separator(_a) {
|
|
612
664
|
var _b = _a, {
|
|
613
665
|
className,
|
|
@@ -616,7 +668,7 @@ function Separator(_a) {
|
|
|
616
668
|
"className",
|
|
617
669
|
"orientation"
|
|
618
670
|
]);
|
|
619
|
-
return /* @__PURE__ */ (0,
|
|
671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
620
672
|
import_separator.Separator,
|
|
621
673
|
__spreadValues({
|
|
622
674
|
className: cn(
|
|
@@ -632,7 +684,7 @@ function Separator(_a) {
|
|
|
632
684
|
// src/components/ui/tabs.tsx
|
|
633
685
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
634
686
|
var import_tabs = require("@base-ui/react/tabs");
|
|
635
|
-
var
|
|
687
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
636
688
|
function Tabs(_a) {
|
|
637
689
|
var _b = _a, {
|
|
638
690
|
className,
|
|
@@ -641,7 +693,7 @@ function Tabs(_a) {
|
|
|
641
693
|
"className",
|
|
642
694
|
"orientation"
|
|
643
695
|
]);
|
|
644
|
-
return /* @__PURE__ */ (0,
|
|
696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
645
697
|
import_tabs.Tabs.Root,
|
|
646
698
|
__spreadValues({
|
|
647
699
|
className: cn(
|
|
@@ -675,7 +727,7 @@ function TabsList(_a) {
|
|
|
675
727
|
"className",
|
|
676
728
|
"variant"
|
|
677
729
|
]);
|
|
678
|
-
return /* @__PURE__ */ (0,
|
|
730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
679
731
|
import_tabs.Tabs.List,
|
|
680
732
|
__spreadValues({
|
|
681
733
|
className: cn(tabsListVariants({ variant }), className),
|
|
@@ -686,7 +738,7 @@ function TabsList(_a) {
|
|
|
686
738
|
}
|
|
687
739
|
function TabsTrigger(_a) {
|
|
688
740
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
689
|
-
return /* @__PURE__ */ (0,
|
|
741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
690
742
|
import_tabs.Tabs.Tab,
|
|
691
743
|
__spreadValues({
|
|
692
744
|
className: cn(
|
|
@@ -730,7 +782,7 @@ var import_toggle2 = require("@base-ui/react/toggle");
|
|
|
730
782
|
// src/components/ui/toggle.tsx
|
|
731
783
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
732
784
|
var import_toggle = require("@base-ui/react/toggle");
|
|
733
|
-
var
|
|
785
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
734
786
|
var toggleVariants = (0, import_class_variance_authority4.cva)(
|
|
735
787
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
736
788
|
{
|
|
@@ -753,7 +805,7 @@ var toggleVariants = (0, import_class_variance_authority4.cva)(
|
|
|
753
805
|
);
|
|
754
806
|
|
|
755
807
|
// src/components/ui/toggle-group.tsx
|
|
756
|
-
var
|
|
808
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
757
809
|
var ToggleGroupContext = React3.createContext({
|
|
758
810
|
size: "default",
|
|
759
811
|
variant: "default",
|
|
@@ -775,7 +827,7 @@ function ToggleGroup(_a) {
|
|
|
775
827
|
"type",
|
|
776
828
|
"children"
|
|
777
829
|
]);
|
|
778
|
-
return /* @__PURE__ */ (0,
|
|
830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
779
831
|
import_toggle_group.ToggleGroup,
|
|
780
832
|
__spreadProps(__spreadValues({
|
|
781
833
|
className: cn(
|
|
@@ -790,7 +842,7 @@ function ToggleGroup(_a) {
|
|
|
790
842
|
multiple: type === "multiple",
|
|
791
843
|
style: { "--gap": spacing }
|
|
792
844
|
}, props), {
|
|
793
|
-
children: /* @__PURE__ */ (0,
|
|
845
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
|
|
794
846
|
})
|
|
795
847
|
);
|
|
796
848
|
}
|
|
@@ -807,7 +859,7 @@ function ToggleGroupItem(_a) {
|
|
|
807
859
|
"size"
|
|
808
860
|
]);
|
|
809
861
|
const context = React3.useContext(ToggleGroupContext);
|
|
810
|
-
return /* @__PURE__ */ (0,
|
|
862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
811
863
|
import_toggle2.Toggle,
|
|
812
864
|
__spreadProps(__spreadValues({
|
|
813
865
|
className: cn(
|
|
@@ -831,10 +883,10 @@ function ToggleGroupItem(_a) {
|
|
|
831
883
|
}
|
|
832
884
|
|
|
833
885
|
// src/components/ui/textarea.tsx
|
|
834
|
-
var
|
|
886
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
835
887
|
function Textarea(_a) {
|
|
836
888
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
837
|
-
return /* @__PURE__ */ (0,
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
838
890
|
"textarea",
|
|
839
891
|
__spreadValues({
|
|
840
892
|
className: cn(
|
|
@@ -849,14 +901,14 @@ function Textarea(_a) {
|
|
|
849
901
|
|
|
850
902
|
// src/components/ui/tooltip.tsx
|
|
851
903
|
var import_tooltip = require("@base-ui/react/tooltip");
|
|
852
|
-
var
|
|
904
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
853
905
|
function TooltipProvider(_a) {
|
|
854
906
|
var _b = _a, {
|
|
855
907
|
delay = 0
|
|
856
908
|
} = _b, props = __objRest(_b, [
|
|
857
909
|
"delay"
|
|
858
910
|
]);
|
|
859
|
-
return /* @__PURE__ */ (0,
|
|
911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
860
912
|
import_tooltip.Tooltip.Provider,
|
|
861
913
|
__spreadValues({
|
|
862
914
|
"data-slot": "tooltip-provider",
|
|
@@ -866,11 +918,11 @@ function TooltipProvider(_a) {
|
|
|
866
918
|
}
|
|
867
919
|
function Tooltip(_a) {
|
|
868
920
|
var props = __objRest(_a, []);
|
|
869
|
-
return /* @__PURE__ */ (0,
|
|
921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
|
|
870
922
|
}
|
|
871
923
|
function TooltipTrigger(_a) {
|
|
872
924
|
var props = __objRest(_a, []);
|
|
873
|
-
return /* @__PURE__ */ (0,
|
|
925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
874
926
|
}
|
|
875
927
|
function TooltipContent(_a) {
|
|
876
928
|
var _b = _a, {
|
|
@@ -887,7 +939,7 @@ function TooltipContent(_a) {
|
|
|
887
939
|
"style"
|
|
888
940
|
]);
|
|
889
941
|
const themeVars = useThemeVars();
|
|
890
|
-
return /* @__PURE__ */ (0,
|
|
942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tooltip.Tooltip.Positioner, { sideOffset, side, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
891
943
|
import_tooltip.Tooltip.Popup,
|
|
892
944
|
__spreadProps(__spreadValues({
|
|
893
945
|
className: cn(
|
|
@@ -899,14 +951,14 @@ function TooltipContent(_a) {
|
|
|
899
951
|
}, props), {
|
|
900
952
|
children: [
|
|
901
953
|
children,
|
|
902
|
-
/* @__PURE__ */ (0,
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 bg-brand-secondary data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1 data-[side=top]:-bottom-1" })
|
|
903
955
|
]
|
|
904
956
|
})
|
|
905
957
|
) }) });
|
|
906
958
|
}
|
|
907
959
|
|
|
908
960
|
// src/components/ui/ai-conversations.tsx
|
|
909
|
-
var
|
|
961
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
910
962
|
function displayContactName(name) {
|
|
911
963
|
return name.trim() || "Website User";
|
|
912
964
|
}
|
|
@@ -945,14 +997,14 @@ function ConversationStatusChip({
|
|
|
945
997
|
className
|
|
946
998
|
}) {
|
|
947
999
|
const { label, variant, dotClass } = STATUS_CONFIG[status];
|
|
948
|
-
return /* @__PURE__ */ (0,
|
|
949
|
-
showDot && /* @__PURE__ */ (0,
|
|
1000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Badge, { variant, className, children: [
|
|
1001
|
+
showDot && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: cn("size-1.5 shrink-0 rounded-full", dotClass) }),
|
|
950
1002
|
label
|
|
951
1003
|
] });
|
|
952
1004
|
}
|
|
953
1005
|
function ContactAvatar({ name, size = "md", className }) {
|
|
954
1006
|
const avatarSize = size === "sm" ? "sm" : size === "lg" ? "lg" : "default";
|
|
955
|
-
return /* @__PURE__ */ (0,
|
|
1007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Avatar, { size: avatarSize, className, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { className: "font-semibold", children: getInitials(name) }) });
|
|
956
1008
|
}
|
|
957
1009
|
function ConversationListItem({
|
|
958
1010
|
data,
|
|
@@ -960,7 +1012,7 @@ function ConversationListItem({
|
|
|
960
1012
|
onClick,
|
|
961
1013
|
onRead
|
|
962
1014
|
}) {
|
|
963
|
-
return /* @__PURE__ */ (0,
|
|
1015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
964
1016
|
"button",
|
|
965
1017
|
{
|
|
966
1018
|
type: "button",
|
|
@@ -974,25 +1026,25 @@ function ConversationListItem({
|
|
|
974
1026
|
isActive ? "bg-muted" : "hover:bg-muted/40"
|
|
975
1027
|
),
|
|
976
1028
|
children: [
|
|
977
|
-
/* @__PURE__ */ (0,
|
|
978
|
-
/* @__PURE__ */ (0,
|
|
979
|
-
/* @__PURE__ */ (0,
|
|
980
|
-
/* @__PURE__ */ (0,
|
|
981
|
-
/* @__PURE__ */ (0,
|
|
982
|
-
data.status === "needs-attention" && /* @__PURE__ */ (0,
|
|
983
|
-
data.channel === "email" ? /* @__PURE__ */ (0,
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ContactAvatar, { name: data.contact.name }),
|
|
1030
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
|
|
1032
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(data.contact.name) }),
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
1034
|
+
data.status === "needs-attention" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Flag, { className: "size-3 text-warning-text" }),
|
|
1035
|
+
data.channel === "email" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Mail, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageSquare, { className: "size-3 text-muted-foreground" }),
|
|
1036
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "whitespace-nowrap text-xs text-muted-foreground", children: data.timestamp })
|
|
985
1037
|
] })
|
|
986
1038
|
] }),
|
|
987
|
-
/* @__PURE__ */ (0,
|
|
988
|
-
/* @__PURE__ */ (0,
|
|
989
|
-
/* @__PURE__ */ (0,
|
|
990
|
-
data.assignedTo && /* @__PURE__ */ (0,
|
|
1039
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1041
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ConversationStatusChip, { status: data.status, showDot: true }),
|
|
1042
|
+
data.assignedTo && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "truncate text-xs text-muted-foreground", children: [
|
|
991
1043
|
"\u2192 ",
|
|
992
1044
|
data.assignedTo
|
|
993
1045
|
] })
|
|
994
1046
|
] }),
|
|
995
|
-
data.unreadCount ? /* @__PURE__ */ (0,
|
|
1047
|
+
data.unreadCount ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
996
1048
|
Badge,
|
|
997
1049
|
{
|
|
998
1050
|
variant: "default",
|
|
@@ -1001,8 +1053,8 @@ function ConversationListItem({
|
|
|
1001
1053
|
}
|
|
1002
1054
|
) : null
|
|
1003
1055
|
] }),
|
|
1004
|
-
/* @__PURE__ */ (0,
|
|
1005
|
-
data.lastMessageRole === "bot" ? /* @__PURE__ */ (0,
|
|
1056
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { className: "line-clamp-2 text-sm leading-relaxed text-muted-foreground", children: [
|
|
1057
|
+
data.lastMessageRole === "bot" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "font-medium text-foreground/60", children: "AI: " }) : data.lastMessageRole === "advisor" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "font-medium text-foreground/60", children: "You: " }) : data.lastMessageRole === "visitor" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "font-medium text-foreground/60", children: [
|
|
1006
1058
|
displayContactName(data.contact.name).split(" ")[0],
|
|
1007
1059
|
":",
|
|
1008
1060
|
" "
|
|
@@ -1055,7 +1107,7 @@ function ConversationList({
|
|
|
1055
1107
|
onChannelFilterChange == null ? void 0 : onChannelFilterChange(v);
|
|
1056
1108
|
}
|
|
1057
1109
|
}
|
|
1058
|
-
return /* @__PURE__ */ (0,
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1059
1111
|
"div",
|
|
1060
1112
|
{
|
|
1061
1113
|
className: cn(
|
|
@@ -1063,11 +1115,11 @@ function ConversationList({
|
|
|
1063
1115
|
className
|
|
1064
1116
|
),
|
|
1065
1117
|
children: [
|
|
1066
|
-
/* @__PURE__ */ (0,
|
|
1067
|
-
/* @__PURE__ */ (0,
|
|
1068
|
-
/* @__PURE__ */ (0,
|
|
1069
|
-
/* @__PURE__ */ (0,
|
|
1070
|
-
/* @__PURE__ */ (0,
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn(PANEL_HEADER_HEIGHT, "flex shrink-0 flex-col"), children: [
|
|
1119
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-3 py-2.5", children: [
|
|
1120
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative flex-1", children: [
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Search, { className: "absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1071
1123
|
Input,
|
|
1072
1124
|
{
|
|
1073
1125
|
value: searchQuery,
|
|
@@ -1077,7 +1129,7 @@ function ConversationList({
|
|
|
1077
1129
|
}
|
|
1078
1130
|
)
|
|
1079
1131
|
] }),
|
|
1080
|
-
/* @__PURE__ */ (0,
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1081
1133
|
ToggleGroup,
|
|
1082
1134
|
{
|
|
1083
1135
|
type: "single",
|
|
@@ -1088,25 +1140,25 @@ function ConversationList({
|
|
|
1088
1140
|
onValueChange: handleChannelFilterChange,
|
|
1089
1141
|
className: "shrink-0",
|
|
1090
1142
|
children: [
|
|
1091
|
-
/* @__PURE__ */ (0,
|
|
1092
|
-
/* @__PURE__ */ (0,
|
|
1093
|
-
/* @__PURE__ */ (0,
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToggleGroupItem, { value: "all", "aria-label": "All channels", children: "All" }),
|
|
1144
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToggleGroupItem, { value: "chat", "aria-label": "Chat", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageSquare, { className: "size-3.5" }) }),
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToggleGroupItem, { value: "email", "aria-label": "Email", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Mail, { className: "size-3.5" }) })
|
|
1094
1146
|
]
|
|
1095
1147
|
}
|
|
1096
1148
|
)
|
|
1097
1149
|
] }),
|
|
1098
|
-
/* @__PURE__ */ (0,
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-1 items-center border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1099
1151
|
Tabs,
|
|
1100
1152
|
{
|
|
1101
1153
|
value: activeFilter,
|
|
1102
1154
|
onValueChange: (v) => v && (onFilterChange == null ? void 0 : onFilterChange(v)),
|
|
1103
1155
|
className: "w-full",
|
|
1104
|
-
children: /* @__PURE__ */ (0,
|
|
1156
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1105
1157
|
TabsList,
|
|
1106
1158
|
{
|
|
1107
1159
|
variant: "line",
|
|
1108
1160
|
className: "w-full justify-start gap-0 h-auto",
|
|
1109
|
-
children: FILTER_TABS.map((tab) => /* @__PURE__ */ (0,
|
|
1161
|
+
children: FILTER_TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1110
1162
|
TabsTrigger,
|
|
1111
1163
|
{
|
|
1112
1164
|
value: tab.id,
|
|
@@ -1120,17 +1172,17 @@ function ConversationList({
|
|
|
1120
1172
|
}
|
|
1121
1173
|
) })
|
|
1122
1174
|
] }),
|
|
1123
|
-
/* @__PURE__ */ (0,
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: (() => {
|
|
1124
1176
|
const filtered = filterConversations(
|
|
1125
1177
|
conversations,
|
|
1126
1178
|
searchQuery,
|
|
1127
1179
|
activeFilter,
|
|
1128
1180
|
channelFilter
|
|
1129
1181
|
);
|
|
1130
|
-
return filtered.length === 0 ? /* @__PURE__ */ (0,
|
|
1131
|
-
/* @__PURE__ */ (0,
|
|
1132
|
-
/* @__PURE__ */ (0,
|
|
1133
|
-
searchQuery && /* @__PURE__ */ (0,
|
|
1182
|
+
return filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2 p-8 text-muted-foreground", children: [
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageSquare, { className: "size-8 opacity-30" }),
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm", children: "No conversations" }),
|
|
1185
|
+
searchQuery && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1134
1186
|
Button,
|
|
1135
1187
|
{
|
|
1136
1188
|
variant: "outline",
|
|
@@ -1139,7 +1191,7 @@ function ConversationList({
|
|
|
1139
1191
|
children: "Clear search"
|
|
1140
1192
|
}
|
|
1141
1193
|
),
|
|
1142
|
-
!searchQuery && activeFilter !== "all" && /* @__PURE__ */ (0,
|
|
1194
|
+
!searchQuery && activeFilter !== "all" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1143
1195
|
Button,
|
|
1144
1196
|
{
|
|
1145
1197
|
variant: "outline",
|
|
@@ -1148,8 +1200,8 @@ function ConversationList({
|
|
|
1148
1200
|
children: "Clear filter"
|
|
1149
1201
|
}
|
|
1150
1202
|
)
|
|
1151
|
-
] }) : /* @__PURE__ */ (0,
|
|
1152
|
-
filtered.map((item) => /* @__PURE__ */ (0,
|
|
1203
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1204
|
+
filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1153
1205
|
ConversationListItem,
|
|
1154
1206
|
{
|
|
1155
1207
|
data: item,
|
|
@@ -1159,7 +1211,7 @@ function ConversationList({
|
|
|
1159
1211
|
},
|
|
1160
1212
|
item.id
|
|
1161
1213
|
)),
|
|
1162
|
-
hasMore && /* @__PURE__ */ (0,
|
|
1214
|
+
hasMore && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "border-t border-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1163
1215
|
Button,
|
|
1164
1216
|
{
|
|
1165
1217
|
variant: "outline",
|
|
@@ -1181,27 +1233,27 @@ function BubbleAvatar({
|
|
|
1181
1233
|
senderName
|
|
1182
1234
|
}) {
|
|
1183
1235
|
if (role === "bot") {
|
|
1184
|
-
return /* @__PURE__ */ (0,
|
|
1236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { className: "border border-border bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Bot, { className: "size-3.5 text-muted-foreground" }) }) });
|
|
1185
1237
|
}
|
|
1186
1238
|
if (role === "advisor") {
|
|
1187
|
-
return /* @__PURE__ */ (0,
|
|
1239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { className: "font-semibold", children: getInitials(senderName != null ? senderName : "Advisor") }) });
|
|
1188
1240
|
}
|
|
1189
|
-
return /* @__PURE__ */ (0,
|
|
1241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { children: getInitials(senderName != null ? senderName : "?") }) });
|
|
1190
1242
|
}
|
|
1191
1243
|
function ChatBubble({ message, className }) {
|
|
1192
1244
|
const { role, content, timestamp, senderName } = message;
|
|
1193
1245
|
if (role === "system") {
|
|
1194
|
-
return /* @__PURE__ */ (0,
|
|
1195
|
-
/* @__PURE__ */ (0,
|
|
1196
|
-
/* @__PURE__ */ (0,
|
|
1197
|
-
/* @__PURE__ */ (0,
|
|
1246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("my-2 flex items-center gap-3 px-2", className), children: [
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, { className: "flex-1" }),
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "shrink-0 text-caption text-muted-foreground", children: content }),
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, { className: "flex-1" })
|
|
1198
1250
|
] });
|
|
1199
1251
|
}
|
|
1200
1252
|
const isAdvisor = role === "advisor";
|
|
1201
1253
|
const isBot = role === "bot";
|
|
1202
1254
|
const isVisitor = role === "visitor";
|
|
1203
1255
|
const displayName = isBot ? "AI Assistant" : isAdvisor ? senderName != null ? senderName : "Advisor" : senderName != null ? senderName : "Lead";
|
|
1204
|
-
return /* @__PURE__ */ (0,
|
|
1256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1205
1257
|
"div",
|
|
1206
1258
|
{
|
|
1207
1259
|
className: cn(
|
|
@@ -1210,8 +1262,8 @@ function ChatBubble({ message, className }) {
|
|
|
1210
1262
|
className
|
|
1211
1263
|
),
|
|
1212
1264
|
children: [
|
|
1213
|
-
/* @__PURE__ */ (0,
|
|
1214
|
-
/* @__PURE__ */ (0,
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BubbleAvatar, { role, senderName }),
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1215
1267
|
"div",
|
|
1216
1268
|
{
|
|
1217
1269
|
className: cn(
|
|
@@ -1219,20 +1271,20 @@ function ChatBubble({ message, className }) {
|
|
|
1219
1271
|
isAdvisor && "items-end"
|
|
1220
1272
|
),
|
|
1221
1273
|
children: [
|
|
1222
|
-
/* @__PURE__ */ (0,
|
|
1223
|
-
/* @__PURE__ */ (0,
|
|
1274
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-caption text-muted-foreground", children: displayName }),
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1224
1276
|
"div",
|
|
1225
1277
|
{
|
|
1226
1278
|
className: cn(
|
|
1227
|
-
"px-3 py-2 text-sm leading-relaxed",
|
|
1228
|
-
isBot && "border border-border bg-muted/60 text-foreground",
|
|
1229
|
-
isVisitor && "border border-border bg-background text-foreground",
|
|
1230
|
-
isAdvisor && "bg-primary text-primary-foreground"
|
|
1279
|
+
"px-3 py-2 text-sm leading-relaxed break-words [&_a]:underline [&_p]:m-0",
|
|
1280
|
+
isBot && "border border-border bg-muted/60 text-foreground [&_a]:text-primary",
|
|
1281
|
+
isVisitor && "border border-border bg-background text-foreground [&_a]:text-primary",
|
|
1282
|
+
isAdvisor && "bg-primary text-primary-foreground [&_a]:text-primary-foreground"
|
|
1231
1283
|
),
|
|
1232
|
-
children: content
|
|
1284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_markdown.default, { rehypePlugins: [import_rehype_raw.default, [import_rehype_sanitize.default, import_rehype_sanitize.defaultSchema]], children: content })
|
|
1233
1285
|
}
|
|
1234
1286
|
),
|
|
1235
|
-
timestamp && /* @__PURE__ */ (0,
|
|
1287
|
+
timestamp && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-caption text-muted-foreground", children: timestamp })
|
|
1236
1288
|
]
|
|
1237
1289
|
}
|
|
1238
1290
|
)
|
|
@@ -1240,6 +1292,89 @@ function ChatBubble({ message, className }) {
|
|
|
1240
1292
|
}
|
|
1241
1293
|
);
|
|
1242
1294
|
}
|
|
1295
|
+
function ComposerToolbarButton({
|
|
1296
|
+
label,
|
|
1297
|
+
icon: Icon,
|
|
1298
|
+
pressed,
|
|
1299
|
+
onToggle
|
|
1300
|
+
}) {
|
|
1301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1302
|
+
"button",
|
|
1303
|
+
{
|
|
1304
|
+
type: "button",
|
|
1305
|
+
"aria-label": label,
|
|
1306
|
+
"aria-pressed": pressed,
|
|
1307
|
+
onClick: onToggle,
|
|
1308
|
+
className: cn(
|
|
1309
|
+
"flex size-7 items-center justify-center transition-colors",
|
|
1310
|
+
pressed ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1311
|
+
),
|
|
1312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { className: "size-3.5" })
|
|
1313
|
+
}
|
|
1314
|
+
);
|
|
1315
|
+
}
|
|
1316
|
+
function ComposerLinkPopover({ editor }) {
|
|
1317
|
+
const [open, setOpen] = import_react3.default.useState(false);
|
|
1318
|
+
const [url, setUrl] = import_react3.default.useState("");
|
|
1319
|
+
const handleApply = () => {
|
|
1320
|
+
if (url.trim()) {
|
|
1321
|
+
editor == null ? void 0 : editor.chain().focus().setLink({ href: url.trim() }).run();
|
|
1322
|
+
}
|
|
1323
|
+
setOpen(false);
|
|
1324
|
+
setUrl("");
|
|
1325
|
+
};
|
|
1326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1327
|
+
Popover,
|
|
1328
|
+
{
|
|
1329
|
+
open,
|
|
1330
|
+
onOpenChange: (newOpen) => {
|
|
1331
|
+
if (newOpen && (editor == null ? void 0 : editor.isActive("link"))) {
|
|
1332
|
+
editor.chain().focus().unsetLink().run();
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
if (newOpen) setUrl("");
|
|
1336
|
+
setOpen(newOpen);
|
|
1337
|
+
},
|
|
1338
|
+
children: [
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1340
|
+
PopoverTrigger,
|
|
1341
|
+
{
|
|
1342
|
+
"aria-label": "Insert link",
|
|
1343
|
+
className: cn(
|
|
1344
|
+
"flex size-7 items-center justify-center transition-colors",
|
|
1345
|
+
(editor == null ? void 0 : editor.isActive("link")) ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1346
|
+
),
|
|
1347
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Link2, { className: "size-3.5" })
|
|
1348
|
+
}
|
|
1349
|
+
),
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverContent, { className: "w-72 p-2", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
1351
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1352
|
+
"input",
|
|
1353
|
+
{
|
|
1354
|
+
type: "url",
|
|
1355
|
+
value: url,
|
|
1356
|
+
onChange: (e) => setUrl(e.target.value),
|
|
1357
|
+
onKeyDown: (e) => e.key === "Enter" && handleApply(),
|
|
1358
|
+
placeholder: "https://",
|
|
1359
|
+
className: "min-w-0 flex-1 border border-border bg-transparent px-2 py-1.5 text-sm text-foreground outline-none placeholder:text-muted-foreground focus:border-primary",
|
|
1360
|
+
autoFocus: true
|
|
1361
|
+
}
|
|
1362
|
+
),
|
|
1363
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { size: "sm", className: "h-8 px-3", onClick: handleApply, children: "Apply" })
|
|
1364
|
+
] }) })
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
function ComposerEmailFieldRow({
|
|
1370
|
+
label,
|
|
1371
|
+
children
|
|
1372
|
+
}) {
|
|
1373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "w-14 shrink-0 text-sm text-muted-foreground", children: label }),
|
|
1375
|
+
children
|
|
1376
|
+
] });
|
|
1377
|
+
}
|
|
1243
1378
|
function ChatComposer({
|
|
1244
1379
|
mode,
|
|
1245
1380
|
channel: channelProp = "chat",
|
|
@@ -1261,44 +1396,26 @@ function ChatComposer({
|
|
|
1261
1396
|
const [emailCc, setEmailCc] = import_react3.default.useState("");
|
|
1262
1397
|
const [showCc, setShowCc] = import_react3.default.useState(false);
|
|
1263
1398
|
const [emailSubject, setEmailSubject] = import_react3.default.useState("");
|
|
1264
|
-
const [
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1399
|
+
const [, forceUpdate] = import_react3.default.useReducer((x) => x + 1, 0);
|
|
1400
|
+
const editor = (0, import_react4.useEditor)({
|
|
1401
|
+
extensions: [
|
|
1402
|
+
import_starter_kit.default,
|
|
1403
|
+
import_extension_underline.default,
|
|
1404
|
+
import_extension_link.default.configure({ openOnClick: false })
|
|
1405
|
+
],
|
|
1406
|
+
content: "",
|
|
1407
|
+
onTransaction: () => forceUpdate(),
|
|
1408
|
+
editorProps: {
|
|
1409
|
+
attributes: {
|
|
1410
|
+
class: "min-h-[150px] px-4 py-3 text-base text-foreground outline-none prose prose-sm max-w-none [&_p]:m-0 [&_a]:text-primary [&_a]:underline [&_a]:cursor-pointer"
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1267
1414
|
const handleChannelChange = (c) => {
|
|
1268
1415
|
setChannel(c);
|
|
1269
1416
|
onChannelChange == null ? void 0 : onChannelChange(c);
|
|
1270
1417
|
};
|
|
1271
|
-
|
|
1272
|
-
label,
|
|
1273
|
-
icon: Icon,
|
|
1274
|
-
pressed,
|
|
1275
|
-
onToggle
|
|
1276
|
-
}) {
|
|
1277
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1278
|
-
"button",
|
|
1279
|
-
{
|
|
1280
|
-
type: "button",
|
|
1281
|
-
"aria-label": label,
|
|
1282
|
-
"aria-pressed": pressed,
|
|
1283
|
-
onClick: onToggle,
|
|
1284
|
-
className: cn(
|
|
1285
|
-
"flex size-7 items-center justify-center transition-colors",
|
|
1286
|
-
pressed ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1287
|
-
),
|
|
1288
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { className: "size-3.5" })
|
|
1289
|
-
}
|
|
1290
|
-
);
|
|
1291
|
-
}
|
|
1292
|
-
function EmailFieldRow({
|
|
1293
|
-
label,
|
|
1294
|
-
children
|
|
1295
|
-
}) {
|
|
1296
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [
|
|
1297
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w-14 shrink-0 text-sm text-muted-foreground", children: label }),
|
|
1298
|
-
children
|
|
1299
|
-
] });
|
|
1300
|
-
}
|
|
1301
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1302
1419
|
"div",
|
|
1303
1420
|
{
|
|
1304
1421
|
className: cn(
|
|
@@ -1306,27 +1423,27 @@ function ChatComposer({
|
|
|
1306
1423
|
className
|
|
1307
1424
|
),
|
|
1308
1425
|
children: [
|
|
1309
|
-
isEmailIntegrated && /* @__PURE__ */ (0,
|
|
1426
|
+
isEmailIntegrated && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "border-b border-border px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1310
1427
|
Tabs,
|
|
1311
1428
|
{
|
|
1312
1429
|
value: channel,
|
|
1313
1430
|
onValueChange: (v) => v && handleChannelChange(v),
|
|
1314
|
-
children: /* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(TabsList, { variant: "default", className: "w-full", children: [
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(TabsTrigger, { value: "chat", className: "flex-1 gap-1.5", children: [
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageSquare, { className: "size-3.5" }),
|
|
1317
1434
|
"Chat"
|
|
1318
1435
|
] }),
|
|
1319
|
-
/* @__PURE__ */ (0,
|
|
1320
|
-
/* @__PURE__ */ (0,
|
|
1436
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(TabsTrigger, { value: "email", className: "flex-1 gap-1.5", children: [
|
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Mail, { className: "size-3.5" }),
|
|
1321
1438
|
"Email"
|
|
1322
1439
|
] })
|
|
1323
1440
|
] })
|
|
1324
1441
|
}
|
|
1325
1442
|
) }),
|
|
1326
|
-
mode === "ai" ? /* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1328
|
-
/* @__PURE__ */ (0,
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1443
|
+
mode === "ai" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 bg-muted/30 px-4 py-2.5 text-[12px] text-muted-foreground", children: [
|
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Bot, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "AI is handling this conversation." }),
|
|
1446
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1330
1447
|
Button,
|
|
1331
1448
|
{
|
|
1332
1449
|
variant: "link",
|
|
@@ -1336,12 +1453,12 @@ function ChatComposer({
|
|
|
1336
1453
|
children: "Take Over"
|
|
1337
1454
|
}
|
|
1338
1455
|
),
|
|
1339
|
-
/* @__PURE__ */ (0,
|
|
1456
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "to reply directly." })
|
|
1340
1457
|
] }) : (
|
|
1341
1458
|
/* Email panel stays in normal flow to anchor container height;
|
|
1342
1459
|
chat panel is an absolute overlay so both tabs share identical dimensions */
|
|
1343
|
-
/* @__PURE__ */ (0,
|
|
1344
|
-
/* @__PURE__ */ (0,
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative", children: [
|
|
1461
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1345
1462
|
"div",
|
|
1346
1463
|
{
|
|
1347
1464
|
className: cn(
|
|
@@ -1350,8 +1467,8 @@ function ChatComposer({
|
|
|
1350
1467
|
),
|
|
1351
1468
|
"aria-hidden": channel !== "email",
|
|
1352
1469
|
children: [
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1470
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ComposerEmailFieldRow, { label: "To", children: [
|
|
1471
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1355
1472
|
"input",
|
|
1356
1473
|
{
|
|
1357
1474
|
type: "email",
|
|
@@ -1361,7 +1478,7 @@ function ChatComposer({
|
|
|
1361
1478
|
className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
|
|
1362
1479
|
}
|
|
1363
1480
|
),
|
|
1364
|
-
/* @__PURE__ */ (0,
|
|
1481
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1365
1482
|
"button",
|
|
1366
1483
|
{
|
|
1367
1484
|
type: "button",
|
|
@@ -1369,12 +1486,12 @@ function ChatComposer({
|
|
|
1369
1486
|
className: "flex shrink-0 items-center gap-0.5 text-sm text-muted-foreground hover:text-foreground",
|
|
1370
1487
|
children: [
|
|
1371
1488
|
"CC",
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1489
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronDown, { className: "size-3.5" })
|
|
1373
1490
|
]
|
|
1374
1491
|
}
|
|
1375
1492
|
)
|
|
1376
1493
|
] }),
|
|
1377
|
-
showCc && /* @__PURE__ */ (0,
|
|
1494
|
+
showCc && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComposerEmailFieldRow, { label: "CC", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1378
1495
|
"input",
|
|
1379
1496
|
{
|
|
1380
1497
|
type: "email",
|
|
@@ -1384,7 +1501,7 @@ function ChatComposer({
|
|
|
1384
1501
|
className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
|
|
1385
1502
|
}
|
|
1386
1503
|
) }),
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1504
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComposerEmailFieldRow, { label: "Subject", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1388
1505
|
"input",
|
|
1389
1506
|
{
|
|
1390
1507
|
type: "text",
|
|
@@ -1394,62 +1511,58 @@ function ChatComposer({
|
|
|
1394
1511
|
className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
|
|
1395
1512
|
}
|
|
1396
1513
|
) }),
|
|
1397
|
-
/* @__PURE__ */ (0,
|
|
1398
|
-
|
|
1399
|
-
{
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
placeholder: "Write your email...",
|
|
1403
|
-
rows: 6,
|
|
1404
|
-
className: "resize-y border-0 px-4 py-3 text-base shadow-none focus-visible:ring-0"
|
|
1405
|
-
}
|
|
1406
|
-
),
|
|
1407
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
|
|
1408
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
1409
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1410
|
-
ToolbarButton,
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react4.EditorContent, { editor }),
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
1517
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1518
|
+
ComposerToolbarButton,
|
|
1411
1519
|
{
|
|
1412
1520
|
label: "Bold",
|
|
1413
1521
|
icon: import_lucide_react4.Bold,
|
|
1414
|
-
pressed: bold,
|
|
1415
|
-
onToggle: () =>
|
|
1522
|
+
pressed: editor == null ? void 0 : editor.isActive("bold"),
|
|
1523
|
+
onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleBold().run()
|
|
1416
1524
|
}
|
|
1417
1525
|
),
|
|
1418
|
-
/* @__PURE__ */ (0,
|
|
1419
|
-
|
|
1526
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1527
|
+
ComposerToolbarButton,
|
|
1420
1528
|
{
|
|
1421
1529
|
label: "Italic",
|
|
1422
1530
|
icon: import_lucide_react4.Italic,
|
|
1423
|
-
pressed: italic,
|
|
1424
|
-
onToggle: () =>
|
|
1531
|
+
pressed: editor == null ? void 0 : editor.isActive("italic"),
|
|
1532
|
+
onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleItalic().run()
|
|
1425
1533
|
}
|
|
1426
1534
|
),
|
|
1427
|
-
/* @__PURE__ */ (0,
|
|
1428
|
-
|
|
1535
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1536
|
+
ComposerToolbarButton,
|
|
1429
1537
|
{
|
|
1430
1538
|
label: "Underline",
|
|
1431
1539
|
icon: import_lucide_react4.Underline,
|
|
1432
|
-
pressed: underline,
|
|
1433
|
-
onToggle: () =>
|
|
1540
|
+
pressed: editor == null ? void 0 : editor.isActive("underline"),
|
|
1541
|
+
onToggle: () => editor == null ? void 0 : editor.chain().focus().toggleUnderline().run()
|
|
1434
1542
|
}
|
|
1435
1543
|
),
|
|
1436
|
-
/* @__PURE__ */ (0,
|
|
1437
|
-
/* @__PURE__ */ (0,
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, { orientation: "vertical", className: "mx-1.5 h-4" }),
|
|
1545
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComposerLinkPopover, { editor }),
|
|
1546
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComposerToolbarButton, { label: "Attach file", icon: import_lucide_react4.Paperclip })
|
|
1439
1547
|
] }),
|
|
1440
|
-
/* @__PURE__ */ (0,
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1441
1549
|
Button,
|
|
1442
1550
|
{
|
|
1443
1551
|
size: "sm",
|
|
1444
|
-
onClick: () =>
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1552
|
+
onClick: () => {
|
|
1553
|
+
var _a;
|
|
1554
|
+
const html = (_a = editor == null ? void 0 : editor.getHTML()) != null ? _a : "";
|
|
1555
|
+
onSendEmail == null ? void 0 : onSendEmail({
|
|
1556
|
+
content: html,
|
|
1557
|
+
to: emailTo,
|
|
1558
|
+
cc: emailCc,
|
|
1559
|
+
subject: emailSubject
|
|
1560
|
+
});
|
|
1561
|
+
editor == null ? void 0 : editor.commands.clearContent();
|
|
1562
|
+
},
|
|
1563
|
+
disabled: !editor || editor.isEmpty || !emailTo.trim(),
|
|
1451
1564
|
children: [
|
|
1452
|
-
/* @__PURE__ */ (0,
|
|
1565
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Send, { className: "mr-1.5 size-3.5" }),
|
|
1453
1566
|
"Send Email"
|
|
1454
1567
|
]
|
|
1455
1568
|
}
|
|
@@ -1458,8 +1571,8 @@ function ChatComposer({
|
|
|
1458
1571
|
]
|
|
1459
1572
|
}
|
|
1460
1573
|
),
|
|
1461
|
-
channel === "chat" && /* @__PURE__ */ (0,
|
|
1462
|
-
/* @__PURE__ */ (0,
|
|
1574
|
+
channel === "chat" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "absolute inset-0 flex flex-col gap-3 p-4", children: [
|
|
1575
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1463
1576
|
Textarea,
|
|
1464
1577
|
{
|
|
1465
1578
|
value: inputValue,
|
|
@@ -1468,19 +1581,19 @@ function ChatComposer({
|
|
|
1468
1581
|
className: "min-h-0 flex-1 resize-none text-base"
|
|
1469
1582
|
}
|
|
1470
1583
|
),
|
|
1471
|
-
/* @__PURE__ */ (0,
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
1473
|
-
/* @__PURE__ */ (0,
|
|
1584
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
1585
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
|
|
1586
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Bot, { className: "mr-1.5 size-3.5" }),
|
|
1474
1587
|
"Let AI Handle"
|
|
1475
1588
|
] }),
|
|
1476
|
-
/* @__PURE__ */ (0,
|
|
1589
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1477
1590
|
Button,
|
|
1478
1591
|
{
|
|
1479
1592
|
size: "sm",
|
|
1480
1593
|
onClick: () => onSend == null ? void 0 : onSend(inputValue),
|
|
1481
1594
|
disabled: !inputValue.trim(),
|
|
1482
1595
|
children: [
|
|
1483
|
-
/* @__PURE__ */ (0,
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Send, { className: "mr-1.5 size-3.5" }),
|
|
1484
1597
|
"Send"
|
|
1485
1598
|
]
|
|
1486
1599
|
}
|
|
@@ -1560,8 +1673,8 @@ function ChatThread({
|
|
|
1560
1673
|
const el = scrollRef.current;
|
|
1561
1674
|
if (el) el.scrollTop = el.scrollHeight;
|
|
1562
1675
|
}, [isAiTyping]);
|
|
1563
|
-
return /* @__PURE__ */ (0,
|
|
1564
|
-
/* @__PURE__ */ (0,
|
|
1676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("flex flex-col bg-background", className), children: [
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1565
1678
|
"div",
|
|
1566
1679
|
{
|
|
1567
1680
|
className: cn(
|
|
@@ -1569,7 +1682,7 @@ function ChatThread({
|
|
|
1569
1682
|
"flex items-center gap-3 border-b border-border px-4"
|
|
1570
1683
|
),
|
|
1571
1684
|
children: [
|
|
1572
|
-
onBack && /* @__PURE__ */ (0,
|
|
1685
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1573
1686
|
Button,
|
|
1574
1687
|
{
|
|
1575
1688
|
variant: "ghost",
|
|
@@ -1577,28 +1690,28 @@ function ChatThread({
|
|
|
1577
1690
|
className: "size-8 shrink-0 md:hidden",
|
|
1578
1691
|
onClick: onBack,
|
|
1579
1692
|
"aria-label": "Back to conversations",
|
|
1580
|
-
children: /* @__PURE__ */ (0,
|
|
1693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ArrowLeft, { className: "size-4" })
|
|
1581
1694
|
}
|
|
1582
1695
|
),
|
|
1583
|
-
/* @__PURE__ */ (0,
|
|
1584
|
-
/* @__PURE__ */ (0,
|
|
1585
|
-
/* @__PURE__ */ (0,
|
|
1586
|
-
/* @__PURE__ */ (0,
|
|
1587
|
-
/* @__PURE__ */ (0,
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ContactAvatar, { name: contact.name, size: "md" }),
|
|
1697
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ConversationStatusChip, { status, showDot: true })
|
|
1588
1701
|
] }),
|
|
1589
|
-
contact.email && /* @__PURE__ */ (0,
|
|
1702
|
+
contact.email && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm text-muted-foreground", children: contact.email })
|
|
1590
1703
|
] }),
|
|
1591
|
-
/* @__PURE__ */ (0,
|
|
1592
|
-
/* @__PURE__ */ (0,
|
|
1593
|
-
isClosed && /* @__PURE__ */ (0,
|
|
1594
|
-
!isClosed && aiIsHandling && /* @__PURE__ */ (0,
|
|
1595
|
-
!isClosed && !aiIsHandling && /* @__PURE__ */ (0,
|
|
1596
|
-
/* @__PURE__ */ (0,
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
1705
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "hidden items-center gap-2 md:flex", children: [
|
|
1706
|
+
isClosed && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { variant: "outline", size: "sm", onClick: onReopen, children: "Reopen" }),
|
|
1707
|
+
!isClosed && aiIsHandling && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { size: "sm", onClick: onTakeOver, children: "Take Over" }),
|
|
1708
|
+
!isClosed && !aiIsHandling && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Bot, { className: "mr-1.5 size-3.5" }),
|
|
1597
1710
|
"Let AI Handle"
|
|
1598
1711
|
] })
|
|
1599
1712
|
] }),
|
|
1600
|
-
/* @__PURE__ */ (0,
|
|
1601
|
-
/* @__PURE__ */ (0,
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu, { children: [
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1602
1715
|
DropdownMenuTrigger,
|
|
1603
1716
|
{
|
|
1604
1717
|
className: cn(
|
|
@@ -1606,38 +1719,38 @@ function ChatThread({
|
|
|
1606
1719
|
"size-8"
|
|
1607
1720
|
),
|
|
1608
1721
|
"aria-label": "More actions",
|
|
1609
|
-
children: /* @__PURE__ */ (0,
|
|
1722
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MoreHorizontal, { className: "size-4" })
|
|
1610
1723
|
}
|
|
1611
1724
|
),
|
|
1612
|
-
/* @__PURE__ */ (0,
|
|
1613
|
-
onShowLeadInfo && /* @__PURE__ */ (0,
|
|
1614
|
-
/* @__PURE__ */ (0,
|
|
1725
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuContent, { children: [
|
|
1726
|
+
onShowLeadInfo && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1727
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1615
1728
|
DropdownMenuItem,
|
|
1616
1729
|
{
|
|
1617
1730
|
className: "md:hidden",
|
|
1618
1731
|
onClick: onShowLeadInfo,
|
|
1619
1732
|
children: [
|
|
1620
|
-
/* @__PURE__ */ (0,
|
|
1733
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronRight, { className: "mr-2 size-4" }),
|
|
1621
1734
|
"Lead Info"
|
|
1622
1735
|
]
|
|
1623
1736
|
}
|
|
1624
1737
|
),
|
|
1625
|
-
/* @__PURE__ */ (0,
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuSeparator, { className: "md:hidden" })
|
|
1626
1739
|
] }),
|
|
1627
|
-
status === "needs-attention" ? /* @__PURE__ */ (0,
|
|
1628
|
-
/* @__PURE__ */ (0,
|
|
1740
|
+
status === "needs-attention" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem, { onClick: onUnmarkUrgent, children: [
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Flag, { className: "mr-2 size-4" }),
|
|
1629
1742
|
"Unmark Urgent"
|
|
1630
|
-
] }) : /* @__PURE__ */ (0,
|
|
1631
|
-
/* @__PURE__ */ (0,
|
|
1743
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem, { onClick: onMarkUrgent, children: [
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Flag, { className: "mr-2 size-4" }),
|
|
1632
1745
|
"Mark as Urgent"
|
|
1633
1746
|
] }),
|
|
1634
|
-
/* @__PURE__ */ (0,
|
|
1635
|
-
/* @__PURE__ */ (0,
|
|
1747
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem, { onClick: onAssignToAdvisor, children: [
|
|
1748
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.UserCheck, { className: "mr-2 size-4" }),
|
|
1636
1749
|
"Assign to advisor"
|
|
1637
1750
|
] }),
|
|
1638
|
-
/* @__PURE__ */ (0,
|
|
1639
|
-
/* @__PURE__ */ (0,
|
|
1640
|
-
/* @__PURE__ */ (0,
|
|
1751
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuSeparator, {}),
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem, { onClick: onArchive, children: [
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Archive, { className: "mr-2 size-4" }),
|
|
1641
1754
|
"Archive"
|
|
1642
1755
|
] })
|
|
1643
1756
|
] })
|
|
@@ -1646,7 +1759,7 @@ function ChatThread({
|
|
|
1646
1759
|
]
|
|
1647
1760
|
}
|
|
1648
1761
|
),
|
|
1649
|
-
/* @__PURE__ */ (0,
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1650
1763
|
"div",
|
|
1651
1764
|
{
|
|
1652
1765
|
ref: scrollRef,
|
|
@@ -1654,29 +1767,29 @@ function ChatThread({
|
|
|
1654
1767
|
className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4",
|
|
1655
1768
|
tabIndex: 0,
|
|
1656
1769
|
children: [
|
|
1657
|
-
isLoadingMoreMessages && /* @__PURE__ */ (0,
|
|
1658
|
-
messages.length === 0 ? /* @__PURE__ */ (0,
|
|
1659
|
-
/* @__PURE__ */ (0,
|
|
1660
|
-
/* @__PURE__ */ (0,
|
|
1661
|
-
] }) : messages.map((msg) => /* @__PURE__ */ (0,
|
|
1662
|
-
isAiTyping && !isClosed && /* @__PURE__ */ (0,
|
|
1663
|
-
/* @__PURE__ */ (0,
|
|
1664
|
-
/* @__PURE__ */ (0,
|
|
1665
|
-
/* @__PURE__ */ (0,
|
|
1666
|
-
/* @__PURE__ */ (0,
|
|
1667
|
-
/* @__PURE__ */ (0,
|
|
1668
|
-
/* @__PURE__ */ (0,
|
|
1669
|
-
/* @__PURE__ */ (0,
|
|
1770
|
+
isLoadingMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex justify-center py-1 text-caption text-muted-foreground", children: "Loading older messages..." }),
|
|
1771
|
+
messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground", children: [
|
|
1772
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageSquare, { className: "size-8 opacity-30" }),
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm", children: "No messages yet" })
|
|
1774
|
+
] }) : messages.map((msg) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChatBubble, { message: msg }, msg.id)),
|
|
1775
|
+
isAiTyping && !isClosed && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex gap-2.5", children: [
|
|
1776
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BubbleAvatar, { role: "bot" }),
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-caption text-muted-foreground", children: "AI Assistant" }),
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-1 border border-border bg-muted/60 px-3 py-2.5", children: [
|
|
1780
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:0ms]" }),
|
|
1781
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:150ms]" }),
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:300ms]" })
|
|
1670
1783
|
] })
|
|
1671
1784
|
] })
|
|
1672
1785
|
] })
|
|
1673
1786
|
]
|
|
1674
1787
|
}
|
|
1675
1788
|
),
|
|
1676
|
-
isClosed ? /* @__PURE__ */ (0,
|
|
1677
|
-
/* @__PURE__ */ (0,
|
|
1678
|
-
/* @__PURE__ */ (0,
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1789
|
+
isClosed ? /* @__PURE__ */ (0, import_jsx_runtime15.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: [
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Lock, { className: "size-3.5 shrink-0" }),
|
|
1791
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "This conversation is closed." }),
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1680
1793
|
Button,
|
|
1681
1794
|
{
|
|
1682
1795
|
variant: "outline",
|
|
@@ -1686,7 +1799,7 @@ function ChatThread({
|
|
|
1686
1799
|
children: "Reopen"
|
|
1687
1800
|
}
|
|
1688
1801
|
)
|
|
1689
|
-
] }) : /* @__PURE__ */ (0,
|
|
1802
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1690
1803
|
ChatComposer,
|
|
1691
1804
|
{
|
|
1692
1805
|
mode,
|
|
@@ -1708,15 +1821,15 @@ function AICollectedDataSection({
|
|
|
1708
1821
|
fields,
|
|
1709
1822
|
className
|
|
1710
1823
|
}) {
|
|
1711
|
-
return /* @__PURE__ */ (0,
|
|
1824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("flex flex-col", className), children: fields.map((field, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1712
1825
|
"div",
|
|
1713
1826
|
{
|
|
1714
1827
|
className: "flex items-center justify-between gap-2 border-b border-border/40 py-1.5 last:border-b-0",
|
|
1715
1828
|
children: [
|
|
1716
|
-
/* @__PURE__ */ (0,
|
|
1717
|
-
/* @__PURE__ */ (0,
|
|
1718
|
-
/* @__PURE__ */ (0,
|
|
1719
|
-
field.confidence === "confirmed" ? /* @__PURE__ */ (0,
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "shrink-0 text-sm text-muted-foreground", children: field.label }),
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-right text-sm font-medium text-foreground", children: field.value }),
|
|
1832
|
+
field.confidence === "confirmed" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.CheckCircle2, { className: "size-3 shrink-0 text-success-text" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.HelpCircle, { className: "size-3 shrink-0 text-warning-text" })
|
|
1720
1833
|
] })
|
|
1721
1834
|
]
|
|
1722
1835
|
},
|
|
@@ -1744,9 +1857,9 @@ function MeetingDetailRow({
|
|
|
1744
1857
|
}) {
|
|
1745
1858
|
const DetailIcon = MEETING_DETAIL_ICON[meetingType];
|
|
1746
1859
|
const isLink = detail.startsWith("http");
|
|
1747
|
-
return /* @__PURE__ */ (0,
|
|
1748
|
-
/* @__PURE__ */ (0,
|
|
1749
|
-
isLink ? /* @__PURE__ */ (0,
|
|
1860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DetailIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1862
|
+
isLink ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1750
1863
|
"a",
|
|
1751
1864
|
{
|
|
1752
1865
|
href: detail,
|
|
@@ -1755,7 +1868,7 @@ function MeetingDetailRow({
|
|
|
1755
1868
|
className: "text-sm text-primary underline underline-offset-2 break-all hover:text-primary/80",
|
|
1756
1869
|
children: detail
|
|
1757
1870
|
}
|
|
1758
|
-
) : /* @__PURE__ */ (0,
|
|
1871
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm text-muted-foreground break-all", children: detail })
|
|
1759
1872
|
] });
|
|
1760
1873
|
}
|
|
1761
1874
|
function AppointmentSection({
|
|
@@ -1768,23 +1881,23 @@ function AppointmentSection({
|
|
|
1768
1881
|
}) {
|
|
1769
1882
|
const AppointmentIcon = MEETING_ICON[appointment.meetingType];
|
|
1770
1883
|
const canReschedule = !isAnonymous && !!onRescheduleAppointment;
|
|
1771
|
-
return /* @__PURE__ */ (0,
|
|
1772
|
-
/* @__PURE__ */ (0,
|
|
1773
|
-
/* @__PURE__ */ (0,
|
|
1774
|
-
/* @__PURE__ */ (0,
|
|
1884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Calendar, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-medium text-foreground", children: appointment.datetime })
|
|
1775
1888
|
] }),
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1777
|
-
/* @__PURE__ */ (0,
|
|
1778
|
-
/* @__PURE__ */ (0,
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1890
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AppointmentIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm text-muted-foreground", children: MEETING_LABEL[appointment.meetingType] })
|
|
1779
1892
|
] }),
|
|
1780
|
-
appointment.meetingDetail && /* @__PURE__ */ (0,
|
|
1893
|
+
appointment.meetingDetail && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1781
1894
|
MeetingDetailRow,
|
|
1782
1895
|
{
|
|
1783
1896
|
meetingType: appointment.meetingType,
|
|
1784
1897
|
detail: appointment.meetingDetail
|
|
1785
1898
|
}
|
|
1786
1899
|
),
|
|
1787
|
-
/* @__PURE__ */ (0,
|
|
1900
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1788
1901
|
"span",
|
|
1789
1902
|
{
|
|
1790
1903
|
className: cn("text-sm font-medium", {
|
|
@@ -1796,9 +1909,9 @@ function AppointmentSection({
|
|
|
1796
1909
|
children: APPOINTMENT_STATUS_LABEL[appointment.status]
|
|
1797
1910
|
}
|
|
1798
1911
|
),
|
|
1799
|
-
appointment.status === "requested" && /* @__PURE__ */ (0,
|
|
1800
|
-
/* @__PURE__ */ (0,
|
|
1801
|
-
/* @__PURE__ */ (0,
|
|
1912
|
+
appointment.status === "requested" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex gap-2 pt-1", children: [
|
|
1913
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { size: "sm", className: "flex-1", onClick: onApproveAppointment, children: "Approve" }),
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1802
1915
|
Button,
|
|
1803
1916
|
{
|
|
1804
1917
|
variant: "outline",
|
|
@@ -1808,7 +1921,7 @@ function AppointmentSection({
|
|
|
1808
1921
|
children: "Decline"
|
|
1809
1922
|
}
|
|
1810
1923
|
),
|
|
1811
|
-
canReschedule && /* @__PURE__ */ (0,
|
|
1924
|
+
canReschedule && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1812
1925
|
Button,
|
|
1813
1926
|
{
|
|
1814
1927
|
variant: "ghost",
|
|
@@ -1819,7 +1932,7 @@ function AppointmentSection({
|
|
|
1819
1932
|
}
|
|
1820
1933
|
)
|
|
1821
1934
|
] }),
|
|
1822
|
-
(appointment.status === "confirmed" || appointment.status === "cancelled") && canReschedule && /* @__PURE__ */ (0,
|
|
1935
|
+
(appointment.status === "confirmed" || appointment.status === "cancelled") && canReschedule && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1823
1936
|
Button,
|
|
1824
1937
|
{
|
|
1825
1938
|
variant: "outline",
|
|
@@ -1832,13 +1945,13 @@ function AppointmentSection({
|
|
|
1832
1945
|
] });
|
|
1833
1946
|
}
|
|
1834
1947
|
function PanelSectionHeader({ children }) {
|
|
1835
|
-
return /* @__PURE__ */ (0,
|
|
1948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "mb-2.5 text-overline text-muted-foreground", children });
|
|
1836
1949
|
}
|
|
1837
1950
|
function PanelSection({
|
|
1838
1951
|
children,
|
|
1839
1952
|
last = false
|
|
1840
1953
|
}) {
|
|
1841
|
-
return /* @__PURE__ */ (0,
|
|
1954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("px-4 py-4", !last && "border-b border-border"), children });
|
|
1842
1955
|
}
|
|
1843
1956
|
function LeadInfoPanel({
|
|
1844
1957
|
contact,
|
|
@@ -1864,8 +1977,8 @@ function LeadInfoPanel({
|
|
|
1864
1977
|
}) {
|
|
1865
1978
|
const isAnonymous = !contact.name.trim();
|
|
1866
1979
|
const addToContactsDisabled = isAnonymous || isKnownContact;
|
|
1867
|
-
return /* @__PURE__ */ (0,
|
|
1868
|
-
/* @__PURE__ */ (0,
|
|
1980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("flex flex-col bg-background", className), children: [
|
|
1981
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1869
1982
|
"div",
|
|
1870
1983
|
{
|
|
1871
1984
|
className: cn(
|
|
@@ -1873,7 +1986,7 @@ function LeadInfoPanel({
|
|
|
1873
1986
|
"flex items-center justify-between border-b border-border px-4"
|
|
1874
1987
|
),
|
|
1875
1988
|
children: [
|
|
1876
|
-
onBack && /* @__PURE__ */ (0,
|
|
1989
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1877
1990
|
Button,
|
|
1878
1991
|
{
|
|
1879
1992
|
variant: "ghost",
|
|
@@ -1881,15 +1994,15 @@ function LeadInfoPanel({
|
|
|
1881
1994
|
className: "size-8 shrink-0 md:hidden",
|
|
1882
1995
|
onClick: onBack,
|
|
1883
1996
|
"aria-label": "Back to conversation",
|
|
1884
|
-
children: /* @__PURE__ */ (0,
|
|
1997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ArrowLeft, { className: "size-4" })
|
|
1885
1998
|
}
|
|
1886
1999
|
),
|
|
1887
|
-
/* @__PURE__ */ (0,
|
|
1888
|
-
onToggleCollapse && /* @__PURE__ */ (0,
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
2000
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-semibold text-foreground", children: "Lead Info" }),
|
|
2001
|
+
onToggleCollapse && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
2002
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1890
2003
|
TooltipTrigger,
|
|
1891
2004
|
{
|
|
1892
|
-
render: /* @__PURE__ */ (0,
|
|
2005
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1893
2006
|
Button,
|
|
1894
2007
|
{
|
|
1895
2008
|
variant: "ghost",
|
|
@@ -1897,7 +2010,7 @@ function LeadInfoPanel({
|
|
|
1897
2010
|
className: "size-7",
|
|
1898
2011
|
onClick: onToggleCollapse,
|
|
1899
2012
|
"aria-label": isCollapsed ? "Expand panel" : "Collapse panel",
|
|
1900
|
-
children: /* @__PURE__ */ (0,
|
|
2013
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1901
2014
|
import_lucide_react4.ChevronRight,
|
|
1902
2015
|
{
|
|
1903
2016
|
className: cn(
|
|
@@ -1910,26 +2023,26 @@ function LeadInfoPanel({
|
|
|
1910
2023
|
)
|
|
1911
2024
|
}
|
|
1912
2025
|
),
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
2026
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipContent, { children: isCollapsed ? "Expand panel" : "Collapse panel" })
|
|
1914
2027
|
] })
|
|
1915
2028
|
]
|
|
1916
2029
|
}
|
|
1917
2030
|
),
|
|
1918
|
-
!isCollapsed && /* @__PURE__ */ (0,
|
|
1919
|
-
/* @__PURE__ */ (0,
|
|
1920
|
-
/* @__PURE__ */ (0,
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1922
|
-
/* @__PURE__ */ (0,
|
|
1923
|
-
/* @__PURE__ */ (0,
|
|
1924
|
-
/* @__PURE__ */ (0,
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
1926
|
-
topic && /* @__PURE__ */ (0,
|
|
2031
|
+
!isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: [
|
|
2032
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PanelSection, { children: [
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PanelSectionHeader, { children: "Contact" }),
|
|
2034
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ContactAvatar, { name: contact.name, size: "lg" }),
|
|
2036
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm text-muted-foreground", children: source }),
|
|
2039
|
+
topic && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant: "secondary", className: "mt-1 text-xs", children: topic })
|
|
1927
2040
|
] })
|
|
1928
2041
|
] }),
|
|
1929
|
-
(contact.email || contact.phone || firstSeen) && /* @__PURE__ */ (0,
|
|
1930
|
-
contact.email && /* @__PURE__ */ (0,
|
|
1931
|
-
/* @__PURE__ */ (0,
|
|
1932
|
-
/* @__PURE__ */ (0,
|
|
2042
|
+
(contact.email || contact.phone || firstSeen) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mt-3 flex flex-col gap-1.5", children: [
|
|
2043
|
+
contact.email && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
2044
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Mail, { className: "size-4 shrink-0" }),
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1933
2046
|
"a",
|
|
1934
2047
|
{
|
|
1935
2048
|
href: `mailto:${contact.email}`,
|
|
@@ -1938,9 +2051,9 @@ function LeadInfoPanel({
|
|
|
1938
2051
|
}
|
|
1939
2052
|
)
|
|
1940
2053
|
] }),
|
|
1941
|
-
contact.phone && /* @__PURE__ */ (0,
|
|
1942
|
-
/* @__PURE__ */ (0,
|
|
1943
|
-
/* @__PURE__ */ (0,
|
|
2054
|
+
contact.phone && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.PhoneCall, { className: "size-4 shrink-0" }),
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1944
2057
|
"a",
|
|
1945
2058
|
{
|
|
1946
2059
|
href: `tel:${contact.phone}`,
|
|
@@ -1949,31 +2062,31 @@ function LeadInfoPanel({
|
|
|
1949
2062
|
}
|
|
1950
2063
|
)
|
|
1951
2064
|
] }),
|
|
1952
|
-
firstSeen && /* @__PURE__ */ (0,
|
|
2065
|
+
firstSeen && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
1953
2066
|
"First seen: ",
|
|
1954
2067
|
firstSeen
|
|
1955
2068
|
] })
|
|
1956
2069
|
] })
|
|
1957
2070
|
] }),
|
|
1958
|
-
/* @__PURE__ */ (0,
|
|
1959
|
-
/* @__PURE__ */ (0,
|
|
1960
|
-
aiFields.length > 0 ? /* @__PURE__ */ (0,
|
|
1961
|
-
/* @__PURE__ */ (0,
|
|
1962
|
-
/* @__PURE__ */ (0,
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PanelSection, { children: [
|
|
2072
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PanelSectionHeader, { children: "AI-Collected Data" }),
|
|
2073
|
+
aiFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
2074
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AICollectedDataSection, { fields: aiFields }),
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mt-2.5 flex items-center gap-3 text-xs text-muted-foreground", children: [
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
2077
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.CheckCircle2, { className: "size-3 text-success-text" }),
|
|
1965
2078
|
"confirmed"
|
|
1966
2079
|
] }),
|
|
1967
|
-
/* @__PURE__ */ (0,
|
|
1968
|
-
/* @__PURE__ */ (0,
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
2081
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.HelpCircle, { className: "size-3 text-warning-text" }),
|
|
1969
2082
|
"estimated"
|
|
1970
2083
|
] })
|
|
1971
2084
|
] })
|
|
1972
|
-
] }) : /* @__PURE__ */ (0,
|
|
2085
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm text-muted-foreground", children: "AI is still gathering information..." })
|
|
1973
2086
|
] }),
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
1975
|
-
/* @__PURE__ */ (0,
|
|
1976
|
-
appointment ? /* @__PURE__ */ (0,
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PanelSection, { children: [
|
|
2088
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PanelSectionHeader, { children: "Appointment" }),
|
|
2089
|
+
appointment ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1977
2090
|
AppointmentSection,
|
|
1978
2091
|
{
|
|
1979
2092
|
appointment,
|
|
@@ -1983,7 +2096,7 @@ function LeadInfoPanel({
|
|
|
1983
2096
|
onDeclineAppointment,
|
|
1984
2097
|
onRescheduleAppointment
|
|
1985
2098
|
}
|
|
1986
|
-
) : /* @__PURE__ */ (0,
|
|
2099
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1987
2100
|
Button,
|
|
1988
2101
|
{
|
|
1989
2102
|
variant: "outline",
|
|
@@ -1992,20 +2105,20 @@ function LeadInfoPanel({
|
|
|
1992
2105
|
disabled: isAnonymous,
|
|
1993
2106
|
onClick: onBookAppointment,
|
|
1994
2107
|
children: [
|
|
1995
|
-
/* @__PURE__ */ (0,
|
|
2108
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Plus, { className: "mr-1.5 size-3.5" }),
|
|
1996
2109
|
"Book Appointment"
|
|
1997
2110
|
]
|
|
1998
2111
|
}
|
|
1999
2112
|
)
|
|
2000
2113
|
] }),
|
|
2001
|
-
/* @__PURE__ */ (0,
|
|
2002
|
-
/* @__PURE__ */ (0,
|
|
2003
|
-
/* @__PURE__ */ (0,
|
|
2004
|
-
/* @__PURE__ */ (0,
|
|
2005
|
-
/* @__PURE__ */ (0,
|
|
2114
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PanelSection, { children: [
|
|
2115
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PanelSectionHeader, { children: "CRM Actions" }),
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2117
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
2118
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2006
2119
|
TooltipTrigger,
|
|
2007
2120
|
{
|
|
2008
|
-
render: /* @__PURE__ */ (0,
|
|
2121
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2009
2122
|
Button,
|
|
2010
2123
|
{
|
|
2011
2124
|
variant: "outline",
|
|
@@ -2014,16 +2127,16 @@ function LeadInfoPanel({
|
|
|
2014
2127
|
disabled: addToContactsDisabled,
|
|
2015
2128
|
onClick: onAddToContacts,
|
|
2016
2129
|
children: [
|
|
2017
|
-
/* @__PURE__ */ (0,
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.UserPlus, { className: "mr-1.5 size-3.5" }),
|
|
2018
2131
|
"Add to Contacts"
|
|
2019
2132
|
]
|
|
2020
2133
|
}
|
|
2021
2134
|
)
|
|
2022
2135
|
}
|
|
2023
2136
|
),
|
|
2024
|
-
isKnownContact && /* @__PURE__ */ (0,
|
|
2137
|
+
isKnownContact && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipContent, { children: "Already in contacts" })
|
|
2025
2138
|
] }),
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2139
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2027
2140
|
Button,
|
|
2028
2141
|
{
|
|
2029
2142
|
variant: "outline",
|
|
@@ -2032,23 +2145,23 @@ function LeadInfoPanel({
|
|
|
2032
2145
|
disabled: isAnonymous,
|
|
2033
2146
|
onClick: onCreateOpportunity,
|
|
2034
2147
|
children: [
|
|
2035
|
-
/* @__PURE__ */ (0,
|
|
2148
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Briefcase, { className: "mr-1.5 size-3.5" }),
|
|
2036
2149
|
"Add to CRM"
|
|
2037
2150
|
]
|
|
2038
2151
|
}
|
|
2039
2152
|
)
|
|
2040
2153
|
] })
|
|
2041
2154
|
] }),
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2044
|
-
/* @__PURE__ */ (0,
|
|
2045
|
-
notesSaveStatus === "saving" && /* @__PURE__ */ (0,
|
|
2046
|
-
notesSaveStatus === "saved" && /* @__PURE__ */ (0,
|
|
2047
|
-
/* @__PURE__ */ (0,
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PanelSection, { last: true, children: [
|
|
2156
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mb-2.5 flex items-center justify-between", children: [
|
|
2157
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-overline text-muted-foreground", children: "Internal Notes" }),
|
|
2158
|
+
notesSaveStatus === "saving" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-muted-foreground", children: "Saving..." }),
|
|
2159
|
+
notesSaveStatus === "saved" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "flex items-center gap-1 text-xs text-success-text", children: [
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.CheckCircle2, { className: "size-3" }),
|
|
2048
2161
|
"Saved"
|
|
2049
2162
|
] })
|
|
2050
2163
|
] }),
|
|
2051
|
-
/* @__PURE__ */ (0,
|
|
2164
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2052
2165
|
Textarea,
|
|
2053
2166
|
{
|
|
2054
2167
|
value: internalNotes,
|
|
@@ -2128,12 +2241,12 @@ function ConversationsPage({
|
|
|
2128
2241
|
onToggleLeadPanel == null ? void 0 : onToggleLeadPanel();
|
|
2129
2242
|
setMobilePanel(showLeadPanel ? "chat" : "lead");
|
|
2130
2243
|
};
|
|
2131
|
-
return /* @__PURE__ */ (0,
|
|
2244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2132
2245
|
"div",
|
|
2133
2246
|
{
|
|
2134
2247
|
className: cn("flex h-full overflow-hidden bg-background", className),
|
|
2135
2248
|
children: [
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2249
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2137
2250
|
ConversationList,
|
|
2138
2251
|
{
|
|
2139
2252
|
conversations,
|
|
@@ -2156,7 +2269,7 @@ function ConversationsPage({
|
|
|
2156
2269
|
)
|
|
2157
2270
|
}
|
|
2158
2271
|
),
|
|
2159
|
-
contact ? /* @__PURE__ */ (0,
|
|
2272
|
+
contact ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2160
2273
|
ChatThread,
|
|
2161
2274
|
{
|
|
2162
2275
|
contact,
|
|
@@ -2189,21 +2302,21 @@ function ConversationsPage({
|
|
|
2189
2302
|
)
|
|
2190
2303
|
},
|
|
2191
2304
|
contact.id
|
|
2192
|
-
) : /* @__PURE__ */ (0,
|
|
2305
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2193
2306
|
"div",
|
|
2194
2307
|
{
|
|
2195
2308
|
className: cn(
|
|
2196
2309
|
"min-w-0 flex-1 items-center justify-center border-r border-border bg-muted/10",
|
|
2197
2310
|
mobilePanel === "chat" ? "flex md:flex" : "hidden md:flex"
|
|
2198
2311
|
),
|
|
2199
|
-
children: /* @__PURE__ */ (0,
|
|
2200
|
-
/* @__PURE__ */ (0,
|
|
2201
|
-
/* @__PURE__ */ (0,
|
|
2312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MessageSquare, { className: "size-10 opacity-30" }),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm", children: "Select a conversation" })
|
|
2202
2315
|
] })
|
|
2203
2316
|
}
|
|
2204
2317
|
),
|
|
2205
|
-
contact && /* @__PURE__ */ (0,
|
|
2206
|
-
/* @__PURE__ */ (0,
|
|
2318
|
+
contact && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2207
2320
|
"div",
|
|
2208
2321
|
{
|
|
2209
2322
|
className: cn(
|
|
@@ -2213,7 +2326,7 @@ function ConversationsPage({
|
|
|
2213
2326
|
"md:block md:shrink-0 md:overflow-hidden md:transition-[width] md:duration-200 md:ease-in-out",
|
|
2214
2327
|
showLeadPanel ? "md:w-[320px]" : "md:w-0"
|
|
2215
2328
|
),
|
|
2216
|
-
children: /* @__PURE__ */ (0,
|
|
2329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2217
2330
|
LeadInfoPanel,
|
|
2218
2331
|
{
|
|
2219
2332
|
contact,
|
|
@@ -2239,11 +2352,11 @@ function ConversationsPage({
|
|
|
2239
2352
|
)
|
|
2240
2353
|
}
|
|
2241
2354
|
),
|
|
2242
|
-
!showLeadPanel && onToggleLeadPanel && /* @__PURE__ */ (0,
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2355
|
+
!showLeadPanel && onToggleLeadPanel && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "hidden shrink-0 items-start border-l border-border pt-[29px] md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2244
2357
|
TooltipTrigger,
|
|
2245
2358
|
{
|
|
2246
|
-
render: /* @__PURE__ */ (0,
|
|
2359
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2247
2360
|
Button,
|
|
2248
2361
|
{
|
|
2249
2362
|
variant: "ghost",
|
|
@@ -2251,12 +2364,12 @@ function ConversationsPage({
|
|
|
2251
2364
|
className: "size-8",
|
|
2252
2365
|
"aria-label": "Show lead info",
|
|
2253
2366
|
onClick: handleToggleLeadPanel,
|
|
2254
|
-
children: /* @__PURE__ */ (0,
|
|
2367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronLeft, { className: "size-4" })
|
|
2255
2368
|
}
|
|
2256
2369
|
)
|
|
2257
2370
|
}
|
|
2258
2371
|
),
|
|
2259
|
-
/* @__PURE__ */ (0,
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipContent, { children: "Show lead info" })
|
|
2260
2373
|
] }) })
|
|
2261
2374
|
] })
|
|
2262
2375
|
]
|
|
@@ -2286,13 +2399,13 @@ function AiConvAssignAdvisorDialog({
|
|
|
2286
2399
|
setRoleFilter("");
|
|
2287
2400
|
}
|
|
2288
2401
|
};
|
|
2289
|
-
return /* @__PURE__ */ (0,
|
|
2290
|
-
/* @__PURE__ */ (0,
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogContent, { children: [
|
|
2403
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogHeader, { children: [
|
|
2404
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogTitle, { children: "Assign to advisor" }),
|
|
2405
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogDescription, { children: "Choose an advisor to handle this conversation." })
|
|
2293
2406
|
] }),
|
|
2294
|
-
/* @__PURE__ */ (0,
|
|
2295
|
-
roles.length > 0 && /* @__PURE__ */ (0,
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
2408
|
+
roles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2296
2409
|
ToggleGroup,
|
|
2297
2410
|
{
|
|
2298
2411
|
type: "single",
|
|
@@ -2305,14 +2418,14 @@ function AiConvAssignAdvisorDialog({
|
|
|
2305
2418
|
setRoleFilter(!v || v === "__all__" ? "" : v);
|
|
2306
2419
|
},
|
|
2307
2420
|
children: [
|
|
2308
|
-
/* @__PURE__ */ (0,
|
|
2309
|
-
roles.map((role) => /* @__PURE__ */ (0,
|
|
2421
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToggleGroupItem, { value: "__all__", children: "All" }),
|
|
2422
|
+
roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToggleGroupItem, { value: role, children: role }, role))
|
|
2310
2423
|
]
|
|
2311
2424
|
}
|
|
2312
2425
|
) }),
|
|
2313
|
-
/* @__PURE__ */ (0,
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2315
|
-
/* @__PURE__ */ (0,
|
|
2426
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 border border-input px-3", children: [
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Search, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2316
2429
|
"input",
|
|
2317
2430
|
{
|
|
2318
2431
|
type: "text",
|
|
@@ -2323,7 +2436,7 @@ function AiConvAssignAdvisorDialog({
|
|
|
2323
2436
|
}
|
|
2324
2437
|
)
|
|
2325
2438
|
] }),
|
|
2326
|
-
/* @__PURE__ */ (0,
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "max-h-52 overflow-y-auto border border-t-0 border-input", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "No advisors found." }) : filtered.map((advisor) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2327
2440
|
"button",
|
|
2328
2441
|
{
|
|
2329
2442
|
type: "button",
|
|
@@ -2333,19 +2446,19 @@ function AiConvAssignAdvisorDialog({
|
|
|
2333
2446
|
value === advisor.id && "bg-muted font-medium"
|
|
2334
2447
|
),
|
|
2335
2448
|
children: [
|
|
2336
|
-
/* @__PURE__ */ (0,
|
|
2337
|
-
/* @__PURE__ */ (0,
|
|
2338
|
-
/* @__PURE__ */ (0,
|
|
2339
|
-
advisor.role && /* @__PURE__ */ (0,
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { className: "font-semibold", children: advisor.initials }) }),
|
|
2450
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2451
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-sm", children: advisor.name }),
|
|
2452
|
+
advisor.role && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: advisor.role })
|
|
2340
2453
|
] })
|
|
2341
2454
|
]
|
|
2342
2455
|
},
|
|
2343
2456
|
advisor.id
|
|
2344
2457
|
)) })
|
|
2345
2458
|
] }),
|
|
2346
|
-
/* @__PURE__ */ (0,
|
|
2347
|
-
/* @__PURE__ */ (0,
|
|
2348
|
-
/* @__PURE__ */ (0,
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogFooter, { children: [
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { onClick: onConfirm, children: "Assign" })
|
|
2349
2462
|
] })
|
|
2350
2463
|
] }) });
|
|
2351
2464
|
}
|