@the-portland-company/shell 0.34.0 → 0.35.0
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/dist/app-chrome.cjs +23 -7
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +53 -1
- package/dist/app-chrome.d.ts +53 -1
- package/dist/app-chrome.js +23 -7
- package/dist/app-chrome.js.map +1 -1
- package/package.json +1 -1
package/dist/app-chrome.cjs
CHANGED
|
@@ -2479,6 +2479,7 @@ function resolveIdentity(input) {
|
|
|
2479
2479
|
loaded: input.loaded ?? false
|
|
2480
2480
|
};
|
|
2481
2481
|
}
|
|
2482
|
+
var CORE_APP = "vrm";
|
|
2482
2483
|
var POLITOGY_APPS = {
|
|
2483
2484
|
vrm: { title: "Politogy VRM", origin: "https://app.politogyvrm.com", storagePrefix: "vrm" },
|
|
2484
2485
|
contacts: { title: "Contacts", origin: "https://contacts.politogyvrm.com", storagePrefix: "contacts" },
|
|
@@ -2554,21 +2555,24 @@ function FrameBody({
|
|
|
2554
2555
|
}) {
|
|
2555
2556
|
const meta = POLITOGY_APPS[app];
|
|
2556
2557
|
const chrome = useChromeState();
|
|
2558
|
+
const core = app === CORE_APP ? data?.core : void 0;
|
|
2557
2559
|
const identity = useChromeIdentity({ userName: session.userName, email: session.email });
|
|
2558
|
-
const
|
|
2560
|
+
const derivedUserMenu = useChromeUserMenu({
|
|
2559
2561
|
userId: session.userId,
|
|
2560
2562
|
userName: identity.userName,
|
|
2561
2563
|
email: identity.email
|
|
2562
2564
|
});
|
|
2565
|
+
const userMenu = core?.userMenu ?? derivedUserMenu;
|
|
2563
2566
|
const footer = useChromeFooter(buildMeta ?? {});
|
|
2564
2567
|
const appMode = meta.mode;
|
|
2565
|
-
const
|
|
2568
|
+
const derivedMode = useChromeMode(appMode ? { pinnedModeId: appMode } : void 0);
|
|
2569
|
+
const mode = core?.mode ?? derivedMode;
|
|
2566
2570
|
const coreOrgs = chrome?.orgs ?? [];
|
|
2567
2571
|
const activeCoreOrg = coreOrgs.find((o) => o.id === chrome?.orgId) ?? null;
|
|
2568
2572
|
const navDisplay = chrome?.navDisplay ?? "both";
|
|
2569
2573
|
const navMode = appMode ?? "relationship";
|
|
2570
2574
|
const activeOrgId = chrome?.orgId ?? null;
|
|
2571
|
-
const
|
|
2575
|
+
const derivedNavItems = react.useMemo(
|
|
2572
2576
|
() => standardPolitogyNav({
|
|
2573
2577
|
coreBaseUrl: POLITOGY_APPS.vrm.origin,
|
|
2574
2578
|
icons: standardNavIcons,
|
|
@@ -2580,17 +2584,19 @@ function FrameBody({
|
|
|
2580
2584
|
}),
|
|
2581
2585
|
[data?.contactsItem, navMode, activeOrgId]
|
|
2582
2586
|
);
|
|
2583
|
-
const
|
|
2587
|
+
const navItems = core?.nav ?? derivedNavItems;
|
|
2588
|
+
const derivedBreadcrumbs = react.useMemo(
|
|
2584
2589
|
() => deriveBreadcrumbs(navItems, pathname, { search, origin: meta.origin }),
|
|
2585
2590
|
[navItems, pathname, search, meta.origin]
|
|
2586
2591
|
);
|
|
2592
|
+
const breadcrumbs = core ? core.page?.breadcrumbs : derivedBreadcrumbs;
|
|
2587
2593
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2588
2594
|
NavAppShell,
|
|
2589
2595
|
{
|
|
2590
2596
|
sidebar: {
|
|
2591
2597
|
pathname,
|
|
2592
2598
|
brand: {
|
|
2593
|
-
logoSrc: "/brand/logos/relationship-mode-logo.png",
|
|
2599
|
+
logoSrc: core?.brandLogoSrc ?? "/brand/logos/relationship-mode-logo.png",
|
|
2594
2600
|
logoAlt: "Politogy",
|
|
2595
2601
|
badgeLabel: "P",
|
|
2596
2602
|
title: "Politogy"
|
|
@@ -2611,8 +2617,11 @@ function FrameBody({
|
|
|
2611
2617
|
linkComponent
|
|
2612
2618
|
},
|
|
2613
2619
|
betaBanner: {},
|
|
2620
|
+
contentWrapper: core?.contentWrapper,
|
|
2614
2621
|
topBar: {
|
|
2615
|
-
|
|
2622
|
+
// Core's pages publish their own identity; every other app is one
|
|
2623
|
+
// product surface and takes its registry title.
|
|
2624
|
+
title: core?.page?.title ?? meta.title,
|
|
2616
2625
|
breadcrumbs,
|
|
2617
2626
|
user: {
|
|
2618
2627
|
name: identity.userName,
|
|
@@ -2624,7 +2633,13 @@ function FrameBody({
|
|
|
2624
2633
|
},
|
|
2625
2634
|
userMenu,
|
|
2626
2635
|
onSignOut,
|
|
2627
|
-
|
|
2636
|
+
// The action cluster is IDENTICAL everywhere — core included. Page
|
|
2637
|
+
// actions sit BEFORE it, never inside it, so the Alerts bell keeps its
|
|
2638
|
+
// required position: farthest right, immediately before My Account.
|
|
2639
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2640
|
+
core?.page?.actions,
|
|
2641
|
+
/* @__PURE__ */ jsxRuntime.jsx(ChromeTopBarActions, {})
|
|
2642
|
+
] })
|
|
2628
2643
|
},
|
|
2629
2644
|
children
|
|
2630
2645
|
}
|
|
@@ -2770,6 +2785,7 @@ function AppDevNotes({
|
|
|
2770
2785
|
}),
|
|
2771
2786
|
[storagePrefix, identity.role]
|
|
2772
2787
|
);
|
|
2788
|
+
if (devNotes?.providedByApp) return /* @__PURE__ */ jsxRuntime.jsx(DevNotesSurface, { children });
|
|
2773
2789
|
return /* @__PURE__ */ jsxRuntime.jsx(devnotes.DevNotesProvider, { adapter, user, config, children: /* @__PURE__ */ jsxRuntime.jsx(DevNotesSurface, { children }) });
|
|
2774
2790
|
}
|
|
2775
2791
|
var DevNotesTasksContext = react.createContext({
|