@aglyn/plugins-crm 1.0.0-beta.179 → 1.0.0-beta.180

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-crm",
3
- "version": "1.0.0-beta.179",
3
+ "version": "1.0.0-beta.180",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,18 +25,18 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.179",
29
- "@aglyn/shared-data-enums": "1.0.0-beta.179",
30
- "@aglyn/shared-data-mdi": "1.0.0-beta.179",
31
- "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.179",
32
- "@aglyn/shared-ui-jsx": "1.0.0-beta.179",
33
- "@aglyn/shared-ui-next": "1.0.0-beta.179",
34
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.179",
35
- "@aglyn/shared-util-email": "1.0.0-beta.179",
36
- "@aglyn/shared-util-http": "1.0.0-beta.179",
37
- "@aglyn/tenant-data-admin": "1.0.0-beta.179",
38
- "@aglyn/tenant-feature-instance": "1.0.0-beta.179",
39
- "@aglyn/tenant-runtime": "1.0.0-beta.179",
28
+ "@aglyn/aglyn": "1.0.0-beta.180",
29
+ "@aglyn/shared-data-enums": "1.0.0-beta.180",
30
+ "@aglyn/shared-data-mdi": "1.0.0-beta.180",
31
+ "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.180",
32
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.180",
33
+ "@aglyn/shared-ui-next": "1.0.0-beta.180",
34
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.180",
35
+ "@aglyn/shared-util-email": "1.0.0-beta.180",
36
+ "@aglyn/shared-util-http": "1.0.0-beta.180",
37
+ "@aglyn/tenant-data-admin": "1.0.0-beta.180",
38
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.180",
39
+ "@aglyn/tenant-runtime": "1.0.0-beta.180",
40
40
  "@dnd-kit/core": "^6.3.1",
41
41
  "@dnd-kit/utilities": "^3.2.2",
42
42
  "@swc/helpers": "0.5.23",
@@ -52,10 +52,10 @@ function hub(context) {
52
52
  }, owner);
53
53
  registerPluginRecordRoute('lead', {
54
54
  list: (context)=>hub(context).section('leads'),
55
- // A lead is keyed by person under ONE site, so the organization's hub
56
- // addresses it by site and id; a caller that names no site has no
57
- // address to be given.
58
- record: (context, id)=>context.host ? hub(context).lead(id) : null
55
+ // One org row per person since AGL-3275, so the id alone addresses a
56
+ // lead at both levels — the organization's hub included, where the
57
+ // organization's Inbox links its leads (AGL-3303).
58
+ record: (context, id)=>hub(context).lead(id)
59
59
  }, owner);
60
60
  registerPluginRecordRoute('company', {
61
61
  list: (context)=>hub(context).section('companies'),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/model/crm-record-routes.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\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 * http://www.apache.org/licenses/LICENSE-2.0\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 { buildRoute, Route } from '@aglyn/aglyn/app-utils/console-routes'\nimport {\n registerPluginRecordRoute,\n type PluginRecordRouteContext,\n} from '@aglyn/aglyn/plugin-manager/plugin-record-routes'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { crmRoutes, type CrmRoutes } from './crm-routes'\n\n/**\n * Where the CRM's records are read, published for every other surface.\n *\n * The Inbox links a lead, a submission links its sender, a form links the\n * people it captured. Each used to import {@link crmRoutes} and spell the\n * CRM's nav slug to do it, which made every one of them a reader of this\n * plugin's address table. They ask the record-route registry now, and get\n * `null` — text instead of a link — in a workspace where the CRM is not\n * loaded, which is also the first time that link stopped pointing at a page\n * the workspace cannot open.\n */\n\n/** The nav slug the shell resolves this plugin's hub by, at either scope. */\nconst CRM_SLUG = 'crm'\n\nfunction hub(context: PluginRecordRouteContext): CrmRoutes {\n return crmRoutes(\n context.host\n ? buildRoute(Route.HOST_PLUGIN, {\n orgSlug: context.orgSlug,\n host: context.host,\n pluginSlug: CRM_SLUG,\n })\n : buildRoute(Route.ORG_PLUGIN, {\n orgSlug: context.orgSlug,\n pluginSlug: CRM_SLUG,\n }),\n )\n}\n\n/** The one narrowing the contacts list publishes: the form that captured them. */\nexport const CRM_CONTACT_FILTER_FORM = 'form'\n\n/**\n * Called from the console registrar. The owner is named rather than read off\n * the loader's marker, so the routes register the same way under a spec that\n * calls the registrar directly.\n */\nexport function registerCrmRecordRoutes(): void {\n const owner = { pluginId: BUNDLE_ID }\n registerPluginRecordRoute('contact', {\n list: (context) => hub(context).section('contacts'),\n record: (context, id) => hub(context).contact(id),\n byEmail: (context, email) => hub(context).contactByEmail(email),\n filtered: (context, filter, value) =>\n filter === CRM_CONTACT_FILTER_FORM\n ? hub(context).contactsByForm(value)\n : null,\n }, owner)\n registerPluginRecordRoute('lead', {\n list: (context) => hub(context).section('leads'),\n // A lead is keyed by person under ONE site, so the organization's hub\n // addresses it by site and id; a caller that names no site has no\n // address to be given.\n record: (context, id) => (context.host ? hub(context).lead(id) : null),\n }, owner)\n registerPluginRecordRoute('company', {\n list: (context) => hub(context).section('companies'),\n record: (context, id) => hub(context).company(id),\n }, owner)\n registerPluginRecordRoute('deal', {\n list: (context) => hub(context).section('deals'),\n record: (context, id) => hub(context).deal(id),\n }, owner)\n}\n"],"names":["buildRoute","Route","registerPluginRecordRoute","BUNDLE_ID","crmRoutes","CRM_SLUG","hub","context","host","HOST_PLUGIN","orgSlug","pluginSlug","ORG_PLUGIN","CRM_CONTACT_FILTER_FORM","registerCrmRecordRoutes","owner","pluginId","list","section","record","id","contact","byEmail","email","contactByEmail","filtered","filter","value","contactsByForm","lead","company","deal"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAED,SAASA,UAAU,EAAEC,KAAK,QAAQ,wCAAuC;AACzE,SACEC,yBAAyB,QAEpB,mDAAkD;AACzD,SAASC,SAAS,QAAQ,gCAA4B;AACtD,SAASC,SAAS,QAAwB,kBAAc;AAExD;;;;;;;;;;CAUC,GAED,2EAA2E,GAC3E,MAAMC,WAAW;AAEjB,SAASC,IAAIC,OAAiC;IAC5C,OAAOH,UACLG,QAAQC,IAAI,GACRR,WAAWC,MAAMQ,WAAW,EAAE;QAC5BC,SAASH,QAAQG,OAAO;QACxBF,MAAMD,QAAQC,IAAI;QAClBG,YAAYN;IACd,KACAL,WAAWC,MAAMW,UAAU,EAAE;QAC3BF,SAASH,QAAQG,OAAO;QACxBC,YAAYN;IACd;AAER;AAEA,gFAAgF,GAChF,OAAO,MAAMQ,0BAA0B,OAAM;AAE7C;;;;CAIC,GACD,OAAO,SAASC;IACd,MAAMC,QAAQ;QAAEC,UAAUb;IAAU;IACpCD,0BAA0B,WAAW;QACnCe,MAAM,CAACV,UAAYD,IAAIC,SAASW,OAAO,CAAC;QACxCC,QAAQ,CAACZ,SAASa,KAAOd,IAAIC,SAASc,OAAO,CAACD;QAC9CE,SAAS,CAACf,SAASgB,QAAUjB,IAAIC,SAASiB,cAAc,CAACD;QACzDE,UAAU,CAAClB,SAASmB,QAAQC,QAC1BD,WAAWb,0BACPP,IAAIC,SAASqB,cAAc,CAACD,SAC5B;IACR,GAAGZ;IACHb,0BAA0B,QAAQ;QAChCe,MAAM,CAACV,UAAYD,IAAIC,SAASW,OAAO,CAAC;QACxC,sEAAsE;QACtE,kEAAkE;QAClE,uBAAuB;QACvBC,QAAQ,CAACZ,SAASa,KAAQb,QAAQC,IAAI,GAAGF,IAAIC,SAASsB,IAAI,CAACT,MAAM;IACnE,GAAGL;IACHb,0BAA0B,WAAW;QACnCe,MAAM,CAACV,UAAYD,IAAIC,SAASW,OAAO,CAAC;QACxCC,QAAQ,CAACZ,SAASa,KAAOd,IAAIC,SAASuB,OAAO,CAACV;IAChD,GAAGL;IACHb,0BAA0B,QAAQ;QAChCe,MAAM,CAACV,UAAYD,IAAIC,SAASW,OAAO,CAAC;QACxCC,QAAQ,CAACZ,SAASa,KAAOd,IAAIC,SAASwB,IAAI,CAACX;IAC7C,GAAGL;AACL"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/model/crm-record-routes.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\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 * http://www.apache.org/licenses/LICENSE-2.0\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 { buildRoute, Route } from '@aglyn/aglyn/app-utils/console-routes'\nimport {\n registerPluginRecordRoute,\n type PluginRecordRouteContext,\n} from '@aglyn/aglyn/plugin-manager/plugin-record-routes'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { crmRoutes, type CrmRoutes } from './crm-routes'\n\n/**\n * Where the CRM's records are read, published for every other surface.\n *\n * The Inbox links a lead, a submission links its sender, a form links the\n * people it captured. Each used to import {@link crmRoutes} and spell the\n * CRM's nav slug to do it, which made every one of them a reader of this\n * plugin's address table. They ask the record-route registry now, and get\n * `null` — text instead of a link — in a workspace where the CRM is not\n * loaded, which is also the first time that link stopped pointing at a page\n * the workspace cannot open.\n */\n\n/** The nav slug the shell resolves this plugin's hub by, at either scope. */\nconst CRM_SLUG = 'crm'\n\nfunction hub(context: PluginRecordRouteContext): CrmRoutes {\n return crmRoutes(\n context.host\n ? buildRoute(Route.HOST_PLUGIN, {\n orgSlug: context.orgSlug,\n host: context.host,\n pluginSlug: CRM_SLUG,\n })\n : buildRoute(Route.ORG_PLUGIN, {\n orgSlug: context.orgSlug,\n pluginSlug: CRM_SLUG,\n }),\n )\n}\n\n/** The one narrowing the contacts list publishes: the form that captured them. */\nexport const CRM_CONTACT_FILTER_FORM = 'form'\n\n/**\n * Called from the console registrar. The owner is named rather than read off\n * the loader's marker, so the routes register the same way under a spec that\n * calls the registrar directly.\n */\nexport function registerCrmRecordRoutes(): void {\n const owner = { pluginId: BUNDLE_ID }\n registerPluginRecordRoute('contact', {\n list: (context) => hub(context).section('contacts'),\n record: (context, id) => hub(context).contact(id),\n byEmail: (context, email) => hub(context).contactByEmail(email),\n filtered: (context, filter, value) =>\n filter === CRM_CONTACT_FILTER_FORM\n ? hub(context).contactsByForm(value)\n : null,\n }, owner)\n registerPluginRecordRoute('lead', {\n list: (context) => hub(context).section('leads'),\n // One org row per person since AGL-3275, so the id alone addresses a\n // lead at both levels — the organization's hub included, where the\n // organization's Inbox links its leads (AGL-3303).\n record: (context, id) => hub(context).lead(id),\n }, owner)\n registerPluginRecordRoute('company', {\n list: (context) => hub(context).section('companies'),\n record: (context, id) => hub(context).company(id),\n }, owner)\n registerPluginRecordRoute('deal', {\n list: (context) => hub(context).section('deals'),\n record: (context, id) => hub(context).deal(id),\n }, owner)\n}\n"],"names":["buildRoute","Route","registerPluginRecordRoute","BUNDLE_ID","crmRoutes","CRM_SLUG","hub","context","host","HOST_PLUGIN","orgSlug","pluginSlug","ORG_PLUGIN","CRM_CONTACT_FILTER_FORM","registerCrmRecordRoutes","owner","pluginId","list","section","record","id","contact","byEmail","email","contactByEmail","filtered","filter","value","contactsByForm","lead","company","deal"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAED,SAASA,UAAU,EAAEC,KAAK,QAAQ,wCAAuC;AACzE,SACEC,yBAAyB,QAEpB,mDAAkD;AACzD,SAASC,SAAS,QAAQ,gCAA4B;AACtD,SAASC,SAAS,QAAwB,kBAAc;AAExD;;;;;;;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