@aglyn/plugins-crm 1.0.0-beta.218 → 1.0.0-beta.219
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/package.json +14 -13
- package/src/index.d.ts +1 -0
- package/src/index.js.map +1 -1
- package/src/lib/components/companies-bulk-bar.js +12 -4
- package/src/lib/components/companies-bulk-bar.js.map +1 -1
- package/src/lib/components/company-detail-page.js +11 -0
- package/src/lib/components/company-detail-page.js.map +1 -1
- package/src/lib/components/company-edit-drawer.js +12 -2
- package/src/lib/components/company-edit-drawer.js.map +1 -1
- package/src/lib/components/company-import-drawer.d.ts +1 -1
- package/src/lib/components/company-picker.js +10 -3
- package/src/lib/components/company-picker.js.map +1 -1
- package/src/lib/components/contact-detail-page.d.ts +4 -4
- package/src/lib/components/contact-detail-page.js +50 -53
- package/src/lib/components/contact-detail-page.js.map +1 -1
- package/src/lib/components/contact-list-columns.d.ts +3 -0
- package/src/lib/components/contact-list-columns.js +21 -5
- package/src/lib/components/contact-list-columns.js.map +1 -1
- package/src/lib/components/contact-merge-dialog.js +2 -1
- package/src/lib/components/contact-merge-dialog.js.map +1 -1
- package/src/lib/components/contact-timeline-card.js +4 -3
- package/src/lib/components/contact-timeline-card.js.map +1 -1
- package/src/lib/components/contacts-bulk-bar.d.ts +3 -3
- package/src/lib/components/contacts-bulk-bar.js +24 -51
- package/src/lib/components/contacts-bulk-bar.js.map +1 -1
- package/src/lib/components/contacts-section.js +9 -3
- package/src/lib/components/contacts-section.js.map +1 -1
- package/src/lib/components/crm-export-all-button.d.ts +1 -1
- package/src/lib/components/crm-export-all-button.js.map +1 -1
- package/src/lib/components/crm-send-email-dialog.js +9 -6
- package/src/lib/components/crm-send-email-dialog.js.map +1 -1
- package/src/lib/components/csv-import-drawer.js +2 -2
- package/src/lib/components/csv-import-drawer.js.map +1 -1
- package/src/lib/components/deal-detail-page.js +18 -2
- package/src/lib/components/deal-detail-page.js.map +1 -1
- package/src/lib/components/deal-edit-drawer.js +10 -0
- package/src/lib/components/deal-edit-drawer.js.map +1 -1
- package/src/lib/components/deals-bulk-bar.js +13 -5
- package/src/lib/components/deals-bulk-bar.js.map +1 -1
- package/src/lib/components/lead-campaigns-card.js +6 -0
- package/src/lib/components/lead-campaigns-card.js.map +1 -1
- package/src/lib/components/lead-detail-page.js +25 -5
- package/src/lib/components/lead-detail-page.js.map +1 -1
- package/src/lib/components/lead-properties-card.js +6 -0
- package/src/lib/components/lead-properties-card.js.map +1 -1
- package/src/lib/components/lead-surfaces-note.js +4 -5
- package/src/lib/components/lead-surfaces-note.js.map +1 -1
- package/src/lib/components/lead-unqualify-dialog.js +6 -0
- package/src/lib/components/lead-unqualify-dialog.js.map +1 -1
- package/src/lib/components/leads-bulk-bar.js +28 -3
- package/src/lib/components/leads-bulk-bar.js.map +1 -1
- package/src/lib/components/leads-section.js +36 -7
- package/src/lib/components/leads-section.js.map +1 -1
- package/src/lib/components/org-lead-surfaces-note.js +6 -2
- package/src/lib/components/org-lead-surfaces-note.js.map +1 -1
- package/src/lib/components/recipes-card.js +9 -4
- package/src/lib/components/recipes-card.js.map +1 -1
- package/src/lib/components/record-sharing-card.d.ts +57 -0
- package/src/lib/components/record-sharing-card.js +244 -0
- package/src/lib/components/record-sharing-card.js.map +1 -0
- package/src/lib/components/settings-section.js +7 -0
- package/src/lib/components/settings-section.js.map +1 -1
- package/src/lib/components/share-records-dialog.d.ts +28 -0
- package/src/lib/components/share-records-dialog.js +184 -0
- package/src/lib/components/share-records-dialog.js.map +1 -0
- package/src/lib/components/sharing-rule-drawer.d.ts +37 -0
- package/src/lib/components/sharing-rule-drawer.js +374 -0
- package/src/lib/components/sharing-rule-drawer.js.map +1 -0
- package/src/lib/components/sharing-rules-card.d.ts +24 -0
- package/src/lib/components/sharing-rules-card.js +287 -0
- package/src/lib/components/sharing-rules-card.js.map +1 -0
- package/src/lib/components/use-crm-api.d.ts +1 -1
- package/src/lib/components/use-crm-api.js.map +1 -1
- package/src/lib/components/use-site-route-context.d.ts +25 -0
- package/src/lib/components/use-site-route-context.js +58 -0
- package/src/lib/components/use-site-route-context.js.map +1 -0
- package/src/lib/constants/api-routes.d.ts +31 -0
- package/src/lib/constants/api-routes.js +27 -1
- package/src/lib/constants/api-routes.js.map +1 -1
- package/src/lib/declarations.console-server.d.ts +37 -0
- package/src/lib/declarations.console-server.js +103 -0
- package/src/lib/declarations.console-server.js.map +1 -0
- package/src/lib/declarations.server.d.ts +6 -0
- package/src/lib/declarations.server.js +33 -0
- package/src/lib/declarations.server.js.map +1 -1
- package/src/lib/hooks/use-contact-remove.d.ts +35 -0
- package/src/lib/hooks/use-contact-remove.js +77 -0
- package/src/lib/hooks/use-contact-remove.js.map +1 -0
- package/src/lib/hooks/use-crm-sharing.d.ts +30 -0
- package/src/lib/hooks/use-crm-sharing.js +109 -0
- package/src/lib/hooks/use-crm-sharing.js.map +1 -0
- package/src/lib/model/companies-csv.d.ts +1 -1
- package/src/lib/model/companies-csv.js +2 -2
- package/src/lib/model/companies-csv.js.map +1 -1
- package/src/lib/model/contact-holder.d.ts +68 -0
- package/src/lib/model/contact-holder.js +129 -0
- package/src/lib/model/contact-holder.js.map +1 -0
- package/src/lib/model/contact-interaction-links.d.ts +46 -0
- package/src/lib/model/contact-interaction-links.js +65 -0
- package/src/lib/model/contact-interaction-links.js.map +1 -0
- package/src/lib/model/contact-merge.d.ts +136 -0
- package/src/lib/model/contact-merge.js +412 -0
- package/src/lib/model/contact-merge.js.map +1 -0
- package/src/lib/model/contact-record.d.ts +7 -1
- package/src/lib/model/contact-record.js +6 -5
- package/src/lib/model/contact-record.js.map +1 -1
- package/src/lib/model/contact-remove.d.ts +48 -0
- package/src/lib/model/contact-remove.js +22 -0
- package/src/lib/model/contact-remove.js.map +1 -0
- package/src/lib/model/contacts-bulk-writes.d.ts +2 -71
- package/src/lib/model/contacts-bulk-writes.js +2 -82
- package/src/lib/model/contacts-bulk-writes.js.map +1 -1
- package/src/lib/model/contacts-csv.d.ts +2 -2
- package/src/lib/model/contacts-csv.js +2 -2
- package/src/lib/model/contacts-csv.js.map +1 -1
- package/src/lib/model/crm-csv.d.ts +239 -0
- package/src/lib/model/crm-csv.js +467 -0
- package/src/lib/model/crm-csv.js.map +1 -0
- package/src/lib/model/crm-digest.d.ts +185 -0
- package/src/lib/model/crm-digest.js +272 -0
- package/src/lib/model/crm-digest.js.map +1 -0
- package/src/lib/model/crm-import.d.ts +7 -1
- package/src/lib/model/crm-import.js +2 -1
- package/src/lib/model/crm-import.js.map +1 -1
- package/src/lib/model/crm-record-routes.d.ts +5 -0
- package/src/lib/model/crm-record-routes.js +7 -0
- package/src/lib/model/crm-record-routes.js.map +1 -1
- package/src/lib/model/crm-routes.d.ts +6 -5
- package/src/lib/model/crm-routes.js +7 -7
- package/src/lib/model/crm-routes.js.map +1 -1
- package/src/lib/model/crm-search-sources.d.ts +15 -0
- package/src/lib/model/crm-search-sources.js +162 -0
- package/src/lib/model/crm-search-sources.js.map +1 -0
- package/src/lib/model/crm-sharing-api.d.ts +32 -0
- package/src/lib/model/crm-sharing-api.js +59 -0
- package/src/lib/model/crm-sharing-api.js.map +1 -0
- package/src/lib/model/crm-sharing.d.ts +333 -0
- package/src/lib/model/crm-sharing.js +603 -0
- package/src/lib/model/crm-sharing.js.map +1 -0
- package/src/lib/model/deals-csv.d.ts +1 -1
- package/src/lib/model/deals-csv.js +4 -5
- package/src/lib/model/deals-csv.js.map +1 -1
- package/src/lib/model/lead-filters.d.ts +1 -1
- package/src/lib/model/leads-csv.d.ts +1 -1
- package/src/lib/model/leads-csv.js +1 -1
- package/src/lib/model/leads-csv.js.map +1 -1
- package/src/lib/model/tasks-csv.d.ts +1 -1
- package/src/lib/model/tasks-csv.js +1 -1
- package/src/lib/model/tasks-csv.js.map +1 -1
- package/src/lib/plan-entitlements.d.ts +75 -0
- package/src/lib/plan-entitlements.js +56 -0
- package/src/lib/plan-entitlements.js.map +1 -0
- package/src/lib/plugin.js +3 -0
- package/src/lib/plugin.js.map +1 -1
- package/src/lib/server/api-v1/contacts-merge.d.ts +20 -0
- package/src/lib/server/api-v1/contacts-merge.js +120 -0
- package/src/lib/server/api-v1/contacts-merge.js.map +1 -0
- package/src/lib/server/api-v1/contacts.d.ts +18 -0
- package/src/lib/server/api-v1/contacts.js +1076 -0
- package/src/lib/server/api-v1/contacts.js.map +1 -0
- package/src/lib/server/api-v1/crm-activities.d.ts +18 -0
- package/src/lib/server/api-v1/crm-activities.js +269 -0
- package/src/lib/server/api-v1/crm-activities.js.map +1 -0
- package/src/lib/server/api-v1/crm-companies.d.ts +18 -0
- package/src/lib/server/api-v1/crm-companies.js +391 -0
- package/src/lib/server/api-v1/crm-companies.js.map +1 -0
- package/src/lib/server/api-v1/crm-deals.d.ts +18 -0
- package/src/lib/server/api-v1/crm-deals.js +631 -0
- package/src/lib/server/api-v1/crm-deals.js.map +1 -0
- package/src/lib/server/api-v1/crm-email-templates.d.ts +18 -0
- package/src/lib/server/api-v1/crm-email-templates.js +336 -0
- package/src/lib/server/api-v1/crm-email-templates.js.map +1 -0
- package/src/lib/server/api-v1/crm-leads.d.ts +18 -0
- package/src/lib/server/api-v1/crm-leads.js +832 -0
- package/src/lib/server/api-v1/crm-leads.js.map +1 -0
- package/src/lib/server/api-v1/crm-pipelines.d.ts +76 -0
- package/src/lib/server/api-v1/crm-pipelines.js +146 -0
- package/src/lib/server/api-v1/crm-pipelines.js.map +1 -0
- package/src/lib/server/api-v1/crm-shared.d.ts +271 -0
- package/src/lib/server/api-v1/crm-shared.js +436 -0
- package/src/lib/server/api-v1/crm-shared.js.map +1 -0
- package/src/lib/server/api-v1/crm-tasks.d.ts +18 -0
- package/src/lib/server/api-v1/crm-tasks.js +398 -0
- package/src/lib/server/api-v1/crm-tasks.js.map +1 -0
- package/src/lib/server/api-v1/openapi.d.ts +29 -0
- package/src/lib/server/api-v1/openapi.js +985 -0
- package/src/lib/server/api-v1/openapi.js.map +1 -0
- package/src/lib/server/api-v1/usage.d.ts +26 -0
- package/src/lib/server/api-v1/usage.js +73 -0
- package/src/lib/server/api-v1/usage.js.map +1 -0
- package/src/lib/server/consent-group-participant.js +1 -1
- package/src/lib/server/consent-group-participant.js.map +1 -1
- package/src/lib/server/contact-lifecycle-floor.d.ts +89 -0
- package/src/lib/server/contact-lifecycle-floor.js +91 -0
- package/src/lib/server/contact-lifecycle-floor.js.map +1 -0
- package/src/lib/server/contact-remove.d.ts +75 -0
- package/src/lib/server/contact-remove.js +244 -0
- package/src/lib/server/contact-remove.js.map +1 -0
- package/src/lib/server/contact-update.js +2 -1
- package/src/lib/server/contact-update.js.map +1 -1
- package/src/lib/server/contacts-import.d.ts +47 -11
- package/src/lib/server/contacts-import.js +171 -71
- package/src/lib/server/contacts-import.js.map +1 -1
- package/src/lib/server/contacts-merge.d.ts +1 -1
- package/src/lib/server/contacts-merge.js +3 -2
- package/src/lib/server/contacts-merge.js.map +1 -1
- package/src/lib/server/convert-host-lead.d.ts +189 -0
- package/src/lib/server/convert-host-lead.js +518 -0
- package/src/lib/server/convert-host-lead.js.map +1 -0
- package/src/lib/server/crm-sharing.d.ts +108 -0
- package/src/lib/server/crm-sharing.js +790 -0
- package/src/lib/server/crm-sharing.js.map +1 -0
- package/src/lib/server/daily-digest-route.d.ts +107 -0
- package/src/lib/server/daily-digest-route.js +588 -0
- package/src/lib/server/daily-digest-route.js.map +1 -0
- package/src/lib/server/export-route.d.ts +60 -0
- package/src/lib/server/export-route.js +447 -0
- package/src/lib/server/export-route.js.map +1 -0
- package/src/lib/server/inbound-route.d.ts +74 -0
- package/src/lib/server/inbound-route.js +257 -0
- package/src/lib/server/inbound-route.js.map +1 -0
- package/src/lib/server/lead-convert.d.ts +1 -1
- package/src/lib/server/lead-convert.js +2 -2
- package/src/lib/server/lead-convert.js.map +1 -1
- package/src/lib/server/merge-contacts.d.ts +55 -0
- package/src/lib/server/merge-contacts.js +274 -0
- package/src/lib/server/merge-contacts.js.map +1 -0
- package/src/lib/server/pipeline-record-index.d.ts +36 -0
- package/src/lib/server/pipeline-record-index.js +87 -0
- package/src/lib/server/pipeline-record-index.js.map +1 -0
- package/src/lib/server/record-facts.js +2 -1
- package/src/lib/server/record-facts.js.map +1 -1
- package/src/lib/server/task-reminders-route.d.ts +82 -0
- package/src/lib/server/task-reminders-route.js +497 -0
- package/src/lib/server/task-reminders-route.js.map +1 -0
- package/src/lib/server-deal-stage.js +2 -1
- package/src/lib/server-deal-stage.js.map +1 -1
- package/src/lib/server.d.ts +5 -2
- package/src/lib/server.js +47 -2
- package/src/lib/server.js.map +1 -1
- package/src/lib/testing/stand-in-site-record-routes.d.ts +26 -0
- package/src/lib/testing/stand-in-site-record-routes.js +55 -0
- package/src/lib/testing/stand-in-site-record-routes.js.map +1 -0
- package/src/lib/usage-axes.d.ts +35 -0
- package/src/lib/usage-axes.js +68 -0
- package/src/lib/usage-axes.js.map +1 -0
- package/src/lib/components/use-emails-hub-path.d.ts +0 -24
- package/src/lib/components/use-emails-hub-path.js +0 -59
- package/src/lib/components/use-emails-hub-path.js.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
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 { PluginUsageAxesDeclaration } from '@aglyn/aglyn/plugin-manager/plugin-usage-axes';
|
|
18
|
+
/**
|
|
19
|
+
* THE CRM'S METER (AGL-3080): the records band — contacts, companies and
|
|
20
|
+
* deals, counted together — in the platform's cost model and utilization
|
|
21
|
+
* table. Compiled into core by the manifest generator (`register.usageAxes`).
|
|
22
|
+
*
|
|
23
|
+
* Priced at `perContactMonth`. The rate was measured on a contact, the most
|
|
24
|
+
* expensive of the three to hold, so it over-covers a company or a deal
|
|
25
|
+
* rather than under-pricing one. `crmRecordsCount` REPLACES `contactsCount`
|
|
26
|
+
* when a rollup carries it — the contacts are inside the sum, and pricing
|
|
27
|
+
* both would charge the same people twice — and `contactsCount` alone is
|
|
28
|
+
* read only on a month written before the band was widened (AGL-2611). The
|
|
29
|
+
* two components are recorded so the sum stays legible.
|
|
30
|
+
*
|
|
31
|
+
* The band is org-wide despite the entitlement's name: the records gate
|
|
32
|
+
* compares `contactsPerHost` against an org-wide headcount, and the tier
|
|
33
|
+
* model costs it unexpanded.
|
|
34
|
+
*/
|
|
35
|
+
export declare function crmUsageAxes(): PluginUsageAxesDeclaration;
|
|
@@ -0,0 +1,68 @@
|
|
|
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'S METER (AGL-3080): the records band — contacts, companies and
|
|
18
|
+
* deals, counted together — in the platform's cost model and utilization
|
|
19
|
+
* table. Compiled into core by the manifest generator (`register.usageAxes`).
|
|
20
|
+
*
|
|
21
|
+
* Priced at `perContactMonth`. The rate was measured on a contact, the most
|
|
22
|
+
* expensive of the three to hold, so it over-covers a company or a deal
|
|
23
|
+
* rather than under-pricing one. `crmRecordsCount` REPLACES `contactsCount`
|
|
24
|
+
* when a rollup carries it — the contacts are inside the sum, and pricing
|
|
25
|
+
* both would charge the same people twice — and `contactsCount` alone is
|
|
26
|
+
* read only on a month written before the band was widened (AGL-2611). The
|
|
27
|
+
* two components are recorded so the sum stays legible.
|
|
28
|
+
*
|
|
29
|
+
* The band is org-wide despite the entitlement's name: the records gate
|
|
30
|
+
* compares `contactsPerHost` against an org-wide headcount, and the tier
|
|
31
|
+
* model costs it unexpanded.
|
|
32
|
+
*/ export function crmUsageAxes() {
|
|
33
|
+
return {
|
|
34
|
+
costAxes: [
|
|
35
|
+
{
|
|
36
|
+
id: 'contacts',
|
|
37
|
+
order: 60,
|
|
38
|
+
fields: [
|
|
39
|
+
'crmRecordsCount'
|
|
40
|
+
],
|
|
41
|
+
fallbackFields: [
|
|
42
|
+
'contactsCount'
|
|
43
|
+
],
|
|
44
|
+
recordedFields: [
|
|
45
|
+
'companiesCount',
|
|
46
|
+
'dealsCount'
|
|
47
|
+
],
|
|
48
|
+
rate: 'perContactMonth'
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
bands: [
|
|
52
|
+
{
|
|
53
|
+
id: 'contactsCount',
|
|
54
|
+
label: 'CRM records',
|
|
55
|
+
order: 70,
|
|
56
|
+
fields: [
|
|
57
|
+
'crmRecordsCount'
|
|
58
|
+
],
|
|
59
|
+
fallbackFields: [
|
|
60
|
+
'contactsCount'
|
|
61
|
+
],
|
|
62
|
+
entitlement: 'contactsPerHost'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=usage-axes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/crm/src/lib/usage-axes.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 { PluginUsageAxesDeclaration } from '@aglyn/aglyn/plugin-manager/plugin-usage-axes'\n\n/**\n * THE CRM'S METER (AGL-3080): the records band — contacts, companies and\n * deals, counted together — in the platform's cost model and utilization\n * table. Compiled into core by the manifest generator (`register.usageAxes`).\n *\n * Priced at `perContactMonth`. The rate was measured on a contact, the most\n * expensive of the three to hold, so it over-covers a company or a deal\n * rather than under-pricing one. `crmRecordsCount` REPLACES `contactsCount`\n * when a rollup carries it — the contacts are inside the sum, and pricing\n * both would charge the same people twice — and `contactsCount` alone is\n * read only on a month written before the band was widened (AGL-2611). The\n * two components are recorded so the sum stays legible.\n *\n * The band is org-wide despite the entitlement's name: the records gate\n * compares `contactsPerHost` against an org-wide headcount, and the tier\n * model costs it unexpanded.\n */\nexport function crmUsageAxes(): PluginUsageAxesDeclaration {\n return {\n costAxes: [\n {\n id: 'contacts',\n order: 60,\n fields: ['crmRecordsCount'],\n fallbackFields: ['contactsCount'],\n recordedFields: ['companiesCount', 'dealsCount'],\n rate: 'perContactMonth',\n },\n ],\n bands: [\n {\n id: 'contactsCount',\n label: 'CRM records',\n order: 70,\n fields: ['crmRecordsCount'],\n fallbackFields: ['contactsCount'],\n entitlement: 'contactsPerHost',\n },\n ],\n }\n}\n"],"names":["crmUsageAxes","costAxes","id","order","fields","fallbackFields","recordedFields","rate","bands","label","entitlement"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAID;;;;;;;;;;;;;;;;CAgBC,GACD,OAAO,SAASA;IACd,OAAO;QACLC,UAAU;YACR;gBACEC,IAAI;gBACJC,OAAO;gBACPC,QAAQ;oBAAC;iBAAkB;gBAC3BC,gBAAgB;oBAAC;iBAAgB;gBACjCC,gBAAgB;oBAAC;oBAAkB;iBAAa;gBAChDC,MAAM;YACR;SACD;QACDC,OAAO;YACL;gBACEN,IAAI;gBACJO,OAAO;gBACPN,OAAO;gBACPC,QAAQ;oBAAC;iBAAkB;gBAC3BC,gBAAgB;oBAAC;iBAAgB;gBACjCK,aAAa;YACf;SACD;IACH;AACF"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Emails hub of the site this page is on — `/{org}/hosts/{site}/emails`
|
|
3
|
-
* — or `null` when the page is not under a site.
|
|
4
|
-
*
|
|
5
|
-
* The sibling-hub pattern the Emails console uses to reach Marketing, in the
|
|
6
|
-
* other direction: a CRM record page links a campaign entry to the email's
|
|
7
|
-
* own report, which lives on the Emails surface, and the shell's `basePath`
|
|
8
|
-
* names only this surface. Read off the URL rather than derived from
|
|
9
|
-
* `basePath`, because the `[host]` segment is the site's subdomain and
|
|
10
|
-
* nothing a CRM component holds says what that is.
|
|
11
|
-
*
|
|
12
|
-
* ⚠️ Under a site, THIS SITE's hub only. A record page under one site cannot
|
|
13
|
-
* address a sibling site's Emails console without that site's subdomain,
|
|
14
|
-
* which a contact document does not carry.
|
|
15
|
-
*
|
|
16
|
-
* At the ORGANIZATION level (AGL-2634) the URL names no site, and the mount
|
|
17
|
-
* holds the org's site list instead: handed a `hostId`, this answers that
|
|
18
|
-
* site's hub — `${hostsPath}/${subdomain}/emails` — or `null` for a site
|
|
19
|
-
* whose subdomain the list could not answer, which is named and not linked.
|
|
20
|
-
* Handed none, `null`: an org-level page has no hub of its own to fall
|
|
21
|
-
* back to.
|
|
22
|
-
*/
|
|
23
|
-
export declare function useEmailsHubPath(hostId?: string | null): string | null;
|
|
24
|
-
export default useEmailsHubPath;
|
|
@@ -1,59 +0,0 @@
|
|
|
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 { buildRoute, Route } from "@aglyn/aglyn";
|
|
18
|
-
import { useParams } from "next/navigation";
|
|
19
|
-
import { useCrmOrgMount } from "../hooks/use-crm-org-mount.js";
|
|
20
|
-
/**
|
|
21
|
-
* The Emails hub of the site this page is on — `/{org}/hosts/{site}/emails`
|
|
22
|
-
* — or `null` when the page is not under a site.
|
|
23
|
-
*
|
|
24
|
-
* The sibling-hub pattern the Emails console uses to reach Marketing, in the
|
|
25
|
-
* other direction: a CRM record page links a campaign entry to the email's
|
|
26
|
-
* own report, which lives on the Emails surface, and the shell's `basePath`
|
|
27
|
-
* names only this surface. Read off the URL rather than derived from
|
|
28
|
-
* `basePath`, because the `[host]` segment is the site's subdomain and
|
|
29
|
-
* nothing a CRM component holds says what that is.
|
|
30
|
-
*
|
|
31
|
-
* ⚠️ Under a site, THIS SITE's hub only. A record page under one site cannot
|
|
32
|
-
* address a sibling site's Emails console without that site's subdomain,
|
|
33
|
-
* which a contact document does not carry.
|
|
34
|
-
*
|
|
35
|
-
* At the ORGANIZATION level (AGL-2634) the URL names no site, and the mount
|
|
36
|
-
* holds the org's site list instead: handed a `hostId`, this answers that
|
|
37
|
-
* site's hub — `${hostsPath}/${subdomain}/emails` — or `null` for a site
|
|
38
|
-
* whose subdomain the list could not answer, which is named and not linked.
|
|
39
|
-
* Handed none, `null`: an org-level page has no hub of its own to fall
|
|
40
|
-
* back to.
|
|
41
|
-
*/ export function useEmailsHubPath(hostId) {
|
|
42
|
-
const params = useParams();
|
|
43
|
-
const mount = useCrmOrgMount();
|
|
44
|
-
const orgSlug = params == null ? void 0 : params.orgSlug;
|
|
45
|
-
const host = params == null ? void 0 : params.host;
|
|
46
|
-
if (orgSlug && host) {
|
|
47
|
-
return buildRoute(Route.HOST_PLUGIN, {
|
|
48
|
-
orgSlug,
|
|
49
|
-
host,
|
|
50
|
-
pluginSlug: 'emails'
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
if (!mount || !hostId) return null;
|
|
54
|
-
const subdomain = mount.siteSubdomain(hostId);
|
|
55
|
-
return subdomain ? `${mount.hostsPath}/${encodeURIComponent(subdomain)}/emails` : null;
|
|
56
|
-
}
|
|
57
|
-
export default useEmailsHubPath;
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=use-emails-hub-path.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/use-emails-hub-path.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'use client'\n\nimport { buildRoute, Route } from '@aglyn/aglyn'\nimport { useParams } from 'next/navigation'\nimport { useCrmOrgMount } from '../hooks/use-crm-org-mount'\n\n/**\n * The Emails hub of the site this page is on — `/{org}/hosts/{site}/emails`\n * — or `null` when the page is not under a site.\n *\n * The sibling-hub pattern the Emails console uses to reach Marketing, in the\n * other direction: a CRM record page links a campaign entry to the email's\n * own report, which lives on the Emails surface, and the shell's `basePath`\n * names only this surface. Read off the URL rather than derived from\n * `basePath`, because the `[host]` segment is the site's subdomain and\n * nothing a CRM component holds says what that is.\n *\n * ⚠️ Under a site, THIS SITE's hub only. A record page under one site cannot\n * address a sibling site's Emails console without that site's subdomain,\n * which a contact document does not carry.\n *\n * At the ORGANIZATION level (AGL-2634) the URL names no site, and the mount\n * holds the org's site list instead: handed a `hostId`, this answers that\n * site's hub — `${hostsPath}/${subdomain}/emails` — or `null` for a site\n * whose subdomain the list could not answer, which is named and not linked.\n * Handed none, `null`: an org-level page has no hub of its own to fall\n * back to.\n */\nexport function useEmailsHubPath(hostId?: string | null): string | null {\n const params = useParams<{ orgSlug: string; host: string }>()\n const mount = useCrmOrgMount()\n const orgSlug = params?.orgSlug\n const host = params?.host\n if (orgSlug && host) {\n return buildRoute(Route.HOST_PLUGIN, { orgSlug, host, pluginSlug: 'emails' })\n }\n if (!mount || !hostId) return null\n const subdomain = mount.siteSubdomain(hostId)\n return subdomain ? `${mount.hostsPath}/${encodeURIComponent(subdomain)}/emails` : null\n}\n\nexport default useEmailsHubPath\n"],"names":["buildRoute","Route","useParams","useCrmOrgMount","useEmailsHubPath","hostId","params","mount","orgSlug","host","HOST_PLUGIN","pluginSlug","subdomain","siteSubdomain","hostsPath","encodeURIComponent"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;AAEA,SAASA,UAAU,EAAEC,KAAK,QAAQ,eAAc;AAChD,SAASC,SAAS,QAAQ,kBAAiB;AAC3C,SAASC,cAAc,QAAQ,gCAA4B;AAE3D;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,SAASC,iBAAiBC,MAAsB;IACrD,MAAMC,SAASJ;IACf,MAAMK,QAAQJ;IACd,MAAMK,UAAUF,0BAAAA,OAAQE,OAAO;IAC/B,MAAMC,OAAOH,0BAAAA,OAAQG,IAAI;IACzB,IAAID,WAAWC,MAAM;QACnB,OAAOT,WAAWC,MAAMS,WAAW,EAAE;YAAEF;YAASC;YAAME,YAAY;QAAS;IAC7E;IACA,IAAI,CAACJ,SAAS,CAACF,QAAQ,OAAO;IAC9B,MAAMO,YAAYL,MAAMM,aAAa,CAACR;IACtC,OAAOO,YAAY,GAAGL,MAAMO,SAAS,CAAC,CAAC,EAAEC,mBAAmBH,WAAW,OAAO,CAAC,GAAG;AACpF;AAEA,eAAeR,iBAAgB"}
|