@handled-ai/design-system 0.8.0 → 0.9.0

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.
Files changed (336) hide show
  1. package/README.md +14 -4
  2. package/dist/charts/bar-chart-component.d.ts +24 -0
  3. package/dist/charts/bar-chart-component.js +123 -0
  4. package/dist/charts/bar-chart-component.js.map +1 -0
  5. package/dist/charts/chart-tooltip.d.ts +26 -0
  6. package/dist/charts/chart-tooltip.js +69 -0
  7. package/dist/charts/chart-tooltip.js.map +1 -0
  8. package/dist/charts/chart.d.ts +64 -0
  9. package/dist/charts/chart.js +285 -0
  10. package/dist/charts/chart.js.map +1 -0
  11. package/dist/charts/donut-chart.d.ts +21 -0
  12. package/dist/charts/donut-chart.js +96 -0
  13. package/dist/charts/donut-chart.js.map +1 -0
  14. package/dist/charts/index.d.ts +11 -0
  15. package/dist/charts/index.js +10 -0
  16. package/dist/charts/index.js.map +1 -0
  17. package/dist/charts/pipeline-overview.d.ts +76 -0
  18. package/dist/charts/pipeline-overview.js +372 -0
  19. package/dist/charts/pipeline-overview.js.map +1 -0
  20. package/dist/charts/sankey-chart.d.ts +52 -0
  21. package/dist/charts/sankey-chart.js +219 -0
  22. package/dist/charts/sankey-chart.js.map +1 -0
  23. package/dist/charts/top-line-metrics.d.ts +26 -0
  24. package/dist/charts/top-line-metrics.js +224 -0
  25. package/dist/charts/top-line-metrics.js.map +1 -0
  26. package/dist/charts/trend-area-chart.d.ts +21 -0
  27. package/dist/charts/trend-area-chart.js +150 -0
  28. package/dist/charts/trend-area-chart.js.map +1 -0
  29. package/dist/charts/volume-analysis-chart.d.ts +19 -0
  30. package/dist/charts/volume-analysis-chart.js +121 -0
  31. package/dist/charts/volume-analysis-chart.js.map +1 -0
  32. package/dist/components/activity-detail.d.ts +38 -0
  33. package/dist/components/activity-detail.js +163 -0
  34. package/dist/components/activity-detail.js.map +1 -0
  35. package/dist/components/activity-log.d.ts +21 -0
  36. package/dist/components/activity-log.js +61 -0
  37. package/dist/components/activity-log.js.map +1 -0
  38. package/dist/components/agent-popover.d.ts +71 -0
  39. package/dist/components/agent-popover.js +282 -0
  40. package/dist/components/agent-popover.js.map +1 -0
  41. package/dist/components/agent-widget.d.ts +24 -0
  42. package/dist/components/agent-widget.js +117 -0
  43. package/dist/components/agent-widget.js.map +1 -0
  44. package/dist/components/avatar.d.ts +13 -0
  45. package/dist/components/avatar.js +140 -0
  46. package/dist/components/avatar.js.map +1 -0
  47. package/dist/components/badge.d.ts +12 -0
  48. package/dist/components/badge.js +75 -0
  49. package/dist/components/badge.js.map +1 -0
  50. package/dist/components/button.d.ts +13 -0
  51. package/dist/components/button.js +83 -0
  52. package/dist/components/button.js.map +1 -0
  53. package/dist/components/card.d.ts +11 -0
  54. package/dist/components/card.js +119 -0
  55. package/dist/components/card.js.map +1 -0
  56. package/dist/components/contact-list.d.ts +34 -0
  57. package/dist/components/contact-list.js +84 -0
  58. package/dist/components/contact-list.js.map +1 -0
  59. package/dist/components/dashboard-cards.d.ts +10 -0
  60. package/dist/components/dashboard-cards.js +164 -0
  61. package/dist/components/dashboard-cards.js.map +1 -0
  62. package/dist/components/data-table-display.d.ts +19 -0
  63. package/dist/components/data-table-display.js +109 -0
  64. package/dist/components/data-table-display.js.map +1 -0
  65. package/dist/components/data-table-filter.d.ts +18 -0
  66. package/dist/components/data-table-filter.js +107 -0
  67. package/dist/components/data-table-filter.js.map +1 -0
  68. package/dist/components/data-table-quick-views.d.ts +13 -0
  69. package/dist/components/data-table-quick-views.js +90 -0
  70. package/dist/components/data-table-quick-views.js.map +1 -0
  71. package/dist/components/data-table-toolbar.d.ts +18 -0
  72. package/dist/components/data-table-toolbar.js +45 -0
  73. package/dist/components/data-table-toolbar.js.map +1 -0
  74. package/dist/components/data-table.d.ts +39 -0
  75. package/dist/components/data-table.js +821 -0
  76. package/dist/components/data-table.js.map +1 -0
  77. package/dist/components/detail-view.d.ts +44 -0
  78. package/dist/components/detail-view.js +165 -0
  79. package/dist/components/detail-view.js.map +1 -0
  80. package/dist/components/dialog.d.ts +19 -0
  81. package/dist/components/dialog.js +188 -0
  82. package/dist/components/dialog.js.map +1 -0
  83. package/dist/components/dropdown-menu.d.ts +27 -0
  84. package/dist/components/dropdown-menu.js +279 -0
  85. package/dist/components/dropdown-menu.js.map +1 -0
  86. package/dist/components/entity-panel.d.ts +69 -0
  87. package/dist/components/entity-panel.js +584 -0
  88. package/dist/components/entity-panel.js.map +1 -0
  89. package/dist/components/inbox-row.d.ts +27 -0
  90. package/dist/components/inbox-row.js +139 -0
  91. package/dist/components/inbox-row.js.map +1 -0
  92. package/dist/components/inbox-toolbar.d.ts +21 -0
  93. package/dist/components/inbox-toolbar.js +203 -0
  94. package/dist/components/inbox-toolbar.js.map +1 -0
  95. package/dist/components/input.d.ts +5 -0
  96. package/dist/components/input.js +50 -0
  97. package/dist/components/input.js.map +1 -0
  98. package/dist/components/insights-filter-bar.d.ts +21 -0
  99. package/dist/components/insights-filter-bar.js +99 -0
  100. package/dist/components/insights-filter-bar.js.map +1 -0
  101. package/dist/components/item-list-display.d.ts +22 -0
  102. package/dist/components/item-list-display.js +240 -0
  103. package/dist/components/item-list-display.js.map +1 -0
  104. package/dist/components/item-list-filter.d.ts +16 -0
  105. package/dist/components/item-list-filter.js +87 -0
  106. package/dist/components/item-list-filter.js.map +1 -0
  107. package/dist/components/item-list-toolbar.d.ts +25 -0
  108. package/dist/components/item-list-toolbar.js +79 -0
  109. package/dist/components/item-list-toolbar.js.map +1 -0
  110. package/dist/components/item-list.d.ts +20 -0
  111. package/dist/components/item-list.js +702 -0
  112. package/dist/components/item-list.js.map +1 -0
  113. package/dist/components/label.d.ts +6 -0
  114. package/dist/components/label.js +55 -0
  115. package/dist/components/label.js.map +1 -0
  116. package/dist/components/message.d.ts +23 -0
  117. package/dist/components/message.js +117 -0
  118. package/dist/components/message.js.map +1 -0
  119. package/dist/components/metric-card.d.ts +25 -0
  120. package/dist/components/metric-card.js +107 -0
  121. package/dist/components/metric-card.js.map +1 -0
  122. package/dist/components/performance-metrics-table.d.ts +38 -0
  123. package/dist/components/performance-metrics-table.js +342 -0
  124. package/dist/components/performance-metrics-table.js.map +1 -0
  125. package/dist/components/preview-list.d.ts +14 -0
  126. package/dist/components/preview-list.js +83 -0
  127. package/dist/components/preview-list.js.map +1 -0
  128. package/dist/components/progress.d.ts +6 -0
  129. package/dist/components/progress.js +69 -0
  130. package/dist/components/progress.js.map +1 -0
  131. package/dist/components/quick-action-chat-area.d.ts +24 -0
  132. package/dist/components/quick-action-chat-area.js +178 -0
  133. package/dist/components/quick-action-chat-area.js.map +1 -0
  134. package/dist/components/quick-action-modal.d.ts +30 -0
  135. package/dist/components/quick-action-modal.js +288 -0
  136. package/dist/components/quick-action-modal.js.map +1 -0
  137. package/dist/components/quick-action-sidebar-nav.d.ts +51 -0
  138. package/dist/components/quick-action-sidebar-nav.js +528 -0
  139. package/dist/components/quick-action-sidebar-nav.js.map +1 -0
  140. package/dist/components/recommended-actions-section.d.ts +23 -0
  141. package/dist/components/recommended-actions-section.js +215 -0
  142. package/dist/components/recommended-actions-section.js.map +1 -0
  143. package/dist/components/report-card.d.ts +26 -0
  144. package/dist/components/report-card.js +69 -0
  145. package/dist/components/report-card.js.map +1 -0
  146. package/dist/components/score-analysis-modal.d.ts +26 -0
  147. package/dist/components/score-analysis-modal.js +141 -0
  148. package/dist/components/score-analysis-modal.js.map +1 -0
  149. package/dist/components/score-breakdown.d.ts +17 -0
  150. package/dist/components/score-breakdown.js +162 -0
  151. package/dist/components/score-breakdown.js.map +1 -0
  152. package/dist/components/score-feedback.d.ts +40 -0
  153. package/dist/components/score-feedback.js +209 -0
  154. package/dist/components/score-feedback.js.map +1 -0
  155. package/dist/components/score-ring.d.ts +14 -0
  156. package/dist/components/score-ring.js +79 -0
  157. package/dist/components/score-ring.js.map +1 -0
  158. package/dist/components/scroll-area.d.ts +7 -0
  159. package/dist/components/scroll-area.js +101 -0
  160. package/dist/components/scroll-area.js.map +1 -0
  161. package/dist/components/select.d.ts +17 -0
  162. package/dist/components/select.js +228 -0
  163. package/dist/components/select.js.map +1 -0
  164. package/dist/components/separator.d.ts +6 -0
  165. package/dist/components/separator.js +61 -0
  166. package/dist/components/separator.js.map +1 -0
  167. package/dist/components/sheet.d.ts +16 -0
  168. package/dist/components/sheet.js +168 -0
  169. package/dist/components/sheet.js.map +1 -0
  170. package/dist/components/sidebar.d.ts +73 -0
  171. package/dist/components/sidebar.js +723 -0
  172. package/dist/components/sidebar.js.map +1 -0
  173. package/dist/components/signal-feedback-inline.d.ts +51 -0
  174. package/dist/components/signal-feedback-inline.js +548 -0
  175. package/dist/components/signal-feedback-inline.js.map +1 -0
  176. package/dist/components/simple-data-table.d.ts +15 -0
  177. package/dist/components/simple-data-table.js +91 -0
  178. package/dist/components/simple-data-table.js.map +1 -0
  179. package/dist/components/skeleton.d.ts +5 -0
  180. package/dist/components/skeleton.js +44 -0
  181. package/dist/components/skeleton.js.map +1 -0
  182. package/dist/components/status-badge.d.ts +10 -0
  183. package/dist/components/status-badge.js +82 -0
  184. package/dist/components/status-badge.js.map +1 -0
  185. package/dist/components/styled-bar-list.d.ts +20 -0
  186. package/dist/components/styled-bar-list.js +59 -0
  187. package/dist/components/styled-bar-list.js.map +1 -0
  188. package/dist/components/suggested-actions.d.ts +110 -0
  189. package/dist/components/suggested-actions.js +1538 -0
  190. package/dist/components/suggested-actions.js.map +1 -0
  191. package/dist/components/table.d.ts +12 -0
  192. package/dist/components/table.js +147 -0
  193. package/dist/components/table.js.map +1 -0
  194. package/dist/components/tabs.d.ts +14 -0
  195. package/dist/components/tabs.js +129 -0
  196. package/dist/components/tabs.js.map +1 -0
  197. package/dist/components/textarea.d.ts +5 -0
  198. package/dist/components/textarea.js +47 -0
  199. package/dist/components/textarea.js.map +1 -0
  200. package/dist/components/timeline-activity.d.ts +34 -0
  201. package/dist/components/timeline-activity.js +181 -0
  202. package/dist/components/timeline-activity.js.map +1 -0
  203. package/dist/components/tooltip.d.ts +9 -0
  204. package/dist/components/tooltip.js +93 -0
  205. package/dist/components/tooltip.js.map +1 -0
  206. package/dist/components/view-mode-toggle.d.ts +16 -0
  207. package/dist/components/view-mode-toggle.js +24 -0
  208. package/dist/components/view-mode-toggle.js.map +1 -0
  209. package/dist/hooks/use-mobile.d.ts +3 -0
  210. package/dist/hooks/use-mobile.js +21 -0
  211. package/dist/hooks/use-mobile.js.map +1 -0
  212. package/dist/index.d.ts +68 -1878
  213. package/dist/index.js +69 -10918
  214. package/dist/index.js.map +1 -1
  215. package/dist/lib/icons.d.ts +18 -0
  216. package/dist/lib/icons.js +21 -0
  217. package/dist/lib/icons.js.map +1 -0
  218. package/dist/lib/utils.d.ts +5 -0
  219. package/dist/lib/utils.js +9 -0
  220. package/dist/lib/utils.js.map +1 -0
  221. package/dist/prototype/index.d.ts +20 -0
  222. package/dist/prototype/index.js +8 -0
  223. package/dist/prototype/index.js.map +1 -0
  224. package/dist/prototype/prototype-accounts-view.d.ts +22 -0
  225. package/dist/prototype/prototype-accounts-view.js +70 -0
  226. package/dist/prototype/prototype-accounts-view.js.map +1 -0
  227. package/dist/prototype/prototype-admin-view.d.ts +21 -0
  228. package/dist/prototype/prototype-admin-view.js +53 -0
  229. package/dist/prototype/prototype-admin-view.js.map +1 -0
  230. package/dist/prototype/prototype-config.d.ts +226 -0
  231. package/dist/prototype/prototype-config.js +1 -0
  232. package/dist/prototype/prototype-config.js.map +1 -0
  233. package/dist/prototype/prototype-inbox-view.d.ts +48 -0
  234. package/dist/prototype/prototype-inbox-view.js +701 -0
  235. package/dist/prototype/prototype-inbox-view.js.map +1 -0
  236. package/dist/prototype/prototype-insights-view.d.ts +23 -0
  237. package/dist/prototype/prototype-insights-view.js +335 -0
  238. package/dist/prototype/prototype-insights-view.js.map +1 -0
  239. package/dist/prototype/prototype-shell.d.ts +40 -0
  240. package/dist/prototype/prototype-shell.js +190 -0
  241. package/dist/prototype/prototype-shell.js.map +1 -0
  242. package/dist/prototype/prototype-work-queue-view.d.ts +8 -0
  243. package/dist/prototype/prototype-work-queue-view.js +17 -0
  244. package/dist/prototype/prototype-work-queue-view.js.map +1 -0
  245. package/dist/three/agent-orb.d.ts +39 -0
  246. package/dist/three/agent-orb.js +500 -0
  247. package/dist/three/agent-orb.js.map +1 -0
  248. package/dist/three/index.d.ts +2 -0
  249. package/dist/three/index.js +2 -0
  250. package/dist/three/index.js.map +1 -0
  251. package/package.json +98 -17
  252. package/src/charts/bar-chart-component.tsx +150 -0
  253. package/src/charts/chart-tooltip.tsx +86 -0
  254. package/src/charts/chart.tsx +371 -0
  255. package/src/charts/donut-chart.tsx +112 -0
  256. package/src/charts/index.ts +13 -0
  257. package/src/charts/pipeline-overview.tsx +476 -0
  258. package/src/charts/sankey-chart.tsx +290 -0
  259. package/src/charts/top-line-metrics.tsx +261 -0
  260. package/src/charts/trend-area-chart.tsx +150 -0
  261. package/src/charts/volume-analysis-chart.tsx +124 -0
  262. package/src/components/activity-detail.tsx +233 -0
  263. package/src/components/activity-log.tsx +89 -0
  264. package/src/components/agent-popover.tsx +373 -0
  265. package/src/components/agent-widget.tsx +163 -0
  266. package/src/components/avatar.tsx +109 -0
  267. package/src/components/badge.tsx +48 -0
  268. package/src/components/button.tsx +59 -0
  269. package/src/components/card.tsx +92 -0
  270. package/src/components/contact-list.tsx +121 -0
  271. package/src/components/dashboard-cards.tsx +170 -0
  272. package/src/components/data-table-display.tsx +139 -0
  273. package/src/components/data-table-filter.tsx +138 -0
  274. package/src/components/data-table-quick-views.tsx +103 -0
  275. package/src/components/data-table-toolbar.tsx +56 -0
  276. package/src/components/data-table.tsx +915 -0
  277. package/src/components/detail-view.tsx +237 -0
  278. package/src/components/dialog.tsx +158 -0
  279. package/src/components/dropdown-menu.tsx +257 -0
  280. package/src/components/entity-panel.tsx +767 -0
  281. package/src/components/inbox-row.tsx +132 -0
  282. package/src/components/inbox-toolbar.tsx +213 -0
  283. package/src/components/input.tsx +21 -0
  284. package/src/components/insights-filter-bar.tsx +132 -0
  285. package/src/components/item-list-display.tsx +278 -0
  286. package/src/components/item-list-filter.tsx +118 -0
  287. package/src/components/item-list-toolbar.tsx +97 -0
  288. package/src/components/item-list.tsx +843 -0
  289. package/src/components/label.tsx +24 -0
  290. package/src/components/message.tsx +83 -0
  291. package/src/components/metric-card.tsx +178 -0
  292. package/src/components/performance-metrics-table.tsx +442 -0
  293. package/src/components/preview-list.tsx +62 -0
  294. package/src/components/progress.tsx +31 -0
  295. package/src/components/quick-action-chat-area.tsx +156 -0
  296. package/src/components/quick-action-modal.tsx +331 -0
  297. package/src/components/quick-action-sidebar-nav.tsx +592 -0
  298. package/src/components/recommended-actions-section.tsx +258 -0
  299. package/src/components/report-card.tsx +106 -0
  300. package/src/components/score-analysis-modal.tsx +172 -0
  301. package/src/components/score-breakdown.tsx +179 -0
  302. package/src/components/score-feedback.tsx +288 -0
  303. package/src/components/score-ring.tsx +87 -0
  304. package/src/components/scroll-area.tsx +58 -0
  305. package/src/components/select.tsx +190 -0
  306. package/src/components/separator.tsx +28 -0
  307. package/src/components/sheet.tsx +143 -0
  308. package/src/components/sidebar.tsx +726 -0
  309. package/src/components/signal-feedback-inline.tsx +591 -0
  310. package/src/components/simple-data-table.tsx +124 -0
  311. package/src/components/skeleton.tsx +15 -0
  312. package/src/components/status-badge.tsx +63 -0
  313. package/src/components/styled-bar-list.tsx +70 -0
  314. package/src/components/suggested-actions.tsx +1985 -0
  315. package/src/components/table.tsx +116 -0
  316. package/src/components/tabs.tsx +91 -0
  317. package/src/components/textarea.tsx +18 -0
  318. package/src/components/timeline-activity.tsx +234 -0
  319. package/src/components/tooltip.tsx +57 -0
  320. package/src/components/view-mode-toggle.tsx +39 -0
  321. package/src/hooks/use-mobile.ts +21 -0
  322. package/src/index.ts +77 -0
  323. package/src/lib/icons.ts +18 -0
  324. package/src/lib/utils.ts +6 -0
  325. package/src/prototype/index.ts +11 -0
  326. package/src/prototype/prototype-accounts-view.tsx +112 -0
  327. package/src/prototype/prototype-admin-view.tsx +67 -0
  328. package/src/prototype/prototype-config.ts +243 -0
  329. package/src/prototype/prototype-inbox-view.tsx +810 -0
  330. package/src/prototype/prototype-insights-view.tsx +379 -0
  331. package/src/prototype/prototype-shell.tsx +219 -0
  332. package/src/prototype/prototype-work-queue-view.tsx +30 -0
  333. package/src/styles/globals.css +299 -0
  334. package/src/three/agent-orb.tsx +557 -0
  335. package/src/three/index.ts +5 -0
  336. package/src/types/r3f.d.ts +8 -0
@@ -0,0 +1,701 @@
1
+ "use client"
2
+
3
+ "use client";
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
24
+ import * as React from "react";
25
+ import {
26
+ ArrowLeft,
27
+ ChevronDown,
28
+ ChevronRight,
29
+ Filter,
30
+ FileText,
31
+ Clock,
32
+ CheckSquare,
33
+ Eye,
34
+ Plus,
35
+ Building,
36
+ LayoutList,
37
+ Columns2,
38
+ Square,
39
+ Tag
40
+ } from "lucide-react";
41
+ import { Button } from "../components/button.js";
42
+ import { Badge } from "../components/badge.js";
43
+ import { Input } from "../components/input.js";
44
+ import { ViewModeToggle } from "../components/view-mode-toggle.js";
45
+ import {
46
+ InboxToolbar
47
+ } from "../components/inbox-toolbar.js";
48
+ import { GroupedListView } from "../components/item-list.js";
49
+ import { SignalApproval } from "../components/signal-feedback-inline.js";
50
+ import { ScoreBreakdown } from "../components/score-breakdown.js";
51
+ import { Citation } from "../components/detail-view.js";
52
+ import {
53
+ SuggestedActions
54
+ } from "../components/suggested-actions.js";
55
+ import { TimelineActivity } from "../components/timeline-activity.js";
56
+ const DEFAULT_DETAIL_SECTIONS = {
57
+ signalBrief: true,
58
+ suggestedActions: true,
59
+ timeline: true
60
+ };
61
+ const DEFAULT_SIGNAL_SCORE = {
62
+ score: 65,
63
+ factors: [
64
+ { key: "trigger", label: "Trigger strength", score: 70, why: "Moderate signal detected based on account activity" },
65
+ { key: "fit", label: "Company fit", score: 65, why: "Reasonable fit based on company profile" },
66
+ { key: "timing", label: "Timing", score: 58, why: "Within general evaluation window" }
67
+ ],
68
+ whyNow: "Moderate signals detected that warrant review and potential outreach.",
69
+ evidence: [
70
+ "Activity patterns suggest potential opportunity",
71
+ "Company profile aligns with target segment"
72
+ ],
73
+ confidence: 72
74
+ };
75
+ function DetailView({
76
+ item,
77
+ sections,
78
+ getSignalScore,
79
+ buildSuggestedActions,
80
+ buildSourceItems,
81
+ getTimelineEvents,
82
+ accountContacts,
83
+ emailSignature,
84
+ iconMap,
85
+ onOpenEntityPanel,
86
+ onOpenRecentActivity,
87
+ onSuggestedActionFeedback: _onSuggestedActionFeedback,
88
+ signalLabels
89
+ }) {
90
+ const [evidenceExpanded, setEvidenceExpanded] = React.useState(false);
91
+ const [showTimeline, setShowTimeline] = React.useState(false);
92
+ const [extraActions, setExtraActions] = React.useState([]);
93
+ React.useEffect(() => {
94
+ setShowTimeline(false);
95
+ setEvidenceExpanded(false);
96
+ setExtraActions([]);
97
+ }, [item.id]);
98
+ const signalData = React.useMemo(
99
+ () => getSignalScore(item.company),
100
+ [getSignalScore, item.company]
101
+ );
102
+ const suggestedActions = React.useMemo(
103
+ () => [...buildSuggestedActions(item), ...extraActions],
104
+ [buildSuggestedActions, item, extraActions]
105
+ );
106
+ const sourceItems = React.useMemo(() => buildSourceItems(item), [buildSourceItems, item]);
107
+ const timelineEvents = React.useMemo(
108
+ () => {
109
+ var _a;
110
+ return (_a = getTimelineEvents == null ? void 0 : getTimelineEvents(item)) != null ? _a : [];
111
+ },
112
+ [getTimelineEvents, item]
113
+ );
114
+ const handleDuplicate = React.useCallback(
115
+ (id) => {
116
+ const base = suggestedActions.find((a) => a.id === id);
117
+ if (!base || base.type !== "email") return;
118
+ const clone = __spreadProps(__spreadValues({}, base), {
119
+ id: `${base.id}-dup-${Date.now()}`,
120
+ emailMeta: base.emailMeta ? __spreadProps(__spreadValues({}, base.emailMeta), { to: void 0 }) : void 0
121
+ });
122
+ setExtraActions((prev) => [...prev, clone]);
123
+ },
124
+ [suggestedActions]
125
+ );
126
+ return /* @__PURE__ */ jsx(
127
+ SignalApproval.Root,
128
+ {
129
+ companyName: item.company,
130
+ opportunityUrl: `https://acme.lightning.force.com/lightning/r/Opportunity/006${item.id}/view`,
131
+ labels: signalLabels,
132
+ onApprove: () => {
133
+ console.log("Approved signal:", { taskId: item.id, company: item.company });
134
+ },
135
+ onApproveFeedback: (reasons, detail) => {
136
+ var _a;
137
+ (_a = signalData.onApproveFeedback) == null ? void 0 : _a.call(signalData, reasons, detail);
138
+ console.log("Approval feedback:", { taskId: item.id, company: item.company, reasons, detail });
139
+ },
140
+ onDismiss: (reasons, detail) => {
141
+ var _a;
142
+ (_a = signalData.onDismissFeedback) == null ? void 0 : _a.call(signalData, reasons, detail);
143
+ console.log("Dismissed signal:", { taskId: item.id, reasons, detail });
144
+ },
145
+ children: /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-3xl p-6 pb-12 md:p-8", children: [
146
+ /* @__PURE__ */ jsxs("div", { className: "pb-8", children: [
147
+ /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center gap-2", children: [
148
+ /* @__PURE__ */ jsxs(
149
+ "button",
150
+ {
151
+ type: "button",
152
+ className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",
153
+ children: [
154
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "h-3.5 w-3.5" }),
155
+ "Back"
156
+ ]
157
+ }
158
+ ),
159
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
160
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: item.company })
161
+ ] }),
162
+ /* @__PURE__ */ jsx("h1", { className: "mb-3 text-2xl font-bold tracking-tight text-foreground", children: item.title }),
163
+ /* @__PURE__ */ jsxs("div", { className: "mb-6 flex flex-wrap items-center gap-2", children: [
164
+ item.statusColor === "red" && /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-1 rounded-md bg-red-50 px-2.5 py-1 text-xs font-semibold text-red-700", children: [
165
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold", children: "!" }),
166
+ " Urgent"
167
+ ] }),
168
+ /* @__PURE__ */ jsx("div", { className: "inline-flex items-center gap-1 rounded-md bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground", children: item.tag1 }),
169
+ /* @__PURE__ */ jsxs(
170
+ "button",
171
+ {
172
+ type: "button",
173
+ onClick: onOpenEntityPanel,
174
+ className: "ml-1 inline-flex items-center gap-1.5 rounded-md border border-border/60 bg-muted/30 px-2 py-1 transition-colors hover:bg-muted/50",
175
+ children: [
176
+ /* @__PURE__ */ jsx("div", { className: "flex h-4 w-4 items-center justify-center rounded bg-muted-foreground/10 text-[9px] font-semibold text-muted-foreground", children: item.company.substring(0, 1) }),
177
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-foreground", children: item.company }),
178
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3 text-muted-foreground/50" })
179
+ ]
180
+ }
181
+ )
182
+ ] }),
183
+ sections.signalBrief && (() => {
184
+ var _a;
185
+ const pct = signalData.score;
186
+ const scoreColor = pct >= 70 ? "text-emerald-600" : pct >= 40 ? "text-amber-600" : "text-red-600";
187
+ const barColor = pct >= 70 ? "bg-emerald-500" : pct >= 40 ? "bg-amber-500" : "bg-red-500";
188
+ const scoreLabel = pct >= 70 ? "HIGH" : pct >= 40 ? "MEDIUM" : "LOW";
189
+ const evidenceWithCitations = sourceItems.length >= 4 ? [
190
+ /* @__PURE__ */ jsxs(Fragment, { children: [
191
+ "There are ",
192
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: "3 unusual signals" }),
193
+ " including a large balance outflow and reduced login frequency",
194
+ /* @__PURE__ */ jsx(Citation, { number: 1, source: sourceItems[0] }),
195
+ /* @__PURE__ */ jsx(Citation, { number: 2, source: sourceItems[1] }),
196
+ /* @__PURE__ */ jsx(Citation, { number: 3, source: sourceItems[2] })
197
+ ] }),
198
+ /* @__PURE__ */ jsxs(Fragment, { children: [
199
+ "Scott mentioned in ",
200
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: "#treasury-questions" }),
201
+ " that they are actively looking for treasury management options",
202
+ /* @__PURE__ */ jsx(Citation, { number: 4, source: sourceItems[2] })
203
+ ] }),
204
+ /* @__PURE__ */ jsxs(Fragment, { children: [
205
+ "You have a recent email thread regarding optimization options that hasn't been replied to",
206
+ /* @__PURE__ */ jsx(Citation, { number: 5, source: sourceItems[3] })
207
+ ] })
208
+ ] : signalData.evidence.map((ev, i) => /* @__PURE__ */ jsx("span", { children: ev }, i));
209
+ return /* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
210
+ /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wider mb-3", children: "Signal brief" }),
211
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground leading-relaxed mb-2", children: [
212
+ "We detected signals that suggest a potential opportunity with ",
213
+ item.company,
214
+ "."
215
+ ] }),
216
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/90 leading-relaxed mb-4", children: signalData.whyNow }),
217
+ /* @__PURE__ */ jsxs("div", { className: "mb-5 rounded-md border border-border bg-muted/20 p-3", children: [
218
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-1.5", children: [
219
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider", children: "Signal Score" }),
220
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
221
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-bold text-foreground", children: [
222
+ signalData.score,
223
+ "/100"
224
+ ] }),
225
+ /* @__PURE__ */ jsx("span", { className: `text-[10px] font-bold uppercase ${scoreColor}`, children: scoreLabel })
226
+ ] })
227
+ ] }),
228
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 bg-muted rounded-full overflow-hidden mb-2", children: /* @__PURE__ */ jsx(
229
+ "div",
230
+ {
231
+ className: `h-full rounded-full transition-all duration-500 ${barColor}`,
232
+ style: { width: `${signalData.score}%` }
233
+ }
234
+ ) }),
235
+ /* @__PURE__ */ jsxs(
236
+ "button",
237
+ {
238
+ type: "button",
239
+ onClick: () => setEvidenceExpanded((prev) => !prev),
240
+ className: "flex items-center gap-1 text-[11px] font-medium text-muted-foreground hover:text-foreground transition-colors",
241
+ children: [
242
+ /* @__PURE__ */ jsx(ChevronDown, { className: `h-3 w-3 transition-transform duration-200 ${evidenceExpanded ? "rotate-180" : ""}` }),
243
+ "View more"
244
+ ]
245
+ }
246
+ ),
247
+ evidenceExpanded && /* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-3", children: [
248
+ /* @__PURE__ */ jsx("ul", { className: "space-y-2", children: evidenceWithCitations.map((ev, index) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-2 text-sm", children: [
249
+ /* @__PURE__ */ jsx("div", { className: "w-1.5 h-1.5 bg-primary rounded-full mt-2 flex-shrink-0" }),
250
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground leading-relaxed", children: ev })
251
+ ] }, index)) }),
252
+ /* @__PURE__ */ jsx(
253
+ ScoreBreakdown,
254
+ {
255
+ factors: signalData.factors,
256
+ onFactorFeedback: (_a = signalData.onFactorFeedback) != null ? _a : ((key, type, detail) => console.log("Signal factor feedback:", { company: item.company, factor: key, type, detail }))
257
+ }
258
+ ),
259
+ /* @__PURE__ */ jsx(SignalApproval.Actions, {})
260
+ ] })
261
+ ] }),
262
+ !evidenceExpanded && /* @__PURE__ */ jsx(SignalApproval.Actions, {})
263
+ ] });
264
+ })(),
265
+ sections.timeline && timelineEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
266
+ /* @__PURE__ */ jsxs(
267
+ "button",
268
+ {
269
+ type: "button",
270
+ onClick: () => setShowTimeline((prev) => !prev),
271
+ className: "group/timeline flex w-full items-center justify-between gap-2 py-2 rounded-md transition-colors hover:bg-muted/40 -mx-2 px-2 cursor-pointer",
272
+ children: [
273
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
274
+ /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wider group-hover/timeline:text-foreground transition-colors", children: "Activity timeline" }),
275
+ !showTimeline && /* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground/60", children: "\xB7 Last activity 1d ago" })
276
+ ] }),
277
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
278
+ /* @__PURE__ */ jsxs("span", { className: "text-[11px] font-medium text-muted-foreground", children: [
279
+ timelineEvents.length,
280
+ " events"
281
+ ] }),
282
+ /* @__PURE__ */ jsx(ChevronDown, { className: `h-3.5 w-3.5 text-muted-foreground transition-transform duration-200 ${showTimeline ? "rotate-180" : ""}` })
283
+ ] })
284
+ ]
285
+ }
286
+ ),
287
+ showTimeline && /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(TimelineActivity, { events: timelineEvents }) })
288
+ ] })
289
+ ] }),
290
+ sections.suggestedActions && /* @__PURE__ */ jsx(SignalApproval.Gate, { children: /* @__PURE__ */ jsx(
291
+ SuggestedActions,
292
+ {
293
+ actions: suggestedActions,
294
+ accountContacts,
295
+ signature: emailSignature,
296
+ iconMap,
297
+ onDismiss: (id) => console.log("Dismiss action:", id),
298
+ onSend: (id) => console.log("Send action:", id),
299
+ onSaveDraft: (id) => console.log("Save draft:", id),
300
+ onDuplicate: handleDuplicate,
301
+ onOpenAccountDetails: onOpenEntityPanel,
302
+ onOpenRecentActivity,
303
+ onMarkComplete: (id) => console.log("Mark complete:", id),
304
+ onDispatchAgent: (id) => console.log("Dispatch agent:", id)
305
+ }
306
+ ) })
307
+ ] })
308
+ }
309
+ );
310
+ }
311
+ function PrototypeInboxView({
312
+ items,
313
+ filterCategories,
314
+ detailSections,
315
+ accountContacts = [],
316
+ buildAccountContacts,
317
+ emailSignature = "",
318
+ buildSuggestedActions: buildSuggestedActionsProp,
319
+ buildSourceItems: buildSourceItemsProp,
320
+ getSignalScore: getSignalScoreProp,
321
+ getTimelineEvents,
322
+ iconMap = {},
323
+ hideToolbarActions,
324
+ hideHoverActions,
325
+ onSuggestedActionFeedback,
326
+ headerActions,
327
+ onOpenEntityPanel,
328
+ onOpenRecentActivity,
329
+ onItemSelect,
330
+ defaultViewMode,
331
+ buildEntityChips,
332
+ quickFilterTabs,
333
+ hideAccountsButton,
334
+ accountDetailsLabel,
335
+ signalLabels
336
+ }) {
337
+ var _a;
338
+ const [inboxViewMode, setInboxViewMode] = React.useState(
339
+ defaultViewMode === "list" ? "list" : defaultViewMode === "split" ? "inbox" : "inbox"
340
+ );
341
+ const [previousViewMode, setPreviousViewMode] = React.useState("inbox");
342
+ const [selectedTask, setSelectedTask] = React.useState(items[0]);
343
+ const [inboxAssignee, setInboxAssignee] = React.useState("me");
344
+ const [inboxFilters, setInboxFilters] = React.useState({});
345
+ const [activeQuickFilter, setActiveQuickFilter] = React.useState("all");
346
+ const [splitViewSearch, setSplitViewSearch] = React.useState("");
347
+ const sections = React.useMemo(
348
+ () => __spreadValues(__spreadValues({}, DEFAULT_DETAIL_SECTIONS), detailSections),
349
+ [detailSections]
350
+ );
351
+ const resolvedFilterCategories = React.useMemo(
352
+ () => filterCategories != null ? filterCategories : [
353
+ {
354
+ id: "category",
355
+ label: "Category",
356
+ icon: /* @__PURE__ */ jsx(Tag, { className: "h-3.5 w-3.5 text-muted-foreground" }),
357
+ options: [...new Set(items.map((i) => i.tag1))]
358
+ },
359
+ {
360
+ id: "account",
361
+ label: "Account",
362
+ icon: /* @__PURE__ */ jsx(Building, { className: "h-3.5 w-3.5 text-muted-foreground" }),
363
+ options: [...new Set(items.map((i) => i.company))]
364
+ }
365
+ ],
366
+ [filterCategories, items]
367
+ );
368
+ const buildSuggestedActions = React.useMemo(
369
+ () => buildSuggestedActionsProp != null ? buildSuggestedActionsProp : (() => []),
370
+ [buildSuggestedActionsProp]
371
+ );
372
+ const buildSourceItems = React.useMemo(
373
+ () => buildSourceItemsProp != null ? buildSourceItemsProp : (() => []),
374
+ [buildSourceItemsProp]
375
+ );
376
+ const getSignalScore = React.useMemo(
377
+ () => getSignalScoreProp != null ? getSignalScoreProp : (() => DEFAULT_SIGNAL_SCORE),
378
+ [getSignalScoreProp]
379
+ );
380
+ const filterFieldMap = React.useMemo(() => {
381
+ const map = {};
382
+ for (const cat of resolvedFilterCategories) {
383
+ switch (cat.id) {
384
+ case "category":
385
+ case "signalType":
386
+ map[cat.id] = (item, v) => item.tag1.toLowerCase() === v.toLowerCase();
387
+ break;
388
+ case "account":
389
+ map[cat.id] = (item, v) => item.company.toLowerCase() === v.toLowerCase();
390
+ break;
391
+ default:
392
+ map[cat.id] = (item, v) => {
393
+ const lv = v.toLowerCase();
394
+ return item.tag1.toLowerCase() === lv || item.company.toLowerCase() === lv || item.title.toLowerCase().includes(lv) || item.details.toLowerCase().includes(lv);
395
+ };
396
+ }
397
+ }
398
+ return map;
399
+ }, [resolvedFilterCategories]);
400
+ const filteredItems = React.useMemo(() => {
401
+ const activeFilters = Object.entries(inboxFilters).filter(
402
+ ([, value]) => value && value !== "all"
403
+ );
404
+ if (activeFilters.length === 0) return items;
405
+ return items.filter(
406
+ (item) => activeFilters.every(([key, value]) => {
407
+ const matcher = filterFieldMap[key];
408
+ return matcher ? matcher(item, value) : true;
409
+ })
410
+ );
411
+ }, [items, inboxFilters, filterFieldMap]);
412
+ const resolvedQuickFilterTabs = React.useMemo(() => {
413
+ if (quickFilterTabs) return quickFilterTabs;
414
+ const uniqueTags = [...new Set(items.map((i) => i.tag1))];
415
+ return uniqueTags.map((tag) => ({
416
+ id: tag.toLowerCase().replace(/\s+/g, "-"),
417
+ label: tag
418
+ }));
419
+ }, [quickFilterTabs, items]);
420
+ const quickFilterTabCounts = React.useMemo(() => {
421
+ var _a2;
422
+ const counts = {};
423
+ for (const tab of resolvedQuickFilterTabs) {
424
+ const match = ((_a2 = tab.matchValue) != null ? _a2 : tab.label).toLowerCase();
425
+ counts[tab.id] = items.filter((i) => i.tag1.toLowerCase() === match).length;
426
+ }
427
+ return counts;
428
+ }, [resolvedQuickFilterTabs, items]);
429
+ const splitViewItems = React.useMemo(() => {
430
+ var _a2;
431
+ let filtered = items;
432
+ if (activeQuickFilter !== "all") {
433
+ const activeTab = resolvedQuickFilterTabs.find((t) => t.id === activeQuickFilter);
434
+ if (activeTab) {
435
+ const match = ((_a2 = activeTab.matchValue) != null ? _a2 : activeTab.label).toLowerCase();
436
+ filtered = filtered.filter(
437
+ (item) => item.tag1.toLowerCase() === match
438
+ );
439
+ }
440
+ }
441
+ if (splitViewSearch.trim()) {
442
+ const q = splitViewSearch.trim().toLowerCase();
443
+ filtered = filtered.filter(
444
+ (item) => item.tag1.toLowerCase().includes(q) || item.company.toLowerCase().includes(q) || item.title.toLowerCase().includes(q)
445
+ );
446
+ }
447
+ return filtered;
448
+ }, [items, activeQuickFilter, resolvedQuickFilterTabs, splitViewSearch]);
449
+ const inboxGroups = React.useMemo(() => {
450
+ const urgent = filteredItems.filter((i) => i.statusColor === "red");
451
+ const active = filteredItems.filter((i) => i.statusColor !== "red");
452
+ return [
453
+ { key: "urgent", label: "Urgent", items: urgent },
454
+ { key: "active", label: "Active", items: active }
455
+ ].filter((g) => g.items.length > 0);
456
+ }, [filteredItems]);
457
+ const renderInboxRow = React.useCallback(
458
+ (item) => /* @__PURE__ */ jsxs(Fragment, { children: [
459
+ /* @__PURE__ */ jsx("span", { className: `h-2 w-2 shrink-0 rounded-full ${item.statusColor === "red" ? "bg-[#f43f5e]" : "bg-[#3b82f6]"}` }),
460
+ /* @__PURE__ */ jsx("span", { className: "w-[80px] shrink-0 font-mono text-xs text-muted-foreground/80", children: item.id }),
461
+ /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground whitespace-nowrap", children: item.tag1 }),
462
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-foreground", children: item.title }),
463
+ /* @__PURE__ */ jsx("span", { className: "w-[120px] shrink-0 truncate text-xs font-medium text-foreground", children: item.company }),
464
+ /* @__PURE__ */ jsx("span", { className: "w-[80px] shrink-0 text-right text-xs text-muted-foreground", children: item.time })
465
+ ] }),
466
+ []
467
+ );
468
+ const handleInboxItemSelect = React.useCallback(
469
+ (item) => {
470
+ setSelectedTask(item);
471
+ if (onItemSelect) {
472
+ onItemSelect(item);
473
+ } else if (inboxViewMode === "list") {
474
+ setPreviousViewMode("list");
475
+ setInboxViewMode("detail");
476
+ }
477
+ },
478
+ [inboxViewMode, onItemSelect]
479
+ );
480
+ const handleBackFromDetail = React.useCallback(() => {
481
+ setInboxViewMode(previousViewMode);
482
+ }, [previousViewMode]);
483
+ const handleViewModeChange = React.useCallback((id) => {
484
+ const mode = id;
485
+ if (mode !== "detail") {
486
+ setPreviousViewMode(mode);
487
+ }
488
+ setInboxViewMode(mode);
489
+ }, []);
490
+ React.useEffect(() => {
491
+ const mql = window.matchMedia("(max-width: 768px)");
492
+ function handleChange(e) {
493
+ if (e.matches && inboxViewMode === "inbox") {
494
+ setPreviousViewMode("inbox");
495
+ setInboxViewMode("detail");
496
+ }
497
+ }
498
+ handleChange(mql);
499
+ mql.addEventListener("change", handleChange);
500
+ return () => mql.removeEventListener("change", handleChange);
501
+ }, [inboxViewMode]);
502
+ const detailViewProps = {
503
+ item: selectedTask,
504
+ sections,
505
+ getSignalScore,
506
+ buildSuggestedActions,
507
+ buildSourceItems,
508
+ getTimelineEvents,
509
+ accountContacts: (_a = buildAccountContacts == null ? void 0 : buildAccountContacts(selectedTask)) != null ? _a : accountContacts,
510
+ emailSignature,
511
+ iconMap,
512
+ onOpenEntityPanel,
513
+ onOpenRecentActivity,
514
+ onSuggestedActionFeedback,
515
+ signalLabels
516
+ };
517
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col", children: [
518
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border bg-background px-4 py-3 shrink-0", children: [
519
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
520
+ inboxViewMode === "detail" ? /* @__PURE__ */ jsxs(
521
+ "button",
522
+ {
523
+ type: "button",
524
+ onClick: handleBackFromDetail,
525
+ className: "flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",
526
+ children: [
527
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }),
528
+ "Back"
529
+ ]
530
+ }
531
+ ) : null,
532
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Inbox" }),
533
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "bg-muted text-muted-foreground hover:bg-muted font-medium text-[11px] px-2 py-0.5 rounded-md", children: items.length })
534
+ ] }),
535
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
536
+ /* @__PURE__ */ jsx(
537
+ ViewModeToggle,
538
+ {
539
+ modes: [
540
+ { id: "inbox", icon: /* @__PURE__ */ jsx(Columns2, { className: "h-3.5 w-3.5" }), label: "Split View" },
541
+ { id: "list", icon: /* @__PURE__ */ jsx(LayoutList, { className: "h-3.5 w-3.5" }), label: "List View" },
542
+ { id: "detail", icon: /* @__PURE__ */ jsx(Square, { className: "h-3.5 w-3.5" }), label: "Detail View" }
543
+ ],
544
+ activeMode: inboxViewMode,
545
+ onModeChange: handleViewModeChange
546
+ }
547
+ ),
548
+ headerActions
549
+ ] })
550
+ ] }),
551
+ inboxViewMode === "detail" ? /* @__PURE__ */ jsx("div", { className: "flex h-full flex-1 flex-col overflow-hidden bg-background", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(DetailView, __spreadValues({}, detailViewProps)) }) }) : inboxViewMode === "list" ? /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto bg-background", children: [
552
+ /* @__PURE__ */ jsx(
553
+ InboxToolbar,
554
+ {
555
+ assignee: inboxAssignee,
556
+ onAssigneeChange: setInboxAssignee,
557
+ filterCategories: resolvedFilterCategories,
558
+ selectedFilters: inboxFilters,
559
+ onFilterChange: (catId, val) => setInboxFilters((prev) => __spreadProps(__spreadValues({}, prev), { [catId]: val })),
560
+ onClearFilters: () => setInboxFilters({})
561
+ }
562
+ ),
563
+ /* @__PURE__ */ jsx(
564
+ GroupedListView,
565
+ {
566
+ groups: inboxGroups,
567
+ renderRow: renderInboxRow,
568
+ getItemKey: (item) => item.id,
569
+ selectedKey: selectedTask.id,
570
+ onItemClick: handleInboxItemSelect,
571
+ emptyMessage: "No inbox items"
572
+ }
573
+ )
574
+ ] }) : (
575
+ /* Split view */
576
+ /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 w-full flex-1", children: [
577
+ /* @__PURE__ */ jsxs("div", { className: "flex h-full min-w-[380px] w-[380px] flex-col border-r border-border bg-background shadow-sm z-10", children: [
578
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 border-b border-border p-4 shrink-0", children: [
579
+ !hideToolbarActions && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
580
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
581
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Eye, { className: "w-4 h-4" }) }),
582
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground", children: /* @__PURE__ */ jsx(FileText, { className: "w-4 h-4" }) }),
583
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Clock, { className: "w-4 h-4" }) }),
584
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground", children: /* @__PURE__ */ jsx(CheckSquare, { className: "w-4 h-4" }) })
585
+ ] }),
586
+ /* @__PURE__ */ jsxs(Button, { size: "sm", className: "h-8 px-4 bg-foreground text-background hover:bg-foreground/90 text-xs font-semibold gap-1.5 rounded-md", children: [
587
+ /* @__PURE__ */ jsx(Plus, { className: "w-4 h-4" }),
588
+ " Add Task"
589
+ ] })
590
+ ] }),
591
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
592
+ /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
593
+ /* @__PURE__ */ jsx(Filter, { className: "absolute left-2.5 top-1.5 w-4 h-4 text-muted-foreground" }),
594
+ /* @__PURE__ */ jsx(
595
+ Input,
596
+ {
597
+ className: "h-8 pl-8 text-xs bg-background border-border rounded-md shadow-none",
598
+ placeholder: "Filter by category...",
599
+ value: splitViewSearch,
600
+ onChange: (e) => setSplitViewSearch(e.target.value)
601
+ }
602
+ )
603
+ ] }),
604
+ !hideAccountsButton && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", className: "h-8 text-xs font-medium rounded-md shadow-none", children: [
605
+ /* @__PURE__ */ jsx(Building, { className: "w-3.5 h-3.5 mr-1.5" }),
606
+ " ",
607
+ accountDetailsLabel != null ? accountDetailsLabel : "Accounts"
608
+ ] })
609
+ ] }),
610
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 overflow-x-auto pb-1 mt-1 scrollbar-hide", children: [
611
+ /* @__PURE__ */ jsx(
612
+ Button,
613
+ {
614
+ size: "sm",
615
+ variant: activeQuickFilter === "all" ? "default" : "outline",
616
+ className: `h-7 rounded-full px-3.5 text-[11px] font-semibold shadow-none ${activeQuickFilter === "all" ? "bg-foreground text-background hover:bg-foreground/90" : "bg-transparent border-border text-muted-foreground hover:text-foreground"}`,
617
+ onClick: () => setActiveQuickFilter("all"),
618
+ children: "All"
619
+ }
620
+ ),
621
+ resolvedQuickFilterTabs.map((tab) => {
622
+ var _a2;
623
+ const count = (_a2 = tab.count) != null ? _a2 : quickFilterTabCounts[tab.id];
624
+ return /* @__PURE__ */ jsxs(
625
+ Button,
626
+ {
627
+ size: "sm",
628
+ variant: activeQuickFilter === tab.id ? "default" : "outline",
629
+ className: `h-7 rounded-full px-3.5 text-[11px] font-medium shadow-none ${activeQuickFilter === tab.id ? "bg-foreground text-background hover:bg-foreground/90" : "bg-transparent border-border text-muted-foreground hover:text-foreground"}`,
630
+ onClick: () => setActiveQuickFilter(tab.id),
631
+ children: [
632
+ tab.label,
633
+ count != null && count > 0 ? ` (${count})` : ""
634
+ ]
635
+ },
636
+ tab.id
637
+ );
638
+ })
639
+ ] })
640
+ ] }),
641
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto", children: [
642
+ splitViewItems.map((item) => /* @__PURE__ */ jsxs(
643
+ "div",
644
+ {
645
+ onClick: () => {
646
+ setSelectedTask(item);
647
+ onItemSelect == null ? void 0 : onItemSelect(item);
648
+ },
649
+ className: `cursor-pointer border-b border-border p-4 transition-colors group relative border-l-2 ${selectedTask.id === item.id ? "bg-muted/30 border-l-brand-purple" : "bg-transparent border-l-transparent hover:bg-muted/10"}`,
650
+ children: [
651
+ /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
652
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[13px] font-semibold text-foreground leading-tight", children: item.title }),
653
+ selectedTask.id !== item.id && item.tag1 && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-md border border-border bg-muted/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: item.tag1 }),
654
+ /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-[10px] font-medium text-muted-foreground/80", children: item.time })
655
+ ] }),
656
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 mt-2", children: [
657
+ /* @__PURE__ */ jsx("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 mt-1.5 ${item.statusColor === "red" ? "bg-[#f43f5e]" : "bg-[#3b82f6]"}` }),
658
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground leading-tight", children: item.details })
659
+ ] }),
660
+ buildEntityChips && (() => {
661
+ const chips = buildEntityChips(item);
662
+ if (!chips.length) return null;
663
+ return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 mt-2 flex-wrap", children: chips.map((chip) => /* @__PURE__ */ jsxs(
664
+ "button",
665
+ {
666
+ type: "button",
667
+ onClick: (e) => {
668
+ var _a2;
669
+ e.stopPropagation();
670
+ (_a2 = chip.onClick) == null ? void 0 : _a2.call(chip);
671
+ },
672
+ className: "inline-flex items-center gap-1 rounded-md border border-border/60 bg-muted/30 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",
673
+ children: [
674
+ /* @__PURE__ */ jsx("span", { className: "flex h-3.5 w-3.5 items-center justify-center rounded bg-muted-foreground/10 text-[8px] font-semibold", children: chip.avatarLetter }),
675
+ chip.label
676
+ ]
677
+ },
678
+ chip.id
679
+ )) });
680
+ })(),
681
+ !hideHoverActions && /* @__PURE__ */ jsxs("div", { className: `absolute right-4 bottom-4 flex items-center gap-1.5 bg-background shadow-sm rounded-md px-1 py-0.5 border border-border ${selectedTask.id === item.id ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity"}`, children: [
682
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 rounded text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ jsx(CheckSquare, { className: "w-3.5 h-3.5" }) }),
683
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 rounded text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ jsx(Clock, { className: "w-3.5 h-3.5" }) })
684
+ ] })
685
+ ]
686
+ },
687
+ item.id
688
+ )),
689
+ /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", className: "h-8 text-xs font-semibold rounded-md shadow-none", children: "See more" }) })
690
+ ] })
691
+ ] }),
692
+ /* @__PURE__ */ jsx("div", { className: "flex h-full flex-1 flex-col overflow-hidden bg-background", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(DetailView, __spreadValues({}, detailViewProps)) }) })
693
+ ] })
694
+ )
695
+ ] });
696
+ }
697
+ export {
698
+ DetailView,
699
+ PrototypeInboxView
700
+ };
701
+ //# sourceMappingURL=prototype-inbox-view.js.map