@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.
- package/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +57 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +29 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/activity-list.d.ts +98 -0
- package/src/lib/components/activity-list.js +321 -0
- package/src/lib/components/activity-list.js.map +1 -0
- package/src/lib/components/activity-queries.d.ts +117 -0
- package/src/lib/components/activity-queries.js +198 -0
- package/src/lib/components/activity-queries.js.map +1 -0
- package/src/lib/components/add-to-list-button.d.ts +25 -0
- package/src/lib/components/add-to-list-button.js +64 -0
- package/src/lib/components/add-to-list-button.js.map +1 -0
- package/src/lib/components/add-to-list-dialog.d.ts +24 -0
- package/src/lib/components/add-to-list-dialog.js +327 -0
- package/src/lib/components/add-to-list-dialog.js.map +1 -0
- package/src/lib/components/assignment-rule-drawer.d.ts +43 -0
- package/src/lib/components/assignment-rule-drawer.js +293 -0
- package/src/lib/components/assignment-rule-drawer.js.map +1 -0
- package/src/lib/components/companies-bulk-bar.d.ts +29 -0
- package/src/lib/components/companies-bulk-bar.js +274 -0
- package/src/lib/components/companies-bulk-bar.js.map +1 -0
- package/src/lib/components/companies-section.d.ts +54 -0
- package/src/lib/components/companies-section.js +522 -0
- package/src/lib/components/companies-section.js.map +1 -0
- package/src/lib/components/company-contacts-card.d.ts +49 -0
- package/src/lib/components/company-contacts-card.js +435 -0
- package/src/lib/components/company-contacts-card.js.map +1 -0
- package/src/lib/components/company-deals-card.d.ts +20 -0
- package/src/lib/components/company-deals-card.js +38 -0
- package/src/lib/components/company-deals-card.js.map +1 -0
- package/src/lib/components/company-detail-page.d.ts +20 -0
- package/src/lib/components/company-detail-page.js +165 -0
- package/src/lib/components/company-detail-page.js.map +1 -0
- package/src/lib/components/company-edit-drawer.d.ts +65 -0
- package/src/lib/components/company-edit-drawer.js +433 -0
- package/src/lib/components/company-edit-drawer.js.map +1 -0
- package/src/lib/components/company-import-drawer.d.ts +42 -0
- package/src/lib/components/company-import-drawer.js +99 -0
- package/src/lib/components/company-import-drawer.js.map +1 -0
- package/src/lib/components/company-picker.d.ts +127 -0
- package/src/lib/components/company-picker.js +323 -0
- package/src/lib/components/company-picker.js.map +1 -0
- package/src/lib/components/company-properties-card.d.ts +47 -0
- package/src/lib/components/company-properties-card.js +289 -0
- package/src/lib/components/company-properties-card.js.map +1 -0
- package/src/lib/components/contact-address-fields.d.ts +29 -0
- package/src/lib/components/contact-address-fields.js +149 -0
- package/src/lib/components/contact-address-fields.js.map +1 -0
- package/src/lib/components/contact-associations-card.d.ts +72 -0
- package/src/lib/components/contact-associations-card.js +296 -0
- package/src/lib/components/contact-associations-card.js.map +1 -0
- package/src/lib/components/contact-custom-columns.d.ts +38 -0
- package/src/lib/components/contact-custom-columns.js +102 -0
- package/src/lib/components/contact-custom-columns.js.map +1 -0
- package/src/lib/components/contact-custom-fields-card.d.ts +39 -0
- package/src/lib/components/contact-custom-fields-card.js +204 -0
- package/src/lib/components/contact-custom-fields-card.js.map +1 -0
- package/src/lib/components/contact-deals-card.d.ts +20 -0
- package/src/lib/components/contact-deals-card.js +38 -0
- package/src/lib/components/contact-deals-card.js.map +1 -0
- package/src/lib/components/contact-detail-page.d.ts +46 -0
- package/src/lib/components/contact-detail-page.js +535 -0
- package/src/lib/components/contact-detail-page.js.map +1 -0
- package/src/lib/components/contact-duplicates-card.d.ts +42 -0
- package/src/lib/components/contact-duplicates-card.js +167 -0
- package/src/lib/components/contact-duplicates-card.js.map +1 -0
- package/src/lib/components/contact-field-drawer.d.ts +64 -0
- package/src/lib/components/contact-field-drawer.js +251 -0
- package/src/lib/components/contact-field-drawer.js.map +1 -0
- package/src/lib/components/contact-import-drawer.d.ts +46 -0
- package/src/lib/components/contact-import-drawer.js +149 -0
- package/src/lib/components/contact-import-drawer.js.map +1 -0
- package/src/lib/components/contact-known-by-card.d.ts +39 -0
- package/src/lib/components/contact-known-by-card.js +142 -0
- package/src/lib/components/contact-known-by-card.js.map +1 -0
- package/src/lib/components/contact-list-columns.d.ts +53 -0
- package/src/lib/components/contact-list-columns.js +288 -0
- package/src/lib/components/contact-list-columns.js.map +1 -0
- package/src/lib/components/contact-merge-dialog.d.ts +79 -0
- package/src/lib/components/contact-merge-dialog.js +405 -0
- package/src/lib/components/contact-merge-dialog.js.map +1 -0
- package/src/lib/components/contact-properties-card.d.ts +89 -0
- package/src/lib/components/contact-properties-card.js +492 -0
- package/src/lib/components/contact-properties-card.js.map +1 -0
- package/src/lib/components/contact-timeline-card.d.ts +68 -0
- package/src/lib/components/contact-timeline-card.js +435 -0
- package/src/lib/components/contact-timeline-card.js.map +1 -0
- package/src/lib/components/contacts-bulk-bar.d.ts +91 -0
- package/src/lib/components/contacts-bulk-bar.js +493 -0
- package/src/lib/components/contacts-bulk-bar.js.map +1 -0
- package/src/lib/components/contacts-section.d.ts +26 -0
- package/src/lib/components/contacts-section.js +1025 -0
- package/src/lib/components/contacts-section.js.map +1 -0
- package/src/lib/components/copy-capture-address-button.d.ts +33 -0
- package/src/lib/components/copy-capture-address-button.js +60 -0
- package/src/lib/components/copy-capture-address-button.js.map +1 -0
- package/src/lib/components/crm-attribution-zone.d.ts +38 -0
- package/src/lib/components/crm-attribution-zone.js +36 -0
- package/src/lib/components/crm-attribution-zone.js.map +1 -0
- package/src/lib/components/crm-booking-zone.d.ts +61 -0
- package/src/lib/components/crm-booking-zone.js +50 -0
- package/src/lib/components/crm-booking-zone.js.map +1 -0
- package/src/lib/components/crm-bulk-bar-frame.d.ts +47 -0
- package/src/lib/components/crm-bulk-bar-frame.js +137 -0
- package/src/lib/components/crm-bulk-bar-frame.js.map +1 -0
- package/src/lib/components/crm-call-actions.d.ts +65 -0
- package/src/lib/components/crm-call-actions.js +110 -0
- package/src/lib/components/crm-call-actions.js.map +1 -0
- package/src/lib/components/crm-column-menu.d.ts +21 -0
- package/src/lib/components/crm-column-menu.js +103 -0
- package/src/lib/components/crm-column-menu.js.map +1 -0
- package/src/lib/components/crm-console-page.d.ts +19 -0
- package/src/lib/components/crm-console-page.js +151 -0
- package/src/lib/components/crm-console-page.js.map +1 -0
- package/src/lib/components/crm-console-sections.d.ts +52 -0
- package/src/lib/components/crm-console-sections.js +83 -0
- package/src/lib/components/crm-console-sections.js.map +1 -0
- package/src/lib/components/crm-custom-field-control.d.ts +26 -0
- package/src/lib/components/crm-custom-field-control.js +131 -0
- package/src/lib/components/crm-custom-field-control.js.map +1 -0
- package/src/lib/components/crm-email-template-tools.d.ts +69 -0
- package/src/lib/components/crm-email-template-tools.js +240 -0
- package/src/lib/components/crm-email-template-tools.js.map +1 -0
- package/src/lib/components/crm-export-all-button.d.ts +39 -0
- package/src/lib/components/crm-export-all-button.js +98 -0
- package/src/lib/components/crm-export-all-button.js.map +1 -0
- package/src/lib/components/crm-filter-bar.d.ts +53 -0
- package/src/lib/components/crm-filter-bar.js +294 -0
- package/src/lib/components/crm-filter-bar.js.map +1 -0
- package/src/lib/components/crm-glance-card.d.ts +54 -0
- package/src/lib/components/crm-glance-card.js +219 -0
- package/src/lib/components/crm-glance-card.js.map +1 -0
- package/src/lib/components/crm-next-activity-column.d.ts +35 -0
- package/src/lib/components/crm-next-activity-column.js +100 -0
- package/src/lib/components/crm-next-activity-column.js.map +1 -0
- package/src/lib/components/crm-record-header.d.ts +97 -0
- package/src/lib/components/crm-record-header.js +160 -0
- package/src/lib/components/crm-record-header.js.map +1 -0
- package/src/lib/components/crm-record-insights-zone.d.ts +50 -0
- package/src/lib/components/crm-record-insights-zone.js +169 -0
- package/src/lib/components/crm-record-insights-zone.js.map +1 -0
- package/src/lib/components/crm-record-picker.d.ts +42 -0
- package/src/lib/components/crm-record-picker.js +104 -0
- package/src/lib/components/crm-record-picker.js.map +1 -0
- package/src/lib/components/crm-send-email-button.d.ts +39 -0
- package/src/lib/components/crm-send-email-button.js +81 -0
- package/src/lib/components/crm-send-email-button.js.map +1 -0
- package/src/lib/components/crm-send-email-dialog.d.ts +61 -0
- package/src/lib/components/crm-send-email-dialog.js +851 -0
- package/src/lib/components/crm-send-email-dialog.js.map +1 -0
- package/src/lib/components/crm-site-picker.d.ts +61 -0
- package/src/lib/components/crm-site-picker.js +99 -0
- package/src/lib/components/crm-site-picker.js.map +1 -0
- package/src/lib/components/crm-suite-lock.d.ts +29 -0
- package/src/lib/components/crm-suite-lock.js +114 -0
- package/src/lib/components/crm-suite-lock.js.map +1 -0
- package/src/lib/components/crm-tasks-due-card.d.ts +42 -0
- package/src/lib/components/crm-tasks-due-card.js +225 -0
- package/src/lib/components/crm-tasks-due-card.js.map +1 -0
- package/src/lib/components/crm-views-control.d.ts +65 -0
- package/src/lib/components/crm-views-control.js +518 -0
- package/src/lib/components/crm-views-control.js.map +1 -0
- package/src/lib/components/csv-import-drawer.d.ts +132 -0
- package/src/lib/components/csv-import-drawer.js +746 -0
- package/src/lib/components/csv-import-drawer.js.map +1 -0
- package/src/lib/components/deal-board.d.ts +70 -0
- package/src/lib/components/deal-board.js +478 -0
- package/src/lib/components/deal-board.js.map +1 -0
- package/src/lib/components/deal-detail-page.d.ts +18 -0
- package/src/lib/components/deal-detail-page.js +323 -0
- package/src/lib/components/deal-detail-page.js.map +1 -0
- package/src/lib/components/deal-edit-drawer.d.ts +59 -0
- package/src/lib/components/deal-edit-drawer.js +640 -0
- package/src/lib/components/deal-edit-drawer.js.map +1 -0
- package/src/lib/components/deal-import-drawer.d.ts +24 -0
- package/src/lib/components/deal-import-drawer.js +83 -0
- package/src/lib/components/deal-import-drawer.js.map +1 -0
- package/src/lib/components/deal-products-card.d.ts +48 -0
- package/src/lib/components/deal-products-card.js +614 -0
- package/src/lib/components/deal-products-card.js.map +1 -0
- package/src/lib/components/deal-properties-card.d.ts +29 -0
- package/src/lib/components/deal-properties-card.js +144 -0
- package/src/lib/components/deal-properties-card.js.map +1 -0
- package/src/lib/components/deal-stage-card.d.ts +24 -0
- package/src/lib/components/deal-stage-card.js +199 -0
- package/src/lib/components/deal-stage-card.js.map +1 -0
- package/src/lib/components/deals-bulk-bar.d.ts +31 -0
- package/src/lib/components/deals-bulk-bar.js +340 -0
- package/src/lib/components/deals-bulk-bar.js.map +1 -0
- package/src/lib/components/deals-section.d.ts +49 -0
- package/src/lib/components/deals-section.js +767 -0
- package/src/lib/components/deals-section.js.map +1 -0
- package/src/lib/components/email-capture-card.d.ts +42 -0
- package/src/lib/components/email-capture-card.js +134 -0
- package/src/lib/components/email-capture-card.js.map +1 -0
- package/src/lib/components/email-template-drawer.d.ts +33 -0
- package/src/lib/components/email-template-drawer.js +209 -0
- package/src/lib/components/email-template-drawer.js.map +1 -0
- package/src/lib/components/email-templates-card.d.ts +33 -0
- package/src/lib/components/email-templates-card.js +370 -0
- package/src/lib/components/email-templates-card.js.map +1 -0
- package/src/lib/components/erase-person-action.d.ts +92 -0
- package/src/lib/components/erase-person-action.js +261 -0
- package/src/lib/components/erase-person-action.js.map +1 -0
- package/src/lib/components/fields-section.d.ts +37 -0
- package/src/lib/components/fields-section.js +641 -0
- package/src/lib/components/fields-section.js.map +1 -0
- package/src/lib/components/form-contact-fields-card.d.ts +46 -0
- package/src/lib/components/form-contact-fields-card.js +253 -0
- package/src/lib/components/form-contact-fields-card.js.map +1 -0
- package/src/lib/components/insert-link-at-caret.d.ts +28 -0
- package/src/lib/components/insert-link-at-caret.js +37 -0
- package/src/lib/components/insert-link-at-caret.js.map +1 -0
- package/src/lib/components/lead-convert-dialog.d.ts +32 -0
- package/src/lib/components/lead-convert-dialog.js +493 -0
- package/src/lib/components/lead-convert-dialog.js.map +1 -0
- package/src/lib/components/lead-detail-page.d.ts +16 -0
- package/src/lib/components/lead-detail-page.js +163 -0
- package/src/lib/components/lead-detail-page.js.map +1 -0
- package/src/lib/components/lead-history-card.d.ts +32 -0
- package/src/lib/components/lead-history-card.js +165 -0
- package/src/lib/components/lead-history-card.js.map +1 -0
- package/src/lib/components/lead-import-drawer.d.ts +24 -0
- package/src/lib/components/lead-import-drawer.js +95 -0
- package/src/lib/components/lead-import-drawer.js.map +1 -0
- package/src/lib/components/lead-owner-select.d.ts +35 -0
- package/src/lib/components/lead-owner-select.js +91 -0
- package/src/lib/components/lead-owner-select.js.map +1 -0
- package/src/lib/components/lead-properties-card.d.ts +61 -0
- package/src/lib/components/lead-properties-card.js +395 -0
- package/src/lib/components/lead-properties-card.js.map +1 -0
- package/src/lib/components/lead-status-chip.d.ts +12 -0
- package/src/lib/components/lead-status-chip.js +43 -0
- package/src/lib/components/lead-status-chip.js.map +1 -0
- package/src/lib/components/lead-surfaces-note.d.ts +126 -0
- package/src/lib/components/lead-surfaces-note.js +262 -0
- package/src/lib/components/lead-surfaces-note.js.map +1 -0
- package/src/lib/components/lead-unqualify-dialog.d.ts +24 -0
- package/src/lib/components/lead-unqualify-dialog.js +125 -0
- package/src/lib/components/lead-unqualify-dialog.js.map +1 -0
- package/src/lib/components/leads-bulk-bar.d.ts +58 -0
- package/src/lib/components/leads-bulk-bar.js +307 -0
- package/src/lib/components/leads-bulk-bar.js.map +1 -0
- package/src/lib/components/leads-section.d.ts +23 -0
- package/src/lib/components/leads-section.js +664 -0
- package/src/lib/components/leads-section.js.map +1 -0
- package/src/lib/components/linked-deals-card.d.ts +32 -0
- package/src/lib/components/linked-deals-card.js +163 -0
- package/src/lib/components/linked-deals-card.js.map +1 -0
- package/src/lib/components/log-activity-dialog.d.ts +60 -0
- package/src/lib/components/log-activity-dialog.js +368 -0
- package/src/lib/components/log-activity-dialog.js.map +1 -0
- package/src/lib/components/lost-reason-dialog.d.ts +26 -0
- package/src/lib/components/lost-reason-dialog.js +95 -0
- package/src/lib/components/lost-reason-dialog.js.map +1 -0
- package/src/lib/components/new-contact-drawer.d.ts +78 -0
- package/src/lib/components/new-contact-drawer.js +343 -0
- package/src/lib/components/new-contact-drawer.js.map +1 -0
- package/src/lib/components/org-lead-surfaces-note.d.ts +57 -0
- package/src/lib/components/org-lead-surfaces-note.js +172 -0
- package/src/lib/components/org-lead-surfaces-note.js.map +1 -0
- package/src/lib/components/owner-avatar.d.ts +18 -0
- package/src/lib/components/owner-avatar.js +61 -0
- package/src/lib/components/owner-avatar.js.map +1 -0
- package/src/lib/components/pipeline-stages-dialog.d.ts +43 -0
- package/src/lib/components/pipeline-stages-dialog.js +339 -0
- package/src/lib/components/pipeline-stages-dialog.js.map +1 -0
- package/src/lib/components/pipelines-dialog.d.ts +55 -0
- package/src/lib/components/pipelines-dialog.js +517 -0
- package/src/lib/components/pipelines-dialog.js.map +1 -0
- package/src/lib/components/recent-activity-feed.d.ts +39 -0
- package/src/lib/components/recent-activity-feed.js +103 -0
- package/src/lib/components/recent-activity-feed.js.map +1 -0
- package/src/lib/components/recipes-card.d.ts +39 -0
- package/src/lib/components/recipes-card.js +485 -0
- package/src/lib/components/recipes-card.js.map +1 -0
- package/src/lib/components/record-activity-card.d.ts +26 -0
- package/src/lib/components/record-activity-card.js +121 -0
- package/src/lib/components/record-activity-card.js.map +1 -0
- package/src/lib/components/record-files-card.d.ts +67 -0
- package/src/lib/components/record-files-card.js +290 -0
- package/src/lib/components/record-files-card.js.map +1 -0
- package/src/lib/components/record-tasks-card.d.ts +32 -0
- package/src/lib/components/record-tasks-card.js +306 -0
- package/src/lib/components/record-tasks-card.js.map +1 -0
- package/src/lib/components/reports/activity-card.d.ts +57 -0
- package/src/lib/components/reports/activity-card.js +281 -0
- package/src/lib/components/reports/activity-card.js.map +1 -0
- package/src/lib/components/reports/closed-deals-card.d.ts +20 -0
- package/src/lib/components/reports/closed-deals-card.js +194 -0
- package/src/lib/components/reports/closed-deals-card.js.map +1 -0
- package/src/lib/components/reports/contacts-mix-card.d.ts +27 -0
- package/src/lib/components/reports/contacts-mix-card.js +161 -0
- package/src/lib/components/reports/contacts-mix-card.js.map +1 -0
- package/src/lib/components/reports/contacts-trend-card.d.ts +31 -0
- package/src/lib/components/reports/contacts-trend-card.js +144 -0
- package/src/lib/components/reports/contacts-trend-card.js.map +1 -0
- package/src/lib/components/reports/forecast-card.d.ts +22 -0
- package/src/lib/components/reports/forecast-card.js +251 -0
- package/src/lib/components/reports/forecast-card.js.map +1 -0
- package/src/lib/components/reports/lead-counts.d.ts +32 -0
- package/src/lib/components/reports/lead-counts.js +44 -0
- package/src/lib/components/reports/lead-counts.js.map +1 -0
- package/src/lib/components/reports/lead-funnel-card.d.ts +38 -0
- package/src/lib/components/reports/lead-funnel-card.js +375 -0
- package/src/lib/components/reports/lead-funnel-card.js.map +1 -0
- package/src/lib/components/reports/pipeline-card.d.ts +19 -0
- package/src/lib/components/reports/pipeline-card.js +338 -0
- package/src/lib/components/reports/pipeline-card.js.map +1 -0
- package/src/lib/components/reports/report-bar-chart.d.ts +39 -0
- package/src/lib/components/reports/report-bar-chart.js +133 -0
- package/src/lib/components/reports/report-bar-chart.js.map +1 -0
- package/src/lib/components/reports/report-breakdown.d.ts +32 -0
- package/src/lib/components/reports/report-breakdown.js +105 -0
- package/src/lib/components/reports/report-breakdown.js.map +1 -0
- package/src/lib/components/reports/report-export.d.ts +37 -0
- package/src/lib/components/reports/report-export.js +66 -0
- package/src/lib/components/reports/report-export.js.map +1 -0
- package/src/lib/components/reports/report-format.d.ts +36 -0
- package/src/lib/components/reports/report-format.js +43 -0
- package/src/lib/components/reports/report-format.js.map +1 -0
- package/src/lib/components/reports/report-scope.d.ts +81 -0
- package/src/lib/components/reports/report-scope.js +58 -0
- package/src/lib/components/reports/report-scope.js.map +1 -0
- package/src/lib/components/reports/report-stat-tile.d.ts +47 -0
- package/src/lib/components/reports/report-stat-tile.js +96 -0
- package/src/lib/components/reports/report-stat-tile.js.map +1 -0
- package/src/lib/components/reports/source-conversion-card.d.ts +28 -0
- package/src/lib/components/reports/source-conversion-card.js +205 -0
- package/src/lib/components/reports/source-conversion-card.js.map +1 -0
- package/src/lib/components/reports/tasks-card.d.ts +26 -0
- package/src/lib/components/reports/tasks-card.js +279 -0
- package/src/lib/components/reports/tasks-card.js.map +1 -0
- package/src/lib/components/reports/use-aggregate-read.d.ts +99 -0
- package/src/lib/components/reports/use-aggregate-read.js +195 -0
- package/src/lib/components/reports/use-aggregate-read.js.map +1 -0
- package/src/lib/components/reports/won-lost-by-owner-card.d.ts +30 -0
- package/src/lib/components/reports/won-lost-by-owner-card.js +168 -0
- package/src/lib/components/reports/won-lost-by-owner-card.js.map +1 -0
- package/src/lib/components/reports-section.d.ts +42 -0
- package/src/lib/components/reports-section.js +308 -0
- package/src/lib/components/reports-section.js.map +1 -0
- package/src/lib/components/sending-addresses-card.d.ts +49 -0
- package/src/lib/components/sending-addresses-card.js +262 -0
- package/src/lib/components/sending-addresses-card.js.map +1 -0
- package/src/lib/components/settings-section.d.ts +151 -0
- package/src/lib/components/settings-section.js +783 -0
- package/src/lib/components/settings-section.js.map +1 -0
- package/src/lib/components/task-cells.d.ts +51 -0
- package/src/lib/components/task-cells.js +139 -0
- package/src/lib/components/task-cells.js.map +1 -0
- package/src/lib/components/task-edit-drawer.d.ts +53 -0
- package/src/lib/components/task-edit-drawer.js +483 -0
- package/src/lib/components/task-edit-drawer.js.map +1 -0
- package/src/lib/components/task-import-drawer.d.ts +24 -0
- package/src/lib/components/task-import-drawer.js +82 -0
- package/src/lib/components/task-import-drawer.js.map +1 -0
- package/src/lib/components/task-snooze-menu.d.ts +65 -0
- package/src/lib/components/task-snooze-menu.js +207 -0
- package/src/lib/components/task-snooze-menu.js.map +1 -0
- package/src/lib/components/tasks-bulk-bar.d.ts +25 -0
- package/src/lib/components/tasks-bulk-bar.js +348 -0
- package/src/lib/components/tasks-bulk-bar.js.map +1 -0
- package/src/lib/components/tasks-calendar.d.ts +38 -0
- package/src/lib/components/tasks-calendar.js +228 -0
- package/src/lib/components/tasks-calendar.js.map +1 -0
- package/src/lib/components/tasks-section.d.ts +27 -0
- package/src/lib/components/tasks-section.js +579 -0
- package/src/lib/components/tasks-section.js.map +1 -0
- package/src/lib/components/use-contact-campaign-emails.d.ts +32 -0
- package/src/lib/components/use-contact-campaign-emails.js +83 -0
- package/src/lib/components/use-contact-campaign-emails.js.map +1 -0
- package/src/lib/components/use-crm-api.d.ts +44 -0
- package/src/lib/components/use-crm-api.js +84 -0
- package/src/lib/components/use-crm-api.js.map +1 -0
- package/src/lib/components/use-crm-inbound-address.d.ts +60 -0
- package/src/lib/components/use-crm-inbound-address.js +124 -0
- package/src/lib/components/use-crm-inbound-address.js.map +1 -0
- package/src/lib/components/use-emails-hub-path.d.ts +24 -0
- package/src/lib/components/use-emails-hub-path.js +59 -0
- package/src/lib/components/use-emails-hub-path.js.map +1 -0
- package/src/lib/components/use-member-email-aliases.d.ts +54 -0
- package/src/lib/components/use-member-email-aliases.js +186 -0
- package/src/lib/components/use-member-email-aliases.js.map +1 -0
- package/src/lib/components/use-org-members.d.ts +40 -0
- package/src/lib/components/use-org-members.js +100 -0
- package/src/lib/components/use-org-members.js.map +1 -0
- package/src/lib/constants/api-routes.d.ts +109 -0
- package/src/lib/constants/api-routes.js +74 -0
- package/src/lib/constants/api-routes.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +14 -0
- package/src/lib/constants/bundle-common.js +14 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/constants/company-filters.d.ts +18 -0
- package/src/lib/constants/company-filters.js +51 -0
- package/src/lib/constants/company-filters.js.map +1 -0
- package/src/lib/constants/contact-filters.d.ts +38 -0
- package/src/lib/constants/contact-filters.js +294 -0
- package/src/lib/constants/contact-filters.js.map +1 -0
- package/src/lib/hooks/use-contact-field-definitions.d.ts +48 -0
- package/src/lib/hooks/use-contact-field-definitions.js +72 -0
- package/src/lib/hooks/use-contact-field-definitions.js.map +1 -0
- package/src/lib/hooks/use-contact-update.d.ts +25 -0
- package/src/lib/hooks/use-contact-update.js +80 -0
- package/src/lib/hooks/use-contact-update.js.map +1 -0
- package/src/lib/hooks/use-crm-activity-logger.d.ts +73 -0
- package/src/lib/hooks/use-crm-activity-logger.js +101 -0
- package/src/lib/hooks/use-crm-activity-logger.js.map +1 -0
- package/src/lib/hooks/use-crm-bulk-apply.d.ts +52 -0
- package/src/lib/hooks/use-crm-bulk-apply.js +112 -0
- package/src/lib/hooks/use-crm-bulk-apply.js.map +1 -0
- package/src/lib/hooks/use-crm-default-view.d.ts +24 -0
- package/src/lib/hooks/use-crm-default-view.js +64 -0
- package/src/lib/hooks/use-crm-default-view.js.map +1 -0
- package/src/lib/hooks/use-crm-email-templates.d.ts +59 -0
- package/src/lib/hooks/use-crm-email-templates.js +103 -0
- package/src/lib/hooks/use-crm-email-templates.js.map +1 -0
- package/src/lib/hooks/use-crm-hub-path.d.ts +29 -0
- package/src/lib/hooks/use-crm-hub-path.js +41 -0
- package/src/lib/hooks/use-crm-hub-path.js.map +1 -0
- package/src/lib/hooks/use-crm-org-mount.d.ts +97 -0
- package/src/lib/hooks/use-crm-org-mount.js +215 -0
- package/src/lib/hooks/use-crm-org-mount.js.map +1 -0
- package/src/lib/hooks/use-crm-record-names.d.ts +52 -0
- package/src/lib/hooks/use-crm-record-names.js +126 -0
- package/src/lib/hooks/use-crm-record-names.js.map +1 -0
- package/src/lib/hooks/use-crm-records-quota.d.ts +68 -0
- package/src/lib/hooks/use-crm-records-quota.js +118 -0
- package/src/lib/hooks/use-crm-records-quota.js.map +1 -0
- package/src/lib/hooks/use-crm-saved-view.d.ts +96 -0
- package/src/lib/hooks/use-crm-saved-view.js +329 -0
- package/src/lib/hooks/use-crm-saved-view.js.map +1 -0
- package/src/lib/hooks/use-crm-scope.d.ts +117 -0
- package/src/lib/hooks/use-crm-scope.js +147 -0
- package/src/lib/hooks/use-crm-scope.js.map +1 -0
- package/src/lib/hooks/use-crm-tasks.d.ts +85 -0
- package/src/lib/hooks/use-crm-tasks.js +153 -0
- package/src/lib/hooks/use-crm-tasks.js.map +1 -0
- package/src/lib/hooks/use-crm-view-grid.d.ts +55 -0
- package/src/lib/hooks/use-crm-view-grid.js +170 -0
- package/src/lib/hooks/use-crm-view-grid.js.map +1 -0
- package/src/lib/hooks/use-crm-views.d.ts +42 -0
- package/src/lib/hooks/use-crm-views.js +84 -0
- package/src/lib/hooks/use-crm-views.js.map +1 -0
- package/src/lib/hooks/use-deal-stage-api.d.ts +69 -0
- package/src/lib/hooks/use-deal-stage-api.js +78 -0
- package/src/lib/hooks/use-deal-stage-api.js.map +1 -0
- package/src/lib/hooks/use-deals.d.ts +47 -0
- package/src/lib/hooks/use-deals.js +105 -0
- package/src/lib/hooks/use-deals.js.map +1 -0
- package/src/lib/hooks/use-org-leads.d.ts +53 -0
- package/src/lib/hooks/use-org-leads.js +114 -0
- package/src/lib/hooks/use-org-leads.js.map +1 -0
- package/src/lib/hooks/use-org-member-directory.d.ts +36 -0
- package/src/lib/hooks/use-org-member-directory.js +116 -0
- package/src/lib/hooks/use-org-member-directory.js.map +1 -0
- package/src/lib/hooks/use-org-member-options.d.ts +38 -0
- package/src/lib/hooks/use-org-member-options.js +131 -0
- package/src/lib/hooks/use-org-member-options.js.map +1 -0
- package/src/lib/hooks/use-pipeline.d.ts +71 -0
- package/src/lib/hooks/use-pipeline.js +159 -0
- package/src/lib/hooks/use-pipeline.js.map +1 -0
- package/src/lib/model/companies-bulk-writes.d.ts +40 -0
- package/src/lib/model/companies-bulk-writes.js +103 -0
- package/src/lib/model/companies-bulk-writes.js.map +1 -0
- package/src/lib/model/companies-csv.d.ts +36 -0
- package/src/lib/model/companies-csv.js +38 -0
- package/src/lib/model/companies-csv.js.map +1 -0
- package/src/lib/model/companies.d.ts +99 -0
- package/src/lib/model/companies.js +168 -0
- package/src/lib/model/companies.js.map +1 -0
- package/src/lib/model/company-delete-route.d.ts +43 -0
- package/src/lib/model/company-delete-route.js +31 -0
- package/src/lib/model/company-delete-route.js.map +1 -0
- package/src/lib/model/company-delete.d.ts +42 -0
- package/src/lib/model/company-delete.js +52 -0
- package/src/lib/model/company-delete.js.map +1 -0
- package/src/lib/model/contact-duplicates.d.ts +58 -0
- package/src/lib/model/contact-duplicates.js +67 -0
- package/src/lib/model/contact-duplicates.js.map +1 -0
- package/src/lib/model/contact-record.d.ts +113 -0
- package/src/lib/model/contact-record.js +70 -0
- package/src/lib/model/contact-record.js.map +1 -0
- package/src/lib/model/contact-update.d.ts +93 -0
- package/src/lib/model/contact-update.js +50 -0
- package/src/lib/model/contact-update.js.map +1 -0
- package/src/lib/model/contacts-bulk-writes.d.ts +173 -0
- package/src/lib/model/contacts-bulk-writes.js +196 -0
- package/src/lib/model/contacts-bulk-writes.js.map +1 -0
- package/src/lib/model/contacts-csv.d.ts +54 -0
- package/src/lib/model/contacts-csv.js +67 -0
- package/src/lib/model/contacts-csv.js.map +1 -0
- package/src/lib/model/contacts-list-seed.d.ts +51 -0
- package/src/lib/model/contacts-list-seed.js +63 -0
- package/src/lib/model/contacts-list-seed.js.map +1 -0
- package/src/lib/model/crm-activity-report.d.ts +27 -0
- package/src/lib/model/crm-activity-report.js +56 -0
- package/src/lib/model/crm-activity-report.js.map +1 -0
- package/src/lib/model/crm-api.d.ts +49 -0
- package/src/lib/model/crm-api.js +47 -0
- package/src/lib/model/crm-api.js.map +1 -0
- package/src/lib/model/crm-bulk-writes.d.ts +147 -0
- package/src/lib/model/crm-bulk-writes.js +207 -0
- package/src/lib/model/crm-bulk-writes.js.map +1 -0
- package/src/lib/model/crm-company-import.d.ts +154 -0
- package/src/lib/model/crm-company-import.js +331 -0
- package/src/lib/model/crm-company-import.js.map +1 -0
- package/src/lib/model/crm-custom-draft.d.ts +62 -0
- package/src/lib/model/crm-custom-draft.js +67 -0
- package/src/lib/model/crm-custom-draft.js.map +1 -0
- package/src/lib/model/crm-deal-import.d.ts +112 -0
- package/src/lib/model/crm-deal-import.js +263 -0
- package/src/lib/model/crm-deal-import.js.map +1 -0
- package/src/lib/model/crm-import.d.ts +244 -0
- package/src/lib/model/crm-import.js +466 -0
- package/src/lib/model/crm-import.js.map +1 -0
- package/src/lib/model/crm-lead-import.d.ts +105 -0
- package/src/lib/model/crm-lead-import.js +255 -0
- package/src/lib/model/crm-lead-import.js.map +1 -0
- package/src/lib/model/crm-record-routes.d.ts +21 -0
- package/src/lib/model/crm-record-routes.js +70 -0
- package/src/lib/model/crm-record-routes.js.map +1 -0
- package/src/lib/model/crm-routes.d.ts +101 -0
- package/src/lib/model/crm-routes.js +92 -0
- package/src/lib/model/crm-routes.js.map +1 -0
- package/src/lib/model/crm-task-import.d.ts +94 -0
- package/src/lib/model/crm-task-import.js +275 -0
- package/src/lib/model/crm-task-import.js.map +1 -0
- package/src/lib/model/crm-view-param.d.ts +43 -0
- package/src/lib/model/crm-view-param.js +49 -0
- package/src/lib/model/crm-view-param.js.map +1 -0
- package/src/lib/model/deal-board-model.d.ts +241 -0
- package/src/lib/model/deal-board-model.js +439 -0
- package/src/lib/model/deal-board-model.js.map +1 -0
- package/src/lib/model/deal-form-model.d.ts +114 -0
- package/src/lib/model/deal-form-model.js +218 -0
- package/src/lib/model/deal-form-model.js.map +1 -0
- package/src/lib/model/deals-csv.d.ts +32 -0
- package/src/lib/model/deals-csv.js +37 -0
- package/src/lib/model/deals-csv.js.map +1 -0
- package/src/lib/model/import-column-shapes.d.ts +36 -0
- package/src/lib/model/import-column-shapes.js +76 -0
- package/src/lib/model/import-column-shapes.js.map +1 -0
- package/src/lib/model/lead-company-suggestion.d.ts +61 -0
- package/src/lib/model/lead-company-suggestion.js +65 -0
- package/src/lib/model/lead-company-suggestion.js.map +1 -0
- package/src/lib/model/lead-filters.d.ts +29 -0
- package/src/lib/model/lead-filters.js +39 -0
- package/src/lib/model/lead-filters.js.map +1 -0
- package/src/lib/model/lead-surfaces.d.ts +58 -0
- package/src/lib/model/lead-surfaces.js +67 -0
- package/src/lib/model/lead-surfaces.js.map +1 -0
- package/src/lib/model/leads-csv.d.ts +40 -0
- package/src/lib/model/leads-csv.js +40 -0
- package/src/lib/model/leads-csv.js.map +1 -0
- package/src/lib/model/next-activity-api.d.ts +31 -0
- package/src/lib/model/next-activity-api.js +57 -0
- package/src/lib/model/next-activity-api.js.map +1 -0
- package/src/lib/model/next-activity.d.ts +64 -0
- package/src/lib/model/next-activity.js +47 -0
- package/src/lib/model/next-activity.js.map +1 -0
- package/src/lib/model/person-key-web.d.ts +43 -0
- package/src/lib/model/person-key-web.js +52 -0
- package/src/lib/model/person-key-web.js.map +1 -0
- package/src/lib/model/record-facts.d.ts +282 -0
- package/src/lib/model/record-facts.js +434 -0
- package/src/lib/model/record-facts.js.map +1 -0
- package/src/lib/model/task-api.d.ts +28 -0
- package/src/lib/model/task-api.js +57 -0
- package/src/lib/model/task-api.js.map +1 -0
- package/src/lib/model/task-calendar.d.ts +108 -0
- package/src/lib/model/task-calendar.js +139 -0
- package/src/lib/model/task-calendar.js.map +1 -0
- package/src/lib/model/task-routes.d.ts +177 -0
- package/src/lib/model/task-routes.js +197 -0
- package/src/lib/model/task-routes.js.map +1 -0
- package/src/lib/model/task-scope.d.ts +45 -0
- package/src/lib/model/task-scope.js +51 -0
- package/src/lib/model/task-scope.js.map +1 -0
- package/src/lib/model/task-views.d.ts +149 -0
- package/src/lib/model/task-views.js +286 -0
- package/src/lib/model/task-views.js.map +1 -0
- package/src/lib/model/tasks-csv.d.ts +28 -0
- package/src/lib/model/tasks-csv.js +28 -0
- package/src/lib/model/tasks-csv.js.map +1 -0
- package/src/lib/plugin.d.ts +32 -0
- package/src/lib/plugin.js +208 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/server/companies-import.d.ts +57 -0
- package/src/lib/server/companies-import.js +242 -0
- package/src/lib/server/companies-import.js.map +1 -0
- package/src/lib/server/company-delete.d.ts +59 -0
- package/src/lib/server/company-delete.js +146 -0
- package/src/lib/server/company-delete.js.map +1 -0
- package/src/lib/server/contact-email-history.d.ts +82 -0
- package/src/lib/server/contact-email-history.js +264 -0
- package/src/lib/server/contact-email-history.js.map +1 -0
- package/src/lib/server/contact-profile.d.ts +41 -0
- package/src/lib/server/contact-profile.js +45 -0
- package/src/lib/server/contact-profile.js.map +1 -0
- package/src/lib/server/contact-update.d.ts +92 -0
- package/src/lib/server/contact-update.js +512 -0
- package/src/lib/server/contact-update.js.map +1 -0
- package/src/lib/server/contacts-import.d.ts +73 -0
- package/src/lib/server/contacts-import.js +263 -0
- package/src/lib/server/contacts-import.js.map +1 -0
- package/src/lib/server/contacts-merge.d.ts +86 -0
- package/src/lib/server/contacts-merge.js +206 -0
- package/src/lib/server/contacts-merge.js.map +1 -0
- package/src/lib/server/deals-import.d.ts +76 -0
- package/src/lib/server/deals-import.js +246 -0
- package/src/lib/server/deals-import.js.map +1 -0
- package/src/lib/server/email-send.d.ts +119 -0
- package/src/lib/server/email-send.js +667 -0
- package/src/lib/server/email-send.js.map +1 -0
- package/src/lib/server/email-template-duplicate.d.ts +19 -0
- package/src/lib/server/email-template-duplicate.js +206 -0
- package/src/lib/server/email-template-duplicate.js.map +1 -0
- package/src/lib/server/erase-person.d.ts +108 -0
- package/src/lib/server/erase-person.js +309 -0
- package/src/lib/server/erase-person.js.map +1 -0
- package/src/lib/server/import-context.d.ts +85 -0
- package/src/lib/server/import-context.js +181 -0
- package/src/lib/server/import-context.js.map +1 -0
- package/src/lib/server/inbound-address.d.ts +61 -0
- package/src/lib/server/inbound-address.js +188 -0
- package/src/lib/server/inbound-address.js.map +1 -0
- package/src/lib/server/lead-convert.d.ts +78 -0
- package/src/lib/server/lead-convert.js +250 -0
- package/src/lib/server/lead-convert.js.map +1 -0
- package/src/lib/server/leads-import.d.ts +84 -0
- package/src/lib/server/leads-import.js +261 -0
- package/src/lib/server/leads-import.js.map +1 -0
- package/src/lib/server/next-activity-routes.d.ts +33 -0
- package/src/lib/server/next-activity-routes.js +110 -0
- package/src/lib/server/next-activity-routes.js.map +1 -0
- package/src/lib/server/org-activity.d.ts +61 -0
- package/src/lib/server/org-activity.js +120 -0
- package/src/lib/server/org-activity.js.map +1 -0
- package/src/lib/server/org-caller.d.ts +110 -0
- package/src/lib/server/org-caller.js +154 -0
- package/src/lib/server/org-caller.js.map +1 -0
- package/src/lib/server/recipe-routes.d.ts +75 -0
- package/src/lib/server/recipe-routes.js +442 -0
- package/src/lib/server/recipe-routes.js.map +1 -0
- package/src/lib/server/record-facts.d.ts +65 -0
- package/src/lib/server/record-facts.js +337 -0
- package/src/lib/server/record-facts.js.map +1 -0
- package/src/lib/server/record-timeline.d.ts +51 -0
- package/src/lib/server/record-timeline.js +215 -0
- package/src/lib/server/record-timeline.js.map +1 -0
- package/src/lib/server/suite-gate.d.ts +42 -0
- package/src/lib/server/suite-gate.js +87 -0
- package/src/lib/server/suite-gate.js.map +1 -0
- package/src/lib/server/task-routes.d.ts +132 -0
- package/src/lib/server/task-routes.js +699 -0
- package/src/lib/server/task-routes.js.map +1 -0
- package/src/lib/server/tasks-import.d.ts +54 -0
- package/src/lib/server/tasks-import.js +157 -0
- package/src/lib/server/tasks-import.js.map +1 -0
- package/src/lib/server-deal-stage.d.ts +88 -0
- package/src/lib/server-deal-stage.js +316 -0
- package/src/lib/server-deal-stage.js.map +1 -0
- package/src/lib/server.d.ts +149 -0
- package/src/lib/server.js +615 -0
- package/src/lib/server.js.map +1 -0
|
@@ -0,0 +1,535 @@
|
|
|
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, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
import * as Aglyn from "@aglyn/aglyn";
|
|
20
|
+
import { CONTACT_LIFECYCLE_STAGE_LABELS, pluginDocsHelp } from "@aglyn/aglyn";
|
|
21
|
+
import { mdiDeleteOutline, mdiMerge } from "@aglyn/shared-data-mdi";
|
|
22
|
+
import { AppLink, MdiIcon, useConfirmationContext } from "@aglyn/shared-ui-jsx";
|
|
23
|
+
import { useSnackbar } from "@aglyn/shared-ui-snackstack";
|
|
24
|
+
import { useFirestore, useFirestoreDoc } from "@aglyn/tenant-feature-instance";
|
|
25
|
+
import { Stack, Tooltip, Typography } from "@mui/material";
|
|
26
|
+
import { arrayRemove, deleteDoc, deleteField, doc, updateDoc } from "firebase/firestore";
|
|
27
|
+
import { useParams, useRouter } from "next/navigation";
|
|
28
|
+
import { useCallback, useMemo } from "react";
|
|
29
|
+
import { useCrmActivityLogger } from "../hooks/use-crm-activity-logger.js";
|
|
30
|
+
import { CrmCreateSiteDefault, useCrmOrgMount } from "../hooks/use-crm-org-mount.js";
|
|
31
|
+
import { useCrmScope } from "../hooks/use-crm-scope.js";
|
|
32
|
+
import { contactPrimaryGroup, contactRecordFromDoc } from "../model/contact-record.js";
|
|
33
|
+
import { crmRoutes } from "../model/crm-routes.js";
|
|
34
|
+
import ContactAssociationsCard from "./contact-associations-card.js";
|
|
35
|
+
import ContactCustomFieldsCard from "./contact-custom-fields-card.js";
|
|
36
|
+
import ContactDuplicatesCard from "./contact-duplicates-card.js";
|
|
37
|
+
import ContactKnownByCard from "./contact-known-by-card.js";
|
|
38
|
+
import ContactMergeDialog, { useContactMergeDialog } from "./contact-merge-dialog.js";
|
|
39
|
+
import ContactPropertiesCard from "./contact-properties-card.js";
|
|
40
|
+
import ContactTimelineCard from "./contact-timeline-card.js";
|
|
41
|
+
import { AddToListButton } from "./add-to-list-button.js";
|
|
42
|
+
import { useBookingDoor } from "./crm-booking-zone.js";
|
|
43
|
+
import { CrmSendEmailButton } from "./crm-send-email-button.js";
|
|
44
|
+
import { ContactDealsCard } from "./contact-deals-card.js";
|
|
45
|
+
import { CrmCallButton } from "./crm-call-actions.js";
|
|
46
|
+
import { CrmRecordChip, CrmRecordHeader } from "./crm-record-header.js";
|
|
47
|
+
import { CrmRecordInsightsZone } from "./crm-record-insights-zone.js";
|
|
48
|
+
import { CrmSuiteNotice, crmSuiteIncluded, crmSuiteLockedReason } from "./crm-suite-lock.js";
|
|
49
|
+
import { useErasePersonAction } from "./erase-person-action.js";
|
|
50
|
+
import RecordFilesCard from "./record-files-card.js";
|
|
51
|
+
import { RecordTasksCard } from "./record-tasks-card.js";
|
|
52
|
+
import { useEmailsHubPath } from "./use-emails-hub-path.js";
|
|
53
|
+
import { useOrgMembers } from "./use-org-members.js";
|
|
54
|
+
const contactDocsHelp = pluginDocsHelp('contacts', {
|
|
55
|
+
anchor: '#the-contacts-page',
|
|
56
|
+
excerpt: "One person's record: the profile your team keeps on them, where they " + 'came from, what they are filed under, and what the site recorded.'
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* `/crm/contacts/{contactId}` — one person (AGL-2596).
|
|
60
|
+
*
|
|
61
|
+
* A ROUTE rather than the v1 drawer, because a person is the thing every
|
|
62
|
+
* other CRM record points at: a deal, a task and an activity all name a
|
|
63
|
+
* contact, and a link that opens a drawer on top of a list is not a link
|
|
64
|
+
* anybody can paste.
|
|
65
|
+
*
|
|
66
|
+
* ## What this page reads
|
|
67
|
+
*
|
|
68
|
+
* ONE document, by id, through the scoped rules — a single-document get is
|
|
69
|
+
* judged on that document's own `visibleTo`, so no `array-contains-any`
|
|
70
|
+
* filter is needed here the way it is on the list. The row is then flattened
|
|
71
|
+
* through the viewing group's facet ONCE (`contactRecordFromDoc`) and the
|
|
72
|
+
* cards below read the flat record: none of them reaches into
|
|
73
|
+
* `facets.{groupId}` for itself, which is what keeps a card from ever
|
|
74
|
+
* showing another holder's notes.
|
|
75
|
+
*
|
|
76
|
+
* Beyond the document: the team roster (one request, for the owner picker)
|
|
77
|
+
* and the site's campaigns (one listen, for the filing picker) — both paid
|
|
78
|
+
* here because opening a record IS the ask for them, and neither is paid by
|
|
79
|
+
* the list.
|
|
80
|
+
*
|
|
81
|
+
* ## The cards
|
|
82
|
+
*
|
|
83
|
+
* Each in its own file, so a card can grow without this page growing:
|
|
84
|
+
* properties (the editable profile), the relationship (sources, attribution,
|
|
85
|
+
* consent, campaign filing) and the timeline. Other CRM sections add a card
|
|
86
|
+
* here by inserting one import and one line.
|
|
87
|
+
*
|
|
88
|
+
* ## Delete is a detach
|
|
89
|
+
*
|
|
90
|
+
* The row is shared by every site that has captured this person, so the
|
|
91
|
+
* action in the overflow menu drops THIS group's facet, consent, attribution
|
|
92
|
+
* and scope tokens, and deletes the document only when nobody else is left
|
|
93
|
+
* holding it — `planContactDetach` does the counting off `visibleTo`, which
|
|
94
|
+
* is what both enforcement layers evaluate, and the rules refuse a delete by
|
|
95
|
+
* a caller who is not the sole holder. Not the erasure path: a privacy
|
|
96
|
+
* erasure removes the person regardless of who else holds them.
|
|
97
|
+
*/ export function ContactDetailPage(props) {
|
|
98
|
+
var _ref;
|
|
99
|
+
const { hostId, org, id, basePath } = props;
|
|
100
|
+
const routes = crmRoutes(basePath);
|
|
101
|
+
const router = useRouter();
|
|
102
|
+
const firestore = useFirestore();
|
|
103
|
+
const { enqueueSnackbar } = useSnackbar();
|
|
104
|
+
const { confirm } = useConfirmationContext();
|
|
105
|
+
// The org root, the viewing group and what this viewer may list — the
|
|
106
|
+
// merge search's and the duplicates query's one clause — from the one
|
|
107
|
+
// scope hook (AGL-2614); at the organization level the group is `null`
|
|
108
|
+
// and resolved per person below, and the listeners carry no clause
|
|
109
|
+
// (AGL-2630).
|
|
110
|
+
const { scope, orgId, consentGroup: viewingGroup, visibleTo } = useCrmScope({
|
|
111
|
+
hostId,
|
|
112
|
+
org
|
|
113
|
+
});
|
|
114
|
+
const mount = useCrmOrgMount();
|
|
115
|
+
const merge = useContactMergeDialog();
|
|
116
|
+
/*
|
|
117
|
+
* THE CRM (AGL-2788). This page is the CRM's, and the shell mounts no CRM
|
|
118
|
+
* page for a plan without it (AGL-2851). What locks below — owner, stage
|
|
119
|
+
* and company; tasks, deals, files and custom fields; a logged call or
|
|
120
|
+
* activity; one-to-one email; a merge — draws only for an org whose plan
|
|
121
|
+
* lacks the CRM. The shell mounted this page once the org had settled, so
|
|
122
|
+
* this is the plan, not a paint of the org still loading.
|
|
123
|
+
*/ const suiteIncluded = crmSuiteIncluded(org);
|
|
124
|
+
const { data: row, status, fromCache } = useFirestoreDoc(()=>scope ? doc(firestore, scope[0], scope[1], 'contacts', id) : null, [
|
|
125
|
+
firestore,
|
|
126
|
+
scope,
|
|
127
|
+
id
|
|
128
|
+
], {
|
|
129
|
+
idField: '$id'
|
|
130
|
+
});
|
|
131
|
+
/*
|
|
132
|
+
* The controller this page is showing. Under a site: the sites declared
|
|
133
|
+
* to be one sender, or this site alone — resolved from the org document
|
|
134
|
+
* the shell already passed, so it costs no read. At the ORGANIZATION
|
|
135
|
+
* level: the person's own PRIMARY holder, the first capturing site's
|
|
136
|
+
* group, so an org-wide member reads the profile that site keeps and an
|
|
137
|
+
* edit goes back to the same facet; the "Known by" card says which other
|
|
138
|
+
* sites hold one.
|
|
139
|
+
*/ const consentGroup = useMemo(()=>viewingGroup != null ? viewingGroup : contactPrimaryGroup(row, org), [
|
|
140
|
+
viewingGroup,
|
|
141
|
+
row,
|
|
142
|
+
org
|
|
143
|
+
]);
|
|
144
|
+
/**
|
|
145
|
+
* The SITE the page acts as, for what needs one — the lead lookup, the
|
|
146
|
+
* campaign filing, the site's activity feed: the mounted site, or the
|
|
147
|
+
* primary holder's, or nothing for a row no site has captured.
|
|
148
|
+
*/ const siteHostId = hostId != null ? hostId : consentGroup.hostId || null;
|
|
149
|
+
/*
|
|
150
|
+
* The feed the act is logged in, decided by the level it was performed
|
|
151
|
+
* at (AGL-2738) and so given the MOUNTED site rather than `siteHostId`:
|
|
152
|
+
* at the org hub a client-direct append to the holder's own site would
|
|
153
|
+
* face a gate the record write never had to pass.
|
|
154
|
+
*/ const logActivity = useCrmActivityLogger(hostId);
|
|
155
|
+
const record = useMemo(()=>row ? contactRecordFromDoc(row, consentGroup) : null, [
|
|
156
|
+
row,
|
|
157
|
+
consentGroup
|
|
158
|
+
]);
|
|
159
|
+
const notFound = Boolean(scope) && status !== 'loading' && !row;
|
|
160
|
+
/** How the site the delete detaches from is named — see `handleRemove`. */ const siteLabel = hostId ? 'this site' : siteHostId ? (_ref = mount == null ? void 0 : mount.siteName(siteHostId)) != null ? _ref : siteHostId : 'its site';
|
|
161
|
+
// The roster, for the owner picker and the owner's name — read because a
|
|
162
|
+
// record page is the one place both are shown.
|
|
163
|
+
const members = useOrgMembers(orgId, {
|
|
164
|
+
enabled: Boolean(record)
|
|
165
|
+
});
|
|
166
|
+
/*
|
|
167
|
+
* Where this person's ORDERS are read (AGL-2622): the site's orders list,
|
|
168
|
+
* narrowed to their address. The count on the header is the number; the
|
|
169
|
+
* list is the rows. Built from the route params already in the URL, so
|
|
170
|
+
* no document is read to draw a link, and absent off a site — the
|
|
171
|
+
* org-level mount has no orders list to point at.
|
|
172
|
+
*/ const params = useParams();
|
|
173
|
+
const ordersHref = (params == null ? void 0 : params.orgSlug) && (params == null ? void 0 : params.host) && (record == null ? void 0 : record.email) ? Aglyn.siteRecordLinks({
|
|
174
|
+
orgSlug: String(params.orgSlug),
|
|
175
|
+
host: String(params.host)
|
|
176
|
+
}).ordersByCustomer(record.email) : null;
|
|
177
|
+
/*
|
|
178
|
+
* Where this person's BOOKINGS are read (AGL-2660): the site's Bookings
|
|
179
|
+
* page narrowed to their address, under the same match rule the booking
|
|
180
|
+
* row's own "View in CRM" uses. Offered only where the site has a booking
|
|
181
|
+
* door — a site that never enabled Bookings should not carry the row. At
|
|
182
|
+
* the organization level the capturing site's page, addressed through
|
|
183
|
+
* the subdomain the mount knows it by.
|
|
184
|
+
*/ const bookingDoor = useBookingDoor(siteHostId, org);
|
|
185
|
+
const siteSlug = (params == null ? void 0 : params.host) ? String(params.host) : siteHostId && mount ? mount.siteSubdomain(siteHostId) : null;
|
|
186
|
+
const bookingsHref = bookingDoor.open && (params == null ? void 0 : params.orgSlug) && siteSlug && (record == null ? void 0 : record.email) ? Aglyn.siteRecordLinks({
|
|
187
|
+
orgSlug: String(params.orgSlug),
|
|
188
|
+
host: siteSlug
|
|
189
|
+
}).bookingsByBooker(record.email) : null;
|
|
190
|
+
/*
|
|
191
|
+
* Where a campaign entry on the timeline links to: the email's own report
|
|
192
|
+
* on this site's Emails hub (AGL-2616). Only a campaign THIS site sent can
|
|
193
|
+
* be addressed — a sibling site in the same consent group has an Emails
|
|
194
|
+
* hub of its own under a subdomain this page does not know — so the
|
|
195
|
+
* builder answers `null` for those and the entry draws unlinked.
|
|
196
|
+
*/ const emailsHub = useEmailsHubPath();
|
|
197
|
+
const campaignHref = useCallback((email)=>emailsHub && email.hostId === hostId ? `${emailsHub}/messages/${encodeURIComponent(email.campaignId)}` : null, [
|
|
198
|
+
emailsHub,
|
|
199
|
+
hostId
|
|
200
|
+
]);
|
|
201
|
+
const handleRemove = useCallback(async ()=>{
|
|
202
|
+
var _ref;
|
|
203
|
+
if (!row || !scope) return;
|
|
204
|
+
const confirmed = await confirm({
|
|
205
|
+
title: 'Delete this contact?',
|
|
206
|
+
description: `"${(_ref = record == null ? void 0 : record.email) != null ? _ref : id}" is removed from ${siteLabel}'s ` + 'Contacts, along with its notes, tags and timeline. Other sites ' + 'that captured the same person keep their own records. Their form ' + 'submissions, orders, bookings, and membership records are ' + 'separate — delete those from their own pages if the request ' + 'covers them.',
|
|
207
|
+
confirmationText: 'Delete contact',
|
|
208
|
+
confirmationButtonProps: {
|
|
209
|
+
color: 'error'
|
|
210
|
+
}
|
|
211
|
+
}).then(()=>true).catch(()=>false);
|
|
212
|
+
if (!confirmed) return;
|
|
213
|
+
try {
|
|
214
|
+
const ref = doc(firestore, scope[0], scope[1], 'contacts', id);
|
|
215
|
+
const plan = Aglyn.planContactDetach(row, consentGroup);
|
|
216
|
+
if (plan.action === 'delete') {
|
|
217
|
+
await deleteDoc(ref);
|
|
218
|
+
} else {
|
|
219
|
+
await updateDoc(ref, _extends({}, Object.fromEntries(plan.remove.map((path)=>[
|
|
220
|
+
path,
|
|
221
|
+
deleteField()
|
|
222
|
+
])), {
|
|
223
|
+
visibleTo: arrayRemove(...plan.removeTokens),
|
|
224
|
+
capturedByHostIds: arrayRemove(...plan.removeHostIds),
|
|
225
|
+
updatedAt: new Date()
|
|
226
|
+
}));
|
|
227
|
+
}
|
|
228
|
+
// `siteLabel` and not "this site": at the organization level the line
|
|
229
|
+
// lands in a feed that spans every site, so it has to name the one.
|
|
230
|
+
logActivity(`Removed contact from ${siteLabel}`, {
|
|
231
|
+
type: 'contact',
|
|
232
|
+
id,
|
|
233
|
+
name: (record == null ? void 0 : record.name) || (record == null ? void 0 : record.email)
|
|
234
|
+
});
|
|
235
|
+
enqueueSnackbar(plan.action === 'delete' ? 'Contact deleted' : `Contact removed from ${siteLabel}`, {
|
|
236
|
+
variant: 'success',
|
|
237
|
+
persist: false
|
|
238
|
+
});
|
|
239
|
+
router.push(routes.section('contacts'));
|
|
240
|
+
} catch (error) {
|
|
241
|
+
console.error(error);
|
|
242
|
+
enqueueSnackbar('An error has occurred', {
|
|
243
|
+
variant: 'error',
|
|
244
|
+
allowDuplicate: true
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}, [
|
|
248
|
+
confirm,
|
|
249
|
+
consentGroup,
|
|
250
|
+
enqueueSnackbar,
|
|
251
|
+
firestore,
|
|
252
|
+
id,
|
|
253
|
+
logActivity,
|
|
254
|
+
record,
|
|
255
|
+
router,
|
|
256
|
+
routes,
|
|
257
|
+
row,
|
|
258
|
+
scope,
|
|
259
|
+
siteLabel
|
|
260
|
+
]);
|
|
261
|
+
const overflowItems = [
|
|
262
|
+
/*
|
|
263
|
+
* Two records for one person become one (AGL-2625). Opened empty, to be
|
|
264
|
+
* searched, with the OTHER record surviving: a reader on the record they
|
|
265
|
+
* want gone says "merge this into…". The dialog lets them switch.
|
|
266
|
+
*/ {
|
|
267
|
+
key: 'merge',
|
|
268
|
+
label: 'Merge into…',
|
|
269
|
+
icon: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
270
|
+
path: mdiMerge.path,
|
|
271
|
+
size: 0.8
|
|
272
|
+
}),
|
|
273
|
+
disabled: !row || !suiteIncluded,
|
|
274
|
+
disabledReason: suiteIncluded ? 'The contact has not loaded' : crmSuiteLockedReason(),
|
|
275
|
+
onClick: ()=>merge.open()
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
key: 'remove',
|
|
279
|
+
label: 'Delete contact',
|
|
280
|
+
icon: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
281
|
+
path: mdiDeleteOutline.path,
|
|
282
|
+
size: 0.8
|
|
283
|
+
}),
|
|
284
|
+
destructive: true,
|
|
285
|
+
disabled: !row,
|
|
286
|
+
disabledReason: 'The contact has not loaded',
|
|
287
|
+
onClick: ()=>void handleRemove()
|
|
288
|
+
}
|
|
289
|
+
];
|
|
290
|
+
// The privacy erasure (AGL-2623): its item joins the overflow, its banner
|
|
291
|
+
// sits under the header while a request waits, its dialog renders once.
|
|
292
|
+
const erase = useErasePersonAction({
|
|
293
|
+
// Filed as the site the page acts as — at the organization level the
|
|
294
|
+
// person's primary holder (AGL-2630).
|
|
295
|
+
hostId: siteHostId,
|
|
296
|
+
orgId,
|
|
297
|
+
subject: record ? {
|
|
298
|
+
kind: 'contact',
|
|
299
|
+
id,
|
|
300
|
+
email: record.email
|
|
301
|
+
} : null,
|
|
302
|
+
requestedAtMs: Aglyn.readErasureRequestedAtMs(row)
|
|
303
|
+
});
|
|
304
|
+
if (notFound) {
|
|
305
|
+
return /*#__PURE__*/ _jsx(CrmRecordHeader, {
|
|
306
|
+
kind: "Contact",
|
|
307
|
+
title: undefined,
|
|
308
|
+
help: contactDocsHelp,
|
|
309
|
+
backHref: routes.section('contacts'),
|
|
310
|
+
backLabel: "Back to contacts",
|
|
311
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
312
|
+
variant: "body2",
|
|
313
|
+
color: "text.secondary",
|
|
314
|
+
children: 'This contact could not be loaded. It may have been removed from this site.'
|
|
315
|
+
})
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
return(// A create opened from this page — a task, an activity, a deal — files
|
|
319
|
+
// under the site that captured this person unless the reader says
|
|
320
|
+
// otherwise (AGL-2630).
|
|
321
|
+
/*#__PURE__*/ _jsx(CrmCreateSiteDefault, {
|
|
322
|
+
hostId: siteHostId,
|
|
323
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
324
|
+
spacing: 3,
|
|
325
|
+
children: [
|
|
326
|
+
/*#__PURE__*/ _jsx(CrmRecordHeader, {
|
|
327
|
+
kind: "Contact",
|
|
328
|
+
title: record ? record.name || record.email : undefined,
|
|
329
|
+
// The identity, and the other addresses a merge folded into it.
|
|
330
|
+
subtitle: record ? [
|
|
331
|
+
record.email,
|
|
332
|
+
...record.alternateEmails.map((email)=>`also ${email}`)
|
|
333
|
+
].join(' · ') : undefined,
|
|
334
|
+
help: contactDocsHelp,
|
|
335
|
+
backHref: routes.section('contacts'),
|
|
336
|
+
backLabel: "Back to contacts",
|
|
337
|
+
actions: record ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
338
|
+
children: [
|
|
339
|
+
/*#__PURE__*/ _jsx(AddToListButton, {
|
|
340
|
+
hostId: hostId,
|
|
341
|
+
org: org,
|
|
342
|
+
contactId: id,
|
|
343
|
+
email: record.email
|
|
344
|
+
}),
|
|
345
|
+
/*#__PURE__*/ _jsx(CrmCallButton, {
|
|
346
|
+
hostId: siteHostId,
|
|
347
|
+
org: org,
|
|
348
|
+
link: {
|
|
349
|
+
contactId: id
|
|
350
|
+
},
|
|
351
|
+
phone: record.phone,
|
|
352
|
+
suiteLocked: !suiteIncluded
|
|
353
|
+
}),
|
|
354
|
+
/*#__PURE__*/ _jsx(CrmSendEmailButton, {
|
|
355
|
+
hostId: siteHostId,
|
|
356
|
+
org: org,
|
|
357
|
+
contactId: id,
|
|
358
|
+
email: record.email,
|
|
359
|
+
name: record.name,
|
|
360
|
+
suiteLocked: !suiteIncluded
|
|
361
|
+
})
|
|
362
|
+
]
|
|
363
|
+
}) : null,
|
|
364
|
+
menuItems: [
|
|
365
|
+
...overflowItems,
|
|
366
|
+
...erase.menuItems
|
|
367
|
+
],
|
|
368
|
+
// The booking door (AGL-2660): this site's services, or at the
|
|
369
|
+
// organization level the capturing site's.
|
|
370
|
+
booking: record ? {
|
|
371
|
+
hostId: siteHostId,
|
|
372
|
+
org,
|
|
373
|
+
kind: 'contact',
|
|
374
|
+
recordId: id
|
|
375
|
+
} : undefined,
|
|
376
|
+
loading: !record,
|
|
377
|
+
chips: record ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
378
|
+
children: [
|
|
379
|
+
/*#__PURE__*/ _jsx(CrmRecordChip, {
|
|
380
|
+
label: "Stage",
|
|
381
|
+
value: record.lifecycleStage ? CONTACT_LIFECYCLE_STAGE_LABELS[record.lifecycleStage] : undefined
|
|
382
|
+
}),
|
|
383
|
+
/*#__PURE__*/ _jsx(CrmRecordChip, {
|
|
384
|
+
label: "Owner",
|
|
385
|
+
value: record.ownerUid ? members.memberName(record.ownerUid) : undefined
|
|
386
|
+
}),
|
|
387
|
+
/*#__PURE__*/ _jsx(CrmRecordChip, {
|
|
388
|
+
label: "Last engaged",
|
|
389
|
+
value: record.lastEmailEngagementAtMs ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
390
|
+
title: new Date(record.lastEmailEngagementAtMs).toLocaleString(),
|
|
391
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
392
|
+
children: Aglyn.activityTimeLabel(record.lastEmailEngagementAtMs, Date.now())
|
|
393
|
+
})
|
|
394
|
+
}) : undefined
|
|
395
|
+
}),
|
|
396
|
+
/*#__PURE__*/ _jsx(CrmRecordChip, {
|
|
397
|
+
label: "Orders",
|
|
398
|
+
value: record.ordersCount > 0 ? ordersHref ? /*#__PURE__*/ _jsx(AppLink, {
|
|
399
|
+
href: ordersHref,
|
|
400
|
+
color: "inherit",
|
|
401
|
+
underline: "hover",
|
|
402
|
+
children: `${record.ordersCount.toLocaleString()} · $${(record.ltvCents / 100).toFixed(2)} lifetime`
|
|
403
|
+
}) : `${record.ordersCount.toLocaleString()} · $${(record.ltvCents / 100).toFixed(2)} lifetime` : undefined
|
|
404
|
+
})
|
|
405
|
+
]
|
|
406
|
+
}) : null,
|
|
407
|
+
children: erase.banner
|
|
408
|
+
}),
|
|
409
|
+
record && row && scope ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
410
|
+
children: [
|
|
411
|
+
suiteIncluded ? null : /*#__PURE__*/ _jsx(CrmSuiteNotice, {
|
|
412
|
+
children: 'Working this contact — the owner, stage and company, tasks, ' + 'deals, files and custom fields, logging a call or an activity, ' + 'one-to-one email and merging duplicates — is part of the CRM.'
|
|
413
|
+
}),
|
|
414
|
+
suiteIncluded ? /*#__PURE__*/ _jsx(CrmRecordInsightsZone, {
|
|
415
|
+
hostId: hostId,
|
|
416
|
+
org: org,
|
|
417
|
+
kind: "contact",
|
|
418
|
+
recordId: id,
|
|
419
|
+
name: record.name || record.email,
|
|
420
|
+
taskLink: {
|
|
421
|
+
contactId: id
|
|
422
|
+
}
|
|
423
|
+
}) : null,
|
|
424
|
+
mount ? /*#__PURE__*/ _jsx(ContactKnownByCard, {
|
|
425
|
+
row: row,
|
|
426
|
+
contactId: id,
|
|
427
|
+
org: org
|
|
428
|
+
}) : null,
|
|
429
|
+
/*#__PURE__*/ _jsx(ContactPropertiesCard, {
|
|
430
|
+
hostId: hostId,
|
|
431
|
+
org: org,
|
|
432
|
+
record: record,
|
|
433
|
+
consentGroup: consentGroup,
|
|
434
|
+
seed: {
|
|
435
|
+
status,
|
|
436
|
+
fromCache
|
|
437
|
+
},
|
|
438
|
+
members: members,
|
|
439
|
+
suiteLocked: !suiteIncluded
|
|
440
|
+
}),
|
|
441
|
+
/*#__PURE__*/ _jsx(ContactAssociationsCard, {
|
|
442
|
+
hostId: siteHostId,
|
|
443
|
+
record: record,
|
|
444
|
+
row: row,
|
|
445
|
+
consentGroup: consentGroup,
|
|
446
|
+
seed: {
|
|
447
|
+
status,
|
|
448
|
+
fromCache
|
|
449
|
+
},
|
|
450
|
+
basePath: basePath,
|
|
451
|
+
bookingsHref: bookingsHref
|
|
452
|
+
}),
|
|
453
|
+
suiteIncluded ? /*#__PURE__*/ _jsx(ContactCustomFieldsCard, {
|
|
454
|
+
hostId: hostId,
|
|
455
|
+
org: org,
|
|
456
|
+
contactId: id,
|
|
457
|
+
basePath: basePath
|
|
458
|
+
}) : null,
|
|
459
|
+
/*#__PURE__*/ _jsx(ContactTimelineCard, {
|
|
460
|
+
hostId: hostId,
|
|
461
|
+
org: org,
|
|
462
|
+
contactId: id,
|
|
463
|
+
contact: row,
|
|
464
|
+
campaignHref: campaignHref,
|
|
465
|
+
suiteLocked: !suiteIncluded
|
|
466
|
+
}),
|
|
467
|
+
suiteIncluded ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
468
|
+
children: [
|
|
469
|
+
/*#__PURE__*/ _jsx(ContactDealsCard, {
|
|
470
|
+
hostId: hostId,
|
|
471
|
+
org: org,
|
|
472
|
+
basePath: basePath,
|
|
473
|
+
contactId: id,
|
|
474
|
+
contactName: record.name || record.email
|
|
475
|
+
}),
|
|
476
|
+
/*#__PURE__*/ _jsx(RecordTasksCard, {
|
|
477
|
+
hostId: hostId,
|
|
478
|
+
org: org,
|
|
479
|
+
basePath: basePath,
|
|
480
|
+
contactId: id
|
|
481
|
+
}),
|
|
482
|
+
/*#__PURE__*/ _jsx(RecordFilesCard, {
|
|
483
|
+
scope: scope,
|
|
484
|
+
collection: "contacts",
|
|
485
|
+
recordId: id,
|
|
486
|
+
hostId: hostId,
|
|
487
|
+
facetGroupId: consentGroup.groupId,
|
|
488
|
+
mediaIds: record.mediaIds,
|
|
489
|
+
topic: "contactRecord"
|
|
490
|
+
})
|
|
491
|
+
]
|
|
492
|
+
}) : null,
|
|
493
|
+
/*#__PURE__*/ _jsx(ContactDuplicatesCard, {
|
|
494
|
+
current: {
|
|
495
|
+
id,
|
|
496
|
+
doc: row
|
|
497
|
+
},
|
|
498
|
+
scope: scope,
|
|
499
|
+
consentGroup: consentGroup,
|
|
500
|
+
visibleTo: visibleTo,
|
|
501
|
+
basePath: basePath,
|
|
502
|
+
onMerge: (candidate)=>merge.open({
|
|
503
|
+
other: candidate,
|
|
504
|
+
keep: 'current'
|
|
505
|
+
}),
|
|
506
|
+
suiteLocked: !suiteIncluded
|
|
507
|
+
}),
|
|
508
|
+
/*#__PURE__*/ _jsx(ContactMergeDialog, _extends({}, merge.state, {
|
|
509
|
+
onClose: merge.close,
|
|
510
|
+
hostId: siteHostId,
|
|
511
|
+
current: {
|
|
512
|
+
id,
|
|
513
|
+
doc: row
|
|
514
|
+
},
|
|
515
|
+
scope: scope,
|
|
516
|
+
consentGroup: consentGroup,
|
|
517
|
+
visibleTo: visibleTo,
|
|
518
|
+
memberName: members.memberName,
|
|
519
|
+
// The page's own record was folded away: its address now opens
|
|
520
|
+
// the survivor, which is where the reader is taken.
|
|
521
|
+
onMerged: (survivorId)=>{
|
|
522
|
+
if (survivorId !== id) router.replace(routes.contact(survivorId));
|
|
523
|
+
}
|
|
524
|
+
}))
|
|
525
|
+
]
|
|
526
|
+
}) : null,
|
|
527
|
+
erase.dialog
|
|
528
|
+
]
|
|
529
|
+
})
|
|
530
|
+
}));
|
|
531
|
+
}
|
|
532
|
+
ContactDetailPage.displayName = 'ContactDetailPage';
|
|
533
|
+
export default ContactDetailPage;
|
|
534
|
+
|
|
535
|
+
//# sourceMappingURL=contact-detail-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/contact-detail-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 * as Aglyn from '@aglyn/aglyn'\nimport { CONTACT_LIFECYCLE_STAGE_LABELS, pluginDocsHelp } from '@aglyn/aglyn'\nimport { mdiDeleteOutline, mdiMerge } from '@aglyn/shared-data-mdi'\nimport { AppLink, MdiIcon, useConfirmationContext } from '@aglyn/shared-ui-jsx'\nimport type { RowActionsMenuItem } from '@aglyn/shared-ui-jsx/components/row-actions-menu.component'\nimport { useSnackbar } from '@aglyn/shared-ui-snackstack'\nimport { useFirestore, useFirestoreDoc } from '@aglyn/tenant-feature-instance'\nimport { Stack, Tooltip, Typography } from '@mui/material'\nimport {\n arrayRemove,\n deleteDoc,\n deleteField,\n doc,\n updateDoc,\n} from 'firebase/firestore'\nimport { useParams, useRouter } from 'next/navigation'\nimport { useCallback, useMemo } from 'react'\nimport { useCrmActivityLogger } from '../hooks/use-crm-activity-logger'\nimport { CrmCreateSiteDefault, useCrmOrgMount } from '../hooks/use-crm-org-mount'\nimport { useCrmScope } from '../hooks/use-crm-scope'\nimport { contactPrimaryGroup, contactRecordFromDoc } from '../model/contact-record'\nimport { type CrmDetailPageProps, crmRoutes } from '../model/crm-routes'\nimport ContactAssociationsCard from './contact-associations-card'\nimport ContactCustomFieldsCard from './contact-custom-fields-card'\nimport ContactDuplicatesCard from './contact-duplicates-card'\nimport ContactKnownByCard from './contact-known-by-card'\nimport ContactMergeDialog, { useContactMergeDialog } from './contact-merge-dialog'\nimport ContactPropertiesCard from './contact-properties-card'\nimport ContactTimelineCard from './contact-timeline-card'\nimport { AddToListButton } from './add-to-list-button'\nimport { useBookingDoor } from './crm-booking-zone'\nimport { CrmSendEmailButton } from './crm-send-email-button'\nimport { ContactDealsCard } from './contact-deals-card'\nimport { CrmCallButton } from './crm-call-actions'\nimport { CrmRecordChip, CrmRecordHeader } from './crm-record-header'\nimport { CrmRecordInsightsZone } from './crm-record-insights-zone'\nimport { CrmSuiteNotice, crmSuiteIncluded, crmSuiteLockedReason } from './crm-suite-lock'\nimport { useErasePersonAction } from './erase-person-action'\nimport RecordFilesCard from './record-files-card'\nimport { RecordTasksCard } from './record-tasks-card'\nimport { useEmailsHubPath } from './use-emails-hub-path'\nimport { useOrgMembers } from './use-org-members'\n\nconst contactDocsHelp = pluginDocsHelp('contacts', {\n anchor: '#the-contacts-page',\n excerpt:\n \"One person's record: the profile your team keeps on them, where they \" +\n 'came from, what they are filed under, and what the site recorded.',\n})\n\n/**\n * `/crm/contacts/{contactId}` — one person (AGL-2596).\n *\n * A ROUTE rather than the v1 drawer, because a person is the thing every\n * other CRM record points at: a deal, a task and an activity all name a\n * contact, and a link that opens a drawer on top of a list is not a link\n * anybody can paste.\n *\n * ## What this page reads\n *\n * ONE document, by id, through the scoped rules — a single-document get is\n * judged on that document's own `visibleTo`, so no `array-contains-any`\n * filter is needed here the way it is on the list. The row is then flattened\n * through the viewing group's facet ONCE (`contactRecordFromDoc`) and the\n * cards below read the flat record: none of them reaches into\n * `facets.{groupId}` for itself, which is what keeps a card from ever\n * showing another holder's notes.\n *\n * Beyond the document: the team roster (one request, for the owner picker)\n * and the site's campaigns (one listen, for the filing picker) — both paid\n * here because opening a record IS the ask for them, and neither is paid by\n * the list.\n *\n * ## The cards\n *\n * Each in its own file, so a card can grow without this page growing:\n * properties (the editable profile), the relationship (sources, attribution,\n * consent, campaign filing) and the timeline. Other CRM sections add a card\n * here by inserting one import and one line.\n *\n * ## Delete is a detach\n *\n * The row is shared by every site that has captured this person, so the\n * action in the overflow menu drops THIS group's facet, consent, attribution\n * and scope tokens, and deletes the document only when nobody else is left\n * holding it — `planContactDetach` does the counting off `visibleTo`, which\n * is what both enforcement layers evaluate, and the rules refuse a delete by\n * a caller who is not the sole holder. Not the erasure path: a privacy\n * erasure removes the person regardless of who else holds them.\n */\nexport function ContactDetailPage(props: CrmDetailPageProps) {\n const { hostId, org, id, basePath } = props\n const routes = crmRoutes(basePath)\n const router = useRouter()\n const firestore = useFirestore()\n const { enqueueSnackbar } = useSnackbar()\n const { confirm } = useConfirmationContext()\n // The org root, the viewing group and what this viewer may list — the\n // merge search's and the duplicates query's one clause — from the one\n // scope hook (AGL-2614); at the organization level the group is `null`\n // and resolved per person below, and the listeners carry no clause\n // (AGL-2630).\n const {\n scope,\n orgId,\n consentGroup: viewingGroup,\n visibleTo,\n } = useCrmScope({ hostId, org })\n const mount = useCrmOrgMount()\n const merge = useContactMergeDialog()\n /*\n * THE CRM (AGL-2788). This page is the CRM's, and the shell mounts no CRM\n * page for a plan without it (AGL-2851). What locks below — owner, stage\n * and company; tasks, deals, files and custom fields; a logged call or\n * activity; one-to-one email; a merge — draws only for an org whose plan\n * lacks the CRM. The shell mounted this page once the org had settled, so\n * this is the plan, not a paint of the org still loading.\n */\n const suiteIncluded = crmSuiteIncluded(org)\n\n const {\n data: row,\n status,\n fromCache,\n } = useFirestoreDoc<Record<string, any>>(\n () => (scope ? doc(firestore, scope[0], scope[1], 'contacts', id) : null),\n [firestore, scope, id],\n { idField: '$id' },\n )\n /*\n * The controller this page is showing. Under a site: the sites declared\n * to be one sender, or this site alone — resolved from the org document\n * the shell already passed, so it costs no read. At the ORGANIZATION\n * level: the person's own PRIMARY holder, the first capturing site's\n * group, so an org-wide member reads the profile that site keeps and an\n * edit goes back to the same facet; the \"Known by\" card says which other\n * sites hold one.\n */\n const consentGroup = useMemo(\n () => viewingGroup ?? contactPrimaryGroup(row, org as Record<string, unknown>),\n [viewingGroup, row, org],\n )\n /**\n * The SITE the page acts as, for what needs one — the lead lookup, the\n * campaign filing, the site's activity feed: the mounted site, or the\n * primary holder's, or nothing for a row no site has captured.\n */\n const siteHostId = hostId ?? (consentGroup.hostId || null)\n /*\n * The feed the act is logged in, decided by the level it was performed\n * at (AGL-2738) and so given the MOUNTED site rather than `siteHostId`:\n * at the org hub a client-direct append to the holder's own site would\n * face a gate the record write never had to pass.\n */\n const logActivity = useCrmActivityLogger(hostId)\n const record = useMemo(\n () => (row ? contactRecordFromDoc(row, consentGroup) : null),\n [row, consentGroup],\n )\n const notFound = Boolean(scope) && status !== 'loading' && !row\n /** How the site the delete detaches from is named — see `handleRemove`. */\n const siteLabel = hostId\n ? 'this site'\n : siteHostId\n ? (mount?.siteName(siteHostId) ?? siteHostId)\n : 'its site'\n\n // The roster, for the owner picker and the owner's name — read because a\n // record page is the one place both are shown.\n const members = useOrgMembers(orgId, { enabled: Boolean(record) })\n /*\n * Where this person's ORDERS are read (AGL-2622): the site's orders list,\n * narrowed to their address. The count on the header is the number; the\n * list is the rows. Built from the route params already in the URL, so\n * no document is read to draw a link, and absent off a site — the\n * org-level mount has no orders list to point at.\n */\n const params = useParams<{ orgSlug?: string; host?: string }>()\n const ordersHref =\n params?.orgSlug && params?.host && record?.email\n ? Aglyn.siteRecordLinks({\n orgSlug: String(params.orgSlug),\n host: String(params.host),\n }).ordersByCustomer(record.email)\n : null\n /*\n * Where this person's BOOKINGS are read (AGL-2660): the site's Bookings\n * page narrowed to their address, under the same match rule the booking\n * row's own \"View in CRM\" uses. Offered only where the site has a booking\n * door — a site that never enabled Bookings should not carry the row. At\n * the organization level the capturing site's page, addressed through\n * the subdomain the mount knows it by.\n */\n const bookingDoor = useBookingDoor(siteHostId, org)\n const siteSlug = params?.host\n ? String(params.host)\n : siteHostId && mount\n ? mount.siteSubdomain(siteHostId)\n : null\n const bookingsHref =\n bookingDoor.open && params?.orgSlug && siteSlug && record?.email\n ? Aglyn.siteRecordLinks({\n orgSlug: String(params.orgSlug),\n host: siteSlug,\n }).bookingsByBooker(record.email)\n : null\n\n /*\n * Where a campaign entry on the timeline links to: the email's own report\n * on this site's Emails hub (AGL-2616). Only a campaign THIS site sent can\n * be addressed — a sibling site in the same consent group has an Emails\n * hub of its own under a subdomain this page does not know — so the\n * builder answers `null` for those and the entry draws unlinked.\n */\n const emailsHub = useEmailsHubPath()\n const campaignHref = useCallback(\n (email: Aglyn.ContactCampaignEmail) =>\n emailsHub && email.hostId === hostId\n ? `${emailsHub}/messages/${encodeURIComponent(email.campaignId)}`\n : null,\n [emailsHub, hostId],\n )\n\n const handleRemove = useCallback(async () => {\n if (!row || !scope) return\n const confirmed = await confirm({\n title: 'Delete this contact?',\n description:\n `\"${record?.email ?? id}\" is removed from ${siteLabel}'s ` +\n 'Contacts, along with its notes, tags and timeline. Other sites ' +\n 'that captured the same person keep their own records. Their form ' +\n 'submissions, orders, bookings, and membership records are ' +\n 'separate — delete those from their own pages if the request ' +\n 'covers them.',\n confirmationText: 'Delete contact',\n confirmationButtonProps: { color: 'error' },\n })\n .then(() => true)\n .catch(() => false)\n if (!confirmed) return\n try {\n const ref = doc(firestore, scope[0], scope[1], 'contacts', id)\n const plan = Aglyn.planContactDetach(row, consentGroup)\n if (plan.action === 'delete') {\n await deleteDoc(ref)\n } else {\n await updateDoc(ref, {\n ...Object.fromEntries(plan.remove.map((path) => [path, deleteField()])),\n visibleTo: arrayRemove(...plan.removeTokens),\n capturedByHostIds: arrayRemove(...plan.removeHostIds),\n updatedAt: new Date(),\n })\n }\n // `siteLabel` and not \"this site\": at the organization level the line\n // lands in a feed that spans every site, so it has to name the one.\n logActivity(`Removed contact from ${siteLabel}`, {\n type: 'contact',\n id,\n name: record?.name || record?.email,\n })\n enqueueSnackbar(\n plan.action === 'delete'\n ? 'Contact deleted'\n : `Contact removed from ${siteLabel}`,\n { variant: 'success', persist: false },\n )\n router.push(routes.section('contacts'))\n } catch (error) {\n console.error(error)\n enqueueSnackbar('An error has occurred', {\n variant: 'error',\n allowDuplicate: true,\n })\n }\n }, [\n confirm,\n consentGroup,\n enqueueSnackbar,\n firestore,\n id,\n logActivity,\n record,\n router,\n routes,\n row,\n scope,\n siteLabel,\n ])\n\n const overflowItems: RowActionsMenuItem[] = [\n /*\n * Two records for one person become one (AGL-2625). Opened empty, to be\n * searched, with the OTHER record surviving: a reader on the record they\n * want gone says \"merge this into…\". The dialog lets them switch.\n */\n {\n key: 'merge',\n label: 'Merge into…',\n icon: <MdiIcon path={mdiMerge.path} size={0.8} />,\n disabled: !row || !suiteIncluded,\n disabledReason: suiteIncluded ? 'The contact has not loaded' : crmSuiteLockedReason(),\n onClick: () => merge.open(),\n },\n {\n key: 'remove',\n label: 'Delete contact',\n icon: <MdiIcon path={mdiDeleteOutline.path} size={0.8} />,\n destructive: true,\n disabled: !row,\n disabledReason: 'The contact has not loaded',\n onClick: () => void handleRemove(),\n },\n ]\n // The privacy erasure (AGL-2623): its item joins the overflow, its banner\n // sits under the header while a request waits, its dialog renders once.\n const erase = useErasePersonAction({\n // Filed as the site the page acts as — at the organization level the\n // person's primary holder (AGL-2630).\n hostId: siteHostId,\n orgId,\n subject: record ? { kind: 'contact', id, email: record.email } : null,\n requestedAtMs: Aglyn.readErasureRequestedAtMs(row),\n })\n\n if (notFound) {\n return (\n <CrmRecordHeader\n kind=\"Contact\"\n title={undefined}\n help={contactDocsHelp}\n backHref={routes.section('contacts')}\n backLabel=\"Back to contacts\"\n >\n {/*\n * Not \"no data\". A contact that cannot be read is a different\n * situation from one with an empty profile — it may have been\n * removed from this site, or be held only by a site this reader\n * cannot see.\n */}\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'This contact could not be loaded. It may have been removed from this site.'}\n </Typography>\n </CrmRecordHeader>\n )\n }\n\n return (\n // A create opened from this page — a task, an activity, a deal — files\n // under the site that captured this person unless the reader says\n // otherwise (AGL-2630).\n <CrmCreateSiteDefault hostId={siteHostId}>\n <Stack spacing={3}>\n <CrmRecordHeader\n kind=\"Contact\"\n title={record ? record.name || record.email : undefined}\n // The identity, and the other addresses a merge folded into it.\n subtitle={\n record\n ? [record.email, ...record.alternateEmails.map((email) => `also ${email}`)].join(' · ')\n : undefined\n }\n help={contactDocsHelp}\n backHref={routes.section('contacts')}\n backLabel=\"Back to contacts\"\n actions={\n record ? (\n <>\n <AddToListButton hostId={hostId} org={org} contactId={id} email={record.email} />\n {/* Dial the number, and log the call it was (AGL-2661). */}\n <CrmCallButton\n hostId={siteHostId}\n org={org}\n link={{ contactId: id }}\n phone={record.phone}\n suiteLocked={!suiteIncluded}\n />\n <CrmSendEmailButton\n hostId={siteHostId}\n org={org}\n contactId={id}\n email={record.email}\n name={record.name}\n suiteLocked={!suiteIncluded}\n />\n </>\n ) : null\n }\n menuItems={[...overflowItems, ...erase.menuItems]}\n // The booking door (AGL-2660): this site's services, or at the\n // organization level the capturing site's.\n booking={record ? { hostId: siteHostId, org, kind: 'contact', recordId: id } : undefined}\n loading={!record}\n chips={\n record ? (\n <>\n <CrmRecordChip\n label=\"Stage\"\n value={\n record.lifecycleStage\n ? CONTACT_LIFECYCLE_STAGE_LABELS[record.lifecycleStage]\n : undefined\n }\n />\n <CrmRecordChip\n label=\"Owner\"\n value={record.ownerUid ? members.memberName(record.ownerUid) : undefined}\n />\n {/*\n The last time they opened or clicked one of this site's\n campaigns (AGL-2616) — the relationship's pulse, beside the\n owner who keeps it.\n */}\n <CrmRecordChip\n label=\"Last engaged\"\n value={\n record.lastEmailEngagementAtMs ? (\n <Tooltip title={new Date(record.lastEmailEngagementAtMs).toLocaleString()}>\n <span>\n {Aglyn.activityTimeLabel(record.lastEmailEngagementAtMs, Date.now())}\n </span>\n </Tooltip>\n ) : undefined\n }\n />\n <CrmRecordChip\n label=\"Orders\"\n value={\n record.ordersCount > 0 ? (\n ordersHref ? (\n <AppLink href={ordersHref} color=\"inherit\" underline=\"hover\">\n {`${record.ordersCount.toLocaleString()} · $${(record.ltvCents / 100).toFixed(2)} lifetime`}\n </AppLink>\n ) : (\n `${record.ordersCount.toLocaleString()} · $${(record.ltvCents / 100).toFixed(2)} lifetime`\n )\n ) : undefined\n }\n />\n </>\n ) : null\n }\n >\n {erase.banner}\n </CrmRecordHeader>\n {record && row && scope ? (\n <>\n {suiteIncluded ? null : (\n <CrmSuiteNotice>\n {'Working this contact — the owner, stage and company, tasks, ' +\n 'deals, files and custom fields, logging a call or an activity, ' +\n 'one-to-one email and merging duplicates — is part of the CRM.'}\n </CrmSuiteNotice>\n )}\n {/*\n The cross-site fact, at the organization level only (AGL-2630):\n which sites know this person, and their consent for each. Under\n a site the page IS one site's view and the card would say so on\n every record.\n */}\n {/* What an assistant proposes about the person (AGL-2917), where the plan works a contact. */}\n {suiteIncluded ? (\n <CrmRecordInsightsZone\n hostId={hostId}\n org={org as Record<string, unknown> | undefined}\n kind=\"contact\"\n recordId={id}\n name={record.name || record.email}\n taskLink={{ contactId: id }}\n />\n ) : null}\n {mount ? <ContactKnownByCard row={row} contactId={id} org={org} /> : null}\n <ContactPropertiesCard\n hostId={hostId}\n org={org}\n record={record}\n consentGroup={consentGroup}\n seed={{ status, fromCache }}\n members={members}\n suiteLocked={!suiteIncluded}\n />\n <ContactAssociationsCard\n hostId={siteHostId}\n record={record}\n row={row}\n consentGroup={consentGroup}\n seed={{ status, fromCache }}\n basePath={basePath}\n bookingsHref={bookingsHref}\n />\n {/*\n On a plan without the CRM, the cards that only work a record —\n custom fields, deals, tasks, files — are named in the notice above\n rather than drawn as four upsells in a row.\n */}\n {suiteIncluded ? (\n <ContactCustomFieldsCard hostId={hostId} org={org} contactId={id} basePath={basePath} />\n ) : null}\n <ContactTimelineCard\n hostId={hostId}\n org={org}\n contactId={id}\n contact={row}\n campaignHref={campaignHref}\n suiteLocked={!suiteIncluded}\n />\n {suiteIncluded ? (\n <>\n <ContactDealsCard\n hostId={hostId}\n org={org}\n basePath={basePath}\n contactId={id}\n contactName={record.name || record.email}\n />\n <RecordTasksCard hostId={hostId} org={org} basePath={basePath} contactId={id} />\n {/*\n The files are the VIEWING holder's, like everything else on this\n page: the write is a facet path, so a contract one brand filed\n never appears on a sibling brand's copy of the person.\n */}\n <RecordFilesCard\n scope={scope}\n collection=\"contacts\"\n recordId={id}\n hostId={hostId}\n facetGroupId={consentGroup.groupId}\n mediaIds={record.mediaIds}\n topic=\"contactRecord\"\n />\n </>\n ) : null}\n <ContactDuplicatesCard\n current={{ id, doc: row }}\n scope={scope}\n consentGroup={consentGroup}\n visibleTo={visibleTo}\n basePath={basePath}\n onMerge={(candidate) => merge.open({ other: candidate, keep: 'current' })}\n suiteLocked={!suiteIncluded}\n />\n <ContactMergeDialog\n {...merge.state}\n onClose={merge.close}\n hostId={siteHostId}\n current={{ id, doc: row }}\n scope={scope}\n consentGroup={consentGroup}\n visibleTo={visibleTo}\n memberName={members.memberName}\n // The page's own record was folded away: its address now opens\n // the survivor, which is where the reader is taken.\n onMerged={(survivorId) => {\n if (survivorId !== id) router.replace(routes.contact(survivorId))\n }}\n />\n </>\n ) : null}\n {erase.dialog}\n </Stack>\n </CrmCreateSiteDefault>\n )\n}\nContactDetailPage.displayName = 'ContactDetailPage'\n\nexport default ContactDetailPage\n"],"names":["Aglyn","CONTACT_LIFECYCLE_STAGE_LABELS","pluginDocsHelp","mdiDeleteOutline","mdiMerge","AppLink","MdiIcon","useConfirmationContext","useSnackbar","useFirestore","useFirestoreDoc","Stack","Tooltip","Typography","arrayRemove","deleteDoc","deleteField","doc","updateDoc","useParams","useRouter","useCallback","useMemo","useCrmActivityLogger","CrmCreateSiteDefault","useCrmOrgMount","useCrmScope","contactPrimaryGroup","contactRecordFromDoc","crmRoutes","ContactAssociationsCard","ContactCustomFieldsCard","ContactDuplicatesCard","ContactKnownByCard","ContactMergeDialog","useContactMergeDialog","ContactPropertiesCard","ContactTimelineCard","AddToListButton","useBookingDoor","CrmSendEmailButton","ContactDealsCard","CrmCallButton","CrmRecordChip","CrmRecordHeader","CrmRecordInsightsZone","CrmSuiteNotice","crmSuiteIncluded","crmSuiteLockedReason","useErasePersonAction","RecordFilesCard","RecordTasksCard","useEmailsHubPath","useOrgMembers","contactDocsHelp","anchor","excerpt","ContactDetailPage","props","hostId","org","id","basePath","routes","router","firestore","enqueueSnackbar","confirm","scope","orgId","consentGroup","viewingGroup","visibleTo","mount","merge","suiteIncluded","data","row","status","fromCache","idField","siteHostId","logActivity","record","notFound","Boolean","siteLabel","siteName","members","enabled","params","ordersHref","orgSlug","host","email","siteRecordLinks","String","ordersByCustomer","bookingDoor","siteSlug","siteSubdomain","bookingsHref","open","bookingsByBooker","emailsHub","campaignHref","encodeURIComponent","campaignId","handleRemove","confirmed","title","description","confirmationText","confirmationButtonProps","color","then","catch","ref","plan","planContactDetach","action","Object","fromEntries","remove","map","path","removeTokens","capturedByHostIds","removeHostIds","updatedAt","Date","type","name","variant","persist","push","section","error","console","allowDuplicate","overflowItems","key","label","icon","size","disabled","disabledReason","onClick","destructive","erase","subject","kind","requestedAtMs","readErasureRequestedAtMs","undefined","help","backHref","backLabel","spacing","subtitle","alternateEmails","join","actions","contactId","link","phone","suiteLocked","menuItems","booking","recordId","loading","chips","value","lifecycleStage","ownerUid","memberName","lastEmailEngagementAtMs","toLocaleString","span","activityTimeLabel","now","ordersCount","href","underline","ltvCents","toFixed","banner","taskLink","seed","contact","contactName","collection","facetGroupId","groupId","mediaIds","topic","current","onMerge","candidate","other","keep","state","onClose","close","onMerged","survivorId","replace","dialog","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAEA,YAAYA,WAAW,eAAc;AACrC,SAASC,8BAA8B,EAAEC,cAAc,QAAQ,eAAc;AAC7E,SAASC,gBAAgB,EAAEC,QAAQ,QAAQ,yBAAwB;AACnE,SAASC,OAAO,EAAEC,OAAO,EAAEC,sBAAsB,QAAQ,uBAAsB;AAE/E,SAASC,WAAW,QAAQ,8BAA6B;AACzD,SAASC,YAAY,EAAEC,eAAe,QAAQ,iCAAgC;AAC9E,SAASC,KAAK,EAAEC,OAAO,EAAEC,UAAU,QAAQ,gBAAe;AAC1D,SACEC,WAAW,EACXC,SAAS,EACTC,WAAW,EACXC,GAAG,EACHC,SAAS,QACJ,qBAAoB;AAC3B,SAASC,S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