@handled-ai/design-system 0.18.51 → 0.18.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/data-table-filter.d.ts +21 -6
- package/dist/components/data-table-filter.js +134 -9
- package/dist/components/data-table-filter.js.map +1 -1
- package/dist/components/entity-panel.js +5 -5
- package/dist/components/entity-panel.js.map +1 -1
- package/dist/components/pill.d.ts +1 -1
- package/dist/components/score-why-chips.d.ts +1 -1
- package/dist/components/signal-feedback-inline.d.ts +28 -12
- package/dist/components/signal-feedback-inline.js +146 -10
- package/dist/components/signal-feedback-inline.js.map +1 -1
- package/dist/components/signal-priority-popover.d.ts +1 -1
- package/dist/components/signal-priority-popover.js +7 -16
- package/dist/components/signal-priority-popover.js.map +1 -1
- package/dist/components/tabs.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js.map +1 -1
- package/dist/prototype/index.d.ts +1 -1
- package/dist/prototype/prototype-accounts-view.d.ts +1 -1
- package/dist/prototype/prototype-admin-view.d.ts +1 -1
- package/dist/prototype/prototype-config.d.ts +1 -1
- package/dist/prototype/prototype-inbox-view.d.ts +3 -3
- package/dist/prototype/prototype-inbox-view.js +1 -3
- package/dist/prototype/prototype-inbox-view.js.map +1 -1
- package/dist/prototype/prototype-insights-view.d.ts +1 -1
- package/dist/prototype/prototype-shell.d.ts +1 -1
- package/dist/{signal-priority-popover-DTedstRL.d.ts → signal-priority-popover-QJngMAj7.d.ts} +4 -13
- package/package.json +1 -1
- package/src/components/__tests__/case-panel-why.test.tsx +126 -0
- package/src/components/__tests__/data-table-filter.test.tsx +130 -0
- package/src/components/__tests__/entity-metadata-grid.test.tsx +27 -1
- package/src/components/__tests__/signal-priority-popover.test.tsx +4 -41
- package/src/components/data-table-filter.tsx +160 -9
- package/src/components/entity-panel.tsx +7 -5
- package/src/components/signal-feedback-inline.tsx +181 -20
- package/src/components/signal-priority-popover.tsx +6 -19
- package/src/index.ts +1 -1
- package/src/prototype/__tests__/detail-view-opportunity-preview.test.tsx +90 -0
- package/src/prototype/__tests__/detail-view-score-why.test.tsx +0 -34
- package/src/prototype/prototype-config.ts +3 -7
- package/src/prototype/prototype-inbox-view.tsx +3 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/entity-panel.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Sheet, SheetContent, SheetHeader, SheetTitle } from \"./sheet\"\nimport { Badge } from \"./badge\"\nimport { Button } from \"./button\"\nimport { Input } from \"./input\"\nimport {\n Plus,\n ExternalLink,\n Mail,\n FileText,\n MessageCircle,\n Briefcase,\n Building2,\n Users,\n X,\n ChevronDown,\n ChevronUp,\n Link as LinkIcon,\n Maximize2,\n Minimize2,\n CalendarDays,\n} from \"lucide-react\"\nimport { TimelineActivity, type TimelineEvent } from \"./timeline-activity\"\n\n// ---------------------------------------------------------------------------\n// EntityPanel -- supports Sheet (side panel), wide, and fullscreen modes\n// ---------------------------------------------------------------------------\n\nexport type PanelMode = 'default' | 'wide' | 'fullscreen'\n\nexport function EntityPanel({\n isOpen,\n onClose,\n children,\n}: {\n isOpen: boolean\n onClose: (open: boolean) => void\n children?: React.ReactNode\n}) {\n const [panelMode, setPanelMode] = React.useState<PanelMode>('default')\n\n // Backward-compatible derived values\n const isFullscreen = panelMode === 'fullscreen'\n const setIsFullscreen = React.useCallback(\n (val: boolean) => setPanelMode(val ? 'fullscreen' : 'default'),\n [],\n )\n\n const cyclePanelMode = React.useCallback(() => {\n setPanelMode((prev) =>\n prev === 'default' ? 'wide' : prev === 'wide' ? 'fullscreen' : 'default',\n )\n }, [])\n\n React.useEffect(() => {\n if (!isOpen) setPanelMode('default')\n }, [isOpen])\n\n const handleClose = React.useCallback(() => {\n setPanelMode('default')\n onClose(false)\n }, [onClose])\n\n const panelContent = (\n <EntityPanelContext.Provider\n value={{\n isFullscreen,\n setIsFullscreen,\n panelMode,\n setPanelMode,\n cyclePanelMode,\n onClose: handleClose,\n }}\n >\n {children}\n </EntityPanelContext.Provider>\n )\n\n if (isFullscreen && isOpen) {\n return (\n <div className=\"fixed inset-0 z-50 flex flex-col overflow-hidden bg-background\">\n <div className=\"flex-1 overflow-y-auto px-5 py-5\">{panelContent}</div>\n </div>\n )\n }\n\n const widthClass =\n panelMode === 'wide'\n ? 'sm:w-[800px] sm:max-w-[900px]'\n : 'sm:w-[500px] sm:max-w-[600px]'\n\n return (\n <Sheet open={isOpen} onOpenChange={onClose}>\n <SheetContent\n side=\"right\"\n className={`w-full ${widthClass} overflow-hidden p-0 bg-background border-l border-border flex flex-col`}\n showCloseButton={false}\n >\n <SheetHeader className=\"sr-only p-0\">\n <SheetTitle>Entity panel</SheetTitle>\n </SheetHeader>\n <div className=\"flex-1 overflow-y-auto px-5 py-5\">{panelContent}</div>\n </SheetContent>\n </Sheet>\n )\n}\n\nconst EntityPanelContext = React.createContext<{\n isFullscreen: boolean\n setIsFullscreen: (v: boolean) => void\n panelMode: PanelMode\n setPanelMode: (mode: PanelMode) => void\n cyclePanelMode: () => void\n onClose: () => void\n}>({\n isFullscreen: false,\n setIsFullscreen: () => {},\n panelMode: 'default',\n setPanelMode: () => {},\n cyclePanelMode: () => {},\n onClose: () => {},\n})\n\nexport function useEntityPanel() {\n return React.useContext(EntityPanelContext)\n}\n\n// ---------------------------------------------------------------------------\n// EntityPanelHeader – MeetingDetail-inspired header bar\n// ---------------------------------------------------------------------------\n\nexport function EntityPanelHeader({\n icon,\n title,\n badgeLabel,\n subtitle,\n headerAction,\n headerSecondaryAction,\n}: {\n icon?: React.ReactNode\n title: string\n badgeLabel?: string\n subtitle?: string\n headerAction?: React.ReactNode\n headerSecondaryAction?: React.ReactNode\n}) {\n const { panelMode, cyclePanelMode, onClose } = useEntityPanel()\n\n const sizeButtonTitle =\n panelMode === 'default' ? 'Wide' : panelMode === 'wide' ? 'Fullscreen' : 'Exit fullscreen'\n\n return (\n <div className=\"mb-3 space-y-2\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n {icon ?? <CalendarDays className=\"w-5 h-5 text-muted-foreground shrink-0\" />}\n <h2 className=\"text-[16px] font-semibold text-foreground truncate\">{title}</h2>\n {badgeLabel && (\n <Badge\n variant=\"outline\"\n className=\"text-blue-600 border-blue-300 dark:border-blue-700 dark:text-blue-400 shadow-none px-2 py-0.5 text-[11px] font-medium shrink-0\"\n >\n {badgeLabel}\n </Badge>\n )}\n </div>\n <div className=\"flex items-center gap-1 shrink-0 ml-4 text-muted-foreground\">\n {headerAction}\n <button\n type=\"button\"\n className=\"p-1.5 rounded-md hover:bg-secondary transition-colors\"\n title=\"Copy Link\"\n >\n <LinkIcon className=\"w-4 h-4\" />\n </button>\n <button\n type=\"button\"\n onClick={cyclePanelMode}\n className=\"p-1.5 rounded-md hover:bg-secondary transition-colors\"\n title={sizeButtonTitle}\n >\n {panelMode === 'fullscreen' ? (\n <Minimize2 className=\"w-4 h-4\" />\n ) : (\n <Maximize2 className=\"w-4 h-4\" />\n )}\n </button>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1.5 rounded-md hover:bg-secondary transition-colors\"\n title=\"Close\"\n >\n <X className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n {(subtitle || headerSecondaryAction) && (\n <div className=\"flex flex-wrap items-center justify-between gap-x-3 gap-y-2\">\n {subtitle ? (\n <p className=\"min-w-0 flex-1 text-xs text-muted-foreground\">{subtitle}</p>\n ) : (\n <div className=\"min-w-0 flex-1\" />\n )}\n {headerSecondaryAction ? (\n <div className=\"flex shrink-0 items-center gap-2\">{headerSecondaryAction}</div>\n ) : null}\n </div>\n )}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityPanelTabs – Overview/Details tab bar\n// ---------------------------------------------------------------------------\n\nexport function EntityPanelTabs({\n tabs,\n activeTab,\n onTabChange,\n}: {\n tabs: { id: string; label: string }[]\n activeTab: string\n onTabChange: (id: string) => void\n}) {\n return (\n <div className=\"flex items-center gap-5 border-b border-border mb-4 overflow-x-auto\">\n {tabs.map((tab) => (\n <button\n key={tab.id}\n type=\"button\"\n onClick={() => onTabChange(tab.id)}\n className={`whitespace-nowrap shrink-0 pb-2.5 text-[13px] font-medium border-b-2 transition-colors ${\n activeTab === tab.id\n ? \"border-primary text-foreground\"\n : \"border-transparent text-muted-foreground hover:text-foreground\"\n }`}\n >\n {tab.label}\n </button>\n ))}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityMetadataGrid – key/value metadata rows with icons\n// ---------------------------------------------------------------------------\n\nexport interface EntityMetadataField {\n icon: React.ComponentType<{ className?: string }>\n label: string\n value: React.ReactNode\n}\n\nexport function EntityMetadataGrid({ fields }: { fields: EntityMetadataField[] }) {\n return (\n <div className=\"grid grid-cols-1 md:grid-cols-[140px_1fr] gap-y-3 gap-x-4 mb-7 text-[13px] overflow-hidden\">\n {fields.map((field, idx) => (\n <React.Fragment key={idx}>\n <div className=\"flex items-center gap-1.5 text-muted-foreground text-[13px] font-normal\">\n <field.icon className=\"w-3.5 h-3.5 shrink-0\" />\n <span>{field.label}</span>\n </div>\n <div className=\"min-w-0 truncate text-foreground\">{field.value}</div>\n </React.Fragment>\n ))}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntitySection – clean section with title (MeetingDetail-style)\n// ---------------------------------------------------------------------------\n\nexport function EntitySection({\n title,\n children,\n action,\n}: {\n title: string\n children: React.ReactNode\n action?: React.ReactNode\n}) {\n return (\n <section className=\"mb-7\">\n <div className=\"flex items-center justify-between mb-3\">\n <h3 className=\"text-[12px] font-semibold text-muted-foreground tracking-wide\">{title}</h3>\n {action}\n </div>\n {children}\n </section>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityActivityItem – clean activity row (MeetingDetail-style)\n// ---------------------------------------------------------------------------\n\nexport function EntityActivityItem({\n icon,\n title,\n description,\n date,\n}: {\n icon?: React.ReactNode\n title: React.ReactNode\n description?: React.ReactNode\n date?: string\n}) {\n return (\n <div className=\"flex gap-3 text-[13px]\">\n <div className=\"mt-0.5 text-muted-foreground shrink-0\">\n {icon ?? <CalendarDays className=\"w-4 h-4\" />}\n </div>\n <div>\n <p className=\"text-foreground leading-relaxed\">{title}</p>\n {description && <p className=\"text-[11px] text-muted-foreground/70 mt-0.5\">{description}</p>}\n {date && <p className=\"text-[11px] text-muted-foreground/70 mt-0.5\">{date}</p>}\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// SystemActivity – standalone section for bottom of entity panel\n// ---------------------------------------------------------------------------\n\nexport function SystemActivity() {\n return (\n <EntitySection title=\"System Activity\">\n <div className=\"space-y-4\">\n <EntityActivityItem\n title={<><span className=\"font-medium\">System</span> enriched the lead</>}\n date=\"Today at 10:15 AM\"\n />\n <EntityActivityItem\n icon={<Mail className=\"w-4 h-4\" />}\n title={<><span className=\"font-medium\">Jackie Lee</span> submitted website form</>}\n date=\"Yesterday at 3:22 PM\"\n />\n </div>\n </EntitySection>\n )\n}\n\n// ---------------------------------------------------------------------------\n// PotentialContacts – unchanged from original\n// ---------------------------------------------------------------------------\n\nexport interface EntityPanelBrandIcons {\n linkedin?: string\n gmail?: string\n slack?: string\n gdoc?: string\n}\n\nfunction EntityPanelBrandIcon({\n src,\n alt,\n className,\n fallback,\n}: {\n src?: string\n alt: string\n className: string\n fallback: React.ReactNode\n}) {\n if (!src) {\n return <>{fallback}</>\n }\n\n return <img src={src} alt={alt} className={className} />\n}\n\nexport function PotentialContacts({\n icons,\n}: {\n icons?: Pick<EntityPanelBrandIcons, \"linkedin\" | \"gmail\">\n}) {\n return (\n <div className=\"space-y-2.5 mb-6\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">Potential Contacts</h3>\n <span className=\"text-xs text-muted-foreground\">3 identified</span>\n </div>\n <div className=\"space-y-0\">\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-2.5 min-w-0\">\n <Badge variant=\"outline\" className=\"bg-indigo-50 text-indigo-700 border-indigo-200 dark:bg-indigo-900/30 dark:text-indigo-300 dark:border-indigo-800 shadow-none px-2 py-0 text-[11px] font-medium shrink-0\">Primary</Badge>\n <span className=\"font-medium text-sm text-foreground truncate\">Jackie Lee</span>\n <span className=\"text-muted-foreground text-sm shrink-0\">·</span>\n <span className=\"text-muted-foreground text-sm truncate\">VP Finance</span>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.linkedin}\n alt=\"LinkedIn\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<LinkIcon className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.gmail}\n alt=\"Gmail\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<Mail className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <Button size=\"sm\" className=\"bg-foreground text-background hover:bg-foreground/90 h-6 text-[11px] font-medium shadow-none ml-1\">\n <Plus className=\"w-3 h-3 mr-1\" /> Add to SF\n </Button>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-2.5 min-w-0\">\n <Badge variant=\"outline\" className=\"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800 shadow-none px-2 py-0 text-[11px] font-medium shrink-0\">78%</Badge>\n <span className=\"font-medium text-sm text-foreground truncate\">Marcus Webb</span>\n <span className=\"text-muted-foreground text-sm shrink-0\">·</span>\n <span className=\"text-muted-foreground text-sm truncate\">CEO</span>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.linkedin}\n alt=\"LinkedIn\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<LinkIcon className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <Button size=\"sm\" className=\"bg-foreground text-background hover:bg-foreground/90 h-6 text-[11px] font-medium shadow-none ml-1\">\n <Plus className=\"w-3 h-3 mr-1\" /> Add to SF\n </Button>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 last:border-0 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-2.5 min-w-0\">\n <Badge variant=\"outline\" className=\"bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 shadow-none px-2 py-0 text-[11px] font-medium shrink-0\">65%</Badge>\n <span className=\"font-medium text-sm text-foreground truncate\">Priya Shah</span>\n <span className=\"text-muted-foreground text-sm shrink-0\">·</span>\n <span className=\"text-muted-foreground text-sm truncate\">Head of Ops</span>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.linkedin}\n alt=\"LinkedIn\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<LinkIcon className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.gmail}\n alt=\"Gmail\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<Mail className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <Button size=\"sm\" className=\"bg-foreground text-background hover:bg-foreground/90 h-6 text-[11px] font-medium shadow-none ml-1\">\n <Plus className=\"w-3 h-3 mr-1\" /> Add to SF\n </Button>\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// RecentActivity\n// ---------------------------------------------------------------------------\n\nexport type ActivityItem = TimelineEvent\n\nexport function RecentActivity({\n title = \"Recent Activity\",\n count = \"10 total events\",\n filters = [],\n items = [],\n}: {\n title?: string\n count?: string\n filters?: string[]\n items?: TimelineEvent[]\n}) {\n return (\n <div id=\"entity-recent-activity\" className=\"space-y-3 mb-6 scroll-m-20\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">{title}</h3>\n {count && <span className=\"text-xs text-muted-foreground\">{count}</span>}\n </div>\n\n {filters.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-1.5\">\n {filters.map((filter) => (\n <Button\n key={filter}\n variant=\"outline\"\n size=\"sm\"\n className=\"h-7 text-xs rounded-md shadow-none font-medium border-border text-muted-foreground hover:text-foreground\"\n >\n {filter}\n </Button>\n ))}\n </div>\n )}\n\n <div className=\"relative\">\n <Input\n placeholder=\"Search activity...\"\n className=\"h-9 text-sm bg-background border-border shadow-none\"\n />\n </div>\n\n <div>\n <TimelineActivity events={items} />\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// ConnectedApps\n// ---------------------------------------------------------------------------\n\nexport function ConnectedApps({\n icons,\n}: {\n icons?: Pick<EntityPanelBrandIcons, \"slack\" | \"gdoc\">\n}) {\n return (\n <div className=\"space-y-2.5 mb-6\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">Connected Apps</h3>\n <span className=\"text-xs text-muted-foreground\">3 connected</span>\n </div>\n\n <div className=\"space-y-0\">\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"w-8 h-8 rounded-md border border-border/60 bg-muted/30 flex items-center justify-center shrink-0\">\n <EntityPanelBrandIcon\n src={icons?.slack}\n alt=\"Slack\"\n className=\"w-4 h-4 object-contain\"\n fallback={<MessageCircle className=\"w-4 h-4 text-muted-foreground\" />}\n />\n </div>\n <div className=\"min-w-0\">\n <p className=\"font-medium text-sm text-foreground leading-snug truncate\">#lunchclub-acmeco</p>\n <p className=\"text-xs text-muted-foreground/60\">Slack Channel</p>\n </div>\n </div>\n <div className=\"flex items-center gap-1.5 shrink-0\">\n <ExternalLink className=\"w-3 h-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity\" />\n <span className=\"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer hover:text-foreground\">Open</span>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"w-8 h-8 rounded-md border border-border/60 bg-muted/30 flex items-center justify-center shrink-0\">\n <EntityPanelBrandIcon\n src={icons?.gdoc}\n alt=\"Google Docs\"\n className=\"w-4 h-4 object-contain\"\n fallback={<FileText className=\"w-4 h-4 text-muted-foreground\" />}\n />\n </div>\n <div className=\"min-w-0\">\n <p className=\"font-medium text-sm text-foreground leading-snug truncate\">Account Strategy Document</p>\n <p className=\"text-xs text-muted-foreground/60\">Google Document</p>\n </div>\n </div>\n <div className=\"flex items-center gap-1.5 shrink-0\">\n <ExternalLink className=\"w-3 h-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity\" />\n <span className=\"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer hover:text-foreground\">Open</span>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 last:border-0 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"w-8 h-8 rounded-md border border-border/60 bg-muted/30 flex items-center justify-center shrink-0\">\n <FileText className=\"w-4 h-4 text-foreground\" />\n </div>\n <div className=\"min-w-0\">\n <p className=\"font-medium text-sm text-foreground leading-snug truncate\">Customer Success Playbook</p>\n <p className=\"text-xs text-muted-foreground/60\">Notion Page</p>\n </div>\n </div>\n <div className=\"flex items-center gap-1.5 shrink-0\">\n <ExternalLink className=\"w-3 h-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity\" />\n <span className=\"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer hover:text-foreground\">Open</span>\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityDetails – updated with MeetingDetail-inspired metadata grid + tabs\n// ---------------------------------------------------------------------------\n\nexport function EntityDetails({ onClose: _onClose }: { onClose?: () => void }) {\n const [activeTab, setActiveTab] = React.useState<\"overview\" | \"details\">(\"overview\")\n const [showMore, setShowMore] = React.useState(false)\n\n const leadFields: EntityMetadataField[] = [\n { icon: Users, label: \"Lead Name\", value: <span className=\"font-medium\">Jackie Lee</span> },\n { icon: Briefcase, label: \"Title\", value: <span className=\"font-medium\">VP Finance</span> },\n { icon: Building2, label: \"Company\", value: <span className=\"font-medium\">CloudKitchen</span> },\n { icon: Mail, label: \"Lead Source\", value: <span className=\"font-medium\">Inbound — Website form</span> },\n {\n icon: ({ className }) => (\n <div className={className}>\n <div className=\"w-3 h-3 rounded-full border-[2px] border-amber-500\" />\n </div>\n ),\n label: \"Lead Status\",\n value: (\n <Badge variant=\"outline\" className=\"text-amber-700 border-amber-200 bg-amber-50 dark:bg-amber-950 dark:text-amber-300 dark:border-amber-800 shadow-none font-medium px-2 py-0 text-[11px]\">\n New — Not Contacted\n </Badge>\n ),\n },\n { icon: Users, label: \"Lead Owner\", value: <span className=\"font-medium\">Sarah Johnson (SDR)</span> },\n {\n icon: Building2,\n label: \"Industry\",\n value: (\n <Badge variant=\"outline\" className=\"text-blue-700 border-blue-200 bg-blue-50 dark:bg-blue-950 dark:text-blue-300 dark:border-blue-800 shadow-none font-medium px-2 py-0 text-[11px]\">\n Food Tech / Logistics\n </Badge>\n ),\n },\n { icon: Users, label: \"Company Size\", value: <span className=\"font-medium\">200-500 employees</span> },\n ]\n\n const visibleFields = showMore ? leadFields : leadFields.slice(0, 6)\n\n return (\n <div className=\"space-y-0\">\n {/* Header */}\n <EntityPanelHeader\n icon={\n <div className=\"w-10 h-10 rounded-lg bg-muted flex items-center justify-center text-sm font-medium text-muted-foreground shrink-0\">\n CK\n </div>\n }\n title=\"CloudKitchen\"\n badgeLabel=\"Lead\"\n subtitle=\"Last enriched: Today at 10:15 AM\"\n />\n\n {/* Tabs */}\n <EntityPanelTabs\n tabs={[\n { id: \"overview\", label: \"Overview\" },\n { id: \"details\", label: \"Details\" },\n ]}\n activeTab={activeTab}\n onTabChange={(id) => setActiveTab(id as \"overview\" | \"details\")}\n />\n\n {activeTab === \"overview\" ? (\n <div className=\"space-y-0\">\n {/* Metadata Grid */}\n <EntityMetadataGrid fields={visibleFields} />\n\n {leadFields.length > 6 && (\n <button\n onClick={() => setShowMore(!showMore)}\n className=\"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors mb-6\"\n >\n {showMore ? \"See less\" : \"See more\"}\n {showMore ? <ChevronUp className=\"w-3 h-3\" /> : <ChevronDown className=\"w-3 h-3\" />}\n </button>\n )}\n\n {/* Enrichment as sections */}\n <EntitySection title=\"Company Signals\">\n <ul className=\"space-y-2\">\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Recent funding: $45M Series B, 3 months ago\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">1</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Hiring: 3 finance/treasury roles in last 30 days\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">2</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Market expansion: 8 → 15 US markets planned\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">3</span>\n </span>\n </li>\n </ul>\n </EntitySection>\n\n <EntitySection title=\"Contact Signals (Jackie Lee)\">\n <ul className=\"space-y-2\">\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Started role: 12 days ago\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">4</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Previous: Deel — operations/finance\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">4</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n LinkedIn connections to existing customers: 2 detected\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">4</span>\n </span>\n </li>\n </ul>\n </EntitySection>\n\n <SourcesToggle />\n </div>\n ) : (\n <div className=\"space-y-0\">\n <EntitySection title=\"Estimated Tech Stack\">\n <div className=\"space-y-2\">\n <div className=\"flex items-start gap-2 text-sm\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span className=\"text-muted-foreground min-w-[100px] shrink-0\">Banking:</span>\n <span className=\"text-muted-foreground/50 italic\">Unknown</span>\n </div>\n <div className=\"flex items-start gap-2 text-sm\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span className=\"text-muted-foreground min-w-[100px] shrink-0\">Corporate Cards:</span>\n <span className=\"text-foreground font-medium\">\n Brex <span className=\"text-muted-foreground font-normal\">(from job posting requirements)</span>\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">2</span>\n </span>\n </div>\n <div className=\"flex items-start gap-2 text-sm\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span className=\"text-muted-foreground min-w-[100px] shrink-0\">Payroll:</span>\n <span className=\"text-foreground font-medium\">\n Gusto <span className=\"text-muted-foreground font-normal\">(from LinkedIn integrations)</span>\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">5</span>\n </span>\n </div>\n </div>\n </EntitySection>\n </div>\n )}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// SourcesToggle – collapsible sources list\n// ---------------------------------------------------------------------------\n\nfunction SourcesToggle() {\n const [expanded, setExpanded] = React.useState(false)\n\n const sources = [\n { name: \"Crunchbase\", type: \"Funding data\", lastPull: \"2h ago\" },\n { name: \"LinkedIn\", type: \"People & company\", lastPull: \"12h ago\" },\n { name: \"LinkedIn Jobs\", type: \"Hiring signals\", lastPull: \"1d ago\" },\n { name: \"PR Newswire\", type: \"News & press\", lastPull: \"6h ago\" },\n { name: \"Clearbit\", type: \"Tech stack & firmographics\", lastPull: \"2h ago\" },\n ]\n\n return (\n <div className=\"mb-6\">\n <button\n onClick={() => setExpanded(!expanded)}\n className=\"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors\"\n >\n Sources\n <ChevronDown className={`w-3.5 h-3.5 transition-transform duration-200 ${expanded ? \"rotate-180\" : \"\"}`} />\n </button>\n\n {expanded && (\n <div className=\"pt-3 space-y-2 animate-in fade-in slide-in-from-top-1 duration-200\">\n {sources.map((src, idx) => (\n <div key={idx} className=\"flex items-center justify-between text-xs text-muted-foreground py-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"inline-flex items-center justify-center w-4 h-4 text-[9px] font-medium text-muted-foreground/50 border border-border rounded-full\">\n {idx + 1}\n </span>\n <span className=\"font-medium text-foreground\">{src.name}</span>\n <span className=\"text-muted-foreground/60\">·</span>\n <span>{src.type}</span>\n </div>\n <span className=\"text-muted-foreground/50\">{src.lastPull}</span>\n </div>\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";AAkEI,SA8Qa,UA9Qb,KA6BE,YA7BF;AAhEJ,YAAY,WAAW;AACvB,SAAS,OAAO,cAAc,aAAa,kBAAkB;AAC7D,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAA4C;AAQ9C,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,CAAC,WAAW,YAAY,IAAI,MAAM,SAAoB,SAAS;AAGrE,QAAM,eAAe,cAAc;AACnC,QAAM,kBAAkB,MAAM;AAAA,IAC5B,CAAC,QAAiB,aAAa,MAAM,eAAe,SAAS;AAAA,IAC7D,CAAC;AAAA,EACH;AAEA,QAAM,iBAAiB,MAAM,YAAY,MAAM;AAC7C;AAAA,MAAa,CAAC,SACZ,SAAS,YAA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AAE,MAAM,iBAAiB,MAAM,kBAAkB,UAAU,SAAS;AAAA,IACpE,EAAE,MAAM,eAAe,MAAM,gBAAgB,UAAU,SAAS;AAAA,IAChE,EAAE,MAAM,YAAY,MAAM,8BAA8B,UAAU,SAAS;AAAA,EAC7E;AAEA,SACE,qBAAC,SAAI,WAAU,QACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,MAAM,YAAY,CAAC,QAAQ;AAAA,QACpC,WAAU;AAAA,QACX;AAAA;AAAA,UAEC,oBAAC,eAAY,WAAW,iDAAiD,WAAW,eAAe,EAAE,IAAI;AAAA;AAAA;AAAA,IAC3G;AAAA,IAEC,YACC,oBAAC,SAAI,WAAU,sEACZ,kBAAQ,IAAI,CAAC,KAAK,QACjB,qBAAC,SAAc,WAAU,wEACvB;AAAA,2BAAC,SAAI,WAAU,2BACb;AAAA,4BAAC,UAAK,WAAU,qIACb,gBAAM,GACT;AAAA,QACA,oBAAC,UAAK,WAAU,+BAA+B,cAAI,MAAK;AAAA,QACxD,oBAAC,UAAK,WAAU,4BAA2B,kBAAQ;AAAA,QACnD,oBAAC,UAAM,cAAI,MAAK;AAAA,SAClB;AAAA,MACA,oBAAC,UAAK,WAAU,4BAA4B,cAAI,UAAS;AAAA,SATjD,GAUV,CACD,GACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/entity-panel.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Sheet, SheetContent, SheetHeader, SheetTitle } from \"./sheet\"\nimport { Badge } from \"./badge\"\nimport { Button } from \"./button\"\nimport { Input } from \"./input\"\nimport {\n Plus,\n ExternalLink,\n Mail,\n FileText,\n MessageCircle,\n Briefcase,\n Building2,\n Users,\n X,\n ChevronDown,\n ChevronUp,\n Link as LinkIcon,\n Maximize2,\n Minimize2,\n CalendarDays,\n} from \"lucide-react\"\nimport { TimelineActivity, type TimelineEvent } from \"./timeline-activity\"\n\n// ---------------------------------------------------------------------------\n// EntityPanel -- supports Sheet (side panel), wide, and fullscreen modes\n// ---------------------------------------------------------------------------\n\nexport type PanelMode = 'default' | 'wide' | 'fullscreen'\n\nexport function EntityPanel({\n isOpen,\n onClose,\n children,\n}: {\n isOpen: boolean\n onClose: (open: boolean) => void\n children?: React.ReactNode\n}) {\n const [panelMode, setPanelMode] = React.useState<PanelMode>('default')\n\n // Backward-compatible derived values\n const isFullscreen = panelMode === 'fullscreen'\n const setIsFullscreen = React.useCallback(\n (val: boolean) => setPanelMode(val ? 'fullscreen' : 'default'),\n [],\n )\n\n const cyclePanelMode = React.useCallback(() => {\n setPanelMode((prev) =>\n prev === 'default' ? 'wide' : prev === 'wide' ? 'fullscreen' : 'default',\n )\n }, [])\n\n React.useEffect(() => {\n if (!isOpen) setPanelMode('default')\n }, [isOpen])\n\n const handleClose = React.useCallback(() => {\n setPanelMode('default')\n onClose(false)\n }, [onClose])\n\n const panelContent = (\n <EntityPanelContext.Provider\n value={{\n isFullscreen,\n setIsFullscreen,\n panelMode,\n setPanelMode,\n cyclePanelMode,\n onClose: handleClose,\n }}\n >\n {children}\n </EntityPanelContext.Provider>\n )\n\n if (isFullscreen && isOpen) {\n return (\n <div className=\"fixed inset-0 z-50 flex flex-col overflow-hidden bg-background\">\n <div className=\"flex-1 overflow-y-auto px-5 py-5\">{panelContent}</div>\n </div>\n )\n }\n\n const widthClass =\n panelMode === 'wide'\n ? 'sm:w-[800px] sm:max-w-[900px]'\n : 'sm:w-[500px] sm:max-w-[600px]'\n\n return (\n <Sheet open={isOpen} onOpenChange={onClose}>\n <SheetContent\n side=\"right\"\n className={`w-full ${widthClass} overflow-hidden p-0 bg-background border-l border-border flex flex-col`}\n showCloseButton={false}\n >\n <SheetHeader className=\"sr-only p-0\">\n <SheetTitle>Entity panel</SheetTitle>\n </SheetHeader>\n <div className=\"flex-1 overflow-y-auto px-5 py-5\">{panelContent}</div>\n </SheetContent>\n </Sheet>\n )\n}\n\nconst EntityPanelContext = React.createContext<{\n isFullscreen: boolean\n setIsFullscreen: (v: boolean) => void\n panelMode: PanelMode\n setPanelMode: (mode: PanelMode) => void\n cyclePanelMode: () => void\n onClose: () => void\n}>({\n isFullscreen: false,\n setIsFullscreen: () => {},\n panelMode: 'default',\n setPanelMode: () => {},\n cyclePanelMode: () => {},\n onClose: () => {},\n})\n\nexport function useEntityPanel() {\n return React.useContext(EntityPanelContext)\n}\n\n// ---------------------------------------------------------------------------\n// EntityPanelHeader – MeetingDetail-inspired header bar\n// ---------------------------------------------------------------------------\n\nexport function EntityPanelHeader({\n icon,\n title,\n badgeLabel,\n subtitle,\n headerAction,\n headerSecondaryAction,\n}: {\n icon?: React.ReactNode\n title: string\n badgeLabel?: string\n subtitle?: string\n headerAction?: React.ReactNode\n headerSecondaryAction?: React.ReactNode\n}) {\n const { panelMode, cyclePanelMode, onClose } = useEntityPanel()\n\n const sizeButtonTitle =\n panelMode === 'default' ? 'Wide' : panelMode === 'wide' ? 'Fullscreen' : 'Exit fullscreen'\n\n return (\n <div className=\"mb-3 space-y-2\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n {icon ?? <CalendarDays className=\"w-5 h-5 text-muted-foreground shrink-0\" />}\n <h2 className=\"text-[16px] font-semibold text-foreground truncate\">{title}</h2>\n {badgeLabel && (\n <Badge\n variant=\"outline\"\n className=\"text-blue-600 border-blue-300 dark:border-blue-700 dark:text-blue-400 shadow-none px-2 py-0.5 text-[11px] font-medium shrink-0\"\n >\n {badgeLabel}\n </Badge>\n )}\n </div>\n <div className=\"flex items-center gap-1 shrink-0 ml-4 text-muted-foreground\">\n {headerAction}\n <button\n type=\"button\"\n className=\"p-1.5 rounded-md hover:bg-secondary transition-colors\"\n title=\"Copy Link\"\n >\n <LinkIcon className=\"w-4 h-4\" />\n </button>\n <button\n type=\"button\"\n onClick={cyclePanelMode}\n className=\"p-1.5 rounded-md hover:bg-secondary transition-colors\"\n title={sizeButtonTitle}\n >\n {panelMode === 'fullscreen' ? (\n <Minimize2 className=\"w-4 h-4\" />\n ) : (\n <Maximize2 className=\"w-4 h-4\" />\n )}\n </button>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1.5 rounded-md hover:bg-secondary transition-colors\"\n title=\"Close\"\n >\n <X className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n {(subtitle || headerSecondaryAction) && (\n <div className=\"flex flex-wrap items-center justify-between gap-x-3 gap-y-2\">\n {subtitle ? (\n <p className=\"min-w-0 flex-1 text-xs text-muted-foreground\">{subtitle}</p>\n ) : (\n <div className=\"min-w-0 flex-1\" />\n )}\n {headerSecondaryAction ? (\n <div className=\"flex shrink-0 items-center gap-2\">{headerSecondaryAction}</div>\n ) : null}\n </div>\n )}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityPanelTabs – Overview/Details tab bar\n// ---------------------------------------------------------------------------\n\nexport function EntityPanelTabs({\n tabs,\n activeTab,\n onTabChange,\n}: {\n tabs: { id: string; label: string }[]\n activeTab: string\n onTabChange: (id: string) => void\n}) {\n return (\n <div className=\"flex items-center gap-5 border-b border-border mb-4 overflow-x-auto\">\n {tabs.map((tab) => (\n <button\n key={tab.id}\n type=\"button\"\n onClick={() => onTabChange(tab.id)}\n className={`whitespace-nowrap shrink-0 pb-2.5 text-[13px] font-medium border-b-2 transition-colors ${\n activeTab === tab.id\n ? \"border-primary text-foreground\"\n : \"border-transparent text-muted-foreground hover:text-foreground\"\n }`}\n >\n {tab.label}\n </button>\n ))}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityMetadataGrid – key/value metadata rows with icons\n// ---------------------------------------------------------------------------\n\nexport interface EntityMetadataField {\n icon: React.ComponentType<{ className?: string }>\n label: string\n value: React.ReactNode\n}\n\nexport function EntityMetadataGrid({ fields }: { fields: EntityMetadataField[] }) {\n return (\n <div className=\"mb-7 grid min-w-0 grid-cols-1 gap-x-4 gap-y-3 overflow-hidden text-[13px] md:grid-cols-[minmax(0,140px)_minmax(0,1fr)]\">\n {fields.map((field, idx) => (\n <React.Fragment key={idx}>\n <div className=\"flex min-w-0 items-start gap-1.5 text-[13px] font-normal text-muted-foreground\">\n <field.icon className=\"mt-0.5 h-3.5 w-3.5 shrink-0\" />\n <span className=\"min-w-0 break-words leading-relaxed [overflow-wrap:anywhere]\">{field.label}</span>\n </div>\n <div className=\"min-w-0 whitespace-normal break-words leading-relaxed text-foreground [overflow-wrap:anywhere] [&_*]:max-w-full [&_*]:[overflow-wrap:anywhere] [&_a]:break-all\">\n {field.value}\n </div>\n </React.Fragment>\n ))}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntitySection – clean section with title (MeetingDetail-style)\n// ---------------------------------------------------------------------------\n\nexport function EntitySection({\n title,\n children,\n action,\n}: {\n title: string\n children: React.ReactNode\n action?: React.ReactNode\n}) {\n return (\n <section className=\"mb-7\">\n <div className=\"flex items-center justify-between mb-3\">\n <h3 className=\"text-[12px] font-semibold text-muted-foreground tracking-wide\">{title}</h3>\n {action}\n </div>\n {children}\n </section>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityActivityItem – clean activity row (MeetingDetail-style)\n// ---------------------------------------------------------------------------\n\nexport function EntityActivityItem({\n icon,\n title,\n description,\n date,\n}: {\n icon?: React.ReactNode\n title: React.ReactNode\n description?: React.ReactNode\n date?: string\n}) {\n return (\n <div className=\"flex gap-3 text-[13px]\">\n <div className=\"mt-0.5 text-muted-foreground shrink-0\">\n {icon ?? <CalendarDays className=\"w-4 h-4\" />}\n </div>\n <div>\n <p className=\"text-foreground leading-relaxed\">{title}</p>\n {description && <p className=\"text-[11px] text-muted-foreground/70 mt-0.5\">{description}</p>}\n {date && <p className=\"text-[11px] text-muted-foreground/70 mt-0.5\">{date}</p>}\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// SystemActivity – standalone section for bottom of entity panel\n// ---------------------------------------------------------------------------\n\nexport function SystemActivity() {\n return (\n <EntitySection title=\"System Activity\">\n <div className=\"space-y-4\">\n <EntityActivityItem\n title={<><span className=\"font-medium\">System</span> enriched the lead</>}\n date=\"Today at 10:15 AM\"\n />\n <EntityActivityItem\n icon={<Mail className=\"w-4 h-4\" />}\n title={<><span className=\"font-medium\">Jackie Lee</span> submitted website form</>}\n date=\"Yesterday at 3:22 PM\"\n />\n </div>\n </EntitySection>\n )\n}\n\n// ---------------------------------------------------------------------------\n// PotentialContacts – unchanged from original\n// ---------------------------------------------------------------------------\n\nexport interface EntityPanelBrandIcons {\n linkedin?: string\n gmail?: string\n slack?: string\n gdoc?: string\n}\n\nfunction EntityPanelBrandIcon({\n src,\n alt,\n className,\n fallback,\n}: {\n src?: string\n alt: string\n className: string\n fallback: React.ReactNode\n}) {\n if (!src) {\n return <>{fallback}</>\n }\n\n return <img src={src} alt={alt} className={className} />\n}\n\nexport function PotentialContacts({\n icons,\n}: {\n icons?: Pick<EntityPanelBrandIcons, \"linkedin\" | \"gmail\">\n}) {\n return (\n <div className=\"space-y-2.5 mb-6\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">Potential Contacts</h3>\n <span className=\"text-xs text-muted-foreground\">3 identified</span>\n </div>\n <div className=\"space-y-0\">\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-2.5 min-w-0\">\n <Badge variant=\"outline\" className=\"bg-indigo-50 text-indigo-700 border-indigo-200 dark:bg-indigo-900/30 dark:text-indigo-300 dark:border-indigo-800 shadow-none px-2 py-0 text-[11px] font-medium shrink-0\">Primary</Badge>\n <span className=\"font-medium text-sm text-foreground truncate\">Jackie Lee</span>\n <span className=\"text-muted-foreground text-sm shrink-0\">·</span>\n <span className=\"text-muted-foreground text-sm truncate\">VP Finance</span>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.linkedin}\n alt=\"LinkedIn\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<LinkIcon className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.gmail}\n alt=\"Gmail\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<Mail className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <Button size=\"sm\" className=\"bg-foreground text-background hover:bg-foreground/90 h-6 text-[11px] font-medium shadow-none ml-1\">\n <Plus className=\"w-3 h-3 mr-1\" /> Add to SF\n </Button>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-2.5 min-w-0\">\n <Badge variant=\"outline\" className=\"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800 shadow-none px-2 py-0 text-[11px] font-medium shrink-0\">78%</Badge>\n <span className=\"font-medium text-sm text-foreground truncate\">Marcus Webb</span>\n <span className=\"text-muted-foreground text-sm shrink-0\">·</span>\n <span className=\"text-muted-foreground text-sm truncate\">CEO</span>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.linkedin}\n alt=\"LinkedIn\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<LinkIcon className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <Button size=\"sm\" className=\"bg-foreground text-background hover:bg-foreground/90 h-6 text-[11px] font-medium shadow-none ml-1\">\n <Plus className=\"w-3 h-3 mr-1\" /> Add to SF\n </Button>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 last:border-0 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-2.5 min-w-0\">\n <Badge variant=\"outline\" className=\"bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 shadow-none px-2 py-0 text-[11px] font-medium shrink-0\">65%</Badge>\n <span className=\"font-medium text-sm text-foreground truncate\">Priya Shah</span>\n <span className=\"text-muted-foreground text-sm shrink-0\">·</span>\n <span className=\"text-muted-foreground text-sm truncate\">Head of Ops</span>\n </div>\n <div className=\"flex items-center gap-1 shrink-0\">\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.linkedin}\n alt=\"LinkedIn\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<LinkIcon className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <button className=\"h-7 w-7 flex items-center justify-center hover:bg-muted rounded-md transition-colors\">\n <EntityPanelBrandIcon\n src={icons?.gmail}\n alt=\"Gmail\"\n className=\"w-3.5 h-3.5 object-contain\"\n fallback={<Mail className=\"w-3.5 h-3.5 text-muted-foreground\" />}\n />\n </button>\n <Button size=\"sm\" className=\"bg-foreground text-background hover:bg-foreground/90 h-6 text-[11px] font-medium shadow-none ml-1\">\n <Plus className=\"w-3 h-3 mr-1\" /> Add to SF\n </Button>\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// RecentActivity\n// ---------------------------------------------------------------------------\n\nexport type ActivityItem = TimelineEvent\n\nexport function RecentActivity({\n title = \"Recent Activity\",\n count = \"10 total events\",\n filters = [],\n items = [],\n}: {\n title?: string\n count?: string\n filters?: string[]\n items?: TimelineEvent[]\n}) {\n return (\n <div id=\"entity-recent-activity\" className=\"space-y-3 mb-6 scroll-m-20\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">{title}</h3>\n {count && <span className=\"text-xs text-muted-foreground\">{count}</span>}\n </div>\n\n {filters.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-1.5\">\n {filters.map((filter) => (\n <Button\n key={filter}\n variant=\"outline\"\n size=\"sm\"\n className=\"h-7 text-xs rounded-md shadow-none font-medium border-border text-muted-foreground hover:text-foreground\"\n >\n {filter}\n </Button>\n ))}\n </div>\n )}\n\n <div className=\"relative\">\n <Input\n placeholder=\"Search activity...\"\n className=\"h-9 text-sm bg-background border-border shadow-none\"\n />\n </div>\n\n <div>\n <TimelineActivity events={items} />\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// ConnectedApps\n// ---------------------------------------------------------------------------\n\nexport function ConnectedApps({\n icons,\n}: {\n icons?: Pick<EntityPanelBrandIcons, \"slack\" | \"gdoc\">\n}) {\n return (\n <div className=\"space-y-2.5 mb-6\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">Connected Apps</h3>\n <span className=\"text-xs text-muted-foreground\">3 connected</span>\n </div>\n\n <div className=\"space-y-0\">\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"w-8 h-8 rounded-md border border-border/60 bg-muted/30 flex items-center justify-center shrink-0\">\n <EntityPanelBrandIcon\n src={icons?.slack}\n alt=\"Slack\"\n className=\"w-4 h-4 object-contain\"\n fallback={<MessageCircle className=\"w-4 h-4 text-muted-foreground\" />}\n />\n </div>\n <div className=\"min-w-0\">\n <p className=\"font-medium text-sm text-foreground leading-snug truncate\">#lunchclub-acmeco</p>\n <p className=\"text-xs text-muted-foreground/60\">Slack Channel</p>\n </div>\n </div>\n <div className=\"flex items-center gap-1.5 shrink-0\">\n <ExternalLink className=\"w-3 h-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity\" />\n <span className=\"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer hover:text-foreground\">Open</span>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"w-8 h-8 rounded-md border border-border/60 bg-muted/30 flex items-center justify-center shrink-0\">\n <EntityPanelBrandIcon\n src={icons?.gdoc}\n alt=\"Google Docs\"\n className=\"w-4 h-4 object-contain\"\n fallback={<FileText className=\"w-4 h-4 text-muted-foreground\" />}\n />\n </div>\n <div className=\"min-w-0\">\n <p className=\"font-medium text-sm text-foreground leading-snug truncate\">Account Strategy Document</p>\n <p className=\"text-xs text-muted-foreground/60\">Google Document</p>\n </div>\n </div>\n <div className=\"flex items-center gap-1.5 shrink-0\">\n <ExternalLink className=\"w-3 h-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity\" />\n <span className=\"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer hover:text-foreground\">Open</span>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-3 group py-2 border-b border-border/30 last:border-0 hover:bg-muted/20 -mx-2 px-2 rounded-sm transition-colors\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"w-8 h-8 rounded-md border border-border/60 bg-muted/30 flex items-center justify-center shrink-0\">\n <FileText className=\"w-4 h-4 text-foreground\" />\n </div>\n <div className=\"min-w-0\">\n <p className=\"font-medium text-sm text-foreground leading-snug truncate\">Customer Success Playbook</p>\n <p className=\"text-xs text-muted-foreground/60\">Notion Page</p>\n </div>\n </div>\n <div className=\"flex items-center gap-1.5 shrink-0\">\n <ExternalLink className=\"w-3 h-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity\" />\n <span className=\"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer hover:text-foreground\">Open</span>\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// EntityDetails – updated with MeetingDetail-inspired metadata grid + tabs\n// ---------------------------------------------------------------------------\n\nexport function EntityDetails({ onClose: _onClose }: { onClose?: () => void }) {\n const [activeTab, setActiveTab] = React.useState<\"overview\" | \"details\">(\"overview\")\n const [showMore, setShowMore] = React.useState(false)\n\n const leadFields: EntityMetadataField[] = [\n { icon: Users, label: \"Lead Name\", value: <span className=\"font-medium\">Jackie Lee</span> },\n { icon: Briefcase, label: \"Title\", value: <span className=\"font-medium\">VP Finance</span> },\n { icon: Building2, label: \"Company\", value: <span className=\"font-medium\">CloudKitchen</span> },\n { icon: Mail, label: \"Lead Source\", value: <span className=\"font-medium\">Inbound — Website form</span> },\n {\n icon: ({ className }) => (\n <div className={className}>\n <div className=\"w-3 h-3 rounded-full border-[2px] border-amber-500\" />\n </div>\n ),\n label: \"Lead Status\",\n value: (\n <Badge variant=\"outline\" className=\"text-amber-700 border-amber-200 bg-amber-50 dark:bg-amber-950 dark:text-amber-300 dark:border-amber-800 shadow-none font-medium px-2 py-0 text-[11px]\">\n New — Not Contacted\n </Badge>\n ),\n },\n { icon: Users, label: \"Lead Owner\", value: <span className=\"font-medium\">Sarah Johnson (SDR)</span> },\n {\n icon: Building2,\n label: \"Industry\",\n value: (\n <Badge variant=\"outline\" className=\"text-blue-700 border-blue-200 bg-blue-50 dark:bg-blue-950 dark:text-blue-300 dark:border-blue-800 shadow-none font-medium px-2 py-0 text-[11px]\">\n Food Tech / Logistics\n </Badge>\n ),\n },\n { icon: Users, label: \"Company Size\", value: <span className=\"font-medium\">200-500 employees</span> },\n ]\n\n const visibleFields = showMore ? leadFields : leadFields.slice(0, 6)\n\n return (\n <div className=\"space-y-0\">\n {/* Header */}\n <EntityPanelHeader\n icon={\n <div className=\"w-10 h-10 rounded-lg bg-muted flex items-center justify-center text-sm font-medium text-muted-foreground shrink-0\">\n CK\n </div>\n }\n title=\"CloudKitchen\"\n badgeLabel=\"Lead\"\n subtitle=\"Last enriched: Today at 10:15 AM\"\n />\n\n {/* Tabs */}\n <EntityPanelTabs\n tabs={[\n { id: \"overview\", label: \"Overview\" },\n { id: \"details\", label: \"Details\" },\n ]}\n activeTab={activeTab}\n onTabChange={(id) => setActiveTab(id as \"overview\" | \"details\")}\n />\n\n {activeTab === \"overview\" ? (\n <div className=\"space-y-0\">\n {/* Metadata Grid */}\n <EntityMetadataGrid fields={visibleFields} />\n\n {leadFields.length > 6 && (\n <button\n onClick={() => setShowMore(!showMore)}\n className=\"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors mb-6\"\n >\n {showMore ? \"See less\" : \"See more\"}\n {showMore ? <ChevronUp className=\"w-3 h-3\" /> : <ChevronDown className=\"w-3 h-3\" />}\n </button>\n )}\n\n {/* Enrichment as sections */}\n <EntitySection title=\"Company Signals\">\n <ul className=\"space-y-2\">\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Recent funding: $45M Series B, 3 months ago\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">1</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Hiring: 3 finance/treasury roles in last 30 days\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">2</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Market expansion: 8 → 15 US markets planned\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">3</span>\n </span>\n </li>\n </ul>\n </EntitySection>\n\n <EntitySection title=\"Contact Signals (Jackie Lee)\">\n <ul className=\"space-y-2\">\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Started role: 12 days ago\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">4</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n Previous: Deel — operations/finance\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">4</span>\n </span>\n </li>\n <li className=\"flex items-start gap-2 text-sm text-muted-foreground\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span>\n LinkedIn connections to existing customers: 2 detected\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">4</span>\n </span>\n </li>\n </ul>\n </EntitySection>\n\n <SourcesToggle />\n </div>\n ) : (\n <div className=\"space-y-0\">\n <EntitySection title=\"Estimated Tech Stack\">\n <div className=\"space-y-2\">\n <div className=\"flex items-start gap-2 text-sm\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span className=\"text-muted-foreground min-w-[100px] shrink-0\">Banking:</span>\n <span className=\"text-muted-foreground/50 italic\">Unknown</span>\n </div>\n <div className=\"flex items-start gap-2 text-sm\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span className=\"text-muted-foreground min-w-[100px] shrink-0\">Corporate Cards:</span>\n <span className=\"text-foreground font-medium\">\n Brex <span className=\"text-muted-foreground font-normal\">(from job posting requirements)</span>\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">2</span>\n </span>\n </div>\n <div className=\"flex items-start gap-2 text-sm\">\n <span className=\"text-muted-foreground/50 mt-1 shrink-0\">•</span>\n <span className=\"text-muted-foreground min-w-[100px] shrink-0\">Payroll:</span>\n <span className=\"text-foreground font-medium\">\n Gusto <span className=\"text-muted-foreground font-normal\">(from LinkedIn integrations)</span>\n <span className=\"inline-flex items-center justify-center w-4 h-4 ml-1.5 align-text-top text-[9px] font-medium text-muted-foreground bg-muted/30 border border-border/50 rounded-full\">5</span>\n </span>\n </div>\n </div>\n </EntitySection>\n </div>\n )}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// SourcesToggle – collapsible sources list\n// ---------------------------------------------------------------------------\n\nfunction SourcesToggle() {\n const [expanded, setExpanded] = React.useState(false)\n\n const sources = [\n { name: \"Crunchbase\", type: \"Funding data\", lastPull: \"2h ago\" },\n { name: \"LinkedIn\", type: \"People & company\", lastPull: \"12h ago\" },\n { name: \"LinkedIn Jobs\", type: \"Hiring signals\", lastPull: \"1d ago\" },\n { name: \"PR Newswire\", type: \"News & press\", lastPull: \"6h ago\" },\n { name: \"Clearbit\", type: \"Tech stack & firmographics\", lastPull: \"2h ago\" },\n ]\n\n return (\n <div className=\"mb-6\">\n <button\n onClick={() => setExpanded(!expanded)}\n className=\"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors\"\n >\n Sources\n <ChevronDown className={`w-3.5 h-3.5 transition-transform duration-200 ${expanded ? \"rotate-180\" : \"\"}`} />\n </button>\n\n {expanded && (\n <div className=\"pt-3 space-y-2 animate-in fade-in slide-in-from-top-1 duration-200\">\n {sources.map((src, idx) => (\n <div key={idx} className=\"flex items-center justify-between text-xs text-muted-foreground py-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"inline-flex items-center justify-center w-4 h-4 text-[9px] font-medium text-muted-foreground/50 border border-border rounded-full\">\n {idx + 1}\n </span>\n <span className=\"font-medium text-foreground\">{src.name}</span>\n <span className=\"text-muted-foreground/60\">·</span>\n <span>{src.type}</span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,kBAAQ,IAAI,CAAC,KAAK,QACjB,qBAAC,SAAc,WAAU,wEACvB;AAAA,2BAAC,SAAI,WAAU,2BACb;AAAA,4BAAC,UAAK,WAAU,qIACb,gBAAM,GACT;AAAA,QACA,oBAAC,UAAK,WAAU,+BAA+B,cAAI,MAAK;AAAA,QACxD,oBAAC,UAAK,WAAU,4BAA2B,kBAAQ;AAAA,QACnD,oBAAC,UAAM,cAAI,MAAK;AAAA,SAClB;AAAA,MACA,oBAAC,UAAK,WAAU,4BAA4B,cAAI,UAAS;AAAA,SATjD,GAUV,CACD,GACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -12,7 +12,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
12
12
|
*/
|
|
13
13
|
type PillStatus = "success" | "warning" | "error" | "neutral" | "info";
|
|
14
14
|
declare const pillVariants: (props?: ({
|
|
15
|
-
variant?: "
|
|
15
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "error" | "neutral" | "info" | "success" | "warning" | null | undefined;
|
|
16
16
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
17
|
interface PillProps extends React.ComponentProps<"span">, VariantProps<typeof pillVariants> {
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Q as QueueItem,
|
|
2
|
+
import { Q as QueueItem, l as SignalScoreData, o as SignalScoreUrgencyLabel } from '../signal-priority-popover-QJngMAj7.js';
|
|
3
3
|
import './feedback-primitives.js';
|
|
4
4
|
import './quick-action-sidebar-nav.js';
|
|
5
5
|
import './quick-action-modal.js';
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
type ApprovalState = "pending" | "confirming" | "creating" | "approving-feedback" | "dismissing" | "approved" | "dismissed" | "auto-approved";
|
|
4
|
+
interface OpportunityPreviewOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
interface OpportunityPreview {
|
|
9
|
+
name: string;
|
|
10
|
+
stage: string;
|
|
11
|
+
closeDate: string;
|
|
12
|
+
closeDateValue?: string;
|
|
13
|
+
amount: string;
|
|
14
|
+
/** Raw draft input value. Numeric values render as currency in the editable field. */
|
|
15
|
+
amountValue?: string | number | null;
|
|
16
|
+
accountName: string;
|
|
17
|
+
description?: string | null;
|
|
18
|
+
churnType?: string | null;
|
|
19
|
+
churnTypeOptions?: Array<string | OpportunityPreviewOption>;
|
|
20
|
+
}
|
|
21
|
+
interface OpportunityDraft {
|
|
22
|
+
closeDate: string;
|
|
23
|
+
amount: string;
|
|
24
|
+
description: string;
|
|
25
|
+
churnType: string;
|
|
26
|
+
}
|
|
4
27
|
interface SignalApprovalLabels {
|
|
5
28
|
approveButton?: string;
|
|
6
29
|
dismissButton?: string;
|
|
@@ -21,9 +44,9 @@ interface SignalApprovalContextValue {
|
|
|
21
44
|
labels: Required<SignalApprovalLabels>;
|
|
22
45
|
hideApproveButton?: boolean;
|
|
23
46
|
approveButtonIconUrl?: string;
|
|
24
|
-
opportunityPreview?:
|
|
47
|
+
opportunityPreview?: OpportunityPreview;
|
|
25
48
|
requestingApproval: boolean;
|
|
26
|
-
approve: () => void;
|
|
49
|
+
approve: (draft?: OpportunityDraft) => void;
|
|
27
50
|
submitApproveFeedback: (reasons: string[], detail: string) => void;
|
|
28
51
|
skipApproveFeedback: () => void;
|
|
29
52
|
dismiss: (reasons: string[], detail: string, subReason?: string) => void;
|
|
@@ -44,13 +67,7 @@ interface RootProps {
|
|
|
44
67
|
/** Optional icon URL for the approve button. Renders an img instead of CirclePlus when provided. */
|
|
45
68
|
approveButtonIconUrl?: string;
|
|
46
69
|
/** Optional structured preview data shown in the confirmation dialog. */
|
|
47
|
-
opportunityPreview?:
|
|
48
|
-
name: string;
|
|
49
|
-
stage: string;
|
|
50
|
-
closeDate: string;
|
|
51
|
-
amount: string;
|
|
52
|
-
accountName: string;
|
|
53
|
-
};
|
|
70
|
+
opportunityPreview?: OpportunityPreview;
|
|
54
71
|
/**
|
|
55
72
|
* Async callback fired when the user clicks the approve button, BEFORE
|
|
56
73
|
* transitioning to the "confirming" state. While the promise is pending,
|
|
@@ -67,7 +84,7 @@ interface RootProps {
|
|
|
67
84
|
* "creating" loading state while the promise is pending. On `true` it
|
|
68
85
|
* transitions to the feedback step; on `false` it reverts to "pending".
|
|
69
86
|
*/
|
|
70
|
-
onApprove?: () => void | Promise<boolean>;
|
|
87
|
+
onApprove?: (draft?: OpportunityDraft) => void | Promise<boolean>;
|
|
71
88
|
onApproveFeedback?: (reasons: string[], detail: string) => void;
|
|
72
89
|
onDismiss?: (reasons: string[], detail: string, subReason?: string) => void;
|
|
73
90
|
}
|
|
@@ -82,6 +99,5 @@ declare const SignalApproval: {
|
|
|
82
99
|
Actions: typeof Actions;
|
|
83
100
|
Gate: typeof Gate;
|
|
84
101
|
};
|
|
85
|
-
type OpportunityPreview = NonNullable<RootProps['opportunityPreview']>;
|
|
86
102
|
|
|
87
|
-
export { type ApprovalState, type OpportunityPreview, SignalApproval, Actions as SignalApprovalActions, type SignalApprovalContextValue, Gate as SignalApprovalGate, type SignalApprovalLabels, Root as SignalApprovalRoot, type RootProps as SignalApprovalRootProps, useSignalApproval };
|
|
103
|
+
export { type ApprovalState, type OpportunityDraft, type OpportunityPreview, SignalApproval, Actions as SignalApprovalActions, type SignalApprovalContextValue, Gate as SignalApprovalGate, type SignalApprovalLabels, Root as SignalApprovalRoot, type RootProps as SignalApprovalRootProps, useSignalApproval };
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
"use client";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -17,6 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
19
|
}
|
|
18
20
|
return a;
|
|
19
21
|
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
23
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
24
|
import * as React from "react";
|
|
22
25
|
import { Check, CirclePlus, ExternalLink, Loader2, Lock, ThumbsDown } from "lucide-react";
|
|
@@ -104,6 +107,7 @@ function Root({ children, companyName, opportunityUrl, scheduledTime, initialApp
|
|
|
104
107
|
const [requestingApproval, setRequestingApproval] = React.useState(false);
|
|
105
108
|
const mountedRef = React.useRef(true);
|
|
106
109
|
React.useEffect(() => {
|
|
110
|
+
mountedRef.current = true;
|
|
107
111
|
return () => {
|
|
108
112
|
mountedRef.current = false;
|
|
109
113
|
};
|
|
@@ -131,8 +135,8 @@ function Root({ children, companyName, opportunityUrl, scheduledTime, initialApp
|
|
|
131
135
|
const cancel = React.useCallback(() => {
|
|
132
136
|
setApprovalState("pending");
|
|
133
137
|
}, []);
|
|
134
|
-
const approve = React.useCallback(() => {
|
|
135
|
-
const result = onApprove == null ? void 0 : onApprove();
|
|
138
|
+
const approve = React.useCallback((draft) => {
|
|
139
|
+
const result = onApprove == null ? void 0 : onApprove(draft);
|
|
136
140
|
if (result && typeof result.then === "function") {
|
|
137
141
|
setApprovalState("creating");
|
|
138
142
|
result.then((success) => {
|
|
@@ -288,7 +292,45 @@ function SubmittedFeedback({
|
|
|
288
292
|
}
|
|
289
293
|
);
|
|
290
294
|
}
|
|
295
|
+
function optionValue(option) {
|
|
296
|
+
return typeof option === "string" ? option : option.value;
|
|
297
|
+
}
|
|
298
|
+
function optionLabel(option) {
|
|
299
|
+
return typeof option === "string" ? option : option.label;
|
|
300
|
+
}
|
|
301
|
+
function formatAmountDraftValue(value) {
|
|
302
|
+
if (value == null || value === "") return "";
|
|
303
|
+
if (typeof value === "number") {
|
|
304
|
+
return new Intl.NumberFormat("en-US", {
|
|
305
|
+
style: "currency",
|
|
306
|
+
currency: "USD",
|
|
307
|
+
maximumFractionDigits: 0
|
|
308
|
+
}).format(value);
|
|
309
|
+
}
|
|
310
|
+
return value;
|
|
311
|
+
}
|
|
312
|
+
function buildOpportunityDraft(preview) {
|
|
313
|
+
var _a, _b, _c, _d, _e;
|
|
314
|
+
return {
|
|
315
|
+
closeDate: (_b = (_a = preview == null ? void 0 : preview.closeDateValue) != null ? _a : preview == null ? void 0 : preview.closeDate) != null ? _b : "",
|
|
316
|
+
amount: (preview == null ? void 0 : preview.amountValue) === void 0 ? (_c = preview == null ? void 0 : preview.amount) != null ? _c : "" : formatAmountDraftValue(preview.amountValue),
|
|
317
|
+
description: (_d = preview == null ? void 0 : preview.description) != null ? _d : "",
|
|
318
|
+
churnType: (_e = preview == null ? void 0 : preview.churnType) != null ? _e : ""
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function hasEditableOpportunityPreview(preview) {
|
|
322
|
+
var _a;
|
|
323
|
+
return !!preview && isValidDateInput((_a = preview.closeDateValue) != null ? _a : preview.closeDate);
|
|
324
|
+
}
|
|
325
|
+
function isValidDateInput(value) {
|
|
326
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
|
|
327
|
+
if (!match) return false;
|
|
328
|
+
const parsed = /* @__PURE__ */ new Date(`${value}T00:00:00Z`);
|
|
329
|
+
if (Number.isNaN(parsed.getTime())) return false;
|
|
330
|
+
return parsed.toISOString().slice(0, 10) === value;
|
|
331
|
+
}
|
|
291
332
|
function Actions() {
|
|
333
|
+
var _a;
|
|
292
334
|
const { approvalState, companyName, opportunityUrl, scheduledTime, labels, hideApproveButton, approveButtonIconUrl, opportunityPreview, requestingApproval, approve, submitApproveFeedback, skipApproveFeedback, dismiss, requestApproval, requestDismiss, cancel } = useSignalApproval();
|
|
293
335
|
const [selectedTopReason, setSelectedTopReason] = React.useState(null);
|
|
294
336
|
const [selectedSubReason, setSelectedSubReason] = React.useState(null);
|
|
@@ -296,6 +338,14 @@ function Actions() {
|
|
|
296
338
|
const [detailText, setDetailText] = React.useState("");
|
|
297
339
|
const [submittedFeedback, setSubmittedFeedback] = React.useState(null);
|
|
298
340
|
const [isEditing, setIsEditing] = React.useState(false);
|
|
341
|
+
const [opportunityDraft, setOpportunityDraft] = React.useState(() => buildOpportunityDraft(opportunityPreview));
|
|
342
|
+
React.useEffect(() => {
|
|
343
|
+
if (approvalState === "confirming") {
|
|
344
|
+
setOpportunityDraft(buildOpportunityDraft(opportunityPreview));
|
|
345
|
+
}
|
|
346
|
+
}, [approvalState, opportunityPreview]);
|
|
347
|
+
const churnTypeOptions = (_a = opportunityPreview == null ? void 0 : opportunityPreview.churnTypeOptions) != null ? _a : [];
|
|
348
|
+
const hasChurnTypeOptions = churnTypeOptions.length > 0;
|
|
299
349
|
const topNode = dismissReasonTree.find((n) => n.label === selectedTopReason);
|
|
300
350
|
const hasSubOptions = !!((topNode == null ? void 0 : topNode.subOptions) && topNode.subOptions.length > 0);
|
|
301
351
|
const isTopOther = selectedTopReason === "Other" && !hasSubOptions;
|
|
@@ -303,6 +353,8 @@ function Actions() {
|
|
|
303
353
|
const needsText = isTopOther || isSubOther;
|
|
304
354
|
const canSubmitDismiss = selectedTopReason !== null && (!hasSubOptions || selectedSubReason !== null) && (!needsText || detailText.trim().length > 0);
|
|
305
355
|
const canSubmitApprove = selectedReasons.length > 0 || detailText.trim().length > 0;
|
|
356
|
+
const isEditableOpportunityPreview = hasEditableOpportunityPreview(opportunityPreview);
|
|
357
|
+
const canConfirmOpportunity = !isEditableOpportunityPreview || isValidDateInput(opportunityDraft.closeDate);
|
|
306
358
|
const selectTopReason = (label) => {
|
|
307
359
|
if (selectedTopReason === label) {
|
|
308
360
|
setSelectedTopReason(null);
|
|
@@ -323,9 +375,9 @@ function Actions() {
|
|
|
323
375
|
);
|
|
324
376
|
};
|
|
325
377
|
const startEditing = () => {
|
|
326
|
-
var
|
|
378
|
+
var _a2, _b;
|
|
327
379
|
if (submittedFeedback) {
|
|
328
|
-
setSelectedTopReason((
|
|
380
|
+
setSelectedTopReason((_a2 = submittedFeedback.reasons[0]) != null ? _a2 : null);
|
|
329
381
|
setSelectedSubReason((_b = submittedFeedback.subReason) != null ? _b : null);
|
|
330
382
|
setSelectedReasons([...submittedFeedback.reasons]);
|
|
331
383
|
setDetailText(submittedFeedback.detail);
|
|
@@ -595,24 +647,108 @@ function Actions() {
|
|
|
595
647
|
/* @__PURE__ */ jsx("strong", { children: companyName }),
|
|
596
648
|
". Confirm?"
|
|
597
649
|
] }),
|
|
598
|
-
opportunityPreview && /* @__PURE__ */ jsx("div", { className: "mt-3 space-y-
|
|
650
|
+
opportunityPreview && !isEditableOpportunityPreview && /* @__PURE__ */ jsx("div", { className: "mt-3 space-y-2 border-t border-border/50 pt-3", children: [
|
|
599
651
|
{ label: "Opportunity", value: opportunityPreview.name },
|
|
600
652
|
{ label: "Account", value: opportunityPreview.accountName },
|
|
601
653
|
{ label: "Stage", value: opportunityPreview.stage },
|
|
602
654
|
{ label: "Close Date", value: opportunityPreview.closeDate },
|
|
603
655
|
{ label: "Amount", value: opportunityPreview.amount }
|
|
604
|
-
].map(({ label, value }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
|
|
656
|
+
].map(({ label, value }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 text-xs", children: [
|
|
605
657
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
606
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: value })
|
|
607
|
-
] }, label)) })
|
|
658
|
+
/* @__PURE__ */ jsx("span", { className: "text-right font-medium text-foreground", children: value })
|
|
659
|
+
] }, label)) }),
|
|
660
|
+
opportunityPreview && isEditableOpportunityPreview && /* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-3 border-t border-border/50 pt-3", children: [
|
|
661
|
+
[
|
|
662
|
+
{ label: "Opportunity", value: opportunityPreview.name },
|
|
663
|
+
{ label: "Account", value: opportunityPreview.accountName },
|
|
664
|
+
{ label: "Stage", value: opportunityPreview.stage }
|
|
665
|
+
].map(({ label, value }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 text-xs", children: [
|
|
666
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
667
|
+
/* @__PURE__ */ jsx("span", { className: "text-right font-medium text-foreground", children: value })
|
|
668
|
+
] }, label)),
|
|
669
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-2 sm:grid-cols-2", children: [
|
|
670
|
+
/* @__PURE__ */ jsxs("label", { className: "space-y-1 text-xs", children: [
|
|
671
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Close Date" }),
|
|
672
|
+
/* @__PURE__ */ jsx(
|
|
673
|
+
"input",
|
|
674
|
+
{
|
|
675
|
+
type: "date",
|
|
676
|
+
value: opportunityDraft.closeDate,
|
|
677
|
+
onChange: (event) => setOpportunityDraft((draft) => __spreadProps(__spreadValues({}, draft), { closeDate: event.target.value })),
|
|
678
|
+
"aria-invalid": !canConfirmOpportunity,
|
|
679
|
+
className: "h-8 w-full rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"
|
|
680
|
+
}
|
|
681
|
+
),
|
|
682
|
+
!canConfirmOpportunity && /* @__PURE__ */ jsx("span", { className: "text-[11px] text-red-600", children: "Enter a valid close date." })
|
|
683
|
+
] }),
|
|
684
|
+
/* @__PURE__ */ jsxs("label", { className: "space-y-1 text-xs", children: [
|
|
685
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Amount" }),
|
|
686
|
+
/* @__PURE__ */ jsx(
|
|
687
|
+
"input",
|
|
688
|
+
{
|
|
689
|
+
type: "text",
|
|
690
|
+
inputMode: "decimal",
|
|
691
|
+
value: opportunityDraft.amount,
|
|
692
|
+
onChange: (event) => setOpportunityDraft((draft) => __spreadProps(__spreadValues({}, draft), { amount: event.target.value })),
|
|
693
|
+
placeholder: opportunityPreview.amount,
|
|
694
|
+
className: "h-8 w-full rounded-md border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-1 focus:ring-ring"
|
|
695
|
+
}
|
|
696
|
+
)
|
|
697
|
+
] })
|
|
698
|
+
] }),
|
|
699
|
+
/* @__PURE__ */ jsxs("label", { className: "space-y-1 text-xs", children: [
|
|
700
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Churn Type" }),
|
|
701
|
+
hasChurnTypeOptions ? /* @__PURE__ */ jsxs(
|
|
702
|
+
"select",
|
|
703
|
+
{
|
|
704
|
+
value: opportunityDraft.churnType,
|
|
705
|
+
onChange: (event) => setOpportunityDraft((draft) => __spreadProps(__spreadValues({}, draft), { churnType: event.target.value })),
|
|
706
|
+
className: "h-8 w-full rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring",
|
|
707
|
+
children: [
|
|
708
|
+
/* @__PURE__ */ jsx("option", { value: "", children: "No churn type" }),
|
|
709
|
+
churnTypeOptions.map((option) => /* @__PURE__ */ jsx("option", { value: optionValue(option), children: optionLabel(option) }, optionValue(option)))
|
|
710
|
+
]
|
|
711
|
+
}
|
|
712
|
+
) : /* @__PURE__ */ jsx(
|
|
713
|
+
"input",
|
|
714
|
+
{
|
|
715
|
+
type: "text",
|
|
716
|
+
value: opportunityDraft.churnType,
|
|
717
|
+
onChange: (event) => setOpportunityDraft((draft) => __spreadProps(__spreadValues({}, draft), { churnType: event.target.value })),
|
|
718
|
+
placeholder: "No churn type",
|
|
719
|
+
className: "h-8 w-full rounded-md border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-1 focus:ring-ring"
|
|
720
|
+
}
|
|
721
|
+
)
|
|
722
|
+
] }),
|
|
723
|
+
/* @__PURE__ */ jsxs("label", { className: "space-y-1 text-xs", children: [
|
|
724
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Description" }),
|
|
725
|
+
/* @__PURE__ */ jsx(
|
|
726
|
+
"textarea",
|
|
727
|
+
{
|
|
728
|
+
value: opportunityDraft.description,
|
|
729
|
+
onChange: (event) => setOpportunityDraft((draft) => __spreadProps(__spreadValues({}, draft), { description: event.target.value })),
|
|
730
|
+
rows: 3,
|
|
731
|
+
placeholder: "Add a short description",
|
|
732
|
+
className: "w-full resize-none rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-1 focus:ring-ring"
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
] })
|
|
736
|
+
] })
|
|
608
737
|
] }),
|
|
609
738
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
610
739
|
/* @__PURE__ */ jsxs(
|
|
611
740
|
"button",
|
|
612
741
|
{
|
|
613
742
|
type: "button",
|
|
614
|
-
onClick:
|
|
615
|
-
|
|
743
|
+
onClick: () => {
|
|
744
|
+
if (!opportunityPreview) {
|
|
745
|
+
approve();
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
approve(isEditableOpportunityPreview ? opportunityDraft : void 0);
|
|
749
|
+
},
|
|
750
|
+
disabled: !canConfirmOpportunity,
|
|
751
|
+
className: "inline-flex h-7 items-center gap-1.5 rounded-md bg-foreground px-3 text-xs font-semibold text-background transition-colors hover:bg-foreground/90 disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground",
|
|
616
752
|
children: [
|
|
617
753
|
/* @__PURE__ */ jsx(Check, { className: "h-3 w-3" }),
|
|
618
754
|
"Confirm"
|