@aglyn/plugins-marketing 1.0.0-beta.269 → 1.0.0-beta.270
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 +16 -16
- package/src/lib/components/org-site-picker-button.d.ts +2 -0
- package/src/lib/components/org-site-picker-button.js +14 -8
- package/src/lib/components/org-site-picker-button.js.map +1 -1
- package/src/lib/native-nav.d.ts +18 -0
- package/src/lib/native-nav.js +60 -0
- package/src/lib/native-nav.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aglyn/plugins-marketing",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.270",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/aglyn": "1.0.0-beta.
|
|
29
|
-
"@aglyn/shared-data-enums": "1.0.0-beta.
|
|
30
|
-
"@aglyn/shared-data-mdi": "1.0.0-beta.
|
|
31
|
-
"@aglyn/shared-ui-email-campaigns": "1.0.0-beta.
|
|
32
|
-
"@aglyn/shared-ui-jsx": "1.0.0-beta.
|
|
33
|
-
"@aglyn/shared-ui-jsx-forms": "1.0.0-beta.
|
|
34
|
-
"@aglyn/shared-ui-next": "1.0.0-beta.
|
|
35
|
-
"@aglyn/shared-ui-snackstack": "1.0.0-beta.
|
|
36
|
-
"@aglyn/shared-util-email": "1.0.0-beta.
|
|
37
|
-
"@aglyn/shared-util-http": "1.0.0-beta.
|
|
38
|
-
"@aglyn/shared-util-timestamp": "1.0.0-beta.
|
|
39
|
-
"@aglyn/shared-util-tools": "1.0.0-beta.
|
|
40
|
-
"@aglyn/tenant-data-admin": "1.0.0-beta.
|
|
41
|
-
"@aglyn/tenant-feature-instance": "1.0.0-beta.
|
|
42
|
-
"@aglyn/tenant-runtime": "1.0.0-beta.
|
|
28
|
+
"@aglyn/aglyn": "1.0.0-beta.270",
|
|
29
|
+
"@aglyn/shared-data-enums": "1.0.0-beta.270",
|
|
30
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.270",
|
|
31
|
+
"@aglyn/shared-ui-email-campaigns": "1.0.0-beta.270",
|
|
32
|
+
"@aglyn/shared-ui-jsx": "1.0.0-beta.270",
|
|
33
|
+
"@aglyn/shared-ui-jsx-forms": "1.0.0-beta.270",
|
|
34
|
+
"@aglyn/shared-ui-next": "1.0.0-beta.270",
|
|
35
|
+
"@aglyn/shared-ui-snackstack": "1.0.0-beta.270",
|
|
36
|
+
"@aglyn/shared-util-email": "1.0.0-beta.270",
|
|
37
|
+
"@aglyn/shared-util-http": "1.0.0-beta.270",
|
|
38
|
+
"@aglyn/shared-util-timestamp": "1.0.0-beta.270",
|
|
39
|
+
"@aglyn/shared-util-tools": "1.0.0-beta.270",
|
|
40
|
+
"@aglyn/tenant-data-admin": "1.0.0-beta.270",
|
|
41
|
+
"@aglyn/tenant-feature-instance": "1.0.0-beta.270",
|
|
42
|
+
"@aglyn/tenant-runtime": "1.0.0-beta.270",
|
|
43
43
|
"@swc/helpers": "0.5.23"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type MarketingOrgMount } from './marketing-org-mount';
|
|
2
|
+
/** Why the picker is off in an organization with no sites (AGL-3982). */
|
|
3
|
+
export declare const ORG_SITE_PICKER_NO_SITES = "Add a site first: this is set up on one of your sites, and the organization has none yet.";
|
|
2
4
|
/** A site's own Marketing hub at `section`, or `null` when it has no address. */
|
|
3
5
|
export declare function orgSiteSectionHref(mount: MarketingOrgMount, hostId: string, section: string): string | null;
|
|
4
6
|
export interface OrgSitePickerButtonProps {
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
19
|
import { AppLink } from "@aglyn/shared-ui-jsx";
|
|
20
|
+
import { BlockedControl } from "@aglyn/shared-ui-jsx/components/blocked-control.component";
|
|
20
21
|
import { Button, Menu, MenuItem } from "@mui/material";
|
|
21
22
|
import { forwardRef, useState } from "react";
|
|
22
23
|
import { orgSiteHubPath } from "./marketing-org-mount.js";
|
|
24
|
+
/** Why the picker is off in an organization with no sites (AGL-3982). */ export const ORG_SITE_PICKER_NO_SITES = 'Add a site first: this is set up on one of your sites, and the organization has none yet.';
|
|
23
25
|
/** A site's own Marketing hub at `section`, or `null` when it has no address. */ export function orgSiteSectionHref(mount, hostId, section) {
|
|
24
26
|
const hub = orgSiteHubPath(mount, hostId, 'marketing');
|
|
25
27
|
return hub ? `${hub}/${section}` : null;
|
|
@@ -64,14 +66,18 @@ MenuItemLink.displayName = 'OrgSitePickerMenuItemLink';
|
|
|
64
66
|
}
|
|
65
67
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
66
68
|
children: [
|
|
67
|
-
/*#__PURE__*/ _jsx(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
/*#__PURE__*/ _jsx(BlockedControl, {
|
|
70
|
+
blocked: mount.hostsReady && !sites.length,
|
|
71
|
+
reason: ORG_SITE_PICKER_NO_SITES,
|
|
72
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
73
|
+
size: "small",
|
|
74
|
+
color: "primary",
|
|
75
|
+
variant: "contained",
|
|
76
|
+
disabled: !sites.length,
|
|
77
|
+
"aria-haspopup": "true",
|
|
78
|
+
onClick: (event)=>setAnchorEl(event.currentTarget),
|
|
79
|
+
children: label
|
|
80
|
+
})
|
|
75
81
|
}),
|
|
76
82
|
/*#__PURE__*/ _jsx(Menu, {
|
|
77
83
|
anchorEl: anchorEl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/plugins/marketing/src/lib/components/org-site-picker-button.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 { AppLink, type AppLinkNakedLinkProps } from '@aglyn/shared-ui-jsx'\nimport { Button, Menu, MenuItem } from '@mui/material'\nimport { forwardRef, useState } from 'react'\nimport { orgSiteHubPath, type MarketingOrgMount } from './marketing-org-mount'\n\n/** A site's own Marketing hub at `section`, or `null` when it has no address. */\nexport function orgSiteSectionHref(\n mount: MarketingOrgMount,\n hostId: string,\n section: string,\n): string | null {\n const hub = orgSiteHubPath(mount, hostId, 'marketing')\n return hub ? `${hub}/${section}` : null\n}\n\n/** The anchor a site in the menu renders as — a real link, like every other. */\nconst MenuItemLink = forwardRef<any, AppLinkNakedLinkProps>((props, ref) => (\n <AppLink ref={ref} {...props} componentVariant={'naked'} />\n))\nMenuItemLink.displayName = 'OrgSitePickerMenuItemLink'\n\nexport interface OrgSitePickerButtonProps {\n mount: MarketingOrgMount\n /** The section of the site's Marketing hub to open — `overlays`, `experiments`. */\n section: string\n label: string\n}\n\n/**\n * The org hub's way into anything that is EDITED on a site: a button that\n * opens one of the organization's sites at a section of its own Marketing\n * hub.\n *\n * An overlay is drawn on one site's pages and an A/B test splits one site's\n * traffic, so their editors belong to the site — the org hub lists them and\n * sends the reader to the site to write. With one site there is nothing to\n * choose and the button is the link; with several it opens a menu of them.\n * A site the shell could not give a subdomain is listed and disabled: it has\n * no hub address to open.\n */\nexport function OrgSitePickerButton(props: OrgSitePickerButtonProps) {\n const { mount, section, label } = props\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)\n const sites = mount.hosts\n\n if (sites.length === 1) {\n const href = orgSiteSectionHref(mount, sites[0].id, section)\n return href ? (\n <AppLink\n componentVariant=\"button\"\n href={href}\n size=\"small\"\n color=\"primary\"\n variant=\"contained\"\n >\n {label}\n </AppLink>\n ) : (\n <Button size=\"small\" color=\"primary\" variant=\"contained\" disabled>\n {label}\n </Button>\n )\n }\n\n return (\n <>\n <Button\n
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/marketing/src/lib/components/org-site-picker-button.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 { AppLink, type AppLinkNakedLinkProps } from '@aglyn/shared-ui-jsx'\nimport { BlockedControl } from '@aglyn/shared-ui-jsx/components/blocked-control.component'\nimport { Button, Menu, MenuItem } from '@mui/material'\nimport { forwardRef, useState } from 'react'\nimport { orgSiteHubPath, type MarketingOrgMount } from './marketing-org-mount'\n\n/** Why the picker is off in an organization with no sites (AGL-3982). */\nexport const ORG_SITE_PICKER_NO_SITES =\n 'Add a site first: this is set up on one of your sites, and the organization has none yet.'\n\n/** A site's own Marketing hub at `section`, or `null` when it has no address. */\nexport function orgSiteSectionHref(\n mount: MarketingOrgMount,\n hostId: string,\n section: string,\n): string | null {\n const hub = orgSiteHubPath(mount, hostId, 'marketing')\n return hub ? `${hub}/${section}` : null\n}\n\n/** The anchor a site in the menu renders as — a real link, like every other. */\nconst MenuItemLink = forwardRef<any, AppLinkNakedLinkProps>((props, ref) => (\n <AppLink ref={ref} {...props} componentVariant={'naked'} />\n))\nMenuItemLink.displayName = 'OrgSitePickerMenuItemLink'\n\nexport interface OrgSitePickerButtonProps {\n mount: MarketingOrgMount\n /** The section of the site's Marketing hub to open — `overlays`, `experiments`. */\n section: string\n label: string\n}\n\n/**\n * The org hub's way into anything that is EDITED on a site: a button that\n * opens one of the organization's sites at a section of its own Marketing\n * hub.\n *\n * An overlay is drawn on one site's pages and an A/B test splits one site's\n * traffic, so their editors belong to the site — the org hub lists them and\n * sends the reader to the site to write. With one site there is nothing to\n * choose and the button is the link; with several it opens a menu of them.\n * A site the shell could not give a subdomain is listed and disabled: it has\n * no hub address to open.\n */\nexport function OrgSitePickerButton(props: OrgSitePickerButtonProps) {\n const { mount, section, label } = props\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)\n const sites = mount.hosts\n\n if (sites.length === 1) {\n const href = orgSiteSectionHref(mount, sites[0].id, section)\n return href ? (\n <AppLink\n componentVariant=\"button\"\n href={href}\n size=\"small\"\n color=\"primary\"\n variant=\"contained\"\n >\n {label}\n </AppLink>\n ) : (\n <Button size=\"small\" color=\"primary\" variant=\"contained\" disabled>\n {label}\n </Button>\n )\n }\n\n return (\n <>\n {/* No sites yet (AGL-3982): the button stays, saying why, once the\n shell has settled the list — never while it is still loading. */}\n <BlockedControl blocked={mount.hostsReady && !sites.length} reason={ORG_SITE_PICKER_NO_SITES}>\n <Button\n size=\"small\"\n color=\"primary\"\n variant=\"contained\"\n disabled={!sites.length}\n aria-haspopup=\"true\"\n onClick={(event) => setAnchorEl(event.currentTarget)}\n >\n {label}\n </Button>\n </BlockedControl>\n <Menu\n anchorEl={anchorEl}\n open={Boolean(anchorEl)}\n onClose={() => setAnchorEl(null)}\n slotProps={{ list: { 'aria-label': `${label} on which site` } }}\n >\n {sites.map((site) => {\n const href = orgSiteSectionHref(mount, site.id, section)\n return (\n <MenuItem\n key={site.id}\n {...((href\n ? { component: MenuItemLink, href }\n : { disabled: true }) as any)}\n onClick={() => setAnchorEl(null)}\n >\n {site.name || site.subdomain || site.id}\n </MenuItem>\n )\n })}\n </Menu>\n </>\n )\n}\nOrgSitePickerButton.displayName = 'OrgSitePickerButton'\n\nexport default OrgSitePickerButton\n"],"names":["AppLink","BlockedControl","Button","Menu","MenuItem","forwardRef","useState","orgSiteHubPath","ORG_SITE_PICKER_NO_SITES","orgSiteSectionHref","mount","hostId","section","hub","MenuItemLink","props","ref","componentVariant","displayName","OrgSitePickerButton","label","anchorEl","setAnchorEl","sites","hosts","length","href","id","size","color","variant","disabled","blocked","hostsReady","reason","aria-haspopup","onClick","event","currentTarget","open","Boolean","onClose","slotProps","list","map","site","component","name","subdomain"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAEA,SAASA,OAAO,QAAoC,uBAAsB;AAC1E,SAASC,cAAc,QAAQ,4DAA2D;AAC1F,SAASC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,gBAAe;AACtD,SAASC,UAAU,EAAEC,QAAQ,QAAQ,QAAO;AAC5C,SAASC,cAAc,QAAgC,2BAAuB;AAE9E,uEAAuE,GACvE,OAAO,MAAMC,2BACX,4FAA2F;AAE7F,+EAA+E,GAC/E,OAAO,SAASC,mBACdC,KAAwB,EACxBC,MAAc,EACdC,OAAe;IAEf,MAAMC,MAAMN,eAAeG,OAAOC,QAAQ;IAC1C,OAAOE,MAAM,GAAGA,IAAI,CAAC,EAAED,SAAS,GAAG;AACrC;AAEA,8EAA8E,GAC9E,MAAME,6BAAeT,WAAuC,CAACU,OAAOC,oBAClE,KAAChB;QAAQgB,KAAKA;OAASD;QAAOE,kBAAkB;;AAElDH,aAAaI,WAAW,GAAG;AAS3B;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,oBAAoBJ,KAA+B;IACjE,MAAM,EAAEL,KAAK,EAAEE,OAAO,EAAEQ,KAAK,EAAE,GAAGL;IAClC,MAAM,CAACM,UAAUC,YAAY,GAAGhB,SAA6B;IAC7D,MAAMiB,QAAQb,MAAMc,KAAK;IAEzB,IAAID,MAAME,MAAM,KAAK,GAAG;QACtB,MAAMC,OAAOjB,mBAAmBC,OAAOa,KAAK,CAAC,EAAE,CAACI,EAAE,EAAEf;QACpD,OAAOc,qBACL,KAAC1B;YACCiB,kBAAiB;YACjBS,MAAMA;YACNE,MAAK;YACLC,OAAM;YACNC,SAAQ;sBAEPV;2BAGH,KAAClB;YAAO0B,MAAK;YAAQC,OAAM;YAAUC,SAAQ;YAAYC,QAAQ;sBAC9DX;;IAGP;IAEA,qBACE;;0BAGE,KAACnB;gBAAe+B,SAAStB,MAAMuB,UAAU,IAAI,CAACV,MAAME,MAAM;gBAAES,QAAQ1B;0BAClE,cAAA,KAACN;oBACC0B,MAAK;oBACLC,OAAM;oBACNC,SAAQ;oBACRC,UAAU,CAACR,MAAME,MAAM;oBACvBU,iBAAc;oBACdC,SAAS,CAACC,QAAUf,YAAYe,MAAMC,aAAa;8BAElDlB;;;0BAGL,KAACjB;gBACCkB,UAAUA;gBACVkB,MAAMC,QAAQnB;gBACdoB,SAAS,IAAMnB,YAAY;gBAC3BoB,WAAW;oBAAEC,MAAM;wBAAE,cAAc,GAAGvB,MAAM,cAAc,CAAC;oBAAC;gBAAE;0BAE7DG,MAAMqB,GAAG,CAAC,CAACC;oBACV,MAAMnB,OAAOjB,mBAAmBC,OAAOmC,KAAKlB,EAAE,EAAEf;oBAChD,qBACE,KAACR,uBAEOsB,OACF;wBAAEoB,WAAWhC;wBAAcY;oBAAK,IAChC;wBAAEK,UAAU;oBAAK;wBACrBK,SAAS,IAAMd,YAAY;kCAE1BuB,KAAKE,IAAI,IAAIF,KAAKG,SAAS,IAAIH,KAAKlB,EAAE;wBANlCkB,KAAKlB,EAAE;gBASlB;;;;AAIR;AACAR,oBAAoBD,WAAW,GAAG;AAElC,eAAeC,oBAAmB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 NativeNavContribution } from '@aglyn/aglyn/app-utils/native-nav';
|
|
18
|
+
export declare const NATIVE_NAV_ROWS: readonly NativeNavContribution[];
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
*/ import { nativeNavHubSection, nativeNavIcon, nativeNavRef } from "@aglyn/aglyn/app-utils/native-nav";
|
|
17
|
+
/**
|
|
18
|
+
* Marketing in the native apps' navigation (AGL-3943): the rows this plugin
|
|
19
|
+
* adds to the manifest the shells draw, placed into the core's lists by
|
|
20
|
+
* `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the
|
|
21
|
+
* console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.
|
|
22
|
+
*
|
|
23
|
+
* Imports only the core's plain nav module, so the native contracts read it.
|
|
24
|
+
*/ /**
|
|
25
|
+
* The row at either scope. The workspace's opens the console's org page
|
|
26
|
+
* (`orgNavItems`, `/[orgSlug]/marketing`), the site's the site's hub; both list
|
|
27
|
+
* the same sections under the same ids.
|
|
28
|
+
*/ function row(scope, order) {
|
|
29
|
+
return {
|
|
30
|
+
id: 'marketing',
|
|
31
|
+
label: 'Marketing',
|
|
32
|
+
icon: nativeNavIcon('megaphone', 'campaign'),
|
|
33
|
+
screen: 'marketing.overview',
|
|
34
|
+
pluginId: 'marketing',
|
|
35
|
+
order,
|
|
36
|
+
sections: [
|
|
37
|
+
nativeNavHubSection(scope, '/marketing', 'overview', 'Overview', 'marketing.overview'),
|
|
38
|
+
nativeNavHubSection(scope, '/marketing', 'campaigns', 'Campaigns', 'marketing.campaigns'),
|
|
39
|
+
nativeNavHubSection(scope, '/marketing', 'conversions', 'Conversions', 'marketing.conversions'),
|
|
40
|
+
nativeNavHubSection(scope, '/marketing', 'overlays', 'Overlays', 'marketing.overlays'),
|
|
41
|
+
nativeNavHubSection(scope, '/marketing', 'experiments', 'A/B testing', 'marketing.experiments')
|
|
42
|
+
],
|
|
43
|
+
docs: '/marketing-and-automation/marketing-overlays/overview',
|
|
44
|
+
console: nativeNavRef(scope === 'org' ? 'orgPluginTab' : 'hostPluginTab', '/marketing')
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export const NATIVE_NAV_ROWS = [
|
|
48
|
+
{
|
|
49
|
+
list: 'workspace',
|
|
50
|
+
group: 'workspace',
|
|
51
|
+
row: row('org', 50)
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
list: 'site',
|
|
55
|
+
group: 'customers',
|
|
56
|
+
row: row('host', 40)
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=native-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/marketing/src/lib/native-nav.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 {\n nativeNavHubSection,\n nativeNavIcon,\n nativeNavRef,\n type NativeNavContribution,\n type NativeNavRow,\n} from '@aglyn/aglyn/app-utils/native-nav'\n\n/**\n * Marketing in the native apps' navigation (AGL-3943): the rows this plugin\n * adds to the manifest the shells draw, placed into the core's lists by\n * `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the\n * console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.\n *\n * Imports only the core's plain nav module, so the native contracts read it.\n */\n\n/**\n * The row at either scope. The workspace's opens the console's org page\n * (`orgNavItems`, `/[orgSlug]/marketing`), the site's the site's hub; both list\n * the same sections under the same ids.\n */\nfunction row(scope: 'org' | 'host', order: number): NativeNavRow {\n return {\n id: 'marketing',\n label: 'Marketing',\n icon: nativeNavIcon('megaphone', 'campaign'),\n screen: 'marketing.overview',\n pluginId: 'marketing',\n order,\n sections: [\n nativeNavHubSection(scope, '/marketing', 'overview', 'Overview', 'marketing.overview'),\n nativeNavHubSection(scope, '/marketing', 'campaigns', 'Campaigns', 'marketing.campaigns'),\n nativeNavHubSection(scope, '/marketing', 'conversions', 'Conversions', 'marketing.conversions'),\n nativeNavHubSection(scope, '/marketing', 'overlays', 'Overlays', 'marketing.overlays'),\n nativeNavHubSection(scope, '/marketing', 'experiments', 'A/B testing', 'marketing.experiments'),\n ],\n docs: '/marketing-and-automation/marketing-overlays/overview',\n console: nativeNavRef(scope === 'org' ? 'orgPluginTab' : 'hostPluginTab', '/marketing'),\n }\n}\n\nexport const NATIVE_NAV_ROWS: readonly NativeNavContribution[] = [\n { list: 'workspace', group: 'workspace', row: row('org', 50) },\n { list: 'site', group: 'customers', row: row('host', 40) },\n]\n"],"names":["nativeNavHubSection","nativeNavIcon","nativeNavRef","row","scope","order","id","label","icon","screen","pluginId","sections","docs","console","NATIVE_NAV_ROWS","list","group"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,mBAAmB,EACnBC,aAAa,EACbC,YAAY,QAGP,oCAAmC;AAE1C;;;;;;;CAOC,GAED;;;;CAIC,GACD,SAASC,IAAIC,KAAqB,EAAEC,KAAa;IAC/C,OAAO;QACLC,IAAI;QACJC,OAAO;QACPC,MAAMP,cAAc,aAAa;QACjCQ,QAAQ;QACRC,UAAU;QACVL;QACAM,UAAU;YACRX,oBAAoBI,OAAO,cAAc,YAAY,YAAY;YACjEJ,oBAAoBI,OAAO,cAAc,aAAa,aAAa;YACnEJ,oBAAoBI,OAAO,cAAc,eAAe,eAAe;YACvEJ,oBAAoBI,OAAO,cAAc,YAAY,YAAY;YACjEJ,oBAAoBI,OAAO,cAAc,eAAe,eAAe;SACxE;QACDQ,MAAM;QACNC,SAASX,aAAaE,UAAU,QAAQ,iBAAiB,iBAAiB;IAC5E;AACF;AAEA,OAAO,MAAMU,kBAAoD;IAC/D;QAAEC,MAAM;QAAaC,OAAO;QAAab,KAAKA,IAAI,OAAO;IAAI;IAC7D;QAAEY,MAAM;QAAQC,OAAO;QAAab,KAAKA,IAAI,QAAQ;IAAI;CAC1D,CAAA"}
|