@burdenoff/microfe-subscriberbot 2026.1107.8 → 2026.1110.2

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 (482) hide show
  1. package/dist/generated/global-operations.d.ts +4 -2
  2. package/dist/generated/global-types.d.ts +2 -22
  3. package/dist/generated/wspace-operations.d.ts +4 -2
  4. package/dist/generated/wspace-types.d.ts +4 -24
  5. package/dist/index.d.ts +0 -1
  6. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  7. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  8. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
  9. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  10. package/dist/stories/Accessibility.stories.d.ts +2 -4
  11. package/dist/stories/EmptyState.stories.d.ts +0 -2
  12. package/dist/stories/MetricsCard.stories.d.ts +0 -2
  13. package/dist/stories/StatusBadge.stories.d.ts +0 -2
  14. package/dist/stories/pages/AgentDetailPage.stories.d.ts +0 -2
  15. package/dist/stories/pages/AgentNewPage.stories.d.ts +0 -2
  16. package/dist/stories/pages/AgentsListPage.stories.d.ts +0 -2
  17. package/dist/stories/pages/AssetVaultPage.stories.d.ts +0 -2
  18. package/dist/stories/pages/BankConnectionsPage.stories.d.ts +0 -2
  19. package/dist/stories/pages/DashboardPage.stories.d.ts +0 -2
  20. package/dist/stories/pages/DecisionDetailPage.stories.d.ts +0 -2
  21. package/dist/stories/pages/DecisionsPage.stories.d.ts +0 -2
  22. package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts +0 -2
  23. package/dist/stories/pages/InboxPage.stories.d.ts +0 -2
  24. package/dist/stories/pages/InboxReadState.stories.d.ts +1 -3
  25. package/dist/stories/pages/InsightsPage.stories.d.ts +0 -2
  26. package/dist/stories/pages/InvoicesPage.stories.d.ts +0 -2
  27. package/dist/stories/pages/NegotiationDetailPage.stories.d.ts +0 -2
  28. package/dist/stories/pages/NegotiationNewPage.stories.d.ts +0 -2
  29. package/dist/stories/pages/NegotiationsPage.stories.d.ts +0 -2
  30. package/dist/stories/pages/ProcurementDetailPage.stories.d.ts +0 -2
  31. package/dist/stories/pages/ProcurementNewPage.stories.d.ts +0 -2
  32. package/dist/stories/pages/ProcurementPage.stories.d.ts +0 -2
  33. package/dist/stories/pages/ProviderDetailPage.stories.d.ts +0 -2
  34. package/dist/stories/pages/ProviderNewPage.stories.d.ts +0 -2
  35. package/dist/stories/pages/ProvidersListPage.stories.d.ts +0 -2
  36. package/dist/stories/pages/RelationshipDetailPage.stories.d.ts +0 -2
  37. package/dist/stories/pages/RelationshipNewPage.stories.d.ts +0 -2
  38. package/dist/stories/pages/RelationshipsListPage.stories.d.ts +0 -2
  39. package/dist/stories/pages/RenewalsPage.stories.d.ts +0 -2
  40. package/dist/stories/pages/SavingsPage.stories.d.ts +0 -2
  41. package/dist/stories/pages/WorkflowBuilderPage.stories.d.ts +0 -2
  42. package/dist/stories/pages/WorkflowsPage.stories.d.ts +0 -2
  43. package/dist/stories/support/PageHarness.d.ts +0 -2
  44. package/dist/stories/support/bankingFixtures.d.ts +0 -2
  45. package/dist/stories/support/fixtures.d.ts +0 -2
  46. package/dist/stories/support/graphqlMock.d.ts +0 -2
  47. package/dist/stories/support/handlers.d.ts +0 -2
  48. package/dist/stories/support/negotiationFixtures.d.ts +0 -2
  49. package/dist/stories/support/phoneViewport.d.ts +0 -2
  50. package/dist/stories/support/play.d.ts +0 -2
  51. package/dist/stories/support/procurementFixtures.d.ts +0 -2
  52. package/dist/subscriberbot/SubscriberBotRoot.d.ts +0 -2
  53. package/dist/subscriberbot/SubscriberBotRoot.js +10 -7
  54. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  55. package/dist/subscriberbot/SubscriberBotRoutes.d.ts +0 -2
  56. package/dist/subscriberbot/SubscriberBotRoutes.js +1 -2
  57. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  58. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts +0 -2
  59. package/dist/subscriberbot/admin/AdminDashboardPage.js +9 -10
  60. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  61. package/dist/subscriberbot/admin/AdminRoot.d.ts +0 -2
  62. package/dist/subscriberbot/admin/AdminRoot.js +2 -3
  63. package/dist/subscriberbot/admin/AdminRoot.js.map +1 -1
  64. package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts +0 -2
  65. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +56 -57
  66. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  67. package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts +0 -2
  68. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +107 -108
  69. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  70. package/dist/subscriberbot/admin/index.d.ts +0 -1
  71. package/dist/subscriberbot/admin/index.js +1 -1
  72. package/dist/subscriberbot/components/EmptyState.d.ts +0 -2
  73. package/dist/subscriberbot/components/EmptyState.js +1 -2
  74. package/dist/subscriberbot/components/EmptyState.js.map +1 -1
  75. package/dist/subscriberbot/components/MetricsCard.d.ts +0 -2
  76. package/dist/subscriberbot/components/MetricsCard.js +1 -2
  77. package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
  78. package/dist/subscriberbot/components/Modal.d.ts +0 -2
  79. package/dist/subscriberbot/components/Modal.js +2 -3
  80. package/dist/subscriberbot/components/Modal.js.map +1 -1
  81. package/dist/subscriberbot/components/PageLayout.d.ts +0 -2
  82. package/dist/subscriberbot/components/PageLayout.js +1 -2
  83. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  84. package/dist/subscriberbot/components/PostureOptions.d.ts +1 -3
  85. package/dist/subscriberbot/components/PostureOptions.js +7 -8
  86. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  87. package/dist/subscriberbot/components/StateViews.d.ts +0 -2
  88. package/dist/subscriberbot/components/StateViews.js +1 -2
  89. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  90. package/dist/subscriberbot/components/StatusBadge.d.ts +0 -2
  91. package/dist/subscriberbot/components/StatusBadge.js +2 -3
  92. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  93. package/dist/subscriberbot/components/decisions/DecisionBanners.d.ts +0 -2
  94. package/dist/subscriberbot/components/decisions/DecisionBanners.js +7 -8
  95. package/dist/subscriberbot/components/decisions/DecisionBanners.js.map +1 -1
  96. package/dist/subscriberbot/components/decisions/DecisionCard.d.ts +0 -2
  97. package/dist/subscriberbot/components/decisions/DecisionCard.js +65 -66
  98. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  99. package/dist/subscriberbot/components/decisions/decisionModel.d.ts +0 -2
  100. package/dist/subscriberbot/components/decisions/decisionModel.js +2 -3
  101. package/dist/subscriberbot/components/decisions/decisionModel.js.map +1 -1
  102. package/dist/subscriberbot/components/decisions/index.d.ts +0 -1
  103. package/dist/subscriberbot/components/decisions/index.js +4 -3
  104. package/dist/subscriberbot/components/index.d.ts +0 -1
  105. package/dist/subscriberbot/components/index.js +8 -7
  106. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts +0 -2
  107. package/dist/subscriberbot/components/mobile/MobileDashboard.js +23 -24
  108. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  109. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts +0 -2
  110. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +40 -49
  111. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  112. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts +0 -2
  113. package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -2
  114. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  115. package/dist/subscriberbot/components/mobile/RelationshipGlyph.d.ts +0 -2
  116. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js +1 -2
  117. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js.map +1 -1
  118. package/dist/subscriberbot/components/mobile/index.d.ts +0 -1
  119. package/dist/subscriberbot/components/mobile/index.js +4 -3
  120. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts +0 -2
  121. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +1 -2
  122. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -1
  123. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts +0 -2
  124. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +4 -5
  125. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  126. package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts +0 -2
  127. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +4 -5
  128. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  129. package/dist/subscriberbot/components/negotiations/index.d.ts +0 -1
  130. package/dist/subscriberbot/components/negotiations/index.js +5 -4
  131. package/dist/subscriberbot/components/negotiations/labels.d.ts +0 -2
  132. package/dist/subscriberbot/components/negotiations/labels.js +1 -2
  133. package/dist/subscriberbot/components/negotiations/labels.js.map +1 -1
  134. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts +0 -2
  135. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +4 -5
  136. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  137. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts +0 -2
  138. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +1 -2
  139. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -1
  140. package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts +0 -2
  141. package/dist/subscriberbot/components/procurement/ProcurementThread.js +4 -5
  142. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  143. package/dist/subscriberbot/components/procurement/index.d.ts +0 -1
  144. package/dist/subscriberbot/components/procurement/index.js +5 -4
  145. package/dist/subscriberbot/components/procurement/labels.d.ts +0 -2
  146. package/dist/subscriberbot/components/procurement/labels.js +1 -2
  147. package/dist/subscriberbot/components/procurement/labels.js.map +1 -1
  148. package/dist/subscriberbot/components/savings/SavingsCards.d.ts +0 -2
  149. package/dist/subscriberbot/components/savings/SavingsCards.js +90 -91
  150. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  151. package/dist/subscriberbot/components/savings/index.d.ts +0 -1
  152. package/dist/subscriberbot/components/savings/index.js +3 -2
  153. package/dist/subscriberbot/components/savings/savingsModel.d.ts +0 -2
  154. package/dist/subscriberbot/components/savings/savingsModel.js +2 -3
  155. package/dist/subscriberbot/components/savings/savingsModel.js.map +1 -1
  156. package/dist/subscriberbot/components/viz.d.ts +0 -2
  157. package/dist/subscriberbot/components/viz.js +2 -3
  158. package/dist/subscriberbot/components/viz.js.map +1 -1
  159. package/dist/subscriberbot/config/assistantUsecases.d.ts +0 -1
  160. package/dist/subscriberbot/context/SubscriberBotContext.d.ts +0 -2
  161. package/dist/subscriberbot/context/SubscriberBotContext.js +3 -3
  162. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  163. package/dist/subscriberbot/context/index.d.ts +0 -1
  164. package/dist/subscriberbot/context/index.js +1 -1
  165. package/dist/subscriberbot/hooks/index.d.ts +0 -1
  166. package/dist/subscriberbot/hooks/index.js +2 -2
  167. package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts +0 -2
  168. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +2 -3
  169. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -1
  170. package/dist/subscriberbot/hooks/useBankingApi.d.ts +0 -2
  171. package/dist/subscriberbot/hooks/useBankingApi.js +2 -3
  172. package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -1
  173. package/dist/subscriberbot/hooks/useCompactViewport.d.ts +0 -1
  174. package/dist/subscriberbot/hooks/useCompactViewport.js +1 -2
  175. package/dist/subscriberbot/hooks/useCompactViewport.js.map +1 -1
  176. package/dist/subscriberbot/hooks/useFormError.d.ts +0 -1
  177. package/dist/subscriberbot/hooks/useFormError.js +1 -2
  178. package/dist/subscriberbot/hooks/useFormError.js.map +1 -1
  179. package/dist/subscriberbot/hooks/useFormatters.d.ts +0 -1
  180. package/dist/subscriberbot/hooks/useFormatters.js +1 -2
  181. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -1
  182. package/dist/subscriberbot/hooks/useNegotiationApi.d.ts +0 -2
  183. package/dist/subscriberbot/hooks/useNegotiationApi.js +2 -3
  184. package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -1
  185. package/dist/subscriberbot/hooks/useProcurementApi.d.ts +0 -2
  186. package/dist/subscriberbot/hooks/useProcurementApi.js +2 -3
  187. package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -1
  188. package/dist/subscriberbot/hooks/useRouteSelection.d.ts +0 -1
  189. package/dist/subscriberbot/hooks/useRouteSelection.js +3 -3
  190. package/dist/subscriberbot/hooks/useRouteSelection.js.map +1 -1
  191. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +0 -2
  192. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -2
  193. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  194. package/dist/subscriberbot/hooks/useTr.d.ts +0 -1
  195. package/dist/subscriberbot/hooks/useTr.js +1 -2
  196. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  197. package/dist/subscriberbot/index.d.ts +0 -1
  198. package/dist/subscriberbot/index.js +9 -8
  199. package/dist/subscriberbot/pages/AssetVaultPage.d.ts +0 -2
  200. package/dist/subscriberbot/pages/AssetVaultPage.js +34 -35
  201. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  202. package/dist/subscriberbot/pages/DashboardPage.d.ts +1 -2
  203. package/dist/subscriberbot/pages/DashboardPage.js +86 -87
  204. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  205. package/dist/subscriberbot/pages/InboxPage.d.ts +1 -2
  206. package/dist/subscriberbot/pages/InboxPage.js +194 -199
  207. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  208. package/dist/subscriberbot/pages/InsightsPage.d.ts +0 -2
  209. package/dist/subscriberbot/pages/InsightsPage.js +28 -29
  210. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  211. package/dist/subscriberbot/pages/InvoicesPage.d.ts +1 -2
  212. package/dist/subscriberbot/pages/InvoicesPage.js +179 -188
  213. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  214. package/dist/subscriberbot/pages/RenewalsPage.d.ts +0 -2
  215. package/dist/subscriberbot/pages/RenewalsPage.js +293 -298
  216. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  217. package/dist/subscriberbot/pages/SavingsPage.d.ts +0 -2
  218. package/dist/subscriberbot/pages/SavingsPage.js +25 -26
  219. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  220. package/dist/subscriberbot/pages/WorkflowsPage.d.ts +1 -2
  221. package/dist/subscriberbot/pages/WorkflowsPage.js +67 -68
  222. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  223. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +1 -2
  224. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +126 -127
  225. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  226. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +1 -2
  227. package/dist/subscriberbot/pages/agents/AgentNewPage.js +10 -11
  228. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  229. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +1 -2
  230. package/dist/subscriberbot/pages/agents/AgentsListPage.js +23 -24
  231. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  232. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +1 -2
  233. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +337 -359
  234. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  235. package/dist/subscriberbot/pages/banking/ConnectBankModal.d.ts +1 -3
  236. package/dist/subscriberbot/pages/banking/ConnectBankModal.js +22 -27
  237. package/dist/subscriberbot/pages/banking/ConnectBankModal.js.map +1 -1
  238. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +1 -2
  239. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +25 -26
  240. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  241. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +1 -2
  242. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +34 -35
  243. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  244. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +1 -2
  245. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +125 -130
  246. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  247. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +1 -2
  248. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +94 -95
  249. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  250. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +1 -2
  251. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +15 -16
  252. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  253. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +1 -2
  254. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +20 -21
  255. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  256. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +1 -2
  257. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +86 -87
  258. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  259. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +1 -2
  260. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +164 -165
  261. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  262. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +1 -2
  263. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +20 -21
  264. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  265. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +1 -2
  266. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +350 -351
  267. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  268. package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts +2 -3
  269. package/dist/subscriberbot/pages/providers/ProviderInsights.js +95 -96
  270. package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -1
  271. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +1 -2
  272. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +11 -12
  273. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  274. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +1 -2
  275. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +62 -63
  276. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  277. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +1 -2
  278. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +166 -172
  279. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  280. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +1 -2
  281. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +12 -13
  282. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  283. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +1 -2
  284. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +21 -22
  285. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  286. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts +1 -3
  287. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +242 -255
  288. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  289. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +0 -2
  290. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +2 -3
  291. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  292. package/dist/subscriberbot/services/createSandboxAssistantTransport.d.ts +0 -1
  293. package/dist/subscriberbot/services/createSandboxAssistantTransport.js +1 -2
  294. package/dist/subscriberbot/services/createSandboxAssistantTransport.js.map +1 -1
  295. package/dist/subscriberbot/store/index.d.ts +0 -1
  296. package/dist/subscriberbot/store/index.js +1 -1
  297. package/dist/subscriberbot/store/subscriberbotStore.d.ts +1 -3
  298. package/dist/subscriberbot/store/subscriberbotStore.js +1 -2
  299. package/dist/subscriberbot/store/subscriberbotStore.js.map +1 -1
  300. package/dist/subscriberbot/types/assistant.d.ts +0 -2
  301. package/dist/subscriberbot/types/banking.d.ts +0 -2
  302. package/dist/subscriberbot/types/index.d.ts +0 -2
  303. package/dist/subscriberbot/types/negotiation.d.ts +0 -2
  304. package/dist/subscriberbot/types/procurement.d.ts +0 -1
  305. package/dist/subscriberbot/utils/bankRedirectLink.d.ts +0 -2
  306. package/dist/subscriberbot/utils/bankRedirectLink.js +18 -19
  307. package/dist/subscriberbot/utils/bankRedirectLink.js.map +1 -1
  308. package/dist/subscriberbot/utils/chartScale.d.ts +0 -1
  309. package/dist/subscriberbot/utils/chartScale.js +1 -2
  310. package/dist/subscriberbot/utils/chartScale.js.map +1 -1
  311. package/dist/subscriberbot/utils/cn.d.ts +0 -2
  312. package/dist/subscriberbot/utils/cn.js +2 -3
  313. package/dist/subscriberbot/utils/cn.js.map +1 -1
  314. package/dist/subscriberbot/utils/formatters.d.ts +0 -1
  315. package/dist/subscriberbot/utils/formatters.js +4 -5
  316. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  317. package/dist/subscriberbot/utils/index.d.ts +0 -1
  318. package/dist/subscriberbot/utils/navigation.d.ts +0 -1
  319. package/dist/subscriberbot/utils/navigation.js +1 -2
  320. package/dist/subscriberbot/utils/navigation.js.map +1 -1
  321. package/dist/subscriberbot/utils/pageContext.d.ts +0 -1
  322. package/dist/subscriberbot/utils/pageContext.js +3 -4
  323. package/dist/subscriberbot/utils/pageContext.js.map +1 -1
  324. package/dist/subscriberbot/utils/plaidLink.d.ts +0 -1
  325. package/dist/subscriberbot/utils/plaidLink.js +21 -22
  326. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  327. package/dist/subscriberbot/utils/portfolio.d.ts +0 -2
  328. package/dist/subscriberbot/utils/portfolio.js +5 -6
  329. package/dist/subscriberbot/utils/portfolio.js.map +1 -1
  330. package/dist/subscriberbot/utils/renewals.d.ts +0 -2
  331. package/dist/subscriberbot/utils/renewals.js +1 -2
  332. package/dist/subscriberbot/utils/renewals.js.map +1 -1
  333. package/package.json +73 -56
  334. package/dist/generated/global-operations.d.ts.map +0 -1
  335. package/dist/generated/global-types.d.ts.map +0 -1
  336. package/dist/generated/wspace-operations.d.ts.map +0 -1
  337. package/dist/generated/wspace-types.d.ts.map +0 -1
  338. package/dist/index.d.ts.map +0 -1
  339. package/dist/stories/Accessibility.stories.d.ts.map +0 -1
  340. package/dist/stories/EmptyState.stories.d.ts.map +0 -1
  341. package/dist/stories/MetricsCard.stories.d.ts.map +0 -1
  342. package/dist/stories/StatusBadge.stories.d.ts.map +0 -1
  343. package/dist/stories/pages/AgentDetailPage.stories.d.ts.map +0 -1
  344. package/dist/stories/pages/AgentNewPage.stories.d.ts.map +0 -1
  345. package/dist/stories/pages/AgentsListPage.stories.d.ts.map +0 -1
  346. package/dist/stories/pages/AssetVaultPage.stories.d.ts.map +0 -1
  347. package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +0 -1
  348. package/dist/stories/pages/DashboardPage.stories.d.ts.map +0 -1
  349. package/dist/stories/pages/DecisionDetailPage.stories.d.ts.map +0 -1
  350. package/dist/stories/pages/DecisionsPage.stories.d.ts.map +0 -1
  351. package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +0 -1
  352. package/dist/stories/pages/InboxPage.stories.d.ts.map +0 -1
  353. package/dist/stories/pages/InboxReadState.stories.d.ts.map +0 -1
  354. package/dist/stories/pages/InsightsPage.stories.d.ts.map +0 -1
  355. package/dist/stories/pages/InvoicesPage.stories.d.ts.map +0 -1
  356. package/dist/stories/pages/NegotiationDetailPage.stories.d.ts.map +0 -1
  357. package/dist/stories/pages/NegotiationNewPage.stories.d.ts.map +0 -1
  358. package/dist/stories/pages/NegotiationsPage.stories.d.ts.map +0 -1
  359. package/dist/stories/pages/ProcurementDetailPage.stories.d.ts.map +0 -1
  360. package/dist/stories/pages/ProcurementNewPage.stories.d.ts.map +0 -1
  361. package/dist/stories/pages/ProcurementPage.stories.d.ts.map +0 -1
  362. package/dist/stories/pages/ProviderDetailPage.stories.d.ts.map +0 -1
  363. package/dist/stories/pages/ProviderNewPage.stories.d.ts.map +0 -1
  364. package/dist/stories/pages/ProvidersListPage.stories.d.ts.map +0 -1
  365. package/dist/stories/pages/RelationshipDetailPage.stories.d.ts.map +0 -1
  366. package/dist/stories/pages/RelationshipNewPage.stories.d.ts.map +0 -1
  367. package/dist/stories/pages/RelationshipsListPage.stories.d.ts.map +0 -1
  368. package/dist/stories/pages/RenewalsPage.stories.d.ts.map +0 -1
  369. package/dist/stories/pages/SavingsPage.stories.d.ts.map +0 -1
  370. package/dist/stories/pages/WorkflowBuilderPage.stories.d.ts.map +0 -1
  371. package/dist/stories/pages/WorkflowsPage.stories.d.ts.map +0 -1
  372. package/dist/stories/support/PageHarness.d.ts.map +0 -1
  373. package/dist/stories/support/bankingFixtures.d.ts.map +0 -1
  374. package/dist/stories/support/fixtures.d.ts.map +0 -1
  375. package/dist/stories/support/graphqlMock.d.ts.map +0 -1
  376. package/dist/stories/support/handlers.d.ts.map +0 -1
  377. package/dist/stories/support/negotiationFixtures.d.ts.map +0 -1
  378. package/dist/stories/support/phoneViewport.d.ts.map +0 -1
  379. package/dist/stories/support/play.d.ts.map +0 -1
  380. package/dist/stories/support/procurementFixtures.d.ts.map +0 -1
  381. package/dist/subscriberbot/SubscriberBotRoot.d.ts.map +0 -1
  382. package/dist/subscriberbot/SubscriberBotRoutes.d.ts.map +0 -1
  383. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +0 -1
  384. package/dist/subscriberbot/admin/AdminRoot.d.ts.map +0 -1
  385. package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +0 -1
  386. package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +0 -1
  387. package/dist/subscriberbot/admin/index.d.ts.map +0 -1
  388. package/dist/subscriberbot/components/EmptyState.d.ts.map +0 -1
  389. package/dist/subscriberbot/components/MetricsCard.d.ts.map +0 -1
  390. package/dist/subscriberbot/components/Modal.d.ts.map +0 -1
  391. package/dist/subscriberbot/components/PageLayout.d.ts.map +0 -1
  392. package/dist/subscriberbot/components/PostureOptions.d.ts.map +0 -1
  393. package/dist/subscriberbot/components/StateViews.d.ts.map +0 -1
  394. package/dist/subscriberbot/components/StatusBadge.d.ts.map +0 -1
  395. package/dist/subscriberbot/components/decisions/DecisionBanners.d.ts.map +0 -1
  396. package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +0 -1
  397. package/dist/subscriberbot/components/decisions/decisionModel.d.ts.map +0 -1
  398. package/dist/subscriberbot/components/decisions/index.d.ts.map +0 -1
  399. package/dist/subscriberbot/components/index.d.ts.map +0 -1
  400. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +0 -1
  401. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +0 -1
  402. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts.map +0 -1
  403. package/dist/subscriberbot/components/mobile/RelationshipGlyph.d.ts.map +0 -1
  404. package/dist/subscriberbot/components/mobile/index.d.ts.map +0 -1
  405. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts.map +0 -1
  406. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +0 -1
  407. package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +0 -1
  408. package/dist/subscriberbot/components/negotiations/index.d.ts.map +0 -1
  409. package/dist/subscriberbot/components/negotiations/labels.d.ts.map +0 -1
  410. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +0 -1
  411. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts.map +0 -1
  412. package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +0 -1
  413. package/dist/subscriberbot/components/procurement/index.d.ts.map +0 -1
  414. package/dist/subscriberbot/components/procurement/labels.d.ts.map +0 -1
  415. package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +0 -1
  416. package/dist/subscriberbot/components/savings/index.d.ts.map +0 -1
  417. package/dist/subscriberbot/components/savings/savingsModel.d.ts.map +0 -1
  418. package/dist/subscriberbot/components/viz.d.ts.map +0 -1
  419. package/dist/subscriberbot/config/assistantUsecases.d.ts.map +0 -1
  420. package/dist/subscriberbot/context/SubscriberBotContext.d.ts.map +0 -1
  421. package/dist/subscriberbot/context/index.d.ts.map +0 -1
  422. package/dist/subscriberbot/hooks/index.d.ts.map +0 -1
  423. package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts.map +0 -1
  424. package/dist/subscriberbot/hooks/useBankingApi.d.ts.map +0 -1
  425. package/dist/subscriberbot/hooks/useCompactViewport.d.ts.map +0 -1
  426. package/dist/subscriberbot/hooks/useFormError.d.ts.map +0 -1
  427. package/dist/subscriberbot/hooks/useFormatters.d.ts.map +0 -1
  428. package/dist/subscriberbot/hooks/useNegotiationApi.d.ts.map +0 -1
  429. package/dist/subscriberbot/hooks/useProcurementApi.d.ts.map +0 -1
  430. package/dist/subscriberbot/hooks/useRouteSelection.d.ts.map +0 -1
  431. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +0 -1
  432. package/dist/subscriberbot/hooks/useTr.d.ts.map +0 -1
  433. package/dist/subscriberbot/index.d.ts.map +0 -1
  434. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +0 -1
  435. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +0 -1
  436. package/dist/subscriberbot/pages/InboxPage.d.ts.map +0 -1
  437. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +0 -1
  438. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +0 -1
  439. package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +0 -1
  440. package/dist/subscriberbot/pages/SavingsPage.d.ts.map +0 -1
  441. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +0 -1
  442. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +0 -1
  443. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +0 -1
  444. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +0 -1
  445. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +0 -1
  446. package/dist/subscriberbot/pages/banking/ConnectBankModal.d.ts.map +0 -1
  447. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +0 -1
  448. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +0 -1
  449. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +0 -1
  450. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +0 -1
  451. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +0 -1
  452. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +0 -1
  453. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +0 -1
  454. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +0 -1
  455. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +0 -1
  456. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +0 -1
  457. package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts.map +0 -1
  458. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +0 -1
  459. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +0 -1
  460. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +0 -1
  461. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +0 -1
  462. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +0 -1
  463. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +0 -1
  464. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +0 -1
  465. package/dist/subscriberbot/services/createSandboxAssistantTransport.d.ts.map +0 -1
  466. package/dist/subscriberbot/store/index.d.ts.map +0 -1
  467. package/dist/subscriberbot/store/subscriberbotStore.d.ts.map +0 -1
  468. package/dist/subscriberbot/types/assistant.d.ts.map +0 -1
  469. package/dist/subscriberbot/types/banking.d.ts.map +0 -1
  470. package/dist/subscriberbot/types/index.d.ts.map +0 -1
  471. package/dist/subscriberbot/types/negotiation.d.ts.map +0 -1
  472. package/dist/subscriberbot/types/procurement.d.ts.map +0 -1
  473. package/dist/subscriberbot/utils/bankRedirectLink.d.ts.map +0 -1
  474. package/dist/subscriberbot/utils/chartScale.d.ts.map +0 -1
  475. package/dist/subscriberbot/utils/cn.d.ts.map +0 -1
  476. package/dist/subscriberbot/utils/formatters.d.ts.map +0 -1
  477. package/dist/subscriberbot/utils/index.d.ts.map +0 -1
  478. package/dist/subscriberbot/utils/navigation.d.ts.map +0 -1
  479. package/dist/subscriberbot/utils/pageContext.d.ts.map +0 -1
  480. package/dist/subscriberbot/utils/plaidLink.d.ts.map +0 -1
  481. package/dist/subscriberbot/utils/portfolio.d.ts.map +0 -1
  482. package/dist/subscriberbot/utils/renewals.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MobileRelationshipList.js","names":[],"sources":["../../../../src/subscriberbot/components/mobile/MobileRelationshipList.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\n/**\n * Mobile relationship list\n * @module subscriberbot/components/mobile\n *\n * Card rows for phone widths. Each row opens the relationship on tap, reveals\n * its lifecycle actions on a left swipe, and offers the same actions through\n * an overflow (⋯) button that opens a bottom sheet — so the actions stay\n * reachable without the gesture (keyboard, screen readers, desktop browsers\n * resized to phone width). Actions are filtered through the svc state machine\n * (`quickActionsFor`); cancelling asks for confirmation first.\n */\n\nimport {\n useRef,\n useState,\n type FC,\n type MouseEvent as ReactMouseEvent,\n type PointerEvent as ReactPointerEvent,\n} from 'react';\nimport { Ban, ChevronRight, MoreHorizontal, Pause, Play, type LucideIcon } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n BottomSheet,\n BottomSheetContent,\n BottomSheetDescription,\n BottomSheetHeader,\n BottomSheetTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { StatusBadge } from '../StatusBadge';\nimport { RelationshipGlyph } from './RelationshipGlyph';\nimport { useCancelRelationship, useTransitionRelationship } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\nimport { cn } from '../../utils/cn';\n\nimport {\n daysUntil,\n isSwipeTrailingClick,\n quickActionsFor,\n renewalCountdown,\n swipeClickDeadline,\n swipeOffset,\n swipeSettlesOpen,\n type QuickAction,\n type QuickActionId,\n} from '../../utils/portfolio';\nimport type { SubRelationship } from '../../types';\n\n/** Width of one revealed action button. */\nconst ACTION_WIDTH = 84;\n/** Horizontal travel before a touch counts as a swipe rather than a tap/scroll. */\nconst SWIPE_SLOP = 8;\n\nconst ACTION_META: Record<\n QuickActionId,\n { key: string; fallback: string; icon: LucideIcon; tone: string }\n> = {\n activate: {\n key: 'relationships.detail.actions.activate',\n fallback: 'Activate',\n icon: Play,\n tone: 'bg-status-success-bg-subtle text-status-success-text',\n },\n resume: {\n key: 'mobile.relationships.resume',\n fallback: 'Resume',\n icon: Play,\n tone: 'bg-status-success-bg-subtle text-status-success-text',\n },\n pause: {\n key: 'relationships.detail.actions.pause',\n fallback: 'Pause',\n icon: Pause,\n tone: 'bg-status-warning-bg-subtle text-status-warning-text',\n },\n cancel: {\n key: 'relationships.detail.actions.cancel',\n fallback: 'Cancel',\n icon: Ban,\n tone: 'bg-status-error-bg-subtle text-status-error-text',\n },\n};\n\ninterface MobileRelationshipListProps {\n items: SubRelationship[];\n navigateTo: (relativePath: string) => void;\n}\n\nexport const MobileRelationshipList: FC<MobileRelationshipListProps> = ({ items, navigateTo }) => {\n const { formatCurrency, formatIntervalSuffix } = useFormatters();\n\n const tr = useTr();\n const transition = useTransitionRelationship();\n const cancel = useCancelRelationship();\n const [openRowId, setOpenRowId] = useState<string | null>(null);\n const [sheetFor, setSheetFor] = useState<SubRelationship | null>(null);\n const [confirmCancel, setConfirmCancel] = useState<SubRelationship | null>(null);\n const [error, setError] = useState<string | null>(null);\n const busy = transition.isPending || cancel.isPending;\n\n const onError = (e: unknown) =>\n setError(\n e instanceof Error\n ? e.message\n : tr('mobile.relationships.actionFailed', 'That action could not be completed.')\n );\n\n const run = (relationship: SubRelationship, action: QuickAction) => {\n setOpenRowId(null);\n setSheetFor(null);\n setError(null);\n if (action.destructive) {\n setConfirmCancel(relationship);\n return;\n }\n transition.mutate({ id: relationship.id, status: action.target }, { onError });\n };\n\n const confirmCancellation = () => {\n if (!confirmCancel) return;\n const id = confirmCancel.id;\n setConfirmCancel(null);\n cancel.mutate(id, { onError });\n };\n\n return (\n <>\n {error && (\n <div\n role=\"alert\"\n className=\"mt-4 rounded-xl border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text\"\n >\n {error}\n </div>\n )}\n\n <ul className=\"mt-4 space-y-3\" data-testid=\"sb-mobile-relationship-list\">\n {items.map((r) => (\n <SwipeRow\n key={r.id}\n relationship={r}\n open={openRowId === r.id}\n busy={busy}\n onOpenChange={(open) => setOpenRowId(open ? r.id : null)}\n onSelect={() => navigateTo(`/relationships/${r.id}`)}\n onMore={() => {\n setOpenRowId(null);\n setSheetFor(r);\n }}\n onAction={(action) => run(r, action)}\n />\n ))}\n </ul>\n\n <BottomSheet open={sheetFor != null} onOpenChange={(open) => !open && setSheetFor(null)}>\n <BottomSheetContent data-testid=\"sb-mobile-relationship-actions\">\n {sheetFor && (\n <>\n <BottomSheetHeader>\n <BottomSheetTitle>{sheetFor.label}</BottomSheetTitle>\n <BottomSheetDescription>\n {formatCurrency(sheetFor.amount, sheetFor.currency)}\n {formatIntervalSuffix(sheetFor.interval)}\n </BottomSheetDescription>\n </BottomSheetHeader>\n <div className=\"flex flex-col gap-2 py-2\">\n <button\n type=\"button\"\n className=\"flex min-h-12 items-center justify-between rounded-xl bg-bg-surface px-4 text-start text-sm font-medium text-text-primary active:bg-bg-sunken\"\n onClick={() => {\n const id = sheetFor.id;\n setSheetFor(null);\n navigateTo(`/relationships/${id}`);\n }}\n >\n {tr('mobile.relationships.viewDetails', 'View details')}\n <ChevronRight className=\"rtl:rotate-180 h-4 w-4 text-text-secondary\" />\n </button>\n {quickActionsFor(sheetFor.status).map((action) => {\n const meta = ACTION_META[action.id];\n const Icon = meta.icon;\n return (\n <button\n key={action.id}\n type=\"button\"\n disabled={busy}\n className={cn(\n 'flex min-h-12 items-center gap-3 rounded-xl px-4 text-start text-sm font-medium disabled:opacity-50',\n meta.tone\n )}\n onClick={() => run(sheetFor, action)}\n >\n <Icon className=\"h-4 w-4\" /> {tr(meta.key, meta.fallback)}\n </button>\n );\n })}\n </div>\n </>\n )}\n </BottomSheetContent>\n </BottomSheet>\n\n <AlertDialog\n open={confirmCancel != null}\n onOpenChange={(open) => !open && setConfirmCancel(null)}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr('mobile.relationships.cancelTitle', 'Cancel {{label}}?', {\n label: confirmCancel?.label ?? '',\n })}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {tr(\n 'mobile.relationships.cancelDescription',\n 'This marks the relationship as cancelled in Subscriber Bot. A cancelled relationship cannot be reactivated.'\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{tr('mobile.relationships.keep', 'Keep it')}</AlertDialogCancel>\n <AlertDialogAction onClick={confirmCancellation}>\n {tr('mobile.relationships.confirmCancel', 'Cancel relationship')}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </>\n );\n};\n\ninterface SwipeRowProps {\n relationship: SubRelationship;\n open: boolean;\n busy: boolean;\n onOpenChange: (open: boolean) => void;\n onSelect: () => void;\n onMore: () => void;\n onAction: (action: QuickAction) => void;\n}\n\nconst SwipeRow: FC<SwipeRowProps> = ({\n relationship: r,\n open,\n busy,\n onOpenChange,\n onSelect,\n onMore,\n onAction,\n}) => {\n const { formatCurrency, formatIntervalSuffix } = useFormatters();\n\n const tr = useTr();\n const actions = quickActionsFor(r.status);\n const revealWidth = actions.length * ACTION_WIDTH;\n const [dragOffset, setDragOffset] = useState<number | null>(null);\n const gesture = useRef<{ x: number; y: number; swiping: boolean; moved: boolean } | null>(null);\n\n // A swipe ends with a synthetic click. While the pointer is captured that\n // click targets the capturing card element rather than the inner button,\n // so it is swallowed in the card's capture phase, and only within a short\n // window after the gesture — a later deliberate tap always goes through,\n // and a cancelled swipe (which dispatches no click) leaves nothing pending.\n const swipeClickUntil = useRef(0);\n\n const offset = dragOffset ?? (open ? -revealWidth : 0);\n const days = daysUntil(r.renewsAt);\n const countdown =\n days != null && (r.status === 'ACTIVE' || r.status === 'TRIAL') ? renewalCountdown(days) : null;\n\n const onPointerDown = (e: ReactPointerEvent<HTMLDivElement>) => {\n if (revealWidth === 0 || e.pointerType === 'mouse') return;\n gesture.current = { x: e.clientX, y: e.clientY, swiping: false, moved: false };\n };\n\n const onPointerMove = (e: ReactPointerEvent<HTMLDivElement>) => {\n const g = gesture.current;\n if (!g) return;\n const dx = e.clientX - g.x;\n const dy = e.clientY - g.y;\n if (!g.swiping) {\n if (Math.abs(dy) > SWIPE_SLOP && Math.abs(dy) > Math.abs(dx)) {\n // Vertical scroll — let the page have it.\n gesture.current = null;\n return;\n }\n if (Math.abs(dx) < SWIPE_SLOP) return;\n g.swiping = true;\n e.currentTarget.setPointerCapture(e.pointerId);\n }\n g.moved = true;\n setDragOffset(swipeOffset(dx, open, revealWidth));\n };\n\n const endGesture = () => {\n const g = gesture.current;\n gesture.current = null;\n if (g?.swiping && dragOffset != null) {\n onOpenChange(swipeSettlesOpen(dragOffset, revealWidth));\n }\n setDragOffset(null);\n if (g?.moved) swipeClickUntil.current = swipeClickDeadline(Date.now());\n };\n\n const onClickCapture = (e: ReactMouseEvent<HTMLDivElement>) => {\n if (!isSwipeTrailingClick(Date.now(), swipeClickUntil.current)) return;\n swipeClickUntil.current = 0;\n e.preventDefault();\n e.stopPropagation();\n };\n\n const handleSelect = () => {\n if (open) {\n onOpenChange(false);\n return;\n }\n onSelect();\n };\n\n return (\n <li\n className=\"relative overflow-hidden rounded-2xl border border-border-subtle bg-bg-sunken\"\n data-testid=\"sb-mobile-relationship-row\"\n data-relationship-id={r.id}\n >\n {/* Action tray, revealed under the card by a left swipe. Hidden from\n assistive tech and the tab order while closed — the ⋯ sheet is the\n accessible path to the same actions. */}\n {actions.length > 0 && (\n <div\n className=\"absolute inset-y-0 right-0 flex\"\n style={{ width: revealWidth }}\n aria-hidden={!open}\n >\n {actions.map((action) => {\n const meta = ACTION_META[action.id];\n const Icon = meta.icon;\n return (\n <button\n key={action.id}\n type=\"button\"\n tabIndex={open ? 0 : -1}\n disabled={busy}\n onClick={() => onAction(action)}\n className={cn(\n 'flex h-full flex-col items-center justify-center gap-1 text-xs font-medium disabled:opacity-50',\n meta.tone\n )}\n style={{ width: ACTION_WIDTH }}\n >\n <Icon className=\"h-5 w-5\" />\n {tr(meta.key, meta.fallback)}\n </button>\n );\n })}\n </div>\n )}\n\n <div\n className={cn(\n 'relative flex touch-pan-y items-center gap-3 bg-bg-surface p-4',\n dragOffset == null && 'transition-transform duration-200 ease-out'\n )}\n style={{ transform: `translateX(${offset}px)` }}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endGesture}\n onPointerCancel={endGesture}\n onClickCapture={onClickCapture}\n >\n <button\n type=\"button\"\n onClick={handleSelect}\n className=\"flex min-w-0 flex-1 items-center gap-3 text-start\"\n >\n <RelationshipGlyph kind={r.kind} />\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-semibold text-text-primary\">{r.label}</span>\n <span className=\"block text-base tabular-nums text-text-primary\">\n {formatCurrency(r.amount, r.currency)}\n <span className=\"text-sm text-text-secondary\">\n {formatIntervalSuffix(r.interval)}\n </span>\n </span>\n <span className=\"mt-0.5 flex items-center gap-2\">\n <StatusBadge status={r.status} />\n {countdown && (\n <span\n className={cn(\n 'truncate text-xs',\n countdown.tone === 'later' ? 'text-text-secondary' : 'text-status-warning-text'\n )}\n >\n {tr(countdown.key, countdown.fallback, countdown.params)}\n </span>\n )}\n </span>\n </span>\n </button>\n <button\n type=\"button\"\n onClick={onMore}\n aria-label={tr('mobile.relationships.moreActions', 'More actions for {{label}}', {\n label: r.label,\n })}\n className=\"flex size-11 shrink-0 items-center justify-center rounded-full text-text-secondary active:bg-bg-sunken\"\n data-testid=\"sb-mobile-relationship-more\"\n >\n <MoreHorizontal className=\"h-5 w-5\" />\n </button>\n </div>\n </li>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAwDA,IAAM,IAAe,IAEf,IAAa,GAEb,IAGF;CACF,UAAU;EACR,KAAK;EACL,UAAU;EACV,MAAM;EACN,MAAM;CACR;CACA,QAAQ;EACN,KAAK;EACL,UAAU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;GACpB;aAiDI,CAYE,kBAAC,UAAD;IACE,MAAK;IACL,eA7DmB;KACzB,IAAI,GAAM;MACR,EAAa,EAAK;MAClB;KACF;KACA,EAAS;IACX;IAwDQ,WAAU;cAHZ,CAKE,kBAAC,GAAD,EAAmB,MAAM,EAAE,KAAO,CAAA,GAClC,kBAAC,QAAD;KAAM,WAAU;eAAhB;MACE,kBAAC,QAAD;OAAM,WAAU;iBAAkD,EAAE;MAAY,CAAA;MAChF,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CACG,EAAe,EAAE,QAAQ,EAAE,QAAQ,GACpC,kBAAC,QAAD;QAAM,WAAU;kBACb,EAAqB,EAAE,QAAQ;OAC5B,CAAA,CACF;;MACN,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CACE,kBAAC,GAAD,EAAa,QAAQ,EAAE,OAAS,CAAA,GAC/B,KACC,kBAAC,QAAD;QACE,WAAW,EACT,oBACA,EAAU,SAAS,UAAU,wBAAwB,0BACvD;kBAEC,EAAG,EAAU,KAAK,EAAU,UAAU,EAAU,MAAM;OACnD,CAAA,CAEJ;;KACF;MACA;OACR,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,cAAY,EAAG,oCAAoC,8BAA8B,EAC/E,OAAO,EAAE,MACX,CAAC;IACD,WAAU;IACV,eAAY;cAEZ,kBAAC,GAAD,EAAgB,WAAU,UAAW,CAAA;GAC/B,CAAA,CACL;IACH;;AAER"}
1
+ {"version":3,"file":"MobileRelationshipList.js","names":["_Fragment","Fragment$1","ACTION_WIDTH","SWIPE_SLOP","ACTION_META","Play","Pause","Ban","MobileRelationshipList","useFormatters","tr","useTr","transition","useTransitionRelationship","cancel","useCancelRelationship","openRowId","setOpenRowId","useState","sheetFor","setSheetFor","confirmCancel","setConfirmCancel","error","setError","busy","onError","run","action","relationship","items","SwipeRow","r","open","navigateTo","BottomSheet","BottomSheetContent","BottomSheetHeader","BottomSheetTitle","BottomSheetDescription","formatCurrency","formatIntervalSuffix","id","ChevronRight","quickActionsFor","meta","Icon","cn","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","actions","revealWidth","dragOffset","setDragOffset","gesture","useRef","swipeClickUntil","offset","days","daysUntil","countdown","renewalCountdown","onPointerDown","onPointerMove","g","dx","dy","swipeOffset","endGesture","onOpenChange","swipeSettlesOpen","swipeClickDeadline","onAction","isSwipeTrailingClick","onSelect","RelationshipGlyph","StatusBadge","onMore","MoreHorizontal"],"sources":["../../../../src/subscriberbot/components/mobile/MobileRelationshipList.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\n/**\n * Mobile relationship list\n * @module subscriberbot/components/mobile\n *\n * Card rows for phone widths. Each row opens the relationship on tap, reveals\n * its lifecycle actions on a left swipe, and offers the same actions through\n * an overflow (⋯) button that opens a bottom sheet — so the actions stay\n * reachable without the gesture (keyboard, screen readers, desktop browsers\n * resized to phone width). Actions are filtered through the svc state machine\n * (`quickActionsFor`); cancelling asks for confirmation first.\n */\n\nimport {\n useRef,\n useState,\n type FC,\n type MouseEvent as ReactMouseEvent,\n type PointerEvent as ReactPointerEvent,\n} from 'react';\nimport { Ban, ChevronRight, MoreHorizontal, Pause, Play, type LucideIcon } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n BottomSheet,\n BottomSheetContent,\n BottomSheetDescription,\n BottomSheetHeader,\n BottomSheetTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { StatusBadge } from '../StatusBadge';\nimport { RelationshipGlyph } from './RelationshipGlyph';\nimport { useCancelRelationship, useTransitionRelationship } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\nimport { cn } from '../../utils/cn';\n\nimport {\n daysUntil,\n isSwipeTrailingClick,\n quickActionsFor,\n renewalCountdown,\n swipeClickDeadline,\n swipeOffset,\n swipeSettlesOpen,\n type QuickAction,\n type QuickActionId,\n} from '../../utils/portfolio';\nimport type { SubRelationship } from '../../types';\n\n/** Width of one revealed action button. */\nconst ACTION_WIDTH = 84;\n/** Horizontal travel before a touch counts as a swipe rather than a tap/scroll. */\nconst SWIPE_SLOP = 8;\n\nconst ACTION_META: Record<\n QuickActionId,\n { key: string; fallback: string; icon: LucideIcon; tone: string }\n> = {\n activate: {\n key: 'relationships.detail.actions.activate',\n fallback: 'Activate',\n icon: Play,\n tone: 'bg-status-success-bg-subtle text-status-success-text',\n },\n resume: {\n key: 'mobile.relationships.resume',\n fallback: 'Resume',\n icon: Play,\n tone: 'bg-status-success-bg-subtle text-status-success-text',\n },\n pause: {\n key: 'relationships.detail.actions.pause',\n fallback: 'Pause',\n icon: Pause,\n tone: 'bg-status-warning-bg-subtle text-status-warning-text',\n },\n cancel: {\n key: 'relationships.detail.actions.cancel',\n fallback: 'Cancel',\n icon: Ban,\n tone: 'bg-status-error-bg-subtle text-status-error-text',\n },\n};\n\ninterface MobileRelationshipListProps {\n items: SubRelationship[];\n navigateTo: (relativePath: string) => void;\n}\n\nexport const MobileRelationshipList: FC<MobileRelationshipListProps> = ({ items, navigateTo }) => {\n const { formatCurrency, formatIntervalSuffix } = useFormatters();\n\n const tr = useTr();\n const transition = useTransitionRelationship();\n const cancel = useCancelRelationship();\n const [openRowId, setOpenRowId] = useState<string | null>(null);\n const [sheetFor, setSheetFor] = useState<SubRelationship | null>(null);\n const [confirmCancel, setConfirmCancel] = useState<SubRelationship | null>(null);\n const [error, setError] = useState<string | null>(null);\n const busy = transition.isPending || cancel.isPending;\n\n const onError = (e: unknown) =>\n setError(\n e instanceof Error\n ? e.message\n : tr('mobile.relationships.actionFailed', 'That action could not be completed.')\n );\n\n const run = (relationship: SubRelationship, action: QuickAction) => {\n setOpenRowId(null);\n setSheetFor(null);\n setError(null);\n if (action.destructive) {\n setConfirmCancel(relationship);\n return;\n }\n transition.mutate({ id: relationship.id, status: action.target }, { onError });\n };\n\n const confirmCancellation = () => {\n if (!confirmCancel) return;\n const id = confirmCancel.id;\n setConfirmCancel(null);\n cancel.mutate(id, { onError });\n };\n\n return (\n <>\n {error && (\n <div\n role=\"alert\"\n className=\"mt-4 rounded-xl border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text\"\n >\n {error}\n </div>\n )}\n\n <ul className=\"mt-4 space-y-3\" data-testid=\"sb-mobile-relationship-list\">\n {items.map((r) => (\n <SwipeRow\n key={r.id}\n relationship={r}\n open={openRowId === r.id}\n busy={busy}\n onOpenChange={(open) => setOpenRowId(open ? r.id : null)}\n onSelect={() => navigateTo(`/relationships/${r.id}`)}\n onMore={() => {\n setOpenRowId(null);\n setSheetFor(r);\n }}\n onAction={(action) => run(r, action)}\n />\n ))}\n </ul>\n\n <BottomSheet open={sheetFor != null} onOpenChange={(open) => !open && setSheetFor(null)}>\n <BottomSheetContent data-testid=\"sb-mobile-relationship-actions\">\n {sheetFor && (\n <>\n <BottomSheetHeader>\n <BottomSheetTitle>{sheetFor.label}</BottomSheetTitle>\n <BottomSheetDescription>\n {formatCurrency(sheetFor.amount, sheetFor.currency)}\n {formatIntervalSuffix(sheetFor.interval)}\n </BottomSheetDescription>\n </BottomSheetHeader>\n <div className=\"flex flex-col gap-2 py-2\">\n <button\n type=\"button\"\n className=\"flex min-h-12 items-center justify-between rounded-xl bg-bg-surface px-4 text-start text-sm font-medium text-text-primary active:bg-bg-sunken\"\n onClick={() => {\n const id = sheetFor.id;\n setSheetFor(null);\n navigateTo(`/relationships/${id}`);\n }}\n >\n {tr('mobile.relationships.viewDetails', 'View details')}\n <ChevronRight className=\"rtl:rotate-180 h-4 w-4 text-text-secondary\" />\n </button>\n {quickActionsFor(sheetFor.status).map((action) => {\n const meta = ACTION_META[action.id];\n const Icon = meta.icon;\n return (\n <button\n key={action.id}\n type=\"button\"\n disabled={busy}\n className={cn(\n 'flex min-h-12 items-center gap-3 rounded-xl px-4 text-start text-sm font-medium disabled:opacity-50',\n meta.tone\n )}\n onClick={() => run(sheetFor, action)}\n >\n <Icon className=\"h-4 w-4\" /> {tr(meta.key, meta.fallback)}\n </button>\n );\n })}\n </div>\n </>\n )}\n </BottomSheetContent>\n </BottomSheet>\n\n <AlertDialog\n open={confirmCancel != null}\n onOpenChange={(open) => !open && setConfirmCancel(null)}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr('mobile.relationships.cancelTitle', 'Cancel {{label}}?', {\n label: confirmCancel?.label ?? '',\n })}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {tr(\n 'mobile.relationships.cancelDescription',\n 'This marks the relationship as cancelled in Subscriber Bot. A cancelled relationship cannot be reactivated.'\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{tr('mobile.relationships.keep', 'Keep it')}</AlertDialogCancel>\n <AlertDialogAction onClick={confirmCancellation}>\n {tr('mobile.relationships.confirmCancel', 'Cancel relationship')}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </>\n );\n};\n\ninterface SwipeRowProps {\n relationship: SubRelationship;\n open: boolean;\n busy: boolean;\n onOpenChange: (open: boolean) => void;\n onSelect: () => void;\n onMore: () => void;\n onAction: (action: QuickAction) => void;\n}\n\nconst SwipeRow: FC<SwipeRowProps> = ({\n relationship: r,\n open,\n busy,\n onOpenChange,\n onSelect,\n onMore,\n onAction,\n}) => {\n const { formatCurrency, formatIntervalSuffix } = useFormatters();\n\n const tr = useTr();\n const actions = quickActionsFor(r.status);\n const revealWidth = actions.length * ACTION_WIDTH;\n const [dragOffset, setDragOffset] = useState<number | null>(null);\n const gesture = useRef<{ x: number; y: number; swiping: boolean; moved: boolean } | null>(null);\n\n // A swipe ends with a synthetic click. While the pointer is captured that\n // click targets the capturing card element rather than the inner button,\n // so it is swallowed in the card's capture phase, and only within a short\n // window after the gesture — a later deliberate tap always goes through,\n // and a cancelled swipe (which dispatches no click) leaves nothing pending.\n const swipeClickUntil = useRef(0);\n\n const offset = dragOffset ?? (open ? -revealWidth : 0);\n const days = daysUntil(r.renewsAt);\n const countdown =\n days != null && (r.status === 'ACTIVE' || r.status === 'TRIAL') ? renewalCountdown(days) : null;\n\n const onPointerDown = (e: ReactPointerEvent<HTMLDivElement>) => {\n if (revealWidth === 0 || e.pointerType === 'mouse') return;\n gesture.current = { x: e.clientX, y: e.clientY, swiping: false, moved: false };\n };\n\n const onPointerMove = (e: ReactPointerEvent<HTMLDivElement>) => {\n const g = gesture.current;\n if (!g) return;\n const dx = e.clientX - g.x;\n const dy = e.clientY - g.y;\n if (!g.swiping) {\n if (Math.abs(dy) > SWIPE_SLOP && Math.abs(dy) > Math.abs(dx)) {\n // Vertical scroll — let the page have it.\n gesture.current = null;\n return;\n }\n if (Math.abs(dx) < SWIPE_SLOP) return;\n g.swiping = true;\n e.currentTarget.setPointerCapture(e.pointerId);\n }\n g.moved = true;\n setDragOffset(swipeOffset(dx, open, revealWidth));\n };\n\n const endGesture = () => {\n const g = gesture.current;\n gesture.current = null;\n if (g?.swiping && dragOffset != null) {\n onOpenChange(swipeSettlesOpen(dragOffset, revealWidth));\n }\n setDragOffset(null);\n if (g?.moved) swipeClickUntil.current = swipeClickDeadline(Date.now());\n };\n\n const onClickCapture = (e: ReactMouseEvent<HTMLDivElement>) => {\n if (!isSwipeTrailingClick(Date.now(), swipeClickUntil.current)) return;\n swipeClickUntil.current = 0;\n e.preventDefault();\n e.stopPropagation();\n };\n\n const handleSelect = () => {\n if (open) {\n onOpenChange(false);\n return;\n }\n onSelect();\n };\n\n return (\n <li\n className=\"relative overflow-hidden rounded-2xl border border-border-subtle bg-bg-sunken\"\n data-testid=\"sb-mobile-relationship-row\"\n data-relationship-id={r.id}\n >\n {/* Action tray, revealed under the card by a left swipe. Hidden from\n assistive tech and the tab order while closed — the ⋯ sheet is the\n accessible path to the same actions. */}\n {actions.length > 0 && (\n <div\n className=\"absolute inset-y-0 right-0 flex\"\n style={{ width: revealWidth }}\n aria-hidden={!open}\n >\n {actions.map((action) => {\n const meta = ACTION_META[action.id];\n const Icon = meta.icon;\n return (\n <button\n key={action.id}\n type=\"button\"\n tabIndex={open ? 0 : -1}\n disabled={busy}\n onClick={() => onAction(action)}\n className={cn(\n 'flex h-full flex-col items-center justify-center gap-1 text-xs font-medium disabled:opacity-50',\n meta.tone\n )}\n style={{ width: ACTION_WIDTH }}\n >\n <Icon className=\"h-5 w-5\" />\n {tr(meta.key, meta.fallback)}\n </button>\n );\n })}\n </div>\n )}\n\n <div\n className={cn(\n 'relative flex touch-pan-y items-center gap-3 bg-bg-surface p-4',\n dragOffset == null && 'transition-transform duration-200 ease-out'\n )}\n style={{ transform: `translateX(${offset}px)` }}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endGesture}\n onPointerCancel={endGesture}\n onClickCapture={onClickCapture}\n >\n <button\n type=\"button\"\n onClick={handleSelect}\n className=\"flex min-w-0 flex-1 items-center gap-3 text-start\"\n >\n <RelationshipGlyph kind={r.kind} />\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-semibold text-text-primary\">{r.label}</span>\n <span className=\"block text-base tabular-nums text-text-primary\">\n {formatCurrency(r.amount, r.currency)}\n <span className=\"text-sm text-text-secondary\">\n {formatIntervalSuffix(r.interval)}\n </span>\n </span>\n <span className=\"mt-0.5 flex items-center gap-2\">\n <StatusBadge status={r.status} />\n {countdown && (\n <span\n className={cn(\n 'truncate text-xs',\n countdown.tone === 'later' ? 'text-text-secondary' : 'text-status-warning-text'\n )}\n >\n {tr(countdown.key, countdown.fallback, countdown.params)}\n </span>\n )}\n </span>\n </span>\n </button>\n <button\n type=\"button\"\n onClick={onMore}\n aria-label={tr('mobile.relationships.moreActions', 'More actions for {{label}}', {\n label: r.label,\n })}\n className=\"flex size-11 shrink-0 items-center justify-center rounded-full text-text-secondary active:bg-bg-sunken\"\n data-testid=\"sb-mobile-relationship-more\"\n >\n <MoreHorizontal className=\"h-5 w-5\" />\n </button>\n </div>\n </li>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAwDA,IAAME,IAAe,IAEfC,IAAa,GAEbC,IAGF;CACF,UAAU;EACR,KAAK;EACL,UAAU;EACV,MAAMC;EACN,MAAM;CACR;CACA,QAAQ;EACN,KAAK;EACL,UAAU;EACV,MAAMA;EACN,MAAM;CACR;CACA,OAAO;EACL,KAAK;EACL,UAAU;EACV,MAAMC;EACN,MAAM;CACR;CACA,QAAQ;EACN,KAAK;EACL,UAAU;EACV,MAAMC;EACN,MAAM;CACR;AACF,GAOaC,KAA2D,EAAE,UAAO,oBAAiB;CAChG,IAAM,EAAE,mBAAgB,4BAAyBC,EAAc,GAEzDC,IAAKC,EAAM,GACXC,IAAaC,EAA0B,GACvCC,IAASC,EAAsB,GAC/B,CAACC,GAAWC,KAAgBC,EAAwB,IAAI,GACxD,CAACC,GAAUC,KAAeF,EAAiC,IAAI,GAC/D,CAACG,GAAeC,KAAoBJ,EAAiC,IAAI,GACzE,CAACK,GAAOC,KAAYN,EAAwB,IAAI,GAChDO,IAAOb,EAAW,aAAaE,EAAO,WAEtCY,KAAW,MACfF,EACE,aAAa,QACT,EAAE,UACFd,EAAG,qCAAqC,qCAAqC,CACnF,GAEIiB,KAAO,GAA+B,MAAwB;EAIlE,AAHAV,EAAa,IAAI,GACjBG,EAAY,IAAI,GAChBI,EAAS,IAAI,GACTI,EAAO,cACTN,EAAiBO,CAAY,IAG/BjB,EAAW,OAAO;GAAE,IAAIiB,EAAa;GAAI,QAAQD,EAAO;EAAO,GAAG,EAAE,WAAQ,CAAC;CAC/E;CASA,OACE,kBAAA5B,GAAA,EAAA,UAAA;EACGuB,KACC,kBAAC,OAAD;GACE,MAAK;GACL,WAAU;GAET,UAAAA;EACE,CAAA;EAGP,kBAAC,MAAD;GAAI,WAAU;GAAiB,eAAY;GACxC,UAAAO,EAAM,KAAK,MACV,kBAACC,GAAD;IAEE,cA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AC,QAAD;QACE,WAAWnB,EACT,oBACAmB,EAAU,SAAS,UAAU,wBAAwB,0BACvD;QAEC,UAAAxD,EAAGwD,EAAU,KAAKA,EAAU,UAAUA,EAAU,MAAM;OACnD,CAAA,CAEJ;;KACF;IACA,CAAA,CAAA;GACR,CAAA,GAAA,kBAAC,UAAD;IACE,MAAK;IACL,SAASiB;IACT,cAAYzE,EAAG,oCAAoC,8BAA8B,EAC/E,OAAO,EAAE,MACX,CAAC;IACD,WAAU;IACV,eAAY;IAEZ,UAAA,kBAAC0E,GAAD,EAAgB,WAAU,UAAW,CAAA;GAC/B,CAAA,CACL;EACH,CAAA,CAAA;;AAER"}
@@ -1,5 +1,4 @@
1
1
  import { FC, ReactNode } from 'react';
2
-
3
2
  interface MobileScreenProps {
4
3
  title: string;
5
4
  /** Small line above the title (e.g. the greeting). */
@@ -26,4 +25,3 @@ interface MobileSectionProps {
26
25
  /** A titled group on the mobile sheet ("Upcoming renewals", "Needs action"). */
27
26
  export declare const MobileSection: FC<MobileSectionProps>;
28
27
  export {};
29
- //# sourceMappingURL=MobileScreen.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { cn as e } from "../../utils/cn.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- //#region src/subscriberbot/components/mobile/MobileScreen.tsx
3
+ // src/subscriberbot/components/mobile/MobileScreen.tsx
4
4
  var r = ({ title: r, eyebrow: i, hero: a, action: o, children: s, className: c, testId: l, dataTour: u }) => /* @__PURE__ */ n("div", {
5
5
  className: e("flex min-h-full flex-col", c),
6
6
  "data-testid": l,
@@ -42,7 +42,6 @@ var r = ({ title: r, eyebrow: i, hero: a, action: o, children: s, className: c,
42
42
  }), i]
43
43
  }), a]
44
44
  });
45
- //#endregion
46
45
  export { r as MobileScreen, i as MobileSection };
47
46
 
48
47
  //# sourceMappingURL=MobileScreen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileScreen.js","names":[],"sources":["../../../../src/subscriberbot/components/mobile/MobileScreen.tsx"],"sourcesContent":["/**\n * Mobile screen frame\n * @module subscriberbot/components/mobile\n *\n * The phone layout from the approved mobile mock (`sb-24-mobile-app.jpg`): a\n * brand-coloured hero band carrying the screen title (and, on the overview,\n * the headline number), with the content on a rounded sheet that overlaps the\n * band. Used below the `md` breakpoint only; desktop pages keep PageLayout.\n *\n * Semantic tokens only — the hero uses the product's action-primary pairing\n * so it follows the active brand and colour mode.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\n\ninterface MobileScreenProps {\n title: string;\n /** Small line above the title (e.g. the greeting). */\n eyebrow?: ReactNode;\n /** Optional hero content under the title (e.g. the recurring-spend figure). */\n hero?: ReactNode;\n /** Optional trailing control in the hero (e.g. an add button). */\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n /** Stable hook for Playwright and the assistant page context. */\n testId?: string;\n /** Product-tour prefix; the header renders `{dataTour}-header`. */\n dataTour?: string;\n}\n\nexport const MobileScreen: FC<MobileScreenProps> = ({\n title,\n eyebrow,\n hero,\n action,\n children,\n className,\n testId,\n dataTour,\n}) => (\n <div className={cn('flex min-h-full flex-col', className)} data-testid={testId}>\n <header\n className=\"bg-action-primary-bg px-4 pb-10 pt-5 text-action-primary-text\"\n data-tour={dataTour ? `${dataTour}-header` : undefined}\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n {eyebrow ? <p className=\"text-sm\">{eyebrow}</p> : null}\n <h1 className=\"text-2xl font-bold tracking-tight\">{title}</h1>\n </div>\n {action ? <div className=\"shrink-0\">{action}</div> : null}\n </div>\n {hero ? <div className=\"mt-4\">{hero}</div> : null}\n </header>\n <div className=\"-mt-6 flex-1 rounded-t-3xl bg-bg-canvas px-4 pb-6 pt-5\">{children}</div>\n </div>\n);\n\ninterface MobileSectionProps {\n title: string;\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n dataTour?: string;\n}\n\n/** A titled group on the mobile sheet (\"Upcoming renewals\", \"Needs action\"). */\nexport const MobileSection: FC<MobileSectionProps> = ({\n title,\n action,\n children,\n className,\n dataTour,\n}) => (\n <section className={cn('mt-6 first:mt-0', className)} aria-label={title} data-tour={dataTour}>\n <div className=\"mb-3 flex items-center justify-between gap-3\">\n <h2 className=\"text-lg font-semibold text-text-primary\">{title}</h2>\n {action}\n </div>\n {children}\n </section>\n);\n"],"mappings":";;;AAgCA,IAAa,KAAuC,EAClD,UACA,YACA,SACA,WACA,aACA,cACA,WACA,kBAEA,kBAAC,OAAD;CAAK,WAAW,EAAG,4BAA4B,CAAS;CAAG,eAAa;WAAxE,CACE,kBAAC,UAAD;EACE,WAAU;EACV,aAAW,IAAW,GAAG,EAAS,WAAW,KAAA;YAF/C,CAIE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,IAAU,kBAAC,KAAD;KAAG,WAAU;eAAW;IAAW,CAAA,IAAI,MAClD,kBAAC,MAAD;KAAI,WAAU;eAAqC;IAAU,CAAA,CAC1D;OACJ,IAAS,kBAAC,OAAD;IAAK,WAAU;cAAY;GAAY,CAAA,IAAI,IAClD;MACJ,IAAO,kBAAC,OAAD;GAAK,WAAU;aAAQ;EAAU,CAAA,IAAI,IACvC;KACR,kBAAC,OAAD;EAAK,WAAU;EAA0D;CAAc,CAAA,CACpF;IAYM,KAAyC,EACpD,UACA,WACA,aACA,cACA,kBAEA,kBAAC,WAAD;CAAS,WAAW,EAAG,mBAAmB,CAAS;CAAG,cAAY;CAAO,aAAW;WAApF,CACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,MAAD;GAAI,WAAU;aAA2C;EAAU,CAAA,GAClE,CACE;KACJ,CACM"}
1
+ {"version":3,"file":"MobileScreen.js","names":["MobileScreen","cn","className","testId","dataTour","eyebrow","title","action","hero","MobileSection","children"],"sources":["../../../../src/subscriberbot/components/mobile/MobileScreen.tsx"],"sourcesContent":["/**\n * Mobile screen frame\n * @module subscriberbot/components/mobile\n *\n * The phone layout from the approved mobile mock (`sb-24-mobile-app.jpg`): a\n * brand-coloured hero band carrying the screen title (and, on the overview,\n * the headline number), with the content on a rounded sheet that overlaps the\n * band. Used below the `md` breakpoint only; desktop pages keep PageLayout.\n *\n * Semantic tokens only — the hero uses the product's action-primary pairing\n * so it follows the active brand and colour mode.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\n\ninterface MobileScreenProps {\n title: string;\n /** Small line above the title (e.g. the greeting). */\n eyebrow?: ReactNode;\n /** Optional hero content under the title (e.g. the recurring-spend figure). */\n hero?: ReactNode;\n /** Optional trailing control in the hero (e.g. an add button). */\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n /** Stable hook for Playwright and the assistant page context. */\n testId?: string;\n /** Product-tour prefix; the header renders `{dataTour}-header`. */\n dataTour?: string;\n}\n\nexport const MobileScreen: FC<MobileScreenProps> = ({\n title,\n eyebrow,\n hero,\n action,\n children,\n className,\n testId,\n dataTour,\n}) => (\n <div className={cn('flex min-h-full flex-col', className)} data-testid={testId}>\n <header\n className=\"bg-action-primary-bg px-4 pb-10 pt-5 text-action-primary-text\"\n data-tour={dataTour ? `${dataTour}-header` : undefined}\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n {eyebrow ? <p className=\"text-sm\">{eyebrow}</p> : null}\n <h1 className=\"text-2xl font-bold tracking-tight\">{title}</h1>\n </div>\n {action ? <div className=\"shrink-0\">{action}</div> : null}\n </div>\n {hero ? <div className=\"mt-4\">{hero}</div> : null}\n </header>\n <div className=\"-mt-6 flex-1 rounded-t-3xl bg-bg-canvas px-4 pb-6 pt-5\">{children}</div>\n </div>\n);\n\ninterface MobileSectionProps {\n title: string;\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n dataTour?: string;\n}\n\n/** A titled group on the mobile sheet (\"Upcoming renewals\", \"Needs action\"). */\nexport const MobileSection: FC<MobileSectionProps> = ({\n title,\n action,\n children,\n className,\n dataTour,\n}) => (\n <section className={cn('mt-6 first:mt-0', className)} aria-label={title} data-tour={dataTour}>\n <div className=\"mb-3 flex items-center justify-between gap-3\">\n <h2 className=\"text-lg font-semibold text-text-primary\">{title}</h2>\n {action}\n </div>\n {children}\n </section>\n);\n"],"mappings":";;;AAgCA,IAAaA,KAAuC,EAClD,UACA,YACA,SACA,WACA,aACA,cACA,WACA,kBAEA,kBAAC,OAAD;CAAK,WAAWC,EAAG,4BAA4BC,CAAS;CAAG,eAAaC;CAAxE,UAAA,CACE,kBAAC,UAAD;EACE,WAAU;EACV,aAAWC,IAAW,GAAGA,EAAS,WAAW,KAAA;EAF/C,UAAA,CAIE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACGC,IAAU,kBAAC,KAAD;KAAG,WAAU;KAAW,UAAAA;IAAW,CAAA,IAAI,MAClD,kBAAC,MAAD;KAAI,WAAU;KAAqC,UAAAC;IAAU,CAAA,CAC1D;GACJ,CAAA,GAAAC,IAAS,kBAAC,OAAD;IAAK,WAAU;IAAY,UAAAA;GAAY,CAAA,IAAI,IAClD;EACJ,CAAA,GAAAC,IAAO,kBAAC,OAAD;GAAK,WAAU;GAAQ,UAAAA;EAAU,CAAA,IAAI,IACvC;CACR,CAAA,GAAA,kBAAC,OAAD;EAAK,WAAU;EAA0D;CAAc,CAAA,CACpF;A,IAYMC,KAAyC,EACpD,UACA,WACA,aACA,cACA,kBAEA,kBAAC,WAAD;CAAS,WAAWR,EAAG,mBAAmBC,CAAS;CAAG,cAAYI;CAAO,aAAWF;CAApF,UAAA,CACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;GAA2C,UAAAE;EAAU,CAAA,GAClEC,CACE;CACJ,CAAA,GAAAG,CACM"}
@@ -1,10 +1,8 @@
1
1
  import { FC } from 'react';
2
2
  import { SubRelationshipKind } from '../../types';
3
-
4
3
  interface RelationshipGlyphProps {
5
4
  kind: SubRelationshipKind | null;
6
5
  className?: string;
7
6
  }
8
7
  export declare const RelationshipGlyph: FC<RelationshipGlyphProps>;
9
8
  export {};
10
- //# sourceMappingURL=RelationshipGlyph.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { cn as e } from "../../utils/cn.js";
2
2
  import { BadgeCheck as t, CreditCard as n, FileSignature as r, GraduationCap as i, Hourglass as a, KeyRound as o, Newspaper as s, Repeat2 as c } from "lucide-react";
3
3
  import { jsx as l } from "react/jsx-runtime";
4
- //#region src/subscriberbot/components/mobile/RelationshipGlyph.tsx
4
+ // src/subscriberbot/components/mobile/RelationshipGlyph.tsx
5
5
  var u = {
6
6
  SUBSCRIPTION: c,
7
7
  MEMBERSHIP: t,
@@ -19,7 +19,6 @@ var u = {
19
19
  children: /* @__PURE__ */ l(r, { className: "h-6 w-6" })
20
20
  });
21
21
  };
22
- //#endregion
23
22
  export { d as RelationshipGlyph };
24
23
 
25
24
  //# sourceMappingURL=RelationshipGlyph.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipGlyph.js","names":[],"sources":["../../../../src/subscriberbot/components/mobile/RelationshipGlyph.tsx"],"sourcesContent":["/**\n * Relationship glyph — the square icon tile on mobile renewal and list cards.\n * @module subscriberbot/components/mobile\n */\n\nimport type { FC } from 'react';\nimport {\n BadgeCheck,\n CreditCard,\n FileSignature,\n GraduationCap,\n Hourglass,\n KeyRound,\n Newspaper,\n Repeat2,\n type LucideIcon,\n} from 'lucide-react';\nimport type { SubRelationshipKind } from '../../types';\nimport { cn } from '../../utils/cn';\n\nconst KIND_ICON: Record<SubRelationshipKind, LucideIcon> = {\n SUBSCRIPTION: Repeat2,\n MEMBERSHIP: BadgeCheck,\n LICENSE: KeyRound,\n CONTRACT: FileSignature,\n NEWSLETTER: Newspaper,\n RECURRING_PAYMENT: CreditCard,\n ENROLLMENT: GraduationCap,\n TRIAL: Hourglass,\n};\n\ninterface RelationshipGlyphProps {\n kind: SubRelationshipKind | null;\n className?: string;\n}\n\nexport const RelationshipGlyph: FC<RelationshipGlyphProps> = ({ kind, className }) => {\n const Icon = (kind && KIND_ICON[kind]) || Repeat2;\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'flex size-12 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-text-secondary',\n className\n )}\n >\n <Icon className=\"h-6 w-6\" />\n </span>\n );\n};\n"],"mappings":";;;;AAoBA,IAAM,IAAqD;CACzD,cAAc;CACd,YAAY;CACZ,SAAS;CACT,UAAU;CACV,YAAY;CACZ,mBAAmB;CACnB,YAAY;CACZ,OAAO;AACT,GAOa,KAAiD,EAAE,SAAM,mBAAgB;CACpF,IAAM,IAAQ,KAAQ,EAAU,MAAU;CAC1C,OACE,kBAAC,QAAD;EACE,eAAY;EACZ,WAAW,EACT,iGACA,CACF;YAEA,kBAAC,GAAD,EAAM,WAAU,UAAW,CAAA;CACvB,CAAA;AAEV"}
1
+ {"version":3,"file":"RelationshipGlyph.js","names":["KIND_ICON","Repeat2","BadgeCheck","KeyRound","FileSignature","Newspaper","CreditCard","GraduationCap","Hourglass","RelationshipGlyph","Icon","kind","cn","className"],"sources":["../../../../src/subscriberbot/components/mobile/RelationshipGlyph.tsx"],"sourcesContent":["/**\n * Relationship glyph — the square icon tile on mobile renewal and list cards.\n * @module subscriberbot/components/mobile\n */\n\nimport type { FC } from 'react';\nimport {\n BadgeCheck,\n CreditCard,\n FileSignature,\n GraduationCap,\n Hourglass,\n KeyRound,\n Newspaper,\n Repeat2,\n type LucideIcon,\n} from 'lucide-react';\nimport type { SubRelationshipKind } from '../../types';\nimport { cn } from '../../utils/cn';\n\nconst KIND_ICON: Record<SubRelationshipKind, LucideIcon> = {\n SUBSCRIPTION: Repeat2,\n MEMBERSHIP: BadgeCheck,\n LICENSE: KeyRound,\n CONTRACT: FileSignature,\n NEWSLETTER: Newspaper,\n RECURRING_PAYMENT: CreditCard,\n ENROLLMENT: GraduationCap,\n TRIAL: Hourglass,\n};\n\ninterface RelationshipGlyphProps {\n kind: SubRelationshipKind | null;\n className?: string;\n}\n\nexport const RelationshipGlyph: FC<RelationshipGlyphProps> = ({ kind, className }) => {\n const Icon = (kind && KIND_ICON[kind]) || Repeat2;\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'flex size-12 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-text-secondary',\n className\n )}\n >\n <Icon className=\"h-6 w-6\" />\n </span>\n );\n};\n"],"mappings":";;;;AAoBA,IAAMA,IAAqD;CACzD,cAAcC;CACd,YAAYC;CACZ,SAASC;CACT,UAAUC;CACV,YAAYC;CACZ,mBAAmBC;CACnB,YAAYC;CACZ,OAAOC;AACT,GAOaC,KAAiD,EAAE,SAAM,mBAAgB;CACpF,IAAMC,IAAQC,KAAQX,EAAUW,MAAUV;CAC1C,OACE,kBAAC,QAAD;EACE,eAAY;EACZ,WAAWW,EACT,iGACAC,CACF;EAEA,UAAA,kBAACH,GAAD,EAAM,WAAU,UAAW,CAAA;CACvB,CAAA;AAEV"}
@@ -6,4 +6,3 @@ export { MobileScreen, MobileSection } from './MobileScreen';
6
6
  export { MobileDashboard, type MobileDashboardProps } from './MobileDashboard';
7
7
  export { MobileRelationshipList } from './MobileRelationshipList';
8
8
  export { RelationshipGlyph } from './RelationshipGlyph';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,5 @@
1
- import "./MobileScreen.js";
1
+ import { MobileScreen as e } from "./MobileScreen.js";
2
+ import { MobileDashboard as t } from "./MobileDashboard.js";
3
+ import { MobileRelationshipList as n } from "./MobileRelationshipList.js";
2
4
  import "./RelationshipGlyph.js";
3
- import "./MobileDashboard.js";
4
- import "./MobileRelationshipList.js";
5
+ export { t as MobileDashboard, n as MobileRelationshipList, e as MobileScreen };
@@ -1,8 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { SubNegotiationStatus } from '../../types/negotiation';
3
-
4
3
  export declare const NegotiationStatusPill: FC<{
5
4
  status: SubNegotiationStatus;
6
5
  className?: string;
7
6
  }>;
8
- //# sourceMappingURL=NegotiationStatusPill.d.ts.map
@@ -2,7 +2,7 @@ import { useTr as e } from "../../hooks/useTr.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { STATUS_LABEL as n, statusTone as r } from "./labels.js";
4
4
  import { jsx as i } from "react/jsx-runtime";
5
- //#region src/subscriberbot/components/negotiations/NegotiationStatusPill.tsx
5
+ // src/subscriberbot/components/negotiations/NegotiationStatusPill.tsx
6
6
  var a = ({ status: a, className: o }) => {
7
7
  let s = e(), c = n[a];
8
8
  return /* @__PURE__ */ i("span", {
@@ -12,7 +12,6 @@ var a = ({ status: a, className: o }) => {
12
12
  children: s(c.key, c.fallback)
13
13
  });
14
14
  };
15
- //#endregion
16
15
  export { a as NegotiationStatusPill };
17
16
 
18
17
  //# sourceMappingURL=NegotiationStatusPill.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NegotiationStatusPill.js","names":[],"sources":["../../../../src/subscriberbot/components/negotiations/NegotiationStatusPill.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useTr } from '../../hooks/useTr';\nimport { cn } from '../../utils/cn';\nimport type { SubNegotiationStatus } from '../../types/negotiation';\nimport { STATUS_LABEL, statusTone } from './labels';\n\nexport const NegotiationStatusPill: FC<{ status: SubNegotiationStatus; className?: string }> = ({\n status,\n className,\n}) => {\n const tr = useTr();\n const label = STATUS_LABEL[status];\n return (\n <span\n data-testid=\"negotiation-status\"\n data-status={status}\n className={cn(\n 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium',\n statusTone(status),\n className\n )}\n >\n {tr(label.key, label.fallback)}\n </span>\n );\n};\n"],"mappings":";;;;;AAMA,IAAa,KAAmF,EAC9F,WACA,mBACI;CACJ,IAAM,IAAK,EAAM,GACX,IAAQ,EAAa;CAC3B,OACE,kBAAC,QAAD;EACE,eAAY;EACZ,eAAa;EACb,WAAW,EACT,2EACA,EAAW,CAAM,GACjB,CACF;YAEC,EAAG,EAAM,KAAK,EAAM,QAAQ;CACzB,CAAA;AAEV"}
1
+ {"version":3,"file":"NegotiationStatusPill.js","names":["NegotiationStatusPill","tr","useTr","label","STATUS_LABEL","status","cn","statusTone","className"],"sources":["../../../../src/subscriberbot/components/negotiations/NegotiationStatusPill.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useTr } from '../../hooks/useTr';\nimport { cn } from '../../utils/cn';\nimport type { SubNegotiationStatus } from '../../types/negotiation';\nimport { STATUS_LABEL, statusTone } from './labels';\n\nexport const NegotiationStatusPill: FC<{ status: SubNegotiationStatus; className?: string }> = ({\n status,\n className,\n}) => {\n const tr = useTr();\n const label = STATUS_LABEL[status];\n return (\n <span\n data-testid=\"negotiation-status\"\n data-status={status}\n className={cn(\n 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium',\n statusTone(status),\n className\n )}\n >\n {tr(label.key, label.fallback)}\n </span>\n );\n};\n"],"mappings":";;;;;AAMA,IAAaA,KAAmF,EAC9F,WACA,mBACI;CACJ,IAAMC,IAAKC,EAAM,GACXC,IAAQC,EAAaC;CAC3B,OACE,kBAAC,QAAD;EACE,eAAY;EACZ,eAAaA;EACb,WAAWC,EACT,2EACAC,EAAWF,CAAM,GACjBG,CACF;EAEC,UAAAP,EAAGE,EAAM,KAAKA,EAAM,QAAQ;CACzB,CAAA;AAEV"}
@@ -1,8 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { SubNegotiationEvent } from '../../types/negotiation';
3
-
4
3
  export declare const NegotiationTimeline: FC<{
5
4
  events: SubNegotiationEvent[];
6
5
  customerLabel?: string;
7
6
  }>;
8
- //# sourceMappingURL=NegotiationTimeline.d.ts.map
@@ -1,8 +1,8 @@
1
- import { useTr as e } from "../../hooks/useTr.js";
2
- import { useFormatters as t } from "../../hooks/useFormatters.js";
1
+ import { useFormatters as e } from "../../hooks/useFormatters.js";
2
+ import { useTr as t } from "../../hooks/useTr.js";
3
3
  import { EVENT_LABEL as n, STATUS_LABEL as r } from "./labels.js";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- //#region src/subscriberbot/components/negotiations/NegotiationTimeline.tsx
5
+ // src/subscriberbot/components/negotiations/NegotiationTimeline.tsx
6
6
  var o = {
7
7
  customer: {
8
8
  key: "negotiations.role.customer",
@@ -17,7 +17,7 @@ var o = {
17
17
  fallback: "Subscriber Bot"
18
18
  }
19
19
  }, s = ({ events: s, customerLabel: c }) => {
20
- let { formatDateTime: l } = t(), u = e();
20
+ let { formatDateTime: l } = e(), u = t();
21
21
  return s.length === 0 ? null : /* @__PURE__ */ i("ol", {
22
22
  className: "space-y-3",
23
23
  "data-testid": "negotiation-timeline",
@@ -43,7 +43,6 @@ var o = {
43
43
  })
44
44
  });
45
45
  };
46
- //#endregion
47
46
  export { s as NegotiationTimeline };
48
47
 
49
48
  //# sourceMappingURL=NegotiationTimeline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NegotiationTimeline.js","names":[],"sources":["../../../../src/subscriberbot/components/negotiations/NegotiationTimeline.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\nimport type { FC } from 'react';\nimport { useTr } from '../../hooks/useTr';\n\nimport type { SubNegotiationEvent } from '../../types/negotiation';\nimport { EVENT_LABEL, STATUS_LABEL } from './labels';\n\nconst ROLE_LABEL: Record<string, { key: string; fallback: string }> = {\n customer: { key: 'negotiations.role.customer', fallback: 'You' },\n negotiator: { key: 'negotiations.role.negotiator', fallback: 'Negotiation desk' },\n system: { key: 'negotiations.role.system', fallback: 'Subscriber Bot' },\n};\n\nexport const NegotiationTimeline: FC<{ events: SubNegotiationEvent[]; customerLabel?: string }> = ({\n events,\n customerLabel,\n}) => {\n const { formatDateTime } = useFormatters();\n\n const tr = useTr();\n if (events.length === 0) return null;\n return (\n <ol className=\"space-y-3\" data-testid=\"negotiation-timeline\">\n {events.map((event) => {\n const role = ROLE_LABEL[event.actorRole] ?? ROLE_LABEL.system!;\n const who =\n event.actorRole === 'customer' && customerLabel\n ? customerLabel\n : tr(role.key, role.fallback);\n const label = EVENT_LABEL[event.kind];\n const to = event.toStatus ? STATUS_LABEL[event.toStatus] : null;\n return (\n <li key={event.id} className=\"rounded-lg border border-border-subtle bg-bg-surface p-3\">\n <div className=\"flex flex-wrap items-center justify-between gap-2 text-xs text-text-secondary\">\n <span className=\"font-medium text-text-primary\">\n {tr(label.key, label.fallback)}\n {to && event.kind !== 'CREATED' ? ` → ${tr(to.key, to.fallback)}` : ''}\n </span>\n <span>\n {who} · {formatDateTime(event.createdAt)}\n </span>\n </div>\n {event.message && (\n <p className=\"mt-1.5 whitespace-pre-wrap text-sm text-text-primary\">\n {event.message}\n </p>\n )}\n </li>\n );\n })}\n </ol>\n );\n};\n"],"mappings":";;;;;AAOA,IAAM,IAAgE;CACpE,UAAU;EAAE,KAAK;EAA8B,UAAU;CAAM;CAC/D,YAAY;EAAE,KAAK;EAAgC,UAAU;CAAmB;CAChF,QAAQ;EAAE,KAAK;EAA4B,UAAU;CAAiB;AACxE,GAEa,KAAsF,EACjG,WACA,uBACI;CACJ,IAAM,EAAE,sBAAmB,EAAc,GAEnC,IAAK,EAAM;CAEjB,OADI,EAAO,WAAW,IAAU,OAE9B,kBAAC,MAAD;EAAI,WAAU;EAAY,eAAY;YACnC,EAAO,KAAK,MAAU;GACrB,IAAM,IAAO,EAAW,EAAM,cAAc,EAAW,QACjD,IACJ,EAAM,cAAc,cAAc,IAC9B,IACA,EAAG,EAAK,KAAK,EAAK,QAAQ,GAC1B,IAAQ,EAAY,EAAM,OAC1B,IAAK,EAAM,WAAW,EAAa,EAAM,YAAY;GAC3D,OACE,kBAAC,MAAD;IAAmB,WAAU;cAA7B,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACG,EAAG,EAAM,KAAK,EAAM,QAAQ,GAC5B,KAAM,EAAM,SAAS,YAAY,MAAM,EAAG,EAAG,KAAK,EAAG,QAAQ,MAAM,EAChE;SACN,kBAAC,QAAD,EAAA,UAAA;MACG;MAAI;MAAI,EAAe,EAAM,SAAS;KACnC,EAAA,CAAA,CACH;QACJ,EAAM,WACL,kBAAC,KAAD;KAAG,WAAU;eACV,EAAM;IACN,CAAA,CAEH;MAfK,EAAM,EAeX;EAER,CAAC;CACC,CAAA;AAER"}
1
+ {"version":3,"file":"NegotiationTimeline.js","names":["ROLE_LABEL","NegotiationTimeline","useFormatters","tr","useTr","events","role","event","who","customerLabel","label","EVENT_LABEL","to","STATUS_LABEL","formatDateTime"],"sources":["../../../../src/subscriberbot/components/negotiations/NegotiationTimeline.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\nimport type { FC } from 'react';\nimport { useTr } from '../../hooks/useTr';\n\nimport type { SubNegotiationEvent } from '../../types/negotiation';\nimport { EVENT_LABEL, STATUS_LABEL } from './labels';\n\nconst ROLE_LABEL: Record<string, { key: string; fallback: string }> = {\n customer: { key: 'negotiations.role.customer', fallback: 'You' },\n negotiator: { key: 'negotiations.role.negotiator', fallback: 'Negotiation desk' },\n system: { key: 'negotiations.role.system', fallback: 'Subscriber Bot' },\n};\n\nexport const NegotiationTimeline: FC<{ events: SubNegotiationEvent[]; customerLabel?: string }> = ({\n events,\n customerLabel,\n}) => {\n const { formatDateTime } = useFormatters();\n\n const tr = useTr();\n if (events.length === 0) return null;\n return (\n <ol className=\"space-y-3\" data-testid=\"negotiation-timeline\">\n {events.map((event) => {\n const role = ROLE_LABEL[event.actorRole] ?? ROLE_LABEL.system!;\n const who =\n event.actorRole === 'customer' && customerLabel\n ? customerLabel\n : tr(role.key, role.fallback);\n const label = EVENT_LABEL[event.kind];\n const to = event.toStatus ? STATUS_LABEL[event.toStatus] : null;\n return (\n <li key={event.id} className=\"rounded-lg border border-border-subtle bg-bg-surface p-3\">\n <div className=\"flex flex-wrap items-center justify-between gap-2 text-xs text-text-secondary\">\n <span className=\"font-medium text-text-primary\">\n {tr(label.key, label.fallback)}\n {to && event.kind !== 'CREATED' ? ` → ${tr(to.key, to.fallback)}` : ''}\n </span>\n <span>\n {who} · {formatDateTime(event.createdAt)}\n </span>\n </div>\n {event.message && (\n <p className=\"mt-1.5 whitespace-pre-wrap text-sm text-text-primary\">\n {event.message}\n </p>\n )}\n </li>\n );\n })}\n </ol>\n );\n};\n"],"mappings":";;;;;AAOA,IAAMA,IAAgE;CACpE,UAAU;EAAE,KAAK;EAA8B,UAAU;CAAM;CAC/D,YAAY;EAAE,KAAK;EAAgC,UAAU;CAAmB;CAChF,QAAQ;EAAE,KAAK;EAA4B,UAAU;CAAiB;AACxE,GAEaC,KAAsF,EACjG,WACA,uBACI;CACJ,IAAM,EAAE,sBAAmBC,EAAc,GAEnCC,IAAKC,EAAM;CAEjB,OADIC,EAAO,WAAW,IAAU,OAE9B,kBAAC,MAAD;EAAI,WAAU;EAAY,eAAY;EACnC,UAAAA,EAAO,KAAK,MAAU;GACrB,IAAMC,IAAON,EAAWO,EAAM,cAAcP,EAAW,QACjDQ,IACJD,EAAM,cAAc,cAAcE,IAC9BA,IACAN,EAAGG,EAAK,KAAKA,EAAK,QAAQ,GAC1BI,IAAQC,EAAYJ,EAAM,OAC1BK,IAAKL,EAAM,WAAWM,EAAaN,EAAM,YAAY;GAC3D,OACE,kBAAC,MAAD;IAAmB,WAAU;IAA7B,UAAA,CACE,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,QAAD;MAAM,WAAU;MAAhB,UAAA,CACGJ,EAAGO,EAAM,KAAKA,EAAM,QAAQ,GAC5BE,KAAML,EAAM,SAAS,YAAY,MAAMJ,EAAGS,EAAG,KAAKA,EAAG,QAAQ,MAAM,EAChE;KACN,CAAA,GAAA,kBAAC,QAAD,EAAA,UAAA;MACGJ;MAAI;MAAIM,EAAeP,EAAM,SAAS;KACnC,EAAA,CAAA,CACH;IACJ,CAAA,GAAAA,EAAM,WACL,kBAAC,KAAD;KAAG,WAAU;KACV,UAAAA,EAAM;IACN,CAAA,CAEH;GAfK,GAAAA,EAAM,EAeX;EAER,CAAC;CACC,CAAA;AAER"}
@@ -1,6 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  import { SubNegotiation, SubRecordNegotiationOutcomeInput } from '../../types/negotiation';
3
-
4
3
  interface OutcomeFormProps {
5
4
  negotiation: SubNegotiation;
6
5
  pending: boolean;
@@ -10,4 +9,3 @@ interface OutcomeFormProps {
10
9
  }
11
10
  export declare const OutcomeForm: FC<OutcomeFormProps>;
12
11
  export {};
13
- //# sourceMappingURL=OutcomeForm.d.ts.map
@@ -1,10 +1,10 @@
1
- import { useTr as e } from "../../hooks/useTr.js";
2
- import { useFormatters as t } from "../../hooks/useFormatters.js";
1
+ import { useFormatters as e } from "../../hooks/useFormatters.js";
2
+ import { useTr as t } from "../../hooks/useTr.js";
3
3
  import { useState as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- //#region src/subscriberbot/components/negotiations/OutcomeForm.tsx
5
+ // src/subscriberbot/components/negotiations/OutcomeForm.tsx
6
6
  var a = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", o = "mb-1 block text-xs font-medium text-text-secondary", s = ({ negotiation: s, pending: c, error: l, submitLabel: u, onSubmit: d }) => {
7
- let { formatCurrency: f } = t(), p = e(), [m, h] = n("SUCCEEDED"), [g, _] = n(""), [v, y] = n(""), [b, x] = n(""), [S, C] = n(!!s.relationshipId);
7
+ let { formatCurrency: f } = e(), p = t(), [m, h] = n("SUCCEEDED"), [g, _] = n(""), [v, y] = n(""), [b, x] = n(""), [S, C] = n(!!s.relationshipId);
8
8
  return /* @__PURE__ */ i("form", {
9
9
  onSubmit: (e) => {
10
10
  e.preventDefault(), d({
@@ -106,7 +106,6 @@ var a = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
106
106
  ]
107
107
  });
108
108
  };
109
- //#endregion
110
109
  export { s as OutcomeForm };
111
110
 
112
111
  //# sourceMappingURL=OutcomeForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OutcomeForm.js","names":[],"sources":["../../../../src/subscriberbot/components/negotiations/OutcomeForm.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\n/**\n * Outcome form shared by the customer (self-serve) and the negotiation desk.\n */\nimport { useState, type FC, type FormEvent } from 'react';\nimport { useTr } from '../../hooks/useTr';\n\nimport type {\n SubNegotiation,\n SubNegotiationOutcome,\n SubRecordNegotiationOutcomeInput,\n} from '../../types/negotiation';\n\nconst inputCls =\n 'w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\nconst labelCls = 'mb-1 block text-xs font-medium text-text-secondary';\n\ninterface OutcomeFormProps {\n negotiation: SubNegotiation;\n pending: boolean;\n error?: string | null;\n submitLabel: string;\n onSubmit: (input: SubRecordNegotiationOutcomeInput) => void;\n}\n\nexport const OutcomeForm: FC<OutcomeFormProps> = ({\n negotiation,\n pending,\n error,\n submitLabel,\n onSubmit,\n}) => {\n const { formatCurrency } = useFormatters();\n\n const tr = useTr();\n const [outcome, setOutcome] = useState<SubNegotiationOutcome>('SUCCEEDED');\n const [newAmount, setNewAmount] = useState('');\n const [credit, setCredit] = useState('');\n const [summary, setSummary] = useState('');\n const [apply, setApply] = useState(Boolean(negotiation.relationshipId));\n\n const handleSubmit = (e: FormEvent) => {\n e.preventDefault();\n onSubmit({\n outcome,\n ...(outcome === 'SUCCEEDED' && newAmount ? { newAmount: Number(newAmount) } : {}),\n ...(outcome === 'SUCCEEDED' && credit ? { oneTimeCredit: Number(credit) } : {}),\n ...(summary.trim() ? { summary: summary.trim() } : {}),\n ...(outcome === 'SUCCEEDED' && negotiation.relationshipId\n ? { applyToRelationship: apply }\n : {}),\n });\n };\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-3\" data-testid=\"negotiation-outcome-form\">\n <fieldset className=\"flex flex-wrap gap-4 text-sm text-text-primary\">\n <legend className={labelCls}>{tr('negotiations.outcome.result', 'Result')}</legend>\n <label className=\"inline-flex items-center gap-2\">\n <input\n type=\"radio\"\n name=\"outcome\"\n checked={outcome === 'SUCCEEDED'}\n onChange={() => setOutcome('SUCCEEDED')}\n />\n {tr('negotiations.outcome.succeeded', 'The bill was lowered or credited')}\n </label>\n <label className=\"inline-flex items-center gap-2\">\n <input\n type=\"radio\"\n name=\"outcome\"\n checked={outcome === 'NO_SAVINGS'}\n onChange={() => setOutcome('NO_SAVINGS')}\n />\n {tr('negotiations.outcome.noSavings', 'No savings offered')}\n </label>\n </fieldset>\n {outcome === 'SUCCEEDED' && (\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"outcome-new-amount\" className={labelCls}>\n {tr('negotiations.outcome.newAmount', 'New price ({{current}} today)', {\n current: formatCurrency(negotiation.currentAmount, negotiation.currency),\n })}\n </label>\n <input\n id=\"outcome-new-amount\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={newAmount}\n onChange={(e) => setNewAmount(e.target.value)}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"outcome-credit\" className={labelCls}>\n {tr('negotiations.outcome.credit', 'One-off credit or refund')}\n </label>\n <input\n id=\"outcome-credit\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={credit}\n onChange={(e) => setCredit(e.target.value)}\n className={inputCls}\n />\n </div>\n </div>\n )}\n <div>\n <label htmlFor=\"outcome-summary\" className={labelCls}>\n {tr('negotiations.outcome.summary', 'What was agreed')}\n </label>\n <textarea\n id=\"outcome-summary\"\n rows={2}\n value={summary}\n onChange={(e) => setSummary(e.target.value)}\n className={inputCls}\n />\n </div>\n {outcome === 'SUCCEEDED' && negotiation.relationshipId && (\n <label className=\"inline-flex items-center gap-2 text-sm text-text-primary\">\n <input type=\"checkbox\" checked={apply} onChange={(e) => setApply(e.target.checked)} />\n {tr('negotiations.outcome.apply', 'Update the tracked subscription with the new price')}\n </label>\n )}\n {error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n )}\n <button\n type=\"submit\"\n disabled={pending}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50\"\n >\n {submitLabel}\n </button>\n </form>\n );\n};\n"],"mappings":";;;;;AAaA,IAAM,IACJ,wMACI,IAAW,sDAUJ,KAAqC,EAChD,gBACA,YACA,UACA,gBACA,kBACI;CACJ,IAAM,EAAE,sBAAmB,EAAc,GAEnC,IAAK,EAAM,GACX,CAAC,GAAS,KAAc,EAAgC,WAAW,GACnE,CAAC,GAAW,KAAgB,EAAS,EAAE,GACvC,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAS,KAAc,EAAS,EAAE,GACnC,CAAC,GAAO,KAAY,EAAS,EAAQ,EAAY,cAAe;CAetE,OACE,kBAAC,QAAD;EAAM,WAdc,MAAiB;GAErC,AADA,EAAE,eAAe,GACjB,EAAS;IACP;IACA,GAAI,MAAY,eAAe,IAAY,EAAE,WAAW,OAAO,CAAS,EAAE,IAAI,CAAC;IAC/E,GAAI,MAAY,eAAe,IAAS,EAAE,eAAe,OAAO,CAAM,EAAE,IAAI,CAAC;IAC7E,GAAI,EAAQ,KAAK,IAAI,EAAE,SAAS,EAAQ,KAAK,EAAE,IAAI,CAAC;IACpD,GAAI,MAAY,eAAe,EAAY,iBACvC,EAAE,qBAAqB,EAAM,IAC7B,CAAC;GACP,CAAC;EACH;EAGgC,WAAU;EAAY,eAAY;YAAhE;GACE,kBAAC,YAAD;IAAU,WAAU;cAApB;KACE,kBAAC,UAAD;MAAQ,WAAW;gBAAW,EAAG,+BAA+B,QAAQ;KAAU,CAAA;KAClF,kBAAC,SAAD;MAAO,WAAU;gBAAjB,CACE,kBAAC,SAAD;OACE,MAAK;OACL,MAAK;OACL,SAAS,MAAY;OACrB,gBAAgB,EAAW,WAAW;MAC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WAAW,MAAM,EAAS,EAAE,OAAO,OAAO;IAAI,CAAA,GACpF,EAAG,8BAA8B,oDAAoD,CACjF;;GAER,KACC,kBAAC,KAAD;IAAG,MAAK;IAAQ,WAAU;cACvB;GACA,CAAA;GAEL,kBAAC,UAAD;IACE,MAAK;IACL,UAAU;IACV,WAAU;cAET;GACK,CAAA;EACJ;;AAEV"}
1
+ {"version":3,"file":"OutcomeForm.js","names":["inputCls","labelCls","OutcomeForm","useFormatters","tr","useTr","outcome","setOutcome","useState","newAmount","setNewAmount","credit","setCredit","summary","setSummary","apply","setApply","negotiation","onSubmit","formatCurrency","error","pending","submitLabel"],"sources":["../../../../src/subscriberbot/components/negotiations/OutcomeForm.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\n/**\n * Outcome form shared by the customer (self-serve) and the negotiation desk.\n */\nimport { useState, type FC, type FormEvent } from 'react';\nimport { useTr } from '../../hooks/useTr';\n\nimport type {\n SubNegotiation,\n SubNegotiationOutcome,\n SubRecordNegotiationOutcomeInput,\n} from '../../types/negotiation';\n\nconst inputCls =\n 'w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\nconst labelCls = 'mb-1 block text-xs font-medium text-text-secondary';\n\ninterface OutcomeFormProps {\n negotiation: SubNegotiation;\n pending: boolean;\n error?: string | null;\n submitLabel: string;\n onSubmit: (input: SubRecordNegotiationOutcomeInput) => void;\n}\n\nexport const OutcomeForm: FC<OutcomeFormProps> = ({\n negotiation,\n pending,\n error,\n submitLabel,\n onSubmit,\n}) => {\n const { formatCurrency } = useFormatters();\n\n const tr = useTr();\n const [outcome, setOutcome] = useState<SubNegotiationOutcome>('SUCCEEDED');\n const [newAmount, setNewAmount] = useState('');\n const [credit, setCredit] = useState('');\n const [summary, setSummary] = useState('');\n const [apply, setApply] = useState(Boolean(negotiation.relationshipId));\n\n const handleSubmit = (e: FormEvent) => {\n e.preventDefault();\n onSubmit({\n outcome,\n ...(outcome === 'SUCCEEDED' && newAmount ? { newAmount: Number(newAmount) } : {}),\n ...(outcome === 'SUCCEEDED' && credit ? { oneTimeCredit: Number(credit) } : {}),\n ...(summary.trim() ? { summary: summary.trim() } : {}),\n ...(outcome === 'SUCCEEDED' && negotiation.relationshipId\n ? { applyToRelationship: apply }\n : {}),\n });\n };\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-3\" data-testid=\"negotiation-outcome-form\">\n <fieldset className=\"flex flex-wrap gap-4 text-sm text-text-primary\">\n <legend className={labelCls}>{tr('negotiations.outcome.result', 'Result')}</legend>\n <label className=\"inline-flex items-center gap-2\">\n <input\n type=\"radio\"\n name=\"outcome\"\n checked={outcome === 'SUCCEEDED'}\n onChange={() => setOutcome('SUCCEEDED')}\n />\n {tr('negotiations.outcome.succeeded', 'The bill was lowered or credited')}\n </label>\n <label className=\"inline-flex items-center gap-2\">\n <input\n type=\"radio\"\n name=\"outcome\"\n checked={outcome === 'NO_SAVINGS'}\n onChange={() => setOutcome('NO_SAVINGS')}\n />\n {tr('negotiations.outcome.noSavings', 'No savings offered')}\n </label>\n </fieldset>\n {outcome === 'SUCCEEDED' && (\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"outcome-new-amount\" className={labelCls}>\n {tr('negotiations.outcome.newAmount', 'New price ({{current}} today)', {\n current: formatCurrency(negotiation.currentAmount, negotiation.currency),\n })}\n </label>\n <input\n id=\"outcome-new-amount\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={newAmount}\n onChange={(e) => setNewAmount(e.target.value)}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"outcome-credit\" className={labelCls}>\n {tr('negotiations.outcome.credit', 'One-off credit or refund')}\n </label>\n <input\n id=\"outcome-credit\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={credit}\n onChange={(e) => setCredit(e.target.value)}\n className={inputCls}\n />\n </div>\n </div>\n )}\n <div>\n <label htmlFor=\"outcome-summary\" className={labelCls}>\n {tr('negotiations.outcome.summary', 'What was agreed')}\n </label>\n <textarea\n id=\"outcome-summary\"\n rows={2}\n value={summary}\n onChange={(e) => setSummary(e.target.value)}\n className={inputCls}\n />\n </div>\n {outcome === 'SUCCEEDED' && negotiation.relationshipId && (\n <label className=\"inline-flex items-center gap-2 text-sm text-text-primary\">\n <input type=\"checkbox\" checked={apply} onChange={(e) => setApply(e.target.checked)} />\n {tr('negotiations.outcome.apply', 'Update the tracked subscription with the new price')}\n </label>\n )}\n {error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n )}\n <button\n type=\"submit\"\n disabled={pending}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50\"\n >\n {submitLabel}\n </button>\n </form>\n );\n};\n"],"mappings":";;;;;AAaA,IAAMA,IACJ,wMACIC,IAAW,sDAUJC,KAAqC,EAChD,gBACA,YACA,UACA,gBACA,kBACI;CACJ,IAAM,EAAE,sBAAmBC,EAAc,GAEnCC,IAAKC,EAAM,GACX,CAACC,GAASC,KAAcC,EAAgC,WAAW,GACnE,CAACC,GAAWC,KAAgBF,EAAS,EAAE,GACvC,CAACG,GAAQC,KAAaJ,EAAS,EAAE,GACjC,CAACK,GAASC,KAAcN,EAAS,EAAE,GACnC,CAACO,GAAOC,KAAYR,EAAS,EAAQS,EAAY,cAAe;CAetE,OACE,kBAAC,QAAD;EAAM,WAdc,MAAiB;GAErC,AADA,EAAE,eAAe,GACjBC,EAAS;IACP;IACA,GAAIZ,MAAY,eAAeG,IAAY,EAAE,WAAW,OAAOA,CAAS,EAAE,IAAI,CAAC;IAC/E,GAAIH,MAAY,eAAeK,IAAS,EAAE,eAAe,OAAOA,CAAM,EAAE,IAAI,CAAC;IAC7E,GAAIE,EAAQ,KAAK,IAAI,EAAE,SAASA,EAAQ,KAAK,EAAE,IAAI,CAA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AE,OAAO,KAAK;KACzC,WAAWZ;IACZ,CAAA,CACE,EAAA,CAAA,CACF;;GAEP,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;IAAO,SAAQ;IAAkB,WAAWC;IACzC,UAAAG,EAAG,gCAAgC,iBAAiB;GAChD,CAAA,GACP,kBAAC,YAAD;IACE,IAAG;IACH,MAAM;IACN,OAAOS;IACP,WAAW,MAAMC,EAAW,EAAE,OAAO,KAAK;IAC1C,WAAWd;GACZ,CAAA,CACE,EAAA,CAAA;GACJM,MAAY,eAAeW,EAAY,kBACtC,kBAAC,SAAD;IAAO,WAAU;IAAjB,UAAA,CACE,kBAAC,SAAD;KAAO,MAAK;KAAW,SAASF;KAAO,WAAW,MAAMC,EAAS,EAAE,OAAO,OAAO;IAAI,CAAA,GACpFZ,EAAG,8BAA8B,oDAAoD,CACjF;;GAERgB,KACC,kBAAC,KAAD;IAAG,MAAK;IAAQ,WAAU;IACvB,UAAAA;GACA,CAAA;GAEL,kBAAC,UAAD;IACE,MAAK;IACL,UAAUC;IACV,WAAU;IAET,UAAAC;GACK,CAAA;EACJ;;AAEV"}
@@ -2,4 +2,3 @@ export * from './labels';
2
2
  export { NegotiationStatusPill } from './NegotiationStatusPill';
3
3
  export { NegotiationTimeline } from './NegotiationTimeline';
4
4
  export { OutcomeForm } from './OutcomeForm';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,5 @@
1
- import "./labels.js";
2
- import "./NegotiationStatusPill.js";
3
- import "./NegotiationTimeline.js";
4
- import "./OutcomeForm.js";
1
+ import { BILL_TYPES as e, BILL_TYPE_LABEL as t, EVENT_LABEL as n, FEE_STATUS_LABEL as r, OPEN_STATUSES as i, STATUS_LABEL as a, TARGETS as o, TARGET_LABEL as s, statusTone as c } from "./labels.js";
2
+ import { NegotiationStatusPill as l } from "./NegotiationStatusPill.js";
3
+ import { NegotiationTimeline as u } from "./NegotiationTimeline.js";
4
+ import { OutcomeForm as d } from "./OutcomeForm.js";
5
+ export { e as BILL_TYPES, t as BILL_TYPE_LABEL, n as EVENT_LABEL, r as FEE_STATUS_LABEL, l as NegotiationStatusPill, u as NegotiationTimeline, i as OPEN_STATUSES, d as OutcomeForm, a as STATUS_LABEL, o as TARGETS, s as TARGET_LABEL, c as statusTone };
@@ -1,5 +1,4 @@
1
1
  import { SubNegotiationBillType, SubNegotiationEventKind, SubNegotiationFeeStatus, SubNegotiationStatus, SubNegotiationTarget } from '../../types/negotiation';
2
-
3
2
  export type Label = {
4
3
  key: string;
5
4
  fallback: string;
@@ -13,4 +12,3 @@ export declare const FEE_STATUS_LABEL: Record<SubNegotiationFeeStatus, Label>;
13
12
  export declare const EVENT_LABEL: Record<SubNegotiationEventKind, Label>;
14
13
  export declare function statusTone(status: SubNegotiationStatus): string;
15
14
  export declare const OPEN_STATUSES: SubNegotiationStatus[];
16
- //# sourceMappingURL=labels.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/subscriberbot/components/negotiations/labels.ts
1
+ // src/subscriberbot/components/negotiations/labels.ts
2
2
  var e = [
3
3
  "INTERNET",
4
4
  "CABLE_TV",
@@ -173,7 +173,6 @@ var l = [
173
173
  "IN_PROGRESS",
174
174
  "AWAITING_CUSTOMER"
175
175
  ];
176
- //#endregion
177
176
  export { e as BILL_TYPES, t as BILL_TYPE_LABEL, o as EVENT_LABEL, a as FEE_STATUS_LABEL, l as OPEN_STATUSES, i as STATUS_LABEL, n as TARGETS, r as TARGET_LABEL, c as statusTone };
178
177
 
179
178
  //# sourceMappingURL=labels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"labels.js","names":[],"sources":["../../../../src/subscriberbot/components/negotiations/labels.ts"],"sourcesContent":["/**\n * Bill negotiation labels (BOFF-4154): i18n keys with English fallbacks.\n */\nimport type {\n SubNegotiationBillType,\n SubNegotiationEventKind,\n SubNegotiationFeeStatus,\n SubNegotiationStatus,\n SubNegotiationTarget,\n} from '../../types/negotiation';\n\nexport type Label = { key: string; fallback: string };\n\nexport const BILL_TYPES: SubNegotiationBillType[] = [\n 'INTERNET',\n 'CABLE_TV',\n 'MOBILE_PHONE',\n 'HOME_PHONE',\n 'INSURANCE',\n 'UTILITY',\n 'SUBSCRIPTION',\n 'OTHER',\n];\n\nexport const BILL_TYPE_LABEL: Record<SubNegotiationBillType, Label> = {\n CABLE_TV: { key: 'negotiations.billType.cableTv', fallback: 'Cable TV' },\n INTERNET: { key: 'negotiations.billType.internet', fallback: 'Internet' },\n MOBILE_PHONE: { key: 'negotiations.billType.mobilePhone', fallback: 'Mobile phone' },\n HOME_PHONE: { key: 'negotiations.billType.homePhone', fallback: 'Home phone' },\n INSURANCE: { key: 'negotiations.billType.insurance', fallback: 'Insurance' },\n UTILITY: { key: 'negotiations.billType.utility', fallback: 'Utility' },\n SUBSCRIPTION: { key: 'negotiations.billType.subscription', fallback: 'Subscription' },\n OTHER: { key: 'negotiations.billType.other', fallback: 'Other' },\n};\n\nexport const TARGETS: SubNegotiationTarget[] = [\n 'LOWER_PRICE',\n 'REMOVE_FEES',\n 'BETTER_PLAN_SAME_PRICE',\n 'RETENTION_OFFER',\n 'CANCEL_IF_NO_DEAL',\n];\n\nexport const TARGET_LABEL: Record<SubNegotiationTarget, Label> = {\n LOWER_PRICE: { key: 'negotiations.target.lowerPrice', fallback: 'Lower the price' },\n REMOVE_FEES: { key: 'negotiations.target.removeFees', fallback: 'Remove fees' },\n BETTER_PLAN_SAME_PRICE: {\n key: 'negotiations.target.betterPlan',\n fallback: 'Better plan for the same price',\n },\n RETENTION_OFFER: { key: 'negotiations.target.retention', fallback: 'Best retention offer' },\n CANCEL_IF_NO_DEAL: {\n key: 'negotiations.target.cancelIfNoDeal',\n fallback: 'Lower the price or cancel',\n },\n};\n\nexport const STATUS_LABEL: Record<SubNegotiationStatus, Label> = {\n DRAFT: { key: 'negotiations.status.draft', fallback: 'Draft' },\n SUBMITTED: { key: 'negotiations.status.submitted', fallback: 'Submitted' },\n IN_PROGRESS: { key: 'negotiations.status.inProgress', fallback: 'Negotiating' },\n AWAITING_CUSTOMER: { key: 'negotiations.status.awaitingCustomer', fallback: 'Needs your reply' },\n SUCCEEDED: { key: 'negotiations.status.succeeded', fallback: 'Bill lowered' },\n NO_SAVINGS: { key: 'negotiations.status.noSavings', fallback: 'No savings' },\n CANCELLED: { key: 'negotiations.status.cancelled', fallback: 'Cancelled' },\n};\n\nexport const FEE_STATUS_LABEL: Record<SubNegotiationFeeStatus, Label> = {\n NONE: { key: 'negotiations.fee.none', fallback: 'No fee' },\n PENDING_BILLING: { key: 'negotiations.fee.pending', fallback: 'Fee pending' },\n BILLED: { key: 'negotiations.fee.billed', fallback: 'Fee billed' },\n WAIVED: { key: 'negotiations.fee.waived', fallback: 'Fee waived' },\n};\n\nexport const EVENT_LABEL: Record<SubNegotiationEventKind, Label> = {\n CREATED: { key: 'negotiations.event.created', fallback: 'Request created' },\n UPDATED: { key: 'negotiations.event.updated', fallback: 'Details updated' },\n SUBMITTED: { key: 'negotiations.event.submitted', fallback: 'Submitted' },\n STATUS_CHANGED: { key: 'negotiations.event.statusChanged', fallback: 'Status changed' },\n NOTE: { key: 'negotiations.event.note', fallback: 'Message' },\n OUTCOME_RECORDED: { key: 'negotiations.event.outcome', fallback: 'Outcome recorded' },\n FEE_BILLED: { key: 'negotiations.event.feeBilled', fallback: 'Success fee billed' },\n FEE_BILLING_FAILED: {\n key: 'negotiations.event.feeBillingFailed',\n fallback: 'Fee billing failed (will be retried)',\n },\n FEE_WAIVED: { key: 'negotiations.event.feeWaived', fallback: 'Success fee waived' },\n CANCELLED: { key: 'negotiations.event.cancelled', fallback: 'Cancelled' },\n};\n\nconst STATUS_TONE: Record<SubNegotiationStatus, string> = {\n DRAFT: 'bg-bg-sunken text-text-secondary',\n SUBMITTED: 'bg-[var(--color-accent-soft)] text-text-primary',\n IN_PROGRESS: 'bg-[var(--color-accent-soft)] text-text-primary',\n AWAITING_CUSTOMER: 'bg-status-warning-bg-subtle text-status-warning-text',\n SUCCEEDED: 'bg-status-success-bg-subtle text-status-success-text',\n NO_SAVINGS: 'bg-bg-sunken text-text-secondary',\n CANCELLED: 'bg-bg-sunken text-text-secondary',\n};\n\nexport function statusTone(status: SubNegotiationStatus): string {\n return STATUS_TONE[status];\n}\n\nexport const OPEN_STATUSES: SubNegotiationStatus[] = [\n 'DRAFT',\n 'SUBMITTED',\n 'IN_PROGRESS',\n 'AWAITING_CUSTOMER',\n];\n"],"mappings":";AAaA,IAAa,IAAuC;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEa,IAAyD;CACpE,UAAU;EAAE,KAAK;EAAiC,UAAU;CAAW;CACvE,UAAU;EAAE,KAAK;EAAkC,UAAU;CAAW;CACxE,cAAc;EAAE,KAAK;EAAqC,UAAU;CAAe;CACnF,YAAY;EAAE,KAAK;EAAmC,UAAU;CAAa;CAC7E,WAAW;EAAE,KAAK;EAAmC,UAAU;CAAY;CAC3E,SAAS;EAAE,KAAK;EAAiC,UAAU;CAAU;CACrE,cAAc;EAAE,KAAK;EAAsC,UAAU;CAAe;CACpF,OAAO;EAAE,KAAK;EAA+B,UAAU;CAAQ;AACjE,GAEa,IAAkC;CAC7C;CACA;CACA;CACA;CACA;AACF,GAEa,IAAoD;CAC/D,aAAa;EAAE,KAAK;EAAkC,UAAU;CAAkB;CAClF,aAAa;EAAE,KAAK;EAAkC,UAAU;CAAc;CAC9E,wBAAwB;EACtB,KAAK;EACL,UAAU;CACZ;CACA,iBAAiB;EAAE,KAAK;EAAiC,UAAU;CAAuB;CAC1F,mBAAmB;EACjB,KAAK;EACL,UAAU;CACZ;AACF,GAEa,IAAoD;CAC/D,OAAO;EAAE,KAAK;EAA6B,UAAU;CAAQ;CAC7D,WAAW;EAAE,KAAK;EAAiC,UAAU;CAAY;CACzE,aAAa;EAAE,KAAK;EAAkC,UAAU;CAAc;CAC9E,mBAAmB;EAAE,KAAK;EAAwC,UAAU;CAAmB;CAC/F,WAAW;EAAE,KAAK;EAAiC,UAAU;CAAe;CAC5E,YAAY;EAAE,KAAK;EAAiC,UAAU;CAAa;CAC3E,WAAW;EAAE,KAAK;EAAiC,UAAU;CAAY;AAC3E,GAEa,IAA2D;CACtE,MAAM;EAAE,KAAK;EAAyB,UAAU;CAAS;CACzD,iBAAiB;EAAE,KAAK;EAA4B,UAAU;CAAc;CAC5E,QAAQ;EAAE,KAAK;EAA2B,UAAU;CAAa;CACjE,QAAQ;EAAE,KAAK;EAA2B,UAAU;CAAa;AACnE,GAEa,IAAsD;CACjE,SAAS;EAAE,KAAK;EAA8B,UAAU;CAAkB;CAC1E,SAAS;EAAE,KAAK;EAA8B,UAAU;CAAkB;CAC1E,WAAW;EAAE,KAAK;EAAgC,UAAU;CAAY;CACxE,gBAAgB;EAAE,KAAK;EAAoC,UAAU;CAAiB;CACtF,MAAM;EAAE,KAAK;EAA2B,UAAU;CAAU;CAC5D,kBAAkB;EAAE,KAAK;EAA8B,UAAU;CAAmB;CACpF,YAAY;EAAE,KAAK;EAAgC,UAAU;CAAqB;CAClF,oBAAoB;EAClB,KAAK;EACL,UAAU;CACZ;CACA,YAAY;EAAE,KAAK;EAAgC,UAAU;CAAqB;CAClF,WAAW;EAAE,KAAK;EAAgC,UAAU;CAAY;AAC1E,GAEM,IAAoD;CACxD,OAAO;CACP,WAAW;CACX,aAAa;CACb,mBAAmB;CACnB,WAAW;CACX,YAAY;CACZ,WAAW;AACb;AAEA,SAAgB,EAAW,GAAsC;CAC/D,OAAO,EAAY;AACrB;AAEA,IAAa,IAAwC;CACnD;CACA;CACA;CACA;AACF"}
1
+ {"version":3,"file":"labels.js","names":["BILL_TYPES","BILL_TYPE_LABEL","TARGETS","TARGET_LABEL","STATUS_LABEL","FEE_STATUS_LABEL","EVENT_LABEL","STATUS_TONE","statusTone","status","OPEN_STATUSES"],"sources":["../../../../src/subscriberbot/components/negotiations/labels.ts"],"sourcesContent":["/**\n * Bill negotiation labels (BOFF-4154): i18n keys with English fallbacks.\n */\nimport type {\n SubNegotiationBillType,\n SubNegotiationEventKind,\n SubNegotiationFeeStatus,\n SubNegotiationStatus,\n SubNegotiationTarget,\n} from '../../types/negotiation';\n\nexport type Label = { key: string; fallback: string };\n\nexport const BILL_TYPES: SubNegotiationBillType[] = [\n 'INTERNET',\n 'CABLE_TV',\n 'MOBILE_PHONE',\n 'HOME_PHONE',\n 'INSURANCE',\n 'UTILITY',\n 'SUBSCRIPTION',\n 'OTHER',\n];\n\nexport const BILL_TYPE_LABEL: Record<SubNegotiationBillType, Label> = {\n CABLE_TV: { key: 'negotiations.billType.cableTv', fallback: 'Cable TV' },\n INTERNET: { key: 'negotiations.billType.internet', fallback: 'Internet' },\n MOBILE_PHONE: { key: 'negotiations.billType.mobilePhone', fallback: 'Mobile phone' },\n HOME_PHONE: { key: 'negotiations.billType.homePhone', fallback: 'Home phone' },\n INSURANCE: { key: 'negotiations.billType.insurance', fallback: 'Insurance' },\n UTILITY: { key: 'negotiations.billType.utility', fallback: 'Utility' },\n SUBSCRIPTION: { key: 'negotiations.billType.subscription', fallback: 'Subscription' },\n OTHER: { key: 'negotiations.billType.other', fallback: 'Other' },\n};\n\nexport const TARGETS: SubNegotiationTarget[] = [\n 'LOWER_PRICE',\n 'REMOVE_FEES',\n 'BETTER_PLAN_SAME_PRICE',\n 'RETENTION_OFFER',\n 'CANCEL_IF_NO_DEAL',\n];\n\nexport const TARGET_LABEL: Record<SubNegotiationTarget, Label> = {\n LOWER_PRICE: { key: 'negotiations.target.lowerPrice', fallback: 'Lower the price' },\n REMOVE_FEES: { key: 'negotiations.target.removeFees', fallback: 'Remove fees' },\n BETTER_PLAN_SAME_PRICE: {\n key: 'negotiations.target.betterPlan',\n fallback: 'Better plan for the same price',\n },\n RETENTION_OFFER: { key: 'negotiations.target.retention', fallback: 'Best retention offer' },\n CANCEL_IF_NO_DEAL: {\n key: 'negotiations.target.cancelIfNoDeal',\n fallback: 'Lower the price or cancel',\n },\n};\n\nexport const STATUS_LABEL: Record<SubNegotiationStatus, Label> = {\n DRAFT: { key: 'negotiations.status.draft', fallback: 'Draft' },\n SUBMITTED: { key: 'negotiations.status.submitted', fallback: 'Submitted' },\n IN_PROGRESS: { key: 'negotiations.status.inProgress', fallback: 'Negotiating' },\n AWAITING_CUSTOMER: { key: 'negotiations.status.awaitingCustomer', fallback: 'Needs your reply' },\n SUCCEEDED: { key: 'negotiations.status.succeeded', fallback: 'Bill lowered' },\n NO_SAVINGS: { key: 'negotiations.status.noSavings', fallback: 'No savings' },\n CANCELLED: { key: 'negotiations.status.cancelled', fallback: 'Cancelled' },\n};\n\nexport const FEE_STATUS_LABEL: Record<SubNegotiationFeeStatus, Label> = {\n NONE: { key: 'negotiations.fee.none', fallback: 'No fee' },\n PENDING_BILLING: { key: 'negotiations.fee.pending', fallback: 'Fee pending' },\n BILLED: { key: 'negotiations.fee.billed', fallback: 'Fee billed' },\n WAIVED: { key: 'negotiations.fee.waived', fallback: 'Fee waived' },\n};\n\nexport const EVENT_LABEL: Record<SubNegotiationEventKind, Label> = {\n CREATED: { key: 'negotiations.event.created', fallback: 'Request created' },\n UPDATED: { key: 'negotiations.event.updated', fallback: 'Details updated' },\n SUBMITTED: { key: 'negotiations.event.submitted', fallback: 'Submitted' },\n STATUS_CHANGED: { key: 'negotiations.event.statusChanged', fallback: 'Status changed' },\n NOTE: { key: 'negotiations.event.note', fallback: 'Message' },\n OUTCOME_RECORDED: { key: 'negotiations.event.outcome', fallback: 'Outcome recorded' },\n FEE_BILLED: { key: 'negotiations.event.feeBilled', fallback: 'Success fee billed' },\n FEE_BILLING_FAILED: {\n key: 'negotiations.event.feeBillingFailed',\n fallback: 'Fee billing failed (will be retried)',\n },\n FEE_WAIVED: { key: 'negotiations.event.feeWaived', fallback: 'Success fee waived' },\n CANCELLED: { key: 'negotiations.event.cancelled', fallback: 'Cancelled' },\n};\n\nconst STATUS_TONE: Record<SubNegotiationStatus, string> = {\n DRAFT: 'bg-bg-sunken text-text-secondary',\n SUBMITTED: 'bg-[var(--color-accent-soft)] text-text-primary',\n IN_PROGRESS: 'bg-[var(--color-accent-soft)] text-text-primary',\n AWAITING_CUSTOMER: 'bg-status-warning-bg-subtle text-status-warning-text',\n SUCCEEDED: 'bg-status-success-bg-subtle text-status-success-text',\n NO_SAVINGS: 'bg-bg-sunken text-text-secondary',\n CANCELLED: 'bg-bg-sunken text-text-secondary',\n};\n\nexport function statusTone(status: SubNegotiationStatus): string {\n return STATUS_TONE[status];\n}\n\nexport const OPEN_STATUSES: SubNegotiationStatus[] = [\n 'DRAFT',\n 'SUBMITTED',\n 'IN_PROGRESS',\n 'AWAITING_CUSTOMER',\n];\n"],"mappings":";AAaA,IAAaA,IAAuC;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEaC,IAAyD;CACpE,UAAU;EAAE,KAAK;EAAiC,UAAU;CAAW;CACvE,UAAU;EAAE,KAAK;EAAkC,UAAU;CAAW;CACxE,cAAc;EAAE,KAAK;EAAqC,UAAU;CAAe;CACnF,YAAY;EAAE,KAAK;EAAmC,UAAU;CAAa;CAC7E,WAAW;EAAE,KAAK;EAAmC,UAAU;CAAY;CAC3E,SAAS;EAAE,KAAK;EAAiC,UAAU;CAAU;CACrE,cAAc;EAAE,KAAK;EAAsC,UAAU;CAAe;CACpF,OAAO;EAAE,KAAK;EAA+B,UAAU;CAAQ;AACjE,GAEaC,IAAkC;CAC7C;CACA;CACA;CACA;CACA;AACF,GAEaC,IAAoD;CAC/D,aAAa;EAAE,KAAK;EAAkC,UAAU;CAAkB;CAClF,aAAa;EAAE,KAAK;EAAkC,UAAU;CAAc;CAC9E,wBAAwB;EACtB,KAAK;EACL,UAAU;CACZ;CACA,iBAAiB;EAAE,KAAK;EAAiC,UAAU;CAAuB;CAC1F,mBAAmB;EACjB,KAAK;EACL,UAAU;CACZ;AACF,GAEaC,IAAoD;CAC/D,OAAO;EAAE,KAAK;EAA6B,UAAU;CAAQ;CAC7D,WAAW;EAAE,KAAK;EAAiC,UAAU;CAAY;CACzE,aAAa;EAAE,KAAK;EAAkC,UAAU;CAAc;CAC9E,mBAAmB;EAAE,KAAK;EAAwC,UAAU;CAAmB;CAC/F,WAAW;EAAE,KAAK;EAAiC,UAAU;CAAe;CAC5E,YAAY;EAAE,KAAK;EAAiC,UAAU;CAAa;CAC3E,WAAW;EAAE,KAAK;EAAiC,UAAU;CAAY;AAC3E,GAEaC,IAA2D;CACtE,MAAM;EAAE,KAAK;EAAyB,UAAU;CAAS;CACzD,iBAAiB;EAAE,KAAK;EAA4B,UAAU;CAAc;CAC5E,QAAQ;EAAE,KAAK;EAA2B,UAAU;CAAa;CACjE,QAAQ;EAAE,KAAK;EAA2B,UAAU;CAAa;AACnE,GAEaC,IAAsD;CACjE,SAAS;EAAE,KAAK;EAA8B,UAAU;CAAkB;CAC1E,SAAS;EAAE,KAAK;EAA8B,UAAU;CAAkB;CAC1E,WAAW;EAAE,KAAK;EAAgC,UAAU;CAAY;CACxE,gBAAgB;EAAE,KAAK;EAAoC,UAAU;CAAiB;CACtF,MAAM;EAAE,KAAK;EAA2B,UAAU;CAAU;CAC5D,kBAAkB;EAAE,KAAK;EAA8B,UAAU;CAAmB;CACpF,YAAY;EAAE,KAAK;EAAgC,UAAU;CAAqB;CAClF,oBAAoB;EAClB,KAAK;EACL,UAAU;CACZ;CACA,YAAY;EAAE,KAAK;EAAgC,UAAU;CAAqB;CAClF,WAAW;EAAE,KAAK;EAAgC,UAAU;CAAY;AAC1E,GAEMC,IAAoD;CACxD,OAAO;CACP,WAAW;CACX,aAAa;CACb,mBAAmB;CACnB,WAAW;CACX,YAAY;CACZ,WAAW;AACb;AAEA,SAAgBC,EAAW,GAAsC;CAC/D,OAAOD,EAAYE;AACrB;AAEA,IAAaC,IAAwC;CACnD;CACA;CACA;CACA;AACF"}
@@ -1,6 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  import { SubProcurementRequest, SubRecordProcurementOutcomeInput } from '../../types/procurement';
3
-
4
3
  interface ProcurementOutcomeFormProps {
5
4
  request: SubProcurementRequest;
6
5
  pending: boolean;
@@ -9,4 +8,3 @@ interface ProcurementOutcomeFormProps {
9
8
  }
10
9
  export declare const ProcurementOutcomeForm: FC<ProcurementOutcomeFormProps>;
11
10
  export {};
12
- //# sourceMappingURL=ProcurementOutcomeForm.d.ts.map
@@ -1,8 +1,8 @@
1
- import { useTr as e } from "../../hooks/useTr.js";
2
- import { useFormatters as t } from "../../hooks/useFormatters.js";
1
+ import { useFormatters as e } from "../../hooks/useFormatters.js";
2
+ import { useTr as t } from "../../hooks/useTr.js";
3
3
  import { useState as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- //#region src/subscriberbot/components/procurement/ProcurementOutcomeForm.tsx
5
+ // src/subscriberbot/components/procurement/ProcurementOutcomeForm.tsx
6
6
  var a = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", o = "mb-1 block text-xs font-medium text-text-secondary";
7
7
  function s(e, t, n, r) {
8
8
  if (e == null || !Number.isFinite(t)) return 0;
@@ -10,7 +10,7 @@ function s(e, t, n, r) {
10
10
  return Math.round((i * Math.min(12, Math.max(0, n)) / 12 + r) * 100) / 100;
11
11
  }
12
12
  var c = ({ request: c, pending: l, error: u, onSubmit: d }) => {
13
- let { formatCurrency: f } = t(), p = e(), [m, h] = n("SUCCEEDED"), [g, _] = n(""), [v, y] = n(String(c.termMonths)), [b, x] = n(""), [S, C] = n(""), [w, T] = n(""), [E, D] = n(!!c.relationshipId), O = Number(g), k = Number(v) || c.termMonths, A = Number(b) || 0, j = g ? s(c.baselineAnnualValue, O, k, A) : 0, M = Math.round(j * c.feeRate * 100) / 100;
13
+ let { formatCurrency: f } = e(), p = t(), [m, h] = n("SUCCEEDED"), [g, _] = n(""), [v, y] = n(String(c.termMonths)), [b, x] = n(""), [S, C] = n(""), [w, T] = n(""), [E, D] = n(!!c.relationshipId), O = Number(g), k = Number(v) || c.termMonths, A = Number(b) || 0, j = g ? s(c.baselineAnnualValue, O, k, A) : 0, M = Math.round(j * c.feeRate * 100) / 100;
14
14
  return /* @__PURE__ */ i("form", {
15
15
  onSubmit: (e) => {
16
16
  e.preventDefault(), d({
@@ -149,7 +149,6 @@ var c = ({ request: c, pending: l, error: u, onSubmit: d }) => {
149
149
  ]
150
150
  });
151
151
  };
152
- //#endregion
153
152
  export { c as ProcurementOutcomeForm };
154
153
 
155
154
  //# sourceMappingURL=ProcurementOutcomeForm.js.map