@aglyn/plugins-crm 1.0.0-beta.143

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 (669) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/package.json +57 -0
  4. package/src/index.d.ts +21 -0
  5. package/src/index.js +29 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/components/activity-list.d.ts +98 -0
  8. package/src/lib/components/activity-list.js +321 -0
  9. package/src/lib/components/activity-list.js.map +1 -0
  10. package/src/lib/components/activity-queries.d.ts +117 -0
  11. package/src/lib/components/activity-queries.js +198 -0
  12. package/src/lib/components/activity-queries.js.map +1 -0
  13. package/src/lib/components/add-to-list-button.d.ts +25 -0
  14. package/src/lib/components/add-to-list-button.js +64 -0
  15. package/src/lib/components/add-to-list-button.js.map +1 -0
  16. package/src/lib/components/add-to-list-dialog.d.ts +24 -0
  17. package/src/lib/components/add-to-list-dialog.js +327 -0
  18. package/src/lib/components/add-to-list-dialog.js.map +1 -0
  19. package/src/lib/components/assignment-rule-drawer.d.ts +43 -0
  20. package/src/lib/components/assignment-rule-drawer.js +293 -0
  21. package/src/lib/components/assignment-rule-drawer.js.map +1 -0
  22. package/src/lib/components/companies-bulk-bar.d.ts +29 -0
  23. package/src/lib/components/companies-bulk-bar.js +274 -0
  24. package/src/lib/components/companies-bulk-bar.js.map +1 -0
  25. package/src/lib/components/companies-section.d.ts +54 -0
  26. package/src/lib/components/companies-section.js +522 -0
  27. package/src/lib/components/companies-section.js.map +1 -0
  28. package/src/lib/components/company-contacts-card.d.ts +49 -0
  29. package/src/lib/components/company-contacts-card.js +435 -0
  30. package/src/lib/components/company-contacts-card.js.map +1 -0
  31. package/src/lib/components/company-deals-card.d.ts +20 -0
  32. package/src/lib/components/company-deals-card.js +38 -0
  33. package/src/lib/components/company-deals-card.js.map +1 -0
  34. package/src/lib/components/company-detail-page.d.ts +20 -0
  35. package/src/lib/components/company-detail-page.js +165 -0
  36. package/src/lib/components/company-detail-page.js.map +1 -0
  37. package/src/lib/components/company-edit-drawer.d.ts +65 -0
  38. package/src/lib/components/company-edit-drawer.js +433 -0
  39. package/src/lib/components/company-edit-drawer.js.map +1 -0
  40. package/src/lib/components/company-import-drawer.d.ts +42 -0
  41. package/src/lib/components/company-import-drawer.js +99 -0
  42. package/src/lib/components/company-import-drawer.js.map +1 -0
  43. package/src/lib/components/company-picker.d.ts +127 -0
  44. package/src/lib/components/company-picker.js +323 -0
  45. package/src/lib/components/company-picker.js.map +1 -0
  46. package/src/lib/components/company-properties-card.d.ts +47 -0
  47. package/src/lib/components/company-properties-card.js +289 -0
  48. package/src/lib/components/company-properties-card.js.map +1 -0
  49. package/src/lib/components/contact-address-fields.d.ts +29 -0
  50. package/src/lib/components/contact-address-fields.js +149 -0
  51. package/src/lib/components/contact-address-fields.js.map +1 -0
  52. package/src/lib/components/contact-associations-card.d.ts +72 -0
  53. package/src/lib/components/contact-associations-card.js +296 -0
  54. package/src/lib/components/contact-associations-card.js.map +1 -0
  55. package/src/lib/components/contact-custom-columns.d.ts +38 -0
  56. package/src/lib/components/contact-custom-columns.js +102 -0
  57. package/src/lib/components/contact-custom-columns.js.map +1 -0
  58. package/src/lib/components/contact-custom-fields-card.d.ts +39 -0
  59. package/src/lib/components/contact-custom-fields-card.js +204 -0
  60. package/src/lib/components/contact-custom-fields-card.js.map +1 -0
  61. package/src/lib/components/contact-deals-card.d.ts +20 -0
  62. package/src/lib/components/contact-deals-card.js +38 -0
  63. package/src/lib/components/contact-deals-card.js.map +1 -0
  64. package/src/lib/components/contact-detail-page.d.ts +46 -0
  65. package/src/lib/components/contact-detail-page.js +535 -0
  66. package/src/lib/components/contact-detail-page.js.map +1 -0
  67. package/src/lib/components/contact-duplicates-card.d.ts +42 -0
  68. package/src/lib/components/contact-duplicates-card.js +167 -0
  69. package/src/lib/components/contact-duplicates-card.js.map +1 -0
  70. package/src/lib/components/contact-field-drawer.d.ts +64 -0
  71. package/src/lib/components/contact-field-drawer.js +251 -0
  72. package/src/lib/components/contact-field-drawer.js.map +1 -0
  73. package/src/lib/components/contact-import-drawer.d.ts +46 -0
  74. package/src/lib/components/contact-import-drawer.js +149 -0
  75. package/src/lib/components/contact-import-drawer.js.map +1 -0
  76. package/src/lib/components/contact-known-by-card.d.ts +39 -0
  77. package/src/lib/components/contact-known-by-card.js +142 -0
  78. package/src/lib/components/contact-known-by-card.js.map +1 -0
  79. package/src/lib/components/contact-list-columns.d.ts +53 -0
  80. package/src/lib/components/contact-list-columns.js +288 -0
  81. package/src/lib/components/contact-list-columns.js.map +1 -0
  82. package/src/lib/components/contact-merge-dialog.d.ts +79 -0
  83. package/src/lib/components/contact-merge-dialog.js +405 -0
  84. package/src/lib/components/contact-merge-dialog.js.map +1 -0
  85. package/src/lib/components/contact-properties-card.d.ts +89 -0
  86. package/src/lib/components/contact-properties-card.js +492 -0
  87. package/src/lib/components/contact-properties-card.js.map +1 -0
  88. package/src/lib/components/contact-timeline-card.d.ts +68 -0
  89. package/src/lib/components/contact-timeline-card.js +435 -0
  90. package/src/lib/components/contact-timeline-card.js.map +1 -0
  91. package/src/lib/components/contacts-bulk-bar.d.ts +91 -0
  92. package/src/lib/components/contacts-bulk-bar.js +493 -0
  93. package/src/lib/components/contacts-bulk-bar.js.map +1 -0
  94. package/src/lib/components/contacts-section.d.ts +26 -0
  95. package/src/lib/components/contacts-section.js +1025 -0
  96. package/src/lib/components/contacts-section.js.map +1 -0
  97. package/src/lib/components/copy-capture-address-button.d.ts +33 -0
  98. package/src/lib/components/copy-capture-address-button.js +60 -0
  99. package/src/lib/components/copy-capture-address-button.js.map +1 -0
  100. package/src/lib/components/crm-attribution-zone.d.ts +38 -0
  101. package/src/lib/components/crm-attribution-zone.js +36 -0
  102. package/src/lib/components/crm-attribution-zone.js.map +1 -0
  103. package/src/lib/components/crm-booking-zone.d.ts +61 -0
  104. package/src/lib/components/crm-booking-zone.js +50 -0
  105. package/src/lib/components/crm-booking-zone.js.map +1 -0
  106. package/src/lib/components/crm-bulk-bar-frame.d.ts +47 -0
  107. package/src/lib/components/crm-bulk-bar-frame.js +137 -0
  108. package/src/lib/components/crm-bulk-bar-frame.js.map +1 -0
  109. package/src/lib/components/crm-call-actions.d.ts +65 -0
  110. package/src/lib/components/crm-call-actions.js +110 -0
  111. package/src/lib/components/crm-call-actions.js.map +1 -0
  112. package/src/lib/components/crm-column-menu.d.ts +21 -0
  113. package/src/lib/components/crm-column-menu.js +103 -0
  114. package/src/lib/components/crm-column-menu.js.map +1 -0
  115. package/src/lib/components/crm-console-page.d.ts +19 -0
  116. package/src/lib/components/crm-console-page.js +151 -0
  117. package/src/lib/components/crm-console-page.js.map +1 -0
  118. package/src/lib/components/crm-console-sections.d.ts +52 -0
  119. package/src/lib/components/crm-console-sections.js +83 -0
  120. package/src/lib/components/crm-console-sections.js.map +1 -0
  121. package/src/lib/components/crm-custom-field-control.d.ts +26 -0
  122. package/src/lib/components/crm-custom-field-control.js +131 -0
  123. package/src/lib/components/crm-custom-field-control.js.map +1 -0
  124. package/src/lib/components/crm-email-template-tools.d.ts +69 -0
  125. package/src/lib/components/crm-email-template-tools.js +240 -0
  126. package/src/lib/components/crm-email-template-tools.js.map +1 -0
  127. package/src/lib/components/crm-export-all-button.d.ts +39 -0
  128. package/src/lib/components/crm-export-all-button.js +98 -0
  129. package/src/lib/components/crm-export-all-button.js.map +1 -0
  130. package/src/lib/components/crm-filter-bar.d.ts +53 -0
  131. package/src/lib/components/crm-filter-bar.js +294 -0
  132. package/src/lib/components/crm-filter-bar.js.map +1 -0
  133. package/src/lib/components/crm-glance-card.d.ts +54 -0
  134. package/src/lib/components/crm-glance-card.js +219 -0
  135. package/src/lib/components/crm-glance-card.js.map +1 -0
  136. package/src/lib/components/crm-next-activity-column.d.ts +35 -0
  137. package/src/lib/components/crm-next-activity-column.js +100 -0
  138. package/src/lib/components/crm-next-activity-column.js.map +1 -0
  139. package/src/lib/components/crm-record-header.d.ts +97 -0
  140. package/src/lib/components/crm-record-header.js +160 -0
  141. package/src/lib/components/crm-record-header.js.map +1 -0
  142. package/src/lib/components/crm-record-insights-zone.d.ts +50 -0
  143. package/src/lib/components/crm-record-insights-zone.js +169 -0
  144. package/src/lib/components/crm-record-insights-zone.js.map +1 -0
  145. package/src/lib/components/crm-record-picker.d.ts +42 -0
  146. package/src/lib/components/crm-record-picker.js +104 -0
  147. package/src/lib/components/crm-record-picker.js.map +1 -0
  148. package/src/lib/components/crm-send-email-button.d.ts +39 -0
  149. package/src/lib/components/crm-send-email-button.js +81 -0
  150. package/src/lib/components/crm-send-email-button.js.map +1 -0
  151. package/src/lib/components/crm-send-email-dialog.d.ts +61 -0
  152. package/src/lib/components/crm-send-email-dialog.js +851 -0
  153. package/src/lib/components/crm-send-email-dialog.js.map +1 -0
  154. package/src/lib/components/crm-site-picker.d.ts +61 -0
  155. package/src/lib/components/crm-site-picker.js +99 -0
  156. package/src/lib/components/crm-site-picker.js.map +1 -0
  157. package/src/lib/components/crm-suite-lock.d.ts +29 -0
  158. package/src/lib/components/crm-suite-lock.js +114 -0
  159. package/src/lib/components/crm-suite-lock.js.map +1 -0
  160. package/src/lib/components/crm-tasks-due-card.d.ts +42 -0
  161. package/src/lib/components/crm-tasks-due-card.js +225 -0
  162. package/src/lib/components/crm-tasks-due-card.js.map +1 -0
  163. package/src/lib/components/crm-views-control.d.ts +65 -0
  164. package/src/lib/components/crm-views-control.js +518 -0
  165. package/src/lib/components/crm-views-control.js.map +1 -0
  166. package/src/lib/components/csv-import-drawer.d.ts +132 -0
  167. package/src/lib/components/csv-import-drawer.js +746 -0
  168. package/src/lib/components/csv-import-drawer.js.map +1 -0
  169. package/src/lib/components/deal-board.d.ts +70 -0
  170. package/src/lib/components/deal-board.js +478 -0
  171. package/src/lib/components/deal-board.js.map +1 -0
  172. package/src/lib/components/deal-detail-page.d.ts +18 -0
  173. package/src/lib/components/deal-detail-page.js +323 -0
  174. package/src/lib/components/deal-detail-page.js.map +1 -0
  175. package/src/lib/components/deal-edit-drawer.d.ts +59 -0
  176. package/src/lib/components/deal-edit-drawer.js +640 -0
  177. package/src/lib/components/deal-edit-drawer.js.map +1 -0
  178. package/src/lib/components/deal-import-drawer.d.ts +24 -0
  179. package/src/lib/components/deal-import-drawer.js +83 -0
  180. package/src/lib/components/deal-import-drawer.js.map +1 -0
  181. package/src/lib/components/deal-products-card.d.ts +48 -0
  182. package/src/lib/components/deal-products-card.js +614 -0
  183. package/src/lib/components/deal-products-card.js.map +1 -0
  184. package/src/lib/components/deal-properties-card.d.ts +29 -0
  185. package/src/lib/components/deal-properties-card.js +144 -0
  186. package/src/lib/components/deal-properties-card.js.map +1 -0
  187. package/src/lib/components/deal-stage-card.d.ts +24 -0
  188. package/src/lib/components/deal-stage-card.js +199 -0
  189. package/src/lib/components/deal-stage-card.js.map +1 -0
  190. package/src/lib/components/deals-bulk-bar.d.ts +31 -0
  191. package/src/lib/components/deals-bulk-bar.js +340 -0
  192. package/src/lib/components/deals-bulk-bar.js.map +1 -0
  193. package/src/lib/components/deals-section.d.ts +49 -0
  194. package/src/lib/components/deals-section.js +767 -0
  195. package/src/lib/components/deals-section.js.map +1 -0
  196. package/src/lib/components/email-capture-card.d.ts +42 -0
  197. package/src/lib/components/email-capture-card.js +134 -0
  198. package/src/lib/components/email-capture-card.js.map +1 -0
  199. package/src/lib/components/email-template-drawer.d.ts +33 -0
  200. package/src/lib/components/email-template-drawer.js +209 -0
  201. package/src/lib/components/email-template-drawer.js.map +1 -0
  202. package/src/lib/components/email-templates-card.d.ts +33 -0
  203. package/src/lib/components/email-templates-card.js +370 -0
  204. package/src/lib/components/email-templates-card.js.map +1 -0
  205. package/src/lib/components/erase-person-action.d.ts +92 -0
  206. package/src/lib/components/erase-person-action.js +261 -0
  207. package/src/lib/components/erase-person-action.js.map +1 -0
  208. package/src/lib/components/fields-section.d.ts +37 -0
  209. package/src/lib/components/fields-section.js +641 -0
  210. package/src/lib/components/fields-section.js.map +1 -0
  211. package/src/lib/components/form-contact-fields-card.d.ts +46 -0
  212. package/src/lib/components/form-contact-fields-card.js +253 -0
  213. package/src/lib/components/form-contact-fields-card.js.map +1 -0
  214. package/src/lib/components/insert-link-at-caret.d.ts +28 -0
  215. package/src/lib/components/insert-link-at-caret.js +37 -0
  216. package/src/lib/components/insert-link-at-caret.js.map +1 -0
  217. package/src/lib/components/lead-convert-dialog.d.ts +32 -0
  218. package/src/lib/components/lead-convert-dialog.js +493 -0
  219. package/src/lib/components/lead-convert-dialog.js.map +1 -0
  220. package/src/lib/components/lead-detail-page.d.ts +16 -0
  221. package/src/lib/components/lead-detail-page.js +163 -0
  222. package/src/lib/components/lead-detail-page.js.map +1 -0
  223. package/src/lib/components/lead-history-card.d.ts +32 -0
  224. package/src/lib/components/lead-history-card.js +165 -0
  225. package/src/lib/components/lead-history-card.js.map +1 -0
  226. package/src/lib/components/lead-import-drawer.d.ts +24 -0
  227. package/src/lib/components/lead-import-drawer.js +95 -0
  228. package/src/lib/components/lead-import-drawer.js.map +1 -0
  229. package/src/lib/components/lead-owner-select.d.ts +35 -0
  230. package/src/lib/components/lead-owner-select.js +91 -0
  231. package/src/lib/components/lead-owner-select.js.map +1 -0
  232. package/src/lib/components/lead-properties-card.d.ts +61 -0
  233. package/src/lib/components/lead-properties-card.js +395 -0
  234. package/src/lib/components/lead-properties-card.js.map +1 -0
  235. package/src/lib/components/lead-status-chip.d.ts +12 -0
  236. package/src/lib/components/lead-status-chip.js +43 -0
  237. package/src/lib/components/lead-status-chip.js.map +1 -0
  238. package/src/lib/components/lead-surfaces-note.d.ts +126 -0
  239. package/src/lib/components/lead-surfaces-note.js +262 -0
  240. package/src/lib/components/lead-surfaces-note.js.map +1 -0
  241. package/src/lib/components/lead-unqualify-dialog.d.ts +24 -0
  242. package/src/lib/components/lead-unqualify-dialog.js +125 -0
  243. package/src/lib/components/lead-unqualify-dialog.js.map +1 -0
  244. package/src/lib/components/leads-bulk-bar.d.ts +58 -0
  245. package/src/lib/components/leads-bulk-bar.js +307 -0
  246. package/src/lib/components/leads-bulk-bar.js.map +1 -0
  247. package/src/lib/components/leads-section.d.ts +23 -0
  248. package/src/lib/components/leads-section.js +664 -0
  249. package/src/lib/components/leads-section.js.map +1 -0
  250. package/src/lib/components/linked-deals-card.d.ts +32 -0
  251. package/src/lib/components/linked-deals-card.js +163 -0
  252. package/src/lib/components/linked-deals-card.js.map +1 -0
  253. package/src/lib/components/log-activity-dialog.d.ts +60 -0
  254. package/src/lib/components/log-activity-dialog.js +368 -0
  255. package/src/lib/components/log-activity-dialog.js.map +1 -0
  256. package/src/lib/components/lost-reason-dialog.d.ts +26 -0
  257. package/src/lib/components/lost-reason-dialog.js +95 -0
  258. package/src/lib/components/lost-reason-dialog.js.map +1 -0
  259. package/src/lib/components/new-contact-drawer.d.ts +78 -0
  260. package/src/lib/components/new-contact-drawer.js +343 -0
  261. package/src/lib/components/new-contact-drawer.js.map +1 -0
  262. package/src/lib/components/org-lead-surfaces-note.d.ts +57 -0
  263. package/src/lib/components/org-lead-surfaces-note.js +172 -0
  264. package/src/lib/components/org-lead-surfaces-note.js.map +1 -0
  265. package/src/lib/components/owner-avatar.d.ts +18 -0
  266. package/src/lib/components/owner-avatar.js +61 -0
  267. package/src/lib/components/owner-avatar.js.map +1 -0
  268. package/src/lib/components/pipeline-stages-dialog.d.ts +43 -0
  269. package/src/lib/components/pipeline-stages-dialog.js +339 -0
  270. package/src/lib/components/pipeline-stages-dialog.js.map +1 -0
  271. package/src/lib/components/pipelines-dialog.d.ts +55 -0
  272. package/src/lib/components/pipelines-dialog.js +517 -0
  273. package/src/lib/components/pipelines-dialog.js.map +1 -0
  274. package/src/lib/components/recent-activity-feed.d.ts +39 -0
  275. package/src/lib/components/recent-activity-feed.js +103 -0
  276. package/src/lib/components/recent-activity-feed.js.map +1 -0
  277. package/src/lib/components/recipes-card.d.ts +39 -0
  278. package/src/lib/components/recipes-card.js +485 -0
  279. package/src/lib/components/recipes-card.js.map +1 -0
  280. package/src/lib/components/record-activity-card.d.ts +26 -0
  281. package/src/lib/components/record-activity-card.js +121 -0
  282. package/src/lib/components/record-activity-card.js.map +1 -0
  283. package/src/lib/components/record-files-card.d.ts +67 -0
  284. package/src/lib/components/record-files-card.js +290 -0
  285. package/src/lib/components/record-files-card.js.map +1 -0
  286. package/src/lib/components/record-tasks-card.d.ts +32 -0
  287. package/src/lib/components/record-tasks-card.js +306 -0
  288. package/src/lib/components/record-tasks-card.js.map +1 -0
  289. package/src/lib/components/reports/activity-card.d.ts +57 -0
  290. package/src/lib/components/reports/activity-card.js +281 -0
  291. package/src/lib/components/reports/activity-card.js.map +1 -0
  292. package/src/lib/components/reports/closed-deals-card.d.ts +20 -0
  293. package/src/lib/components/reports/closed-deals-card.js +194 -0
  294. package/src/lib/components/reports/closed-deals-card.js.map +1 -0
  295. package/src/lib/components/reports/contacts-mix-card.d.ts +27 -0
  296. package/src/lib/components/reports/contacts-mix-card.js +161 -0
  297. package/src/lib/components/reports/contacts-mix-card.js.map +1 -0
  298. package/src/lib/components/reports/contacts-trend-card.d.ts +31 -0
  299. package/src/lib/components/reports/contacts-trend-card.js +144 -0
  300. package/src/lib/components/reports/contacts-trend-card.js.map +1 -0
  301. package/src/lib/components/reports/forecast-card.d.ts +22 -0
  302. package/src/lib/components/reports/forecast-card.js +251 -0
  303. package/src/lib/components/reports/forecast-card.js.map +1 -0
  304. package/src/lib/components/reports/lead-counts.d.ts +32 -0
  305. package/src/lib/components/reports/lead-counts.js +44 -0
  306. package/src/lib/components/reports/lead-counts.js.map +1 -0
  307. package/src/lib/components/reports/lead-funnel-card.d.ts +38 -0
  308. package/src/lib/components/reports/lead-funnel-card.js +375 -0
  309. package/src/lib/components/reports/lead-funnel-card.js.map +1 -0
  310. package/src/lib/components/reports/pipeline-card.d.ts +19 -0
  311. package/src/lib/components/reports/pipeline-card.js +338 -0
  312. package/src/lib/components/reports/pipeline-card.js.map +1 -0
  313. package/src/lib/components/reports/report-bar-chart.d.ts +39 -0
  314. package/src/lib/components/reports/report-bar-chart.js +133 -0
  315. package/src/lib/components/reports/report-bar-chart.js.map +1 -0
  316. package/src/lib/components/reports/report-breakdown.d.ts +32 -0
  317. package/src/lib/components/reports/report-breakdown.js +105 -0
  318. package/src/lib/components/reports/report-breakdown.js.map +1 -0
  319. package/src/lib/components/reports/report-export.d.ts +37 -0
  320. package/src/lib/components/reports/report-export.js +66 -0
  321. package/src/lib/components/reports/report-export.js.map +1 -0
  322. package/src/lib/components/reports/report-format.d.ts +36 -0
  323. package/src/lib/components/reports/report-format.js +43 -0
  324. package/src/lib/components/reports/report-format.js.map +1 -0
  325. package/src/lib/components/reports/report-scope.d.ts +81 -0
  326. package/src/lib/components/reports/report-scope.js +58 -0
  327. package/src/lib/components/reports/report-scope.js.map +1 -0
  328. package/src/lib/components/reports/report-stat-tile.d.ts +47 -0
  329. package/src/lib/components/reports/report-stat-tile.js +96 -0
  330. package/src/lib/components/reports/report-stat-tile.js.map +1 -0
  331. package/src/lib/components/reports/source-conversion-card.d.ts +28 -0
  332. package/src/lib/components/reports/source-conversion-card.js +205 -0
  333. package/src/lib/components/reports/source-conversion-card.js.map +1 -0
  334. package/src/lib/components/reports/tasks-card.d.ts +26 -0
  335. package/src/lib/components/reports/tasks-card.js +279 -0
  336. package/src/lib/components/reports/tasks-card.js.map +1 -0
  337. package/src/lib/components/reports/use-aggregate-read.d.ts +99 -0
  338. package/src/lib/components/reports/use-aggregate-read.js +195 -0
  339. package/src/lib/components/reports/use-aggregate-read.js.map +1 -0
  340. package/src/lib/components/reports/won-lost-by-owner-card.d.ts +30 -0
  341. package/src/lib/components/reports/won-lost-by-owner-card.js +168 -0
  342. package/src/lib/components/reports/won-lost-by-owner-card.js.map +1 -0
  343. package/src/lib/components/reports-section.d.ts +42 -0
  344. package/src/lib/components/reports-section.js +308 -0
  345. package/src/lib/components/reports-section.js.map +1 -0
  346. package/src/lib/components/sending-addresses-card.d.ts +49 -0
  347. package/src/lib/components/sending-addresses-card.js +262 -0
  348. package/src/lib/components/sending-addresses-card.js.map +1 -0
  349. package/src/lib/components/settings-section.d.ts +151 -0
  350. package/src/lib/components/settings-section.js +783 -0
  351. package/src/lib/components/settings-section.js.map +1 -0
  352. package/src/lib/components/task-cells.d.ts +51 -0
  353. package/src/lib/components/task-cells.js +139 -0
  354. package/src/lib/components/task-cells.js.map +1 -0
  355. package/src/lib/components/task-edit-drawer.d.ts +53 -0
  356. package/src/lib/components/task-edit-drawer.js +483 -0
  357. package/src/lib/components/task-edit-drawer.js.map +1 -0
  358. package/src/lib/components/task-import-drawer.d.ts +24 -0
  359. package/src/lib/components/task-import-drawer.js +82 -0
  360. package/src/lib/components/task-import-drawer.js.map +1 -0
  361. package/src/lib/components/task-snooze-menu.d.ts +65 -0
  362. package/src/lib/components/task-snooze-menu.js +207 -0
  363. package/src/lib/components/task-snooze-menu.js.map +1 -0
  364. package/src/lib/components/tasks-bulk-bar.d.ts +25 -0
  365. package/src/lib/components/tasks-bulk-bar.js +348 -0
  366. package/src/lib/components/tasks-bulk-bar.js.map +1 -0
  367. package/src/lib/components/tasks-calendar.d.ts +38 -0
  368. package/src/lib/components/tasks-calendar.js +228 -0
  369. package/src/lib/components/tasks-calendar.js.map +1 -0
  370. package/src/lib/components/tasks-section.d.ts +27 -0
  371. package/src/lib/components/tasks-section.js +579 -0
  372. package/src/lib/components/tasks-section.js.map +1 -0
  373. package/src/lib/components/use-contact-campaign-emails.d.ts +32 -0
  374. package/src/lib/components/use-contact-campaign-emails.js +83 -0
  375. package/src/lib/components/use-contact-campaign-emails.js.map +1 -0
  376. package/src/lib/components/use-crm-api.d.ts +44 -0
  377. package/src/lib/components/use-crm-api.js +84 -0
  378. package/src/lib/components/use-crm-api.js.map +1 -0
  379. package/src/lib/components/use-crm-inbound-address.d.ts +60 -0
  380. package/src/lib/components/use-crm-inbound-address.js +124 -0
  381. package/src/lib/components/use-crm-inbound-address.js.map +1 -0
  382. package/src/lib/components/use-emails-hub-path.d.ts +24 -0
  383. package/src/lib/components/use-emails-hub-path.js +59 -0
  384. package/src/lib/components/use-emails-hub-path.js.map +1 -0
  385. package/src/lib/components/use-member-email-aliases.d.ts +54 -0
  386. package/src/lib/components/use-member-email-aliases.js +186 -0
  387. package/src/lib/components/use-member-email-aliases.js.map +1 -0
  388. package/src/lib/components/use-org-members.d.ts +40 -0
  389. package/src/lib/components/use-org-members.js +100 -0
  390. package/src/lib/components/use-org-members.js.map +1 -0
  391. package/src/lib/constants/api-routes.d.ts +109 -0
  392. package/src/lib/constants/api-routes.js +74 -0
  393. package/src/lib/constants/api-routes.js.map +1 -0
  394. package/src/lib/constants/bundle-common.d.ts +14 -0
  395. package/src/lib/constants/bundle-common.js +14 -0
  396. package/src/lib/constants/bundle-common.js.map +1 -0
  397. package/src/lib/constants/company-filters.d.ts +18 -0
  398. package/src/lib/constants/company-filters.js +51 -0
  399. package/src/lib/constants/company-filters.js.map +1 -0
  400. package/src/lib/constants/contact-filters.d.ts +38 -0
  401. package/src/lib/constants/contact-filters.js +294 -0
  402. package/src/lib/constants/contact-filters.js.map +1 -0
  403. package/src/lib/hooks/use-contact-field-definitions.d.ts +48 -0
  404. package/src/lib/hooks/use-contact-field-definitions.js +72 -0
  405. package/src/lib/hooks/use-contact-field-definitions.js.map +1 -0
  406. package/src/lib/hooks/use-contact-update.d.ts +25 -0
  407. package/src/lib/hooks/use-contact-update.js +80 -0
  408. package/src/lib/hooks/use-contact-update.js.map +1 -0
  409. package/src/lib/hooks/use-crm-activity-logger.d.ts +73 -0
  410. package/src/lib/hooks/use-crm-activity-logger.js +101 -0
  411. package/src/lib/hooks/use-crm-activity-logger.js.map +1 -0
  412. package/src/lib/hooks/use-crm-bulk-apply.d.ts +52 -0
  413. package/src/lib/hooks/use-crm-bulk-apply.js +112 -0
  414. package/src/lib/hooks/use-crm-bulk-apply.js.map +1 -0
  415. package/src/lib/hooks/use-crm-default-view.d.ts +24 -0
  416. package/src/lib/hooks/use-crm-default-view.js +64 -0
  417. package/src/lib/hooks/use-crm-default-view.js.map +1 -0
  418. package/src/lib/hooks/use-crm-email-templates.d.ts +59 -0
  419. package/src/lib/hooks/use-crm-email-templates.js +103 -0
  420. package/src/lib/hooks/use-crm-email-templates.js.map +1 -0
  421. package/src/lib/hooks/use-crm-hub-path.d.ts +29 -0
  422. package/src/lib/hooks/use-crm-hub-path.js +41 -0
  423. package/src/lib/hooks/use-crm-hub-path.js.map +1 -0
  424. package/src/lib/hooks/use-crm-org-mount.d.ts +97 -0
  425. package/src/lib/hooks/use-crm-org-mount.js +215 -0
  426. package/src/lib/hooks/use-crm-org-mount.js.map +1 -0
  427. package/src/lib/hooks/use-crm-record-names.d.ts +52 -0
  428. package/src/lib/hooks/use-crm-record-names.js +126 -0
  429. package/src/lib/hooks/use-crm-record-names.js.map +1 -0
  430. package/src/lib/hooks/use-crm-records-quota.d.ts +68 -0
  431. package/src/lib/hooks/use-crm-records-quota.js +118 -0
  432. package/src/lib/hooks/use-crm-records-quota.js.map +1 -0
  433. package/src/lib/hooks/use-crm-saved-view.d.ts +96 -0
  434. package/src/lib/hooks/use-crm-saved-view.js +329 -0
  435. package/src/lib/hooks/use-crm-saved-view.js.map +1 -0
  436. package/src/lib/hooks/use-crm-scope.d.ts +117 -0
  437. package/src/lib/hooks/use-crm-scope.js +147 -0
  438. package/src/lib/hooks/use-crm-scope.js.map +1 -0
  439. package/src/lib/hooks/use-crm-tasks.d.ts +85 -0
  440. package/src/lib/hooks/use-crm-tasks.js +153 -0
  441. package/src/lib/hooks/use-crm-tasks.js.map +1 -0
  442. package/src/lib/hooks/use-crm-view-grid.d.ts +55 -0
  443. package/src/lib/hooks/use-crm-view-grid.js +170 -0
  444. package/src/lib/hooks/use-crm-view-grid.js.map +1 -0
  445. package/src/lib/hooks/use-crm-views.d.ts +42 -0
  446. package/src/lib/hooks/use-crm-views.js +84 -0
  447. package/src/lib/hooks/use-crm-views.js.map +1 -0
  448. package/src/lib/hooks/use-deal-stage-api.d.ts +69 -0
  449. package/src/lib/hooks/use-deal-stage-api.js +78 -0
  450. package/src/lib/hooks/use-deal-stage-api.js.map +1 -0
  451. package/src/lib/hooks/use-deals.d.ts +47 -0
  452. package/src/lib/hooks/use-deals.js +105 -0
  453. package/src/lib/hooks/use-deals.js.map +1 -0
  454. package/src/lib/hooks/use-org-leads.d.ts +53 -0
  455. package/src/lib/hooks/use-org-leads.js +114 -0
  456. package/src/lib/hooks/use-org-leads.js.map +1 -0
  457. package/src/lib/hooks/use-org-member-directory.d.ts +36 -0
  458. package/src/lib/hooks/use-org-member-directory.js +116 -0
  459. package/src/lib/hooks/use-org-member-directory.js.map +1 -0
  460. package/src/lib/hooks/use-org-member-options.d.ts +38 -0
  461. package/src/lib/hooks/use-org-member-options.js +131 -0
  462. package/src/lib/hooks/use-org-member-options.js.map +1 -0
  463. package/src/lib/hooks/use-pipeline.d.ts +71 -0
  464. package/src/lib/hooks/use-pipeline.js +159 -0
  465. package/src/lib/hooks/use-pipeline.js.map +1 -0
  466. package/src/lib/model/companies-bulk-writes.d.ts +40 -0
  467. package/src/lib/model/companies-bulk-writes.js +103 -0
  468. package/src/lib/model/companies-bulk-writes.js.map +1 -0
  469. package/src/lib/model/companies-csv.d.ts +36 -0
  470. package/src/lib/model/companies-csv.js +38 -0
  471. package/src/lib/model/companies-csv.js.map +1 -0
  472. package/src/lib/model/companies.d.ts +99 -0
  473. package/src/lib/model/companies.js +168 -0
  474. package/src/lib/model/companies.js.map +1 -0
  475. package/src/lib/model/company-delete-route.d.ts +43 -0
  476. package/src/lib/model/company-delete-route.js +31 -0
  477. package/src/lib/model/company-delete-route.js.map +1 -0
  478. package/src/lib/model/company-delete.d.ts +42 -0
  479. package/src/lib/model/company-delete.js +52 -0
  480. package/src/lib/model/company-delete.js.map +1 -0
  481. package/src/lib/model/contact-duplicates.d.ts +58 -0
  482. package/src/lib/model/contact-duplicates.js +67 -0
  483. package/src/lib/model/contact-duplicates.js.map +1 -0
  484. package/src/lib/model/contact-record.d.ts +113 -0
  485. package/src/lib/model/contact-record.js +70 -0
  486. package/src/lib/model/contact-record.js.map +1 -0
  487. package/src/lib/model/contact-update.d.ts +93 -0
  488. package/src/lib/model/contact-update.js +50 -0
  489. package/src/lib/model/contact-update.js.map +1 -0
  490. package/src/lib/model/contacts-bulk-writes.d.ts +173 -0
  491. package/src/lib/model/contacts-bulk-writes.js +196 -0
  492. package/src/lib/model/contacts-bulk-writes.js.map +1 -0
  493. package/src/lib/model/contacts-csv.d.ts +54 -0
  494. package/src/lib/model/contacts-csv.js +67 -0
  495. package/src/lib/model/contacts-csv.js.map +1 -0
  496. package/src/lib/model/contacts-list-seed.d.ts +51 -0
  497. package/src/lib/model/contacts-list-seed.js +63 -0
  498. package/src/lib/model/contacts-list-seed.js.map +1 -0
  499. package/src/lib/model/crm-activity-report.d.ts +27 -0
  500. package/src/lib/model/crm-activity-report.js +56 -0
  501. package/src/lib/model/crm-activity-report.js.map +1 -0
  502. package/src/lib/model/crm-api.d.ts +49 -0
  503. package/src/lib/model/crm-api.js +47 -0
  504. package/src/lib/model/crm-api.js.map +1 -0
  505. package/src/lib/model/crm-bulk-writes.d.ts +147 -0
  506. package/src/lib/model/crm-bulk-writes.js +207 -0
  507. package/src/lib/model/crm-bulk-writes.js.map +1 -0
  508. package/src/lib/model/crm-company-import.d.ts +154 -0
  509. package/src/lib/model/crm-company-import.js +331 -0
  510. package/src/lib/model/crm-company-import.js.map +1 -0
  511. package/src/lib/model/crm-custom-draft.d.ts +62 -0
  512. package/src/lib/model/crm-custom-draft.js +67 -0
  513. package/src/lib/model/crm-custom-draft.js.map +1 -0
  514. package/src/lib/model/crm-deal-import.d.ts +112 -0
  515. package/src/lib/model/crm-deal-import.js +263 -0
  516. package/src/lib/model/crm-deal-import.js.map +1 -0
  517. package/src/lib/model/crm-import.d.ts +244 -0
  518. package/src/lib/model/crm-import.js +466 -0
  519. package/src/lib/model/crm-import.js.map +1 -0
  520. package/src/lib/model/crm-lead-import.d.ts +105 -0
  521. package/src/lib/model/crm-lead-import.js +255 -0
  522. package/src/lib/model/crm-lead-import.js.map +1 -0
  523. package/src/lib/model/crm-record-routes.d.ts +21 -0
  524. package/src/lib/model/crm-record-routes.js +70 -0
  525. package/src/lib/model/crm-record-routes.js.map +1 -0
  526. package/src/lib/model/crm-routes.d.ts +101 -0
  527. package/src/lib/model/crm-routes.js +92 -0
  528. package/src/lib/model/crm-routes.js.map +1 -0
  529. package/src/lib/model/crm-task-import.d.ts +94 -0
  530. package/src/lib/model/crm-task-import.js +275 -0
  531. package/src/lib/model/crm-task-import.js.map +1 -0
  532. package/src/lib/model/crm-view-param.d.ts +43 -0
  533. package/src/lib/model/crm-view-param.js +49 -0
  534. package/src/lib/model/crm-view-param.js.map +1 -0
  535. package/src/lib/model/deal-board-model.d.ts +241 -0
  536. package/src/lib/model/deal-board-model.js +439 -0
  537. package/src/lib/model/deal-board-model.js.map +1 -0
  538. package/src/lib/model/deal-form-model.d.ts +114 -0
  539. package/src/lib/model/deal-form-model.js +218 -0
  540. package/src/lib/model/deal-form-model.js.map +1 -0
  541. package/src/lib/model/deals-csv.d.ts +32 -0
  542. package/src/lib/model/deals-csv.js +37 -0
  543. package/src/lib/model/deals-csv.js.map +1 -0
  544. package/src/lib/model/import-column-shapes.d.ts +36 -0
  545. package/src/lib/model/import-column-shapes.js +76 -0
  546. package/src/lib/model/import-column-shapes.js.map +1 -0
  547. package/src/lib/model/lead-company-suggestion.d.ts +61 -0
  548. package/src/lib/model/lead-company-suggestion.js +65 -0
  549. package/src/lib/model/lead-company-suggestion.js.map +1 -0
  550. package/src/lib/model/lead-filters.d.ts +29 -0
  551. package/src/lib/model/lead-filters.js +39 -0
  552. package/src/lib/model/lead-filters.js.map +1 -0
  553. package/src/lib/model/lead-surfaces.d.ts +58 -0
  554. package/src/lib/model/lead-surfaces.js +67 -0
  555. package/src/lib/model/lead-surfaces.js.map +1 -0
  556. package/src/lib/model/leads-csv.d.ts +40 -0
  557. package/src/lib/model/leads-csv.js +40 -0
  558. package/src/lib/model/leads-csv.js.map +1 -0
  559. package/src/lib/model/next-activity-api.d.ts +31 -0
  560. package/src/lib/model/next-activity-api.js +57 -0
  561. package/src/lib/model/next-activity-api.js.map +1 -0
  562. package/src/lib/model/next-activity.d.ts +64 -0
  563. package/src/lib/model/next-activity.js +47 -0
  564. package/src/lib/model/next-activity.js.map +1 -0
  565. package/src/lib/model/person-key-web.d.ts +43 -0
  566. package/src/lib/model/person-key-web.js +52 -0
  567. package/src/lib/model/person-key-web.js.map +1 -0
  568. package/src/lib/model/record-facts.d.ts +282 -0
  569. package/src/lib/model/record-facts.js +434 -0
  570. package/src/lib/model/record-facts.js.map +1 -0
  571. package/src/lib/model/task-api.d.ts +28 -0
  572. package/src/lib/model/task-api.js +57 -0
  573. package/src/lib/model/task-api.js.map +1 -0
  574. package/src/lib/model/task-calendar.d.ts +108 -0
  575. package/src/lib/model/task-calendar.js +139 -0
  576. package/src/lib/model/task-calendar.js.map +1 -0
  577. package/src/lib/model/task-routes.d.ts +177 -0
  578. package/src/lib/model/task-routes.js +197 -0
  579. package/src/lib/model/task-routes.js.map +1 -0
  580. package/src/lib/model/task-scope.d.ts +45 -0
  581. package/src/lib/model/task-scope.js +51 -0
  582. package/src/lib/model/task-scope.js.map +1 -0
  583. package/src/lib/model/task-views.d.ts +149 -0
  584. package/src/lib/model/task-views.js +286 -0
  585. package/src/lib/model/task-views.js.map +1 -0
  586. package/src/lib/model/tasks-csv.d.ts +28 -0
  587. package/src/lib/model/tasks-csv.js +28 -0
  588. package/src/lib/model/tasks-csv.js.map +1 -0
  589. package/src/lib/plugin.d.ts +32 -0
  590. package/src/lib/plugin.js +208 -0
  591. package/src/lib/plugin.js.map +1 -0
  592. package/src/lib/server/companies-import.d.ts +57 -0
  593. package/src/lib/server/companies-import.js +242 -0
  594. package/src/lib/server/companies-import.js.map +1 -0
  595. package/src/lib/server/company-delete.d.ts +59 -0
  596. package/src/lib/server/company-delete.js +146 -0
  597. package/src/lib/server/company-delete.js.map +1 -0
  598. package/src/lib/server/contact-email-history.d.ts +82 -0
  599. package/src/lib/server/contact-email-history.js +264 -0
  600. package/src/lib/server/contact-email-history.js.map +1 -0
  601. package/src/lib/server/contact-profile.d.ts +41 -0
  602. package/src/lib/server/contact-profile.js +45 -0
  603. package/src/lib/server/contact-profile.js.map +1 -0
  604. package/src/lib/server/contact-update.d.ts +92 -0
  605. package/src/lib/server/contact-update.js +512 -0
  606. package/src/lib/server/contact-update.js.map +1 -0
  607. package/src/lib/server/contacts-import.d.ts +73 -0
  608. package/src/lib/server/contacts-import.js +263 -0
  609. package/src/lib/server/contacts-import.js.map +1 -0
  610. package/src/lib/server/contacts-merge.d.ts +86 -0
  611. package/src/lib/server/contacts-merge.js +206 -0
  612. package/src/lib/server/contacts-merge.js.map +1 -0
  613. package/src/lib/server/deals-import.d.ts +76 -0
  614. package/src/lib/server/deals-import.js +246 -0
  615. package/src/lib/server/deals-import.js.map +1 -0
  616. package/src/lib/server/email-send.d.ts +119 -0
  617. package/src/lib/server/email-send.js +667 -0
  618. package/src/lib/server/email-send.js.map +1 -0
  619. package/src/lib/server/email-template-duplicate.d.ts +19 -0
  620. package/src/lib/server/email-template-duplicate.js +206 -0
  621. package/src/lib/server/email-template-duplicate.js.map +1 -0
  622. package/src/lib/server/erase-person.d.ts +108 -0
  623. package/src/lib/server/erase-person.js +309 -0
  624. package/src/lib/server/erase-person.js.map +1 -0
  625. package/src/lib/server/import-context.d.ts +85 -0
  626. package/src/lib/server/import-context.js +181 -0
  627. package/src/lib/server/import-context.js.map +1 -0
  628. package/src/lib/server/inbound-address.d.ts +61 -0
  629. package/src/lib/server/inbound-address.js +188 -0
  630. package/src/lib/server/inbound-address.js.map +1 -0
  631. package/src/lib/server/lead-convert.d.ts +78 -0
  632. package/src/lib/server/lead-convert.js +250 -0
  633. package/src/lib/server/lead-convert.js.map +1 -0
  634. package/src/lib/server/leads-import.d.ts +84 -0
  635. package/src/lib/server/leads-import.js +261 -0
  636. package/src/lib/server/leads-import.js.map +1 -0
  637. package/src/lib/server/next-activity-routes.d.ts +33 -0
  638. package/src/lib/server/next-activity-routes.js +110 -0
  639. package/src/lib/server/next-activity-routes.js.map +1 -0
  640. package/src/lib/server/org-activity.d.ts +61 -0
  641. package/src/lib/server/org-activity.js +120 -0
  642. package/src/lib/server/org-activity.js.map +1 -0
  643. package/src/lib/server/org-caller.d.ts +110 -0
  644. package/src/lib/server/org-caller.js +154 -0
  645. package/src/lib/server/org-caller.js.map +1 -0
  646. package/src/lib/server/recipe-routes.d.ts +75 -0
  647. package/src/lib/server/recipe-routes.js +442 -0
  648. package/src/lib/server/recipe-routes.js.map +1 -0
  649. package/src/lib/server/record-facts.d.ts +65 -0
  650. package/src/lib/server/record-facts.js +337 -0
  651. package/src/lib/server/record-facts.js.map +1 -0
  652. package/src/lib/server/record-timeline.d.ts +51 -0
  653. package/src/lib/server/record-timeline.js +215 -0
  654. package/src/lib/server/record-timeline.js.map +1 -0
  655. package/src/lib/server/suite-gate.d.ts +42 -0
  656. package/src/lib/server/suite-gate.js +87 -0
  657. package/src/lib/server/suite-gate.js.map +1 -0
  658. package/src/lib/server/task-routes.d.ts +132 -0
  659. package/src/lib/server/task-routes.js +699 -0
  660. package/src/lib/server/task-routes.js.map +1 -0
  661. package/src/lib/server/tasks-import.d.ts +54 -0
  662. package/src/lib/server/tasks-import.js +157 -0
  663. package/src/lib/server/tasks-import.js.map +1 -0
  664. package/src/lib/server-deal-stage.d.ts +88 -0
  665. package/src/lib/server-deal-stage.js +316 -0
  666. package/src/lib/server-deal-stage.js.map +1 -0
  667. package/src/lib/server.d.ts +149 -0
  668. package/src/lib/server.js +615 -0
  669. package/src/lib/server.js.map +1 -0
@@ -0,0 +1,151 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ import { HubSections } from "@aglyn/shared-ui-next";
20
+ import { CrmOrgMountProvider } from "../hooks/use-crm-org-mount.js";
21
+ import CompaniesSection from "./companies-section.js";
22
+ import CompanyDetailPage from "./company-detail-page.js";
23
+ import ContactDetailPage from "./contact-detail-page.js";
24
+ import DealDetailPage from "./deal-detail-page.js";
25
+ import DealsSection from "./deals-section.js";
26
+ import FieldsSection from "./fields-section.js";
27
+ import LeadDetailPage from "./lead-detail-page.js";
28
+ import LeadsSection from "./leads-section.js";
29
+ import ContactsSection from "./contacts-section.js";
30
+ import ReportsSection from "./reports-section.js";
31
+ import CrmSettingsSection from "./settings-section.js";
32
+ import TasksSection from "./tasks-section.js";
33
+ /**
34
+ * The body of one Contacts section, built only when that section is the one
35
+ * being read (AGL-2595).
36
+ *
37
+ * A function rather than a map of nodes on purpose: a `Record<id, ReactNode>`
38
+ * would CONSTRUCT every section on every render, and the people list alone
39
+ * opens four Firestore listens and an aggregate read on mount. Only the
40
+ * returned branch is ever built.
41
+ *
42
+ * Three sections own a deeper route — a record beneath the list — and read
43
+ * it off `detail`, the segments after the section id. A list section with
44
+ * nothing after it is the list; one segment is the record; the shell has
45
+ * already 404'd anything it could not resolve to this surface.
46
+ */ function sectionBody(section, props, /** The section's OWN segments — `segments[1]` onward. */ detail, basePath) {
47
+ const record = detail[0];
48
+ const recordProps = {
49
+ hostId: props.hostId,
50
+ org: props.org,
51
+ permissions: props.permissions,
52
+ releaseFlag: props.releaseFlag,
53
+ hostRole: props.hostRole,
54
+ basePath
55
+ };
56
+ switch(section){
57
+ case 'contacts':
58
+ return record ? /*#__PURE__*/ _jsx(ContactDetailPage, _extends({}, recordProps, {
59
+ id: record
60
+ })) : /*#__PURE__*/ _jsx(ContactsSection, _extends({}, props));
61
+ case 'leads':
62
+ /*
63
+ * A lead lives under its site, so at the organization level the
64
+ * address names the site before the id — `leads/{hostId}/{leadId}`
65
+ * (AGL-2630) — and the record page is mounted UNDER that site: every
66
+ * read and write it makes is host-scoped by path, exactly as on the
67
+ * site's own hub. Under a site the id is the one segment it always
68
+ * was.
69
+ */ return record ? !props.hostId && detail.length >= 2 ? /*#__PURE__*/ _jsx(LeadDetailPage, _extends({}, recordProps, {
70
+ hostId: record,
71
+ id: detail[1]
72
+ })) : /*#__PURE__*/ _jsx(LeadDetailPage, _extends({}, recordProps, {
73
+ id: record
74
+ })) : /*#__PURE__*/ _jsx(LeadsSection, _extends({}, props));
75
+ case 'companies':
76
+ return record ? /*#__PURE__*/ _jsx(CompanyDetailPage, _extends({}, recordProps, {
77
+ id: record
78
+ })) : /*#__PURE__*/ _jsx(CompaniesSection, {
79
+ hostId: props.hostId,
80
+ org: props.org,
81
+ basePath: basePath
82
+ });
83
+ case 'deals':
84
+ return record ? /*#__PURE__*/ _jsx(DealDetailPage, _extends({}, recordProps, {
85
+ id: record
86
+ })) : /*#__PURE__*/ _jsx(DealsSection, _extends({}, props));
87
+ case 'tasks':
88
+ return /*#__PURE__*/ _jsx(TasksSection, _extends({}, props));
89
+ case 'reports':
90
+ // The shell's props whole, like the contacts list: the reports resolve
91
+ // the org scope from `hostId`, the consent group from `org`, and their
92
+ // drill-down links from `basePath` (AGL-2604).
93
+ return /*#__PURE__*/ _jsx(ReportsSection, _extends({}, props));
94
+ case 'fields':
95
+ return /*#__PURE__*/ _jsx(FieldsSection, {
96
+ hostId: props.hostId,
97
+ org: props.org
98
+ });
99
+ case 'settings':
100
+ // The org-wide switches (AGL-2613): what the CRM does on its own for
101
+ // every site in the workspace, written to the org document.
102
+ return /*#__PURE__*/ _jsx(CrmSettingsSection, {
103
+ hostId: props.hostId,
104
+ org: props.org
105
+ });
106
+ default:
107
+ return null;
108
+ }
109
+ }
110
+ /**
111
+ * Contacts (AGL-109 → AGL-395 → AGL-2595): the CRM hub — people, companies,
112
+ * deals, tasks, reports and fields — owned by the contacts plugin and
113
+ * rendered by the shell's generic plugin route. The shell applies the
114
+ * `release_crm` gate (via the nav tab) and passes the resolved `org`
115
+ * doc, which the people section reads for the `contactsPerHost` quota.
116
+ *
117
+ * Sections are ROUTES, following the hubs that migrated before it (AGL-2501):
118
+ * `/contacts/people` is the v1 list, and every other section is a URL of its
119
+ * own, so the page builds one section's body and the others do not exist to
120
+ * subscribe. The v1 body moved to `contacts-section.tsx` untouched; what this
121
+ * file adds is the rail and the switch.
122
+ */ export function CrmConsolePage(props) {
123
+ const { section, sections, basePath, segments, orgMount } = props;
124
+ /*
125
+ * Nothing until the URL names a section. The shell redirects a bare
126
+ * `/contacts` to the landing section and holds a spinner while it does, so
127
+ * this state is transient — and rendering the people list here instead
128
+ * would pay for its listens on a URL that is already being replaced.
129
+ */ if (!section || !(sections == null ? void 0 : sections.length) || !basePath) return null;
130
+ const hub = /*#__PURE__*/ _jsx(HubSections, {
131
+ sections: sections,
132
+ children: sectionBody(section, props, (// `segments[0]` IS the section — the shell resolved it into `section`
133
+ // already — so what a section owns is everything after it.
134
+ segments != null ? segments : []).slice(1), basePath)
135
+ });
136
+ /*
137
+ * THE ORGANIZATION-LEVEL MOUNT (AGL-2630). The shell hands an `orgMount`
138
+ * only from `/[orgSlug]/crm`, where there is no site: the hub publishes it
139
+ * so every section, record page and drawer beneath resolves its scope from
140
+ * the org rather than from the `null` host it was handed. Under a site
141
+ * there is no provider, and `useCrmOrgMount` answering `null` is how a
142
+ * surface knows it is on one.
143
+ */ return orgMount ? /*#__PURE__*/ _jsx(CrmOrgMountProvider, {
144
+ mount: orgMount,
145
+ children: hub
146
+ }) : hub;
147
+ }
148
+ CrmConsolePage.displayName = 'CrmConsolePage';
149
+ export default CrmConsolePage;
150
+
151
+ //# sourceMappingURL=crm-console-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/crm-console-page.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport type { ConsolePluginPageProps } from '@aglyn/aglyn'\nimport { HubSections } from '@aglyn/shared-ui-next'\nimport type { ReactNode } from 'react'\nimport { CrmOrgMountProvider } from '../hooks/use-crm-org-mount'\nimport CompaniesSection from './companies-section'\nimport CompanyDetailPage from './company-detail-page'\nimport ContactDetailPage from './contact-detail-page'\nimport type { CrmConsoleSectionId } from './crm-console-sections'\nimport DealDetailPage from './deal-detail-page'\nimport DealsSection from './deals-section'\nimport FieldsSection from './fields-section'\nimport LeadDetailPage from './lead-detail-page'\nimport LeadsSection from './leads-section'\nimport ContactsSection from './contacts-section'\nimport ReportsSection from './reports-section'\nimport CrmSettingsSection from './settings-section'\nimport TasksSection from './tasks-section'\n\n/**\n * The body of one Contacts section, built only when that section is the one\n * being read (AGL-2595).\n *\n * A function rather than a map of nodes on purpose: a `Record<id, ReactNode>`\n * would CONSTRUCT every section on every render, and the people list alone\n * opens four Firestore listens and an aggregate read on mount. Only the\n * returned branch is ever built.\n *\n * Three sections own a deeper route — a record beneath the list — and read\n * it off `detail`, the segments after the section id. A list section with\n * nothing after it is the list; one segment is the record; the shell has\n * already 404'd anything it could not resolve to this surface.\n */\nfunction sectionBody(\n section: CrmConsoleSectionId,\n props: ConsolePluginPageProps,\n /** The section's OWN segments — `segments[1]` onward. */\n detail: readonly string[],\n basePath: string,\n): ReactNode {\n const record = detail[0]\n const recordProps = {\n hostId: props.hostId,\n org: props.org,\n permissions: props.permissions,\n releaseFlag: props.releaseFlag,\n hostRole: props.hostRole,\n basePath,\n }\n switch (section) {\n case 'contacts':\n return record ? (\n <ContactDetailPage {...recordProps} id={record} />\n ) : (\n <ContactsSection {...props} />\n )\n case 'leads':\n /*\n * A lead lives under its site, so at the organization level the\n * address names the site before the id — `leads/{hostId}/{leadId}`\n * (AGL-2630) — and the record page is mounted UNDER that site: every\n * read and write it makes is host-scoped by path, exactly as on the\n * site's own hub. Under a site the id is the one segment it always\n * was.\n */\n return record ? (\n !props.hostId && detail.length >= 2 ? (\n <LeadDetailPage {...recordProps} hostId={record} id={detail[1]} />\n ) : (\n <LeadDetailPage {...recordProps} id={record} />\n )\n ) : (\n <LeadsSection {...props} />\n )\n case 'companies':\n return record ? (\n <CompanyDetailPage {...recordProps} id={record} />\n ) : (\n <CompaniesSection\n hostId={props.hostId}\n org={props.org}\n basePath={basePath}\n />\n )\n case 'deals':\n return record ? (\n <DealDetailPage {...recordProps} id={record} />\n ) : (\n <DealsSection {...props} />\n )\n case 'tasks':\n return <TasksSection {...props} />\n case 'reports':\n // The shell's props whole, like the contacts list: the reports resolve\n // the org scope from `hostId`, the consent group from `org`, and their\n // drill-down links from `basePath` (AGL-2604).\n return <ReportsSection {...props} />\n case 'fields':\n return <FieldsSection hostId={props.hostId} org={props.org} />\n case 'settings':\n // The org-wide switches (AGL-2613): what the CRM does on its own for\n // every site in the workspace, written to the org document.\n return <CrmSettingsSection hostId={props.hostId} org={props.org} />\n default:\n return null\n }\n}\n\n/**\n * Contacts (AGL-109 → AGL-395 → AGL-2595): the CRM hub — people, companies,\n * deals, tasks, reports and fields — owned by the contacts plugin and\n * rendered by the shell's generic plugin route. The shell applies the\n * `release_crm` gate (via the nav tab) and passes the resolved `org`\n * doc, which the people section reads for the `contactsPerHost` quota.\n *\n * Sections are ROUTES, following the hubs that migrated before it (AGL-2501):\n * `/contacts/people` is the v1 list, and every other section is a URL of its\n * own, so the page builds one section's body and the others do not exist to\n * subscribe. The v1 body moved to `contacts-section.tsx` untouched; what this\n * file adds is the rail and the switch.\n */\nexport function CrmConsolePage(props: ConsolePluginPageProps) {\n const { section, sections, basePath, segments, orgMount } = props\n\n /*\n * Nothing until the URL names a section. The shell redirects a bare\n * `/contacts` to the landing section and holds a spinner while it does, so\n * this state is transient — and rendering the people list here instead\n * would pay for its listens on a URL that is already being replaced.\n */\n if (!section || !sections?.length || !basePath) return null\n\n const hub = (\n <HubSections sections={sections}>\n {sectionBody(\n section as CrmConsoleSectionId,\n props,\n // `segments[0]` IS the section — the shell resolved it into `section`\n // already — so what a section owns is everything after it.\n (segments ?? []).slice(1),\n basePath,\n )}\n </HubSections>\n )\n /*\n * THE ORGANIZATION-LEVEL MOUNT (AGL-2630). The shell hands an `orgMount`\n * only from `/[orgSlug]/crm`, where there is no site: the hub publishes it\n * so every section, record page and drawer beneath resolves its scope from\n * the org rather than from the `null` host it was handed. Under a site\n * there is no provider, and `useCrmOrgMount` answering `null` is how a\n * surface knows it is on one.\n */\n return orgMount ? (\n <CrmOrgMountProvider mount={orgMount}>{hub}</CrmOrgMountProvider>\n ) : (\n hub\n )\n}\nCrmConsolePage.displayName = 'CrmConsolePage'\n\nexport default CrmConsolePage\n"],"names":["HubSections","CrmOrgMountProvider","CompaniesSection","CompanyDetailPage","ContactDetailPage","DealDetailPage","DealsSection","FieldsSection","LeadDetailPage","LeadsSection","ContactsSection","ReportsSection","CrmSettingsSection","TasksSection","sectionBody","section","props","detail","basePath","record","recordProps","hostId","org","permissions","releaseFlag","hostRole","id","length","CrmConsolePage","sections","segments","orgMount","hub","slice","mount","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAGA,SAASA,WAAW,QAAQ,wBAAuB;AAEnD,SAASC,mBAAmB,QAAQ,gCAA4B;AAChE,OAAOC,sBAAsB,yBAAqB;AAClD,OAAOC,uBAAuB,2BAAuB;AACrD,OAAOC,uBAAuB,2BAAuB;AAErD,OAAOC,oBAAoB,wBAAoB;AAC/C,OAAOC,kBAAkB,qBAAiB;AAC1C,OAAOC,mBAAmB,sBAAkB;AAC5C,OAAOC,oBAAoB,wBAAoB;AAC/C,OAAOC,kBAAkB,qBAAiB;AAC1C,OAAOC,qBAAqB,wBAAoB;AAChD,OAAOC,oBAAoB,uBAAmB;AAC9C,OAAOC,wBAAwB,wBAAoB;AACnD,OAAOC,kBAAkB,qBAAiB;AAE1C;;;;;;;;;;;;;CAaC,GACD,SAASC,YACPC,OAA4B,EAC5BC,KAA6B,EAC7B,uDAAuD,GACvDC,MAAyB,EACzBC,QAAgB;IAEhB,MAAMC,SAASF,MAAM,CAAC,EAAE;IACxB,MAAMG,cAAc;QAClBC,QAAQL,MAAMK,MAAM;QACpBC,KAAKN,MAAMM,GAAG;QACdC,aAAaP,MAAMO,WAAW;QAC9BC,aAAaR,MAAMQ,WAAW;QAC9BC,UAAUT,MAAMS,QAAQ;QACxBP;IACF;IACA,OAAQH;QACN,KAAK;YACH,OAAOI,uBACL,KAACf,gCAAsBgB;gBAAaM,IAAIP;gCAExC,KAACT,8BAAoBM;QAEzB,KAAK;YACH;;;;;;;OAOC,GACD,OAAOG,SACL,CAACH,MAAMK,MAAM,IAAIJ,OAAOU,MAAM,IAAI,kBAChC,KAACnB,6BAAmBY;gBAAaC,QAAQF;gBAAQO,IAAIT,MAAM,CAAC,EAAE;gCAE9D,KAACT,6BAAmBY;gBAAaM,IAAIP;gCAGvC,KAACV,2BAAiBO;QAEtB,KAAK;YACH,OAAOG,uBACL,KAAChB,gCAAsBiB;gBAAaM,IAAIP;gCAExC,KAACjB;gBACCmB,QAAQL,MAAMK,MAAM;gBACpBC,KAAKN,MAAMM,GAAG;gBACdJ,UAAUA;;QAGhB,KAAK;YACH,OAAOC,uBACL,KAACd,6BAAmBe;gBAAaM,IAAIP;gCAErC,KAACb,2BAAiBU;QAEtB,KAAK;YACH,qBAAO,KAACH,2BAAiBG;QAC3B,KAAK;YACH,uEAAuE;YACvE,uEAAuE;YACvE,+CAA+C;YAC/C,qBAAO,KAACL,6BAAmBK;QAC7B,KAAK;YACH,qBAAO,KAACT;gBAAcc,QAAQL,MAAMK,MAAM;gBAAEC,KAAKN,MAAMM,GAAG;;QAC5D,KAAK;YACH,qEAAqE;YACrE,4DAA4D;YAC5D,qBAAO,KAACV;gBAAmBS,QAAQL,MAAMK,MAAM;gBAAEC,KAAKN,MAAMM,GAAG;;QACjE;YACE,OAAO;IACX;AACF;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,SAASM,eAAeZ,KAA6B;IAC1D,MAAM,EAAED,OAAO,EAAEc,QAAQ,EAAEX,QAAQ,EAAEY,QAAQ,EAAEC,QAAQ,EAAE,GAAGf;IAE5D;;;;;GAKC,GACD,IAAI,CAACD,WAAW,EAACc,4BAAAA,SAAUF,MAAM,KAAI,CAACT,UAAU,OAAO;IAEvD,MAAMc,oBACJ,KAAChC;QAAY6B,UAAUA;kBACpBf,YACCC,SACAC,OAGA,CAFA,sEAAsE;QACtE,2DAA2D;QAC1Dc,mBAAAA,WAAY,EAAE,EAAEG,KAAK,CAAC,IACvBf;;IAIN;;;;;;;GAOC,GACD,OAAOa,yBACL,KAAC9B;QAAoBiC,OAAOH;kBAAWC;SAEvCA;AAEJ;AACAJ,eAAeO,WAAW,GAAG;AAE7B,eAAeP,eAAc"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { ConsoleNavSection } from '@aglyn/aglyn';
18
+ export type CrmConsoleSectionId = 'contacts' | 'leads' | 'companies' | 'deals' | 'tasks' | 'reports' | 'fields' | 'settings';
19
+ /**
20
+ * The CRM hub's sections, in rail order (AGL-2595).
21
+ *
22
+ * One list, read twice and never copied: `plugin.ts` registers it on the nav
23
+ * item so the shell can route and gate each section, and the hub page
24
+ * switches its body on the id the shell resolves back. A second copy is how a
25
+ * section comes to be routable under one id and drawn under another.
26
+ *
27
+ * Ids appear in links people keep, so they are persisted vocabulary. The
28
+ * surface is called CRM and its first section Contacts, the way Salesforce
29
+ * and HubSpot lay the same objects out — Leads, Contacts, Companies, Deals —
30
+ * so `/crm/contacts` names the list and reads as one.
31
+ *
32
+ * Every section here ships with the surface and inherits the nav item's
33
+ * `release_crm` gate — no `navTabId` on any of them. A section that
34
+ * later needs its own schedule declares one, which can only narrow.
35
+ *
36
+ * The PLAN is the other axis, and it is asked once, of the whole hub
37
+ * (AGL-2851). The CRM is included from Starter and a Free workspace has none
38
+ * of it, so `plugin.ts` declares `features.crm` on the extension and no
39
+ * section declares a flag of its own. On a plan without it the shell draws
40
+ * every section here locked and answers every address beneath the hub — a
41
+ * bare `/crm`, a section, a record — with the upgrade notice beside the rail.
42
+ * A section that later belongs to a narrower entitlement declares that flag,
43
+ * which can only narrow.
44
+ *
45
+ * Rail ORDER decides where a bare `/crm` lands: the shell redirects it to
46
+ * the first section this reader may open, which is Contacts on every plan
47
+ * that opens the CRM. There is deliberately no separate default constant.
48
+ * Settings is LAST (AGL-2613): it is the section a reader visits once and
49
+ * the records are what the rail is for, so it sits where a settings entry
50
+ * sits in every hub — after the work, before nothing.
51
+ */
52
+ export declare const CRM_CONSOLE_SECTIONS: readonly ConsoleNavSection[];
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * The CRM hub's sections, in rail order (AGL-2595).
18
+ *
19
+ * One list, read twice and never copied: `plugin.ts` registers it on the nav
20
+ * item so the shell can route and gate each section, and the hub page
21
+ * switches its body on the id the shell resolves back. A second copy is how a
22
+ * section comes to be routable under one id and drawn under another.
23
+ *
24
+ * Ids appear in links people keep, so they are persisted vocabulary. The
25
+ * surface is called CRM and its first section Contacts, the way Salesforce
26
+ * and HubSpot lay the same objects out — Leads, Contacts, Companies, Deals —
27
+ * so `/crm/contacts` names the list and reads as one.
28
+ *
29
+ * Every section here ships with the surface and inherits the nav item's
30
+ * `release_crm` gate — no `navTabId` on any of them. A section that
31
+ * later needs its own schedule declares one, which can only narrow.
32
+ *
33
+ * The PLAN is the other axis, and it is asked once, of the whole hub
34
+ * (AGL-2851). The CRM is included from Starter and a Free workspace has none
35
+ * of it, so `plugin.ts` declares `features.crm` on the extension and no
36
+ * section declares a flag of its own. On a plan without it the shell draws
37
+ * every section here locked and answers every address beneath the hub — a
38
+ * bare `/crm`, a section, a record — with the upgrade notice beside the rail.
39
+ * A section that later belongs to a narrower entitlement declares that flag,
40
+ * which can only narrow.
41
+ *
42
+ * Rail ORDER decides where a bare `/crm` lands: the shell redirects it to
43
+ * the first section this reader may open, which is Contacts on every plan
44
+ * that opens the CRM. There is deliberately no separate default constant.
45
+ * Settings is LAST (AGL-2613): it is the section a reader visits once and
46
+ * the records are what the rail is for, so it sits where a settings entry
47
+ * sits in every hub — after the work, before nothing.
48
+ */ export const CRM_CONSOLE_SECTIONS = [
49
+ {
50
+ id: 'contacts',
51
+ label: 'Contacts'
52
+ },
53
+ {
54
+ id: 'leads',
55
+ label: 'Leads'
56
+ },
57
+ {
58
+ id: 'companies',
59
+ label: 'Companies'
60
+ },
61
+ {
62
+ id: 'deals',
63
+ label: 'Deals'
64
+ },
65
+ {
66
+ id: 'tasks',
67
+ label: 'Tasks'
68
+ },
69
+ {
70
+ id: 'reports',
71
+ label: 'Reports'
72
+ },
73
+ {
74
+ id: 'fields',
75
+ label: 'Fields'
76
+ },
77
+ {
78
+ id: 'settings',
79
+ label: 'Settings'
80
+ }
81
+ ];
82
+
83
+ //# sourceMappingURL=crm-console-sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/crm-console-sections.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ConsoleNavSection } from '@aglyn/aglyn'\n\nexport type CrmConsoleSectionId =\n | 'contacts'\n | 'leads'\n | 'companies'\n | 'deals'\n | 'tasks'\n | 'reports'\n | 'fields'\n | 'settings'\n\n/**\n * The CRM hub's sections, in rail order (AGL-2595).\n *\n * One list, read twice and never copied: `plugin.ts` registers it on the nav\n * item so the shell can route and gate each section, and the hub page\n * switches its body on the id the shell resolves back. A second copy is how a\n * section comes to be routable under one id and drawn under another.\n *\n * Ids appear in links people keep, so they are persisted vocabulary. The\n * surface is called CRM and its first section Contacts, the way Salesforce\n * and HubSpot lay the same objects out — Leads, Contacts, Companies, Deals —\n * so `/crm/contacts` names the list and reads as one.\n *\n * Every section here ships with the surface and inherits the nav item's\n * `release_crm` gate — no `navTabId` on any of them. A section that\n * later needs its own schedule declares one, which can only narrow.\n *\n * The PLAN is the other axis, and it is asked once, of the whole hub\n * (AGL-2851). The CRM is included from Starter and a Free workspace has none\n * of it, so `plugin.ts` declares `features.crm` on the extension and no\n * section declares a flag of its own. On a plan without it the shell draws\n * every section here locked and answers every address beneath the hub — a\n * bare `/crm`, a section, a record — with the upgrade notice beside the rail.\n * A section that later belongs to a narrower entitlement declares that flag,\n * which can only narrow.\n *\n * Rail ORDER decides where a bare `/crm` lands: the shell redirects it to\n * the first section this reader may open, which is Contacts on every plan\n * that opens the CRM. There is deliberately no separate default constant.\n * Settings is LAST (AGL-2613): it is the section a reader visits once and\n * the records are what the rail is for, so it sits where a settings entry\n * sits in every hub — after the work, before nothing.\n */\nexport const CRM_CONSOLE_SECTIONS: readonly ConsoleNavSection[] = [\n { id: 'contacts', label: 'Contacts' },\n { id: 'leads', label: 'Leads' },\n { id: 'companies', label: 'Companies' },\n { id: 'deals', label: 'Deals' },\n { id: 'tasks', label: 'Tasks' },\n { id: 'reports', label: 'Reports' },\n { id: 'fields', label: 'Fields' },\n { id: 'settings', label: 'Settings' },\n]\n"],"names":["CRM_CONSOLE_SECTIONS","id","label"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCC,GACD,OAAO,MAAMA,uBAAqD;IAChE;QAAEC,IAAI;QAAYC,OAAO;IAAW;IACpC;QAAED,IAAI;QAASC,OAAO;IAAQ;IAC9B;QAAED,IAAI;QAAaC,OAAO;IAAY;IACtC;QAAED,IAAI;QAASC,OAAO;IAAQ;IAC9B;QAAED,IAAI;QAASC,OAAO;IAAQ;IAC9B;QAAED,IAAI;QAAWC,OAAO;IAAU;IAClC;QAAED,IAAI;QAAUC,OAAO;IAAS;IAChC;QAAED,IAAI;QAAYC,OAAO;IAAW;CACrC,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { ContactFieldDefinition, CrmCustomValue } from '@aglyn/aglyn';
2
+ /** An ISO stamp as the `<input type="date">` value it corresponds to. */
3
+ export declare const isoToDateInput: (value: CrmCustomValue | undefined) => string;
4
+ export interface CrmCustomFieldControlProps {
5
+ definition: Pick<ContactFieldDefinition, 'key' | 'label' | 'type' | 'options' | 'required'>;
6
+ /** The value as shown — the draft's where touched, else the stored one. */
7
+ value: CrmCustomValue | undefined;
8
+ /** `null` is the explicit "cleared" every surface writes for an emptied control. */
9
+ onChange: (value: CrmCustomValue) => void;
10
+ disabled?: boolean;
11
+ }
12
+ /**
13
+ * ONE control per custom-field type (AGL-2601, shared since AGL-2661), the
14
+ * same on a contact's card, a company's drawer and a deal's.
15
+ *
16
+ * A checkbox, a choice list, a number box, a date picker, or a text or
17
+ * link box — chosen by the definition's type, which is also what every
18
+ * reader coerces the value by. Clearing any of them hands back `null`
19
+ * rather than deleting the key: a `where` on the key can still find the
20
+ * record, and an export still shows the column.
21
+ */
22
+ export declare function CrmCustomFieldControl(props: CrmCustomFieldControlProps): import("react").JSX.Element;
23
+ export declare namespace CrmCustomFieldControl {
24
+ var displayName: string;
25
+ }
26
+ export default CrmCustomFieldControl;
@@ -0,0 +1,131 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { Checkbox, FormControlLabel, MenuItem, TextField } from "@mui/material";
19
+ /** An ISO stamp as the `<input type="date">` value it corresponds to. */ export const isoToDateInput = (value)=>{
20
+ if (typeof value !== 'string' || !value) return '';
21
+ const ms = Date.parse(value);
22
+ return Number.isFinite(ms) ? new Date(ms).toISOString().slice(0, 10) : '';
23
+ };
24
+ /** The longest text a text or link control accepts — the model's own cap. */ const TEXT_MAX = 2000;
25
+ /**
26
+ * ONE control per custom-field type (AGL-2601, shared since AGL-2661), the
27
+ * same on a contact's card, a company's drawer and a deal's.
28
+ *
29
+ * A checkbox, a choice list, a number box, a date picker, or a text or
30
+ * link box — chosen by the definition's type, which is also what every
31
+ * reader coerces the value by. Clearing any of them hands back `null`
32
+ * rather than deleting the key: a `where` on the key can still find the
33
+ * record, and an export still shows the column.
34
+ */ export function CrmCustomFieldControl(props) {
35
+ const { definition, value, onChange, disabled } = props;
36
+ const label = definition.label || definition.key;
37
+ switch(definition.type){
38
+ case 'checkbox':
39
+ return /*#__PURE__*/ _jsx(FormControlLabel, {
40
+ control: /*#__PURE__*/ _jsx(Checkbox, {
41
+ checked: value === true,
42
+ disabled: disabled,
43
+ onChange: (event)=>onChange(event.target.checked),
44
+ slotProps: {
45
+ input: {
46
+ 'aria-label': label
47
+ }
48
+ }
49
+ }),
50
+ label: definition.required ? `${label} *` : label
51
+ });
52
+ case 'select':
53
+ var _definition_options, _definition_options1;
54
+ return /*#__PURE__*/ _jsxs(TextField, {
55
+ select: true,
56
+ size: "small",
57
+ label: label,
58
+ required: definition.required === true,
59
+ disabled: disabled,
60
+ value: typeof value === 'string' && ((_definition_options = definition.options) != null ? _definition_options : []).includes(value) ? value : '',
61
+ onChange: (event)=>onChange(event.target.value || null),
62
+ fullWidth: true,
63
+ children: [
64
+ /*#__PURE__*/ _jsx(MenuItem, {
65
+ value: "",
66
+ children: '—'
67
+ }),
68
+ ((_definition_options1 = definition.options) != null ? _definition_options1 : []).map((option)=>/*#__PURE__*/ _jsx(MenuItem, {
69
+ value: option,
70
+ children: option
71
+ }, option))
72
+ ]
73
+ });
74
+ case 'number':
75
+ return /*#__PURE__*/ _jsx(TextField, {
76
+ size: "small",
77
+ type: "number",
78
+ label: label,
79
+ required: definition.required === true,
80
+ disabled: disabled,
81
+ value: typeof value === 'number' ? value : '',
82
+ onChange: (event)=>{
83
+ const text = event.target.value;
84
+ if (text === '') return onChange(null);
85
+ const parsed = Number(text);
86
+ if (Number.isFinite(parsed)) onChange(parsed);
87
+ },
88
+ fullWidth: true
89
+ });
90
+ case 'date':
91
+ return /*#__PURE__*/ _jsx(TextField, {
92
+ size: "small",
93
+ type: "date",
94
+ label: label,
95
+ required: definition.required === true,
96
+ disabled: disabled,
97
+ value: isoToDateInput(value),
98
+ onChange: (event)=>{
99
+ const text = event.target.value;
100
+ const ms = text ? Date.parse(text) : Number.NaN;
101
+ onChange(Number.isFinite(ms) ? new Date(ms).toISOString() : null);
102
+ },
103
+ slotProps: {
104
+ inputLabel: {
105
+ shrink: true
106
+ }
107
+ },
108
+ fullWidth: true
109
+ });
110
+ default:
111
+ return /*#__PURE__*/ _jsx(TextField, {
112
+ size: "small",
113
+ type: definition.type === 'url' ? 'url' : 'text',
114
+ label: label,
115
+ required: definition.required === true,
116
+ disabled: disabled,
117
+ value: typeof value === 'string' ? value : value == null ? '' : String(value),
118
+ onChange: (event)=>onChange(event.target.value || null),
119
+ slotProps: {
120
+ htmlInput: {
121
+ maxLength: TEXT_MAX
122
+ }
123
+ },
124
+ fullWidth: true
125
+ });
126
+ }
127
+ }
128
+ CrmCustomFieldControl.displayName = 'CrmCustomFieldControl';
129
+ export default CrmCustomFieldControl;
130
+
131
+ //# sourceMappingURL=crm-custom-field-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/crm-custom-field-control.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport type { ContactFieldDefinition, CrmCustomValue } from '@aglyn/aglyn'\nimport { Checkbox, FormControlLabel, MenuItem, TextField } from '@mui/material'\n\n/** An ISO stamp as the `<input type=\"date\">` value it corresponds to. */\nexport const isoToDateInput = (value: CrmCustomValue | undefined): string => {\n if (typeof value !== 'string' || !value) return ''\n const ms = Date.parse(value)\n return Number.isFinite(ms) ? new Date(ms).toISOString().slice(0, 10) : ''\n}\n\n/** The longest text a text or link control accepts — the model's own cap. */\nconst TEXT_MAX = 2000\n\nexport interface CrmCustomFieldControlProps {\n definition: Pick<ContactFieldDefinition, 'key' | 'label' | 'type' | 'options' | 'required'>\n /** The value as shown — the draft's where touched, else the stored one. */\n value: CrmCustomValue | undefined\n /** `null` is the explicit \"cleared\" every surface writes for an emptied control. */\n onChange: (value: CrmCustomValue) => void\n disabled?: boolean\n}\n\n/**\n * ONE control per custom-field type (AGL-2601, shared since AGL-2661), the\n * same on a contact's card, a company's drawer and a deal's.\n *\n * A checkbox, a choice list, a number box, a date picker, or a text or\n * link box — chosen by the definition's type, which is also what every\n * reader coerces the value by. Clearing any of them hands back `null`\n * rather than deleting the key: a `where` on the key can still find the\n * record, and an export still shows the column.\n */\nexport function CrmCustomFieldControl(props: CrmCustomFieldControlProps) {\n const { definition, value, onChange, disabled } = props\n const label = definition.label || definition.key\n switch (definition.type) {\n case 'checkbox':\n return (\n <FormControlLabel\n control={\n <Checkbox\n checked={value === true}\n disabled={disabled}\n onChange={(event) => onChange(event.target.checked)}\n slotProps={{ input: { 'aria-label': label } }}\n />\n }\n label={definition.required ? `${label} *` : label}\n />\n )\n case 'select':\n return (\n <TextField\n select\n size=\"small\"\n label={label}\n required={definition.required === true}\n disabled={disabled}\n value={\n typeof value === 'string' && (definition.options ?? []).includes(value) ? value : ''\n }\n onChange={(event) => onChange(event.target.value || null)}\n fullWidth\n >\n <MenuItem value=\"\">{'—'}</MenuItem>\n {(definition.options ?? []).map((option) => (\n <MenuItem key={option} value={option}>\n {option}\n </MenuItem>\n ))}\n </TextField>\n )\n case 'number':\n return (\n <TextField\n size=\"small\"\n type=\"number\"\n label={label}\n required={definition.required === true}\n disabled={disabled}\n value={typeof value === 'number' ? value : ''}\n onChange={(event) => {\n const text = event.target.value\n if (text === '') return onChange(null)\n const parsed = Number(text)\n if (Number.isFinite(parsed)) onChange(parsed)\n }}\n fullWidth\n />\n )\n case 'date':\n return (\n <TextField\n size=\"small\"\n type=\"date\"\n label={label}\n required={definition.required === true}\n disabled={disabled}\n value={isoToDateInput(value)}\n onChange={(event) => {\n const text = event.target.value\n const ms = text ? Date.parse(text) : Number.NaN\n onChange(Number.isFinite(ms) ? new Date(ms).toISOString() : null)\n }}\n slotProps={{ inputLabel: { shrink: true } }}\n fullWidth\n />\n )\n default:\n return (\n <TextField\n size=\"small\"\n type={definition.type === 'url' ? 'url' : 'text'}\n label={label}\n required={definition.required === true}\n disabled={disabled}\n value={typeof value === 'string' ? value : value == null ? '' : String(value)}\n onChange={(event) => onChange(event.target.value || null)}\n slotProps={{ htmlInput: { maxLength: TEXT_MAX } }}\n fullWidth\n />\n )\n }\n}\nCrmCustomFieldControl.displayName = 'CrmCustomFieldControl'\n\nexport default CrmCustomFieldControl\n"],"names":["Checkbox","FormControlLabel","MenuItem","TextField","isoToDateInput","value","ms","Date","parse","Number","isFinite","toISOString","slice","TEXT_MAX","CrmCustomFieldControl","props","definition","onChange","disabled","label","key","type","control","checked","event","target","slotProps","input","required","select","size","options","includes","fullWidth","map","option","text","parsed","NaN","inputLabel","shrink","String","htmlInput","maxLength","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAGA,SAASA,QAAQ,EAAEC,gBAAgB,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,gBAAe;AAE/E,uEAAuE,GACvE,OAAO,MAAMC,iBAAiB,CAACC;IAC7B,IAAI,OAAOA,UAAU,YAAY,CAACA,OAAO,OAAO;IAChD,MAAMC,KAAKC,KAAKC,KAAK,CAACH;IACtB,OAAOI,OAAOC,QAAQ,CAACJ,MAAM,IAAIC,KAAKD,IAAIK,WAAW,GAAGC,KAAK,CAAC,GAAG,MAAM;AACzE,EAAC;AAED,2EAA2E,GAC3E,MAAMC,WAAW;AAWjB;;;;;;;;;CASC,GACD,OAAO,SAASC,sBAAsBC,KAAiC;IACrE,MAAM,EAAEC,UAAU,EAAEX,KAAK,EAAEY,QAAQ,EAAEC,QAAQ,EAAE,GAAGH;IAClD,MAAMI,QAAQH,WAAWG,KAAK,IAAIH,WAAWI,GAAG;IAChD,OAAQJ,WAAWK,IAAI;QACrB,KAAK;YACH,qBACE,KAACpB;gBACCqB,uBACE,KAACtB;oBACCuB,SAASlB,UAAU;oBACnBa,UAAUA;oBACVD,UAAU,CAACO,QAAUP,SAASO,MAAMC,MAAM,CAACF,OAAO;oBAClDG,WAAW;wBAAEC,OAAO;4BAAE,cAAcR;wBAAM;oBAAE;;gBAGhDA,OAAOH,WAAWY,QAAQ,GAAG,GAAGT,MAAM,EAAE,CAAC,GAAGA;;QAGlD,KAAK;gBASiCH,qBAM9BA;YAdN,qBACE,MAACb;gBACC0B,MAAM;gBACNC,MAAK;gBACLX,OAAOA;gBACPS,UAAUZ,WAAWY,QAAQ,KAAK;gBAClCV,UAAUA;gBACVb,OACE,OAAOA,UAAU,YAAY,EAACW,sBAAAA,WAAWe,OAAO,YAAlBf,sBAAsB,EAAE,EAAEgB,QAAQ,CAAC3B,SAASA,QAAQ;gBAEpFY,UAAU,CAACO,QAAUP,SAASO,MAAMC,MAAM,CAACpB,KAAK,IAAI;gBACpD4B,SAAS;;kCAET,KAAC/B;wBAASG,OAAM;kCAAI;;oBACnB,EAACW,uBAAAA,WAAWe,OAAO,YAAlBf,uBAAsB,EAAE,EAAEkB,GAAG,CAAC,CAACC,uBAC/B,KAACjC;4BAAsBG,OAAO8B;sCAC3BA;2BADYA;;;QAMvB,KAAK;YACH,qBACE,KAAChC;gBACC2B,MAAK;gBACLT,MAAK;gBACLF,OAAOA;gBACPS,UAAUZ,WAAWY,QAAQ,KAAK;gBAClCV,UAAUA;gBACVb,OAAO,OAAOA,UAAU,WAAWA,QAAQ;gBAC3CY,UAAU,CAACO;oBACT,MAAMY,OAAOZ,MAAMC,MAAM,CAACpB,KAAK;oBAC/B,IAAI+B,SAAS,IAAI,OAAOnB,SAAS;oBACjC,MAAMoB,SAAS5B,OAAO2B;oBACtB,IAAI3B,OAAOC,QAAQ,CAAC2B,SAASpB,SAASoB;gBACxC;gBACAJ,SAAS;;QAGf,KAAK;YACH,qBACE,KAAC9B;gBACC2B,MAAK;gBACLT,MAAK;gBACLF,OAAOA;gBACPS,UAAUZ,WAAWY,QAAQ,KAAK;gBAClCV,UAAUA;gBACVb,OAAOD,eAAeC;gBACtBY,UAAU,CAACO;oBACT,MAAMY,OAAOZ,MAAMC,MAAM,CAACpB,KAAK;oBAC/B,MAAMC,KAAK8B,OAAO7B,KAAKC,KAAK,CAAC4B,QAAQ3B,OAAO6B,GAAG;oBAC/CrB,SAASR,OAAOC,QAAQ,CAACJ,MAAM,IAAIC,KAAKD,IAAIK,WAAW,KAAK;gBAC9D;gBACAe,WAAW;oBAAEa,YAAY;wBAAEC,QAAQ;oBAAK;gBAAE;gBAC1CP,SAAS;;QAGf;YACE,qBACE,KAAC9B;gBACC2B,MAAK;gBACLT,MAAML,WAAWK,IAAI,KAAK,QAAQ,QAAQ;gBAC1CF,OAAOA;gBACPS,UAAUZ,WAAWY,QAAQ,KAAK;gBAClCV,UAAUA;gBACVb,OAAO,OAAOA,UAAU,WAAWA,QAAQA,SAAS,OAAO,KAAKoC,OAAOpC;gBACvEY,UAAU,CAACO,QAAUP,SAASO,MAAMC,MAAM,CAACpB,KAAK,IAAI;gBACpDqB,WAAW;oBAAEgB,WAAW;wBAAEC,WAAW9B;oBAAS;gBAAE;gBAChDoB,SAAS;;IAGjB;AACF;AACAnB,sBAAsB8B,WAAW,GAAG;AAEpC,eAAe9B,sBAAqB"}
@@ -0,0 +1,69 @@
1
+ import { type CrmEmailTemplateRow, type CrmEmailTemplateVisibility, type CrmMergeFieldGroup } from '@aglyn/aglyn';
2
+ /**
3
+ * The pieces the send dialog grows for templates (AGL-2658), each on its
4
+ * own so the dialog's file — which several hands edit — takes three
5
+ * elements and a handful of lines rather than a second component's worth.
6
+ */
7
+ export interface CrmTemplatePickerProps {
8
+ /** Every listed template of kind `template`, shared and personal alike. */
9
+ templates: readonly CrmEmailTemplateRow[];
10
+ /** The one applied to the draft, or `null`. */
11
+ value: CrmEmailTemplateRow | null;
12
+ onChange: (template: CrmEmailTemplateRow | null) => void;
13
+ disabled?: boolean;
14
+ }
15
+ /**
16
+ * "Template" — the letter to start from, grouped into the team's and the
17
+ * reader's own. An Autocomplete rather than a select because a workspace
18
+ * that keeps forty letters finds one by typing its name. Options are
19
+ * ordered shared-then-personal so the groups render contiguous, which is
20
+ * what the control's grouping needs.
21
+ */
22
+ export declare function CrmTemplatePicker(props: CrmTemplatePickerProps): import("react").JSX.Element;
23
+ export declare namespace CrmTemplatePicker {
24
+ var displayName: string;
25
+ }
26
+ export interface CrmInsertMenuProps {
27
+ /** Every listed template of kind `snippet`. */
28
+ snippets: readonly CrmEmailTemplateRow[];
29
+ /** Which merge-field groups apply to the record being written to. */
30
+ groups: readonly CrmMergeFieldGroup[];
31
+ disabled?: boolean;
32
+ /** Receives the text to put at the caret. */
33
+ onInsert: (text: string) => void;
34
+ }
35
+ /**
36
+ * "Insert" — a snippet, or a merge field, at the caret.
37
+ *
38
+ * One menu for both because they are one gesture: put something into the
39
+ * message where I am. The snippets come first, under their own heading,
40
+ * and the fields follow grouped by what they read — only the groups that
41
+ * apply, so a letter to a contact is not offered `{{lead.name}}`. With no
42
+ * snippets the menu is the fields alone, which is what keeps the dialog
43
+ * useful before anyone has saved a snippet.
44
+ */
45
+ export declare function CrmInsertMenu(props: CrmInsertMenuProps): import("react").JSX.Element;
46
+ export declare namespace CrmInsertMenu {
47
+ var displayName: string;
48
+ }
49
+ export interface CrmSaveAsTemplateDialogProps {
50
+ open: boolean;
51
+ onClose: () => void;
52
+ /** Writes the template; closing on success is the caller's job. */
53
+ onSave: (draft: {
54
+ name: string;
55
+ visibility: CrmEmailTemplateVisibility;
56
+ }) => Promise<void>;
57
+ }
58
+ /**
59
+ * "Save as template" — a name and whose it is, over the draft as written.
60
+ *
61
+ * The subject and the body are the dialog's own and are not shown again
62
+ * here; this asks only what the draft does not carry. Personal is the
63
+ * default, because a letter one rep wrote is theirs until they hand it to
64
+ * the team, and handing it over is one click.
65
+ */
66
+ export declare function CrmSaveAsTemplateDialog(props: CrmSaveAsTemplateDialogProps): import("react").JSX.Element;
67
+ export declare namespace CrmSaveAsTemplateDialog {
68
+ var displayName: string;
69
+ }