@pega/cosmos-react-wss 10.0.0-build.9.0 → 10.0.0-build.9.10
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/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +138 -47
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +10 -19
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +70 -19
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +14 -18
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.types.js.map +1 -1
- package/lib/components/AppShell/AppShell.utils.d.ts +8 -0
- package/lib/components/AppShell/AppShell.utils.d.ts.map +1 -0
- package/lib/components/AppShell/AppShell.utils.js +120 -0
- package/lib/components/AppShell/AppShell.utils.js.map +1 -0
- package/lib/components/AppShell/AppShellMenu.types.d.ts +141 -0
- package/lib/components/AppShell/AppShellMenu.types.d.ts.map +1 -0
- package/lib/components/AppShell/AppShellMenu.types.js +2 -0
- package/lib/components/AppShell/AppShellMenu.types.js.map +1 -0
- package/lib/components/AppShell/AppShellMenuControl.d.ts +4 -0
- package/lib/components/AppShell/AppShellMenuControl.d.ts.map +1 -0
- package/lib/components/AppShell/AppShellMenuControl.js +24 -0
- package/lib/components/AppShell/AppShellMenuControl.js.map +1 -0
- package/lib/components/AppShell/AppShellMenuControl.test-ids.d.ts +2 -0
- package/lib/components/AppShell/AppShellMenuControl.test-ids.d.ts.map +1 -0
- package/lib/components/AppShell/AppShellMenuControl.test-ids.js +3 -0
- package/lib/components/AppShell/AppShellMenuControl.test-ids.js.map +1 -0
- package/lib/components/AppShell/GroupedMenu.styles.d.ts +16 -0
- package/lib/components/AppShell/GroupedMenu.styles.d.ts.map +1 -0
- package/lib/components/AppShell/GroupedMenu.styles.js +84 -0
- package/lib/components/AppShell/GroupedMenu.styles.js.map +1 -0
- package/lib/components/AppShell/MegaMenu.d.ts +18 -0
- package/lib/components/AppShell/MegaMenu.d.ts.map +1 -0
- package/lib/components/AppShell/MegaMenu.js +181 -0
- package/lib/components/AppShell/MegaMenu.js.map +1 -0
- package/lib/components/AppShell/MegaMenu.styles.d.ts +198 -0
- package/lib/components/AppShell/MegaMenu.styles.d.ts.map +1 -0
- package/lib/components/AppShell/MegaMenu.styles.js +120 -0
- package/lib/components/AppShell/MegaMenu.styles.js.map +1 -0
- package/lib/components/AppShell/MobileHeaderContent.d.ts +2 -2
- package/lib/components/AppShell/MobileHeaderContent.d.ts.map +1 -1
- package/lib/components/AppShell/MobileHeaderContent.js +2 -2
- package/lib/components/AppShell/MobileHeaderContent.js.map +1 -1
- package/lib/components/AppShell/NavLinks.d.ts +2 -2
- package/lib/components/AppShell/NavLinks.d.ts.map +1 -1
- package/lib/components/AppShell/NavLinks.js.map +1 -1
- package/lib/components/AppShell/Notifications.js +1 -1
- package/lib/components/AppShell/Notifications.js.map +1 -1
- package/lib/components/AppShell/index.d.ts +1 -0
- package/lib/components/AppShell/index.d.ts.map +1 -1
- package/lib/components/AppShell/index.js.map +1 -1
- package/lib/components/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.js +25 -9
- package/lib/components/CaseView/CaseView.js.map +1 -1
- package/lib/components/CaseView/CaseView.types.d.ts +4 -0
- package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.types.js.map +1 -1
- package/lib/components/Footer/Footer.d.ts +1 -1
- package/lib/components/Footer/Footer.d.ts.map +1 -1
- package/lib/components/Footer/Footer.js +47 -4
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.styles.d.ts +21 -1
- package/lib/components/Footer/Footer.styles.d.ts.map +1 -1
- package/lib/components/Footer/Footer.styles.js +77 -4
- package/lib/components/Footer/Footer.styles.js.map +1 -1
- package/lib/components/Footer/Footer.types.d.ts +75 -2
- package/lib/components/Footer/Footer.types.d.ts.map +1 -1
- package/lib/components/Footer/Footer.types.js.map +1 -1
- package/lib/components/ModernCaseView/ModernCaseView.d.ts +6 -0
- package/lib/components/ModernCaseView/ModernCaseView.d.ts.map +1 -0
- package/lib/components/ModernCaseView/ModernCaseView.js +206 -0
- package/lib/components/ModernCaseView/ModernCaseView.js.map +1 -0
- package/lib/components/ModernCaseView/ModernCaseView.styles.d.ts +39 -0
- package/lib/components/ModernCaseView/ModernCaseView.styles.d.ts.map +1 -0
- package/lib/components/ModernCaseView/ModernCaseView.styles.js +245 -0
- package/lib/components/ModernCaseView/ModernCaseView.styles.js.map +1 -0
- package/lib/components/ModernCaseView/index.d.ts +2 -0
- package/lib/components/ModernCaseView/index.d.ts.map +1 -0
- package/lib/components/ModernCaseView/index.js +2 -0
- package/lib/components/ModernCaseView/index.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,+BAA+B,EAAkB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,+BAA+B,EAAkB,MAAM,yBAAyB,CAAC;AAW/F,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAwBpE,QAAA,MAAM,QAAQ,EAAE,+BAA+B,CAAC,aAAa,CAuqB3D,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { forwardRef, useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { Avatar, Backdrop, Button, ThemeOverride, ContextSwitcher, debounce, Drawer, Flex, Icon, Image, Popover, registerIcon, SearchInput, SkipLinks, Text, useBreakpoint, useConsolidatedRef, useDirection, useElement, useEscape, useFocusWithin, useI18n, useOuterEvent, usePreviewManager, useTheme, VisuallyHiddenText, MenuButton, ThemeSwitcher } from '@pega/cosmos-react-core';
|
|
4
4
|
import Operator from '@pega/cosmos-react-core/lib/components/AppShell/Operator';
|
|
5
5
|
import { StyledAppHeaderOperator } from '@pega/cosmos-react-core/lib/components/AppShell/AppHeader.styles';
|
|
6
6
|
import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
|
|
7
|
-
import * as
|
|
7
|
+
import * as shareExternalIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/share-external.icon';
|
|
8
8
|
import { getHeaderTheme } from '@pega/cosmos-react-core/lib/components/AppShell/style-utils';
|
|
9
9
|
import useThemeMode from '@pega/cosmos-react-core/lib/hooks/useThemeMode';
|
|
10
10
|
import Footer from '../Footer';
|
|
11
|
-
import {
|
|
11
|
+
import { flattenMenuItems, toFooterMenuEntries } from './AppShell.utils';
|
|
12
|
+
import { WSSAppShellGlobalStyle, StyledAppHeader, StyledCountIcon, StyledHamburgerMenu, StyledMain, StyledNotificationCount, StyledMainMenuLink, StyledNav, StyledPrimaryName, StyledEndNavBlock, StyledBannerRegion, StyledShareButtonContent } from './AppShell.styles';
|
|
12
13
|
import Notifications from './Notifications';
|
|
13
14
|
import MobileHeaderContent from './MobileHeaderContent';
|
|
14
15
|
import NavLinks from './NavLinks';
|
|
15
|
-
|
|
16
|
+
import AppShellMenuControl from './AppShellMenuControl';
|
|
17
|
+
import { MegaMenuPanel, MegaMenuTriggers, useMegaMenu } from './MegaMenu';
|
|
18
|
+
registerIcon(shareExternalIcon);
|
|
16
19
|
const AppShell = forwardRef(function AppShell(props, ref) {
|
|
17
|
-
const { main, banners, appInfo, navLinks, operator, notifications, searchInput, contextSwitcher = {}, navAlignment = 'end', navPosition = 'inline', isDefaultWSS = true, helpMenu, shareApp, portalSwitcher, footer } = props;
|
|
20
|
+
const { main, banners, appInfo, mainNav, navLinks: deprecatedNavLinks, operator, notifications, searchInput, contextSwitcher = {}, navAlignment = 'end', navPosition = 'inline', isDefaultWSS = true, helpMenu, shareApp, portalSwitcher, footer } = props;
|
|
21
|
+
const configuredMainMenu = Array.isArray(mainNav) ? undefined : mainNav;
|
|
22
|
+
let legacyNavLinks;
|
|
23
|
+
if (Array.isArray(mainNav)) {
|
|
24
|
+
legacyNavLinks = mainNav;
|
|
25
|
+
}
|
|
26
|
+
else if (mainNav !== undefined) {
|
|
27
|
+
legacyNavLinks = configuredMainMenu?.fallbackLinks ?? [];
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
legacyNavLinks = deprecatedNavLinks ?? [];
|
|
31
|
+
}
|
|
32
|
+
const mainMenuVariant = configuredMainMenu?.variant ?? 'mega-menu';
|
|
33
|
+
const configuredFooterMenu = footer && !Array.isArray(footer) ? footer : undefined;
|
|
34
|
+
const footerLinks = Array.isArray(footer) ? footer : configuredFooterMenu?.fallbackLinks ?? [];
|
|
18
35
|
const t = useI18n();
|
|
19
36
|
const { contexts, onContextClick, label: contextSwitcherLabel = t('switch_to') } = contextSwitcher;
|
|
20
37
|
const [backdropOpen, setBackdropOpen] = useState(false);
|
|
@@ -29,6 +46,8 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
29
46
|
const [popoverEl, setPopoverEl] = useElement();
|
|
30
47
|
const [notificationsButtonEl, setNotificationsButtonEl] = useElement();
|
|
31
48
|
const [searchContainerEl, setSearchContainerEl] = useElement();
|
|
49
|
+
const [footerEl, setFooterEl] = useElement();
|
|
50
|
+
const [configuredFooterHeight, setConfiguredFooterHeight] = useState();
|
|
32
51
|
const searchInputRef = useRef(null);
|
|
33
52
|
const minInlineWidth = useRef(0);
|
|
34
53
|
const theme = useTheme();
|
|
@@ -37,6 +56,49 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
37
56
|
const headerTheme = useMemo(() => getHeaderTheme(theme), [theme]);
|
|
38
57
|
const headerRef = useConsolidatedRef(setHeaderEl, ref);
|
|
39
58
|
const isSmallOrAbove = useBreakpoint('sm');
|
|
59
|
+
const configuredMainMenuItems = configuredMainMenu?.items;
|
|
60
|
+
const resolvedMainMenu = useMemo(() => configuredMainMenuItems?.filter(Boolean) ?? [], [configuredMainMenuItems]);
|
|
61
|
+
const resolvedFooterMenu = useMemo(() => {
|
|
62
|
+
if (!configuredFooterMenu?.items.length)
|
|
63
|
+
return undefined;
|
|
64
|
+
if (configuredFooterMenu.variant === 'fat-footer') {
|
|
65
|
+
const items = toFooterMenuEntries(configuredFooterMenu.items);
|
|
66
|
+
return items.length ? { variant: 'fat-footer', items } : undefined;
|
|
67
|
+
}
|
|
68
|
+
const items = flattenMenuItems(configuredFooterMenu.items).map(item => ({
|
|
69
|
+
type: 'link',
|
|
70
|
+
id: item.id,
|
|
71
|
+
label: item.text,
|
|
72
|
+
...(item.onClick && { onClick: item.onClick })
|
|
73
|
+
}));
|
|
74
|
+
return items.length ? { variant: configuredFooterMenu.variant, items } : undefined;
|
|
75
|
+
}, [configuredFooterMenu]);
|
|
76
|
+
const hasConfiguredFooter = !!configuredFooterMenu;
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (!footerEl || !hasConfiguredFooter) {
|
|
79
|
+
setConfiguredFooterHeight(undefined);
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
const measureFooter = () => {
|
|
83
|
+
const root = footerEl.ownerDocument.documentElement;
|
|
84
|
+
const rootFontSize = parseFloat(getComputedStyle(root).fontSize);
|
|
85
|
+
const height = footerEl.getBoundingClientRect().height;
|
|
86
|
+
if (rootFontSize > 0 && height > 0) {
|
|
87
|
+
setConfiguredFooterHeight(`${height / rootFontSize}rem`);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
measureFooter();
|
|
91
|
+
const observer = new ResizeObserver(measureFooter);
|
|
92
|
+
observer.observe(footerEl);
|
|
93
|
+
return () => observer.disconnect();
|
|
94
|
+
}, [footerEl, hasConfiguredFooter]);
|
|
95
|
+
const activeNavItems = resolvedMainMenu.length ? resolvedMainMenu : legacyNavLinks;
|
|
96
|
+
const mainMenuPanelId = useId();
|
|
97
|
+
const megaMenu = useMegaMenu({
|
|
98
|
+
menus: resolvedMainMenu,
|
|
99
|
+
navElement: navSectionEl,
|
|
100
|
+
isMobile: hasMobileNav
|
|
101
|
+
});
|
|
40
102
|
const { end } = useDirection();
|
|
41
103
|
let appInfoAs = 'div';
|
|
42
104
|
if (appInfo.href)
|
|
@@ -76,33 +138,43 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
76
138
|
if (isSmallOrAbove) {
|
|
77
139
|
setLinksCollapsed(false);
|
|
78
140
|
}
|
|
79
|
-
}, [isSmallOrAbove, navAlignment,
|
|
141
|
+
}, [isSmallOrAbove, navAlignment, activeNavItems, mainMenuVariant, navPosition, isDefaultWSS]);
|
|
80
142
|
useEffect(() => {
|
|
143
|
+
if (!headerEl)
|
|
144
|
+
return undefined;
|
|
81
145
|
const resizeObserver = new ResizeObserver(debouncedResize);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (headerEl)
|
|
86
|
-
minInlineWidth.current = headerEl.clientWidth + 1;
|
|
87
|
-
setLinksCollapsed(true);
|
|
88
|
-
}
|
|
89
|
-
else if (navSectionEl)
|
|
90
|
-
navSectionEl.style.visibility = 'visible';
|
|
91
|
-
}, { root: intersectionRoot, threshold: 1 });
|
|
92
|
-
if (headerEl && navSectionEl?.firstElementChild && navSectionEl?.lastElementChild) {
|
|
146
|
+
resizeObserver.observe(headerEl);
|
|
147
|
+
let intersectionObserver;
|
|
148
|
+
if (navSectionEl?.firstElementChild && navSectionEl?.lastElementChild) {
|
|
93
149
|
const firstNavItem = navSectionEl.firstElementChild;
|
|
94
150
|
const lastNavItem = navSectionEl.lastElementChild;
|
|
151
|
+
intersectionObserver = new IntersectionObserver(entries => {
|
|
152
|
+
if (entries.some(({ intersectionRatio }) => intersectionRatio < 1) && !linksCollapsed) {
|
|
153
|
+
minInlineWidth.current = headerEl.clientWidth + 1;
|
|
154
|
+
setLinksCollapsed(true);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
navSectionEl.style.visibility = 'visible';
|
|
158
|
+
}
|
|
159
|
+
}, { root: navSectionEl, threshold: 1 });
|
|
95
160
|
intersectionObserver.observe(firstNavItem);
|
|
96
161
|
if (lastNavItem !== firstNavItem) {
|
|
97
162
|
intersectionObserver.observe(lastNavItem);
|
|
98
163
|
}
|
|
99
|
-
resizeObserver.observe(headerEl);
|
|
100
164
|
}
|
|
101
165
|
return () => {
|
|
102
|
-
intersectionObserver
|
|
166
|
+
intersectionObserver?.disconnect();
|
|
103
167
|
resizeObserver.disconnect();
|
|
104
168
|
};
|
|
105
|
-
}, [
|
|
169
|
+
}, [
|
|
170
|
+
headerEl,
|
|
171
|
+
navSectionEl,
|
|
172
|
+
activeNavItems,
|
|
173
|
+
mainMenuVariant,
|
|
174
|
+
navAlignment,
|
|
175
|
+
navPosition,
|
|
176
|
+
linksCollapsed
|
|
177
|
+
]);
|
|
106
178
|
useEffect(() => {
|
|
107
179
|
setHasMobileNav(!isSmallOrAbove || linksCollapsed);
|
|
108
180
|
}, [isSmallOrAbove, linksCollapsed]);
|
|
@@ -127,37 +199,56 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
127
199
|
openDrawer('notifications');
|
|
128
200
|
}
|
|
129
201
|
}, [hasMobileNav, drawerOpen]);
|
|
130
|
-
const hasFooter = !!
|
|
202
|
+
const hasFooter = !!(footerLinks.length || resolvedFooterMenu);
|
|
131
203
|
const useDefaultInlineLayout = isDefaultWSS || navPosition === 'inline';
|
|
204
|
+
const renderMainMenu = () => {
|
|
205
|
+
if (mainMenuVariant === 'individual-menus') {
|
|
206
|
+
return resolvedMainMenu.map(menu => (_jsx(StyledMainMenuLink, { as: AppShellMenuControl, menu: menu, "$isDefaultWSS": isDefaultWSS, "$navPosition": navPosition }, menu.id)));
|
|
207
|
+
}
|
|
208
|
+
return (_jsx(MegaMenuTriggers, { menus: resolvedMainMenu, openId: megaMenu.openMenuId, panelId: mainMenuPanelId, onOpenChange: megaMenu.onOpenChange, onTriggerOpen: megaMenu.onTriggerOpen, isDefaultWSS: isDefaultWSS, navPosition: navPosition }));
|
|
209
|
+
};
|
|
132
210
|
const shareLabel = shareApp?.label ?? t('app_shell_share');
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
211
|
+
let footerElement = null;
|
|
212
|
+
if (resolvedFooterMenu) {
|
|
213
|
+
footerElement = (_jsx(Footer, { source: 'menu', menu: resolvedFooterMenu, fallbackLinks: footerLinks, elementRef: setFooterEl }));
|
|
214
|
+
}
|
|
215
|
+
else if (footerLinks.length) {
|
|
216
|
+
footerElement = _jsx(Footer, { source: 'legacy', links: footerLinks, elementRef: setFooterEl });
|
|
217
|
+
}
|
|
218
|
+
return (_jsxs(_Fragment, { children: [_jsx(WSSAppShellGlobalStyle, { navPosition: navPosition, hasFooter: hasFooter, configuredFooterHeight: hasConfiguredFooter ? configuredFooterHeight : undefined, hasMobileNav: hasMobileNav, isDefaultWSS: useDefaultInlineLayout }), _jsx(SkipLinks, { items: skipLinks }), _jsxs(ThemeOverride, { theme: headerTheme, children: [_jsxs(StyledAppHeader, { ref: headerRef, navPosition: navPosition, "$isDefaultWSS": isDefaultWSS, "$hasMobileNav": hasMobileNav, children: [_jsxs(Flex, { container: {
|
|
219
|
+
alignItems: 'center',
|
|
220
|
+
justify: 'between',
|
|
221
|
+
pad: navPosition === 'below' ? [1, 0] : 0
|
|
222
|
+
}, children: [useDefaultInlineLayout ? (_jsxs(_Fragment, { children: [_jsxs(Flex, { container: { alignItems: 'center' }, children: [contexts && onContextClick && contexts.length > 1 && (_jsx(ContextSwitcher, { contexts: contexts, onContextClick: onContextClick, label: contextSwitcherLabel, container: { justify: 'center', pad: [0, 0, 0, isDefaultWSS ? 1 : 0] } })), _jsxs(Flex, { as: appInfoAs, container: { alignItems: 'center', pad: [1, 4, 1, 1], gap: 1 }, href: appInfo.href, onClick: appInfo.onClick, target: appInfo.target, children: [_jsx(Image, { src: appInfo.imageSrc, alt: appInfo.appName }), !hasMobileNav && (_jsxs(Flex, { as: 'span', container: { direction: 'row', gap: 1, alignItems: 'end' }, children: [_jsx(Text, { as: appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName, variant: 'h1', children: appInfo.appName }), appInfo.portalName && (_jsx(Text, { variant: 'secondary', children: appInfo.portalName }))] }))] })] }), !hasMobileNav &&
|
|
223
|
+
navPosition === 'inline' &&
|
|
224
|
+
(resolvedMainMenu.length ? (_jsx(Flex, { as: StyledNav, ref: setNavSectionEl, item: { grow: 1, basis: '0' }, container: { alignItems: 'center', gap: 0.5, justify: navAlignment }, children: renderMainMenu() })) : (_jsx(NavLinks, { ref: setNavSectionEl, navLinks: legacyNavLinks, navAlignment: navAlignment, navPosition: navPosition, isDefaultWSS: true }))), !hasMobileNav && navPosition !== 'inline' && resolvedMainMenu.length === 0 && (_jsx(NavLinks, { ref: setNavSectionEl, navLinks: legacyNavLinks, navAlignment: navAlignment, navPosition: navPosition, isDefaultWSS: true }))] })) : (_jsxs(Flex, { container: { alignItems: 'center' }, children: [contexts && onContextClick && contexts.length > 1 && (_jsx(ContextSwitcher, { contexts: contexts, onContextClick: onContextClick, label: contextSwitcherLabel, container: { justify: 'center', pad: [0, 0, 0, isDefaultWSS ? 1 : 0] } })), navPosition !== 'below' || hasMobileNav ? (_jsxs(Flex, { as: appInfoAs, container: { alignItems: 'center', pad: [1, 4, 1, 1], gap: 1 }, href: appInfo.href, onClick: appInfo.onClick, target: appInfo.target, children: [_jsx(Image, { src: appInfo.imageSrc, alt: appInfo.appName }), !hasMobileNav && (_jsxs(Flex, { as: 'span', container: { direction: 'row', gap: 1, alignItems: 'end' }, children: [_jsx(Text, { as: appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName, variant: 'h1', children: appInfo.appName }), appInfo.portalName && (_jsx(Text, { variant: 'secondary', children: appInfo.portalName }))] }))] })) : null] })), _jsxs(Flex, { as: StyledEndNavBlock, container: { alignItems: 'center', gap: 1 }, mobile: hasMobileNav, children: [!hasMobileNav && searchInput && (_jsx("div", { ref: setSearchContainerEl, role: 'search', "aria-label": t('search'), children: searchExpanded ? (_jsx(SearchInput, { ...searchInput, ref: searchInputRef, onSearchSubmit: searchInput.onSearchSubmit
|
|
225
|
+
? value => {
|
|
226
|
+
searchInput.onSearchSubmit?.(value);
|
|
227
|
+
setSearchExpanded(false);
|
|
228
|
+
}
|
|
229
|
+
: undefined })) : (_jsx(Button, { icon: true, variant: 'simple', label: t('search'), "aria-label": t('expand_search'), onClick: () => setSearchExpanded(true), children: _jsx(Icon, { name: 'search' }) })) })), onThemeModeChange && (_jsx(ThemeSwitcher, { themeMode: themeMode, onThemeModeChange: onThemeModeChange })), notifications && (_jsxs(_Fragment, { children: [_jsx(Button, { ref: setNotificationsButtonEl, variant: 'simple', label: t('open_app_header_notifications'), icon: true, onClick: () => {
|
|
230
|
+
if (!hasMobileNav) {
|
|
231
|
+
if (notificationsPopover) {
|
|
232
|
+
setNotificationsPopover(false);
|
|
233
|
+
notifications.onNotificationsClose?.();
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
setNotificationsPopover(true);
|
|
237
|
+
notifications.onNotificationsOpen?.();
|
|
238
|
+
}
|
|
147
239
|
}
|
|
148
240
|
else {
|
|
149
|
-
|
|
150
|
-
notifications.onNotificationsOpen?.();
|
|
241
|
+
openDrawer('notifications');
|
|
151
242
|
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
243
|
+
}, children: _jsxs(StyledNotificationCount, { children: [_jsx(Icon, { name: 'bell' }), !!notifications.count && (_jsx(StyledCountIcon, { variant: 'urgent', children: notifications.count }))] }) }), _jsx(Popover, { ref: setPopoverEl, show: notificationsPopover, target: notificationsButtonEl, placement: 'bottom-end', children: _jsx(Notifications, { ...notifications, popover: true }) })] })), helpMenu && (_jsx(MenuButton, { variant: 'simple', icon: 'help', text: t('app_header_help'), iconOnly: true, menu: {
|
|
244
|
+
items: helpMenu
|
|
245
|
+
} })), portalSwitcher && _jsx(MenuButton, { ...portalSwitcher }), shareApp &&
|
|
246
|
+
(hasMobileNav ? (_jsx(Button, { variant: 'secondary', icon: true, label: shareLabel, onClick: shareApp.onClick, children: _jsx(StyledShareButtonContent, { name: 'share-external', set: 'budicon' }) })) : (_jsxs(Button, { variant: 'secondary', onClick: shareApp.onClick, children: [_jsx(StyledShareButtonContent, { name: 'share-external', set: 'budicon' }), _jsx("span", { children: shareLabel })] }))), !hasMobileNav && (_jsx(Operator, { as: StyledAppHeaderOperator, actions: operator.actions, popover: { placement: 'bottom-start' }, name: operator.avatar.name, children: _jsx(Avatar, { ...operator.avatar }) })), hasMobileNav && (_jsx(Button, { as: StyledHamburgerMenu, label: t('open_app_header_drawer'), variant: 'simple', icon: true, onClick: () => {
|
|
247
|
+
megaMenu.close();
|
|
248
|
+
openDrawer('navigationOperator');
|
|
249
|
+
}, children: _jsx(Icon, { name: 'bars' }) }))] })] }), navPosition === 'below' &&
|
|
250
|
+
!hasMobileNav &&
|
|
251
|
+
(useDefaultInlineLayout ? (_jsx(Flex, { container: { justify: navAlignment }, children: resolvedMainMenu.length ? (_jsx(Flex, { as: StyledNav, ref: setNavSectionEl, item: { grow: 1, basis: '0' }, container: { alignItems: 'center', gap: 0.5, justify: navAlignment }, children: renderMainMenu() })) : (_jsx(NavLinks, { ref: setNavSectionEl, navLinks: legacyNavLinks, navAlignment: navAlignment, navPosition: navPosition, isDefaultWSS: true })) })) : (_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsxs(Flex, { as: appInfoAs, container: { alignItems: 'center', gap: 1 }, href: appInfo.href, onClick: appInfo.onClick, target: appInfo.target, children: [_jsx(Image, { src: appInfo.imageSrc, alt: appInfo.appName }), _jsxs(Flex, { as: 'span', container: { direction: 'row', gap: 1, alignItems: 'center' }, children: [_jsx(Text, { as: appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName, variant: 'h1', children: appInfo.appName }), appInfo.portalName && _jsx(Text, { variant: 'secondary', children: appInfo.portalName })] })] }), resolvedMainMenu.length ? (_jsx(Flex, { as: StyledNav, ref: setNavSectionEl, item: { grow: 1 }, container: { alignItems: 'center', gap: 0.5, justify: navAlignment }, children: renderMainMenu() })) : (_jsx(NavLinks, { ref: setNavSectionEl, navLinks: legacyNavLinks, navAlignment: navAlignment, navPosition: 'below', isDefaultWSS: isDefaultWSS }))] })))] }), !hasMobileNav && mainMenuVariant === 'mega-menu' && megaMenu.openMenu && (_jsx(MegaMenuPanel, { menu: megaMenu.openMenu, panelId: mainMenuPanelId, panelRef: megaMenu.panelRef, onClose: megaMenu.onClose, onTabForwardExit: megaMenu.onTabForwardExit, onActionClose: megaMenu.onActionClose, focusOnOpen: megaMenu.focusOnOpen }))] }), _jsxs(StyledMain, { navPosition: navPosition, "$isDefaultWSS": useDefaultInlineLayout, "$hasFooter": hasFooter, "$hasConfiguredFooter": hasConfiguredFooter, previewActive: previewActive, children: [banners && _jsx(StyledBannerRegion, { children: banners }), main] }), resolvedFooterMenu ? (_jsx(ThemeOverride, { theme: headerTheme, children: footerElement })) : (footerElement), _jsx(Backdrop, { open: backdropOpen, transitionSpeed: 'none', onAfterTransitionIn: () => setDrawerOpen(true), onBeforeTransitionOut: () => setDrawerOpen(false), onClick: e => {
|
|
161
252
|
if (e.currentTarget === e.target)
|
|
162
253
|
setDrawerOpen(false);
|
|
163
254
|
}, children: _jsxs(Drawer, { open: drawerOpen, onAfterClose: () => {
|
|
@@ -169,7 +260,7 @@ const AppShell = forwardRef(function AppShell(props, ref) {
|
|
|
169
260
|
if (drawerContent === 'notifications') {
|
|
170
261
|
notifications?.onNotificationsOpen?.();
|
|
171
262
|
}
|
|
172
|
-
}, position: 'fixed', placement: end, size: 'min(26rem, calc(100vw - 5rem))', nullWhenClosed: true, children: [drawerContent === 'notifications' && notifications && (_jsx(Notifications, { ...notifications, onClose: () => setDrawerOpen(false) })), drawerContent === 'navigationOperator' && (_jsx(MobileHeaderContent, { appInfo: appInfo, navLinks:
|
|
263
|
+
}, position: 'fixed', placement: end, size: 'min(26rem, calc(100vw - 5rem))', nullWhenClosed: true, children: [drawerContent === 'notifications' && notifications && (_jsx(Notifications, { ...notifications, onClose: () => setDrawerOpen(false) })), drawerContent === 'navigationOperator' && (_jsx(MobileHeaderContent, { appInfo: appInfo, navLinks: resolvedMainMenu.length ? flattenMenuItems(resolvedMainMenu) : legacyNavLinks, operator: operator, onClose: () => setDrawerOpen(false) }))] }) })] }));
|
|
173
264
|
});
|
|
174
265
|
export default AppShell;
|
|
175
266
|
//# sourceMappingURL=AppShell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtF,OAAO,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,aAAa,EACb,eAAe,EACf,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EAC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CAAC,aAAa,CAAC,KAAK,CAAC,EACjD,OAAO,EAAE,CAAC,CAAC,EAAE;oBACX,IAAI,CAAC,CAAC,aAAa,KAAK,CAAC,CAAC,MAAM;wBAAE,aAAa,CAAC,KAAK,CAAC,CAAC;gBACzD,CAAC,YAED,MAAC,MAAM,IACL,IAAI,EAAE,UAAU,EAChB,YAAY,EAAE,GAAG,EAAE;wBACjB,WAAW,EAAE,CAAC;wBACd,IAAI,aAAa,KAAK,eAAe,EAAE,CAAC;4BACtC,aAAa,EAAE,oBAAoB,EAAE,EAAE,CAAC;wBAC1C,CAAC;oBACH,CAAC,EACD,WAAW,EAAE,GAAG,EAAE;wBAChB,IAAI,aAAa,KAAK,eAAe,EAAE,CAAC;4BACtC,aAAa,EAAE,mBAAmB,EAAE,EAAE,CAAC;wBACzC,CAAC;oBACH,CAAC,EACD,QAAQ,EAAC,OAAO,EAChB,SAAS,EAAE,GAAG,EACd,IAAI,EAAC,gCAAgC,EACrC,cAAc,mBAEb,aAAa,KAAK,eAAe,IAAI,aAAa,IAAI,CACrD,KAAC,aAAa,OAAK,aAAa,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,GAAI,CAC1E,EACA,aAAa,KAAK,oBAAoB,IAAI,CACzC,KAAC,mBAAmB,IAClB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,GACnC,CACH,IACM,GACA,IACV,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { ElementType, PropsWithoutRef } from 'react';\n\nimport {\n Avatar,\n Backdrop,\n Button,\n ThemeOverride,\n ContextSwitcher,\n debounce,\n Drawer,\n Flex,\n Icon,\n Image,\n Popover,\n registerIcon,\n SearchInput,\n SkipLinks,\n Text,\n useBreakpoint,\n useConsolidatedRef,\n useDirection,\n useElement,\n useEscape,\n useFocusWithin,\n useI18n,\n useOuterEvent,\n usePreviewManager,\n useTheme,\n VisuallyHiddenText,\n MenuButton,\n ThemeSwitcher\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent, SkipLinksProps } from '@pega/cosmos-react-core';\nimport Operator from '@pega/cosmos-react-core/lib/components/AppShell/Operator';\nimport { StyledAppHeaderOperator } from '@pega/cosmos-react-core/lib/components/AppShell/AppHeader.styles';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport * as shareIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/share.icon';\nimport { getHeaderTheme } from '@pega/cosmos-react-core/lib/components/AppShell/style-utils';\nimport useThemeMode from '@pega/cosmos-react-core/lib/hooks/useThemeMode';\n\nimport Footer from '../Footer';\n\nimport type { AppShellProps } from './AppShell.types';\nimport {\n WSSAppShellGlobalStyle,\n StyledAppHeader,\n StyledCountIcon,\n StyledHamburgerMenu,\n StyledMain,\n StyledNotificationCount,\n StyledPrimaryName,\n StyledEndNavBlock,\n StyledBannerRegion,\n StyledShareButtonContent\n} from './AppShell.styles';\nimport Notifications from './Notifications';\nimport MobileHeaderContent from './MobileHeaderContent';\nimport NavLinks from './NavLinks';\n\nregisterIcon(shareIcon);\n\nconst AppShell: ForwardRefForwardPropsComponent<AppShellProps> = forwardRef(function AppShell(\n props: PropsWithoutRef<AppShellProps>,\n ref: AppShellProps['ref']\n) {\n const {\n main,\n banners,\n appInfo,\n navLinks,\n operator,\n notifications,\n searchInput,\n contextSwitcher = {},\n navAlignment = 'end',\n navPosition = 'inline',\n isDefaultWSS = true,\n helpMenu,\n shareApp,\n portalSwitcher,\n footer\n } = props;\n const t = useI18n();\n const {\n contexts,\n onContextClick,\n label: contextSwitcherLabel = t('switch_to')\n } = contextSwitcher;\n const [backdropOpen, setBackdropOpen] = useState(false);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const [drawerContent, setDrawerContent] = useState('');\n const [notificationsPopover, setNotificationsPopover] = useState(false);\n const [searchExpanded, setSearchExpanded] = useState(false);\n const [linksCollapsed, setLinksCollapsed] = useState(false);\n const [hasMobileNav, setHasMobileNav] = useState(true);\n\n const [headerEl, setHeaderEl] = useElement<HTMLElement>();\n const [navSectionEl, setNavSectionEl] = useElement<HTMLDivElement>();\n const [popoverEl, setPopoverEl] = useElement<HTMLDivElement>();\n const [notificationsButtonEl, setNotificationsButtonEl] = useElement<HTMLButtonElement>();\n const [searchContainerEl, setSearchContainerEl] = useElement<HTMLDivElement>();\n const searchInputRef = useRef<HTMLInputElement>(null);\n const minInlineWidth = useRef(0);\n const theme = useTheme();\n const { previewActive } = usePreviewManager();\n const { themeMode, onThemeModeChange } = useThemeMode();\n const headerTheme = useMemo(() => getHeaderTheme(theme), [theme]);\n\n const headerRef = useConsolidatedRef(setHeaderEl, ref);\n\n const isSmallOrAbove = useBreakpoint('sm');\n const { end } = useDirection();\n\n let appInfoAs: ElementType = 'div';\n if (appInfo.href) appInfoAs = 'a';\n else if (appInfo.onClick) appInfoAs = BareButton;\n\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: { ariaLabel: t('main_content'), selector: 'main' }\n }\n ],\n [t]\n );\n\n const closeNotificationsPopover = useCallback(() => {\n if (!notificationsPopover) return;\n\n setNotificationsPopover(false);\n notifications?.onNotificationsClose?.();\n\n notificationsButtonEl?.focus();\n }, [notificationsPopover, notifications, notificationsButtonEl]);\n\n const closeDrawer = () => {\n setDrawerContent('');\n setBackdropOpen(false);\n };\n\n const openDrawer = (content: 'notifications' | 'navigationOperator') => {\n setDrawerContent(content);\n setBackdropOpen(true);\n };\n\n useOuterEvent('mousedown', [popoverEl, notificationsButtonEl], closeNotificationsPopover);\n\n useEscape(closeNotificationsPopover, popoverEl);\n\n const debouncedResize = debounce((entries: ResizeObserverEntry[]) => {\n if (entries[0].contentRect.width > minInlineWidth.current) {\n setLinksCollapsed(false);\n }\n }, 100);\n\n useEffect(() => {\n minInlineWidth.current = 0;\n\n if (isSmallOrAbove) {\n setLinksCollapsed(false);\n }\n }, [isSmallOrAbove, navAlignment, navLinks, navPosition, isDefaultWSS]);\n\n useEffect(() => {\n const resizeObserver = new ResizeObserver(debouncedResize);\n const intersectionRoot = navSectionEl;\n\n const intersectionObserver = new IntersectionObserver(\n entries => {\n if (entries.some(({ intersectionRatio }) => intersectionRatio < 1) && !linksCollapsed) {\n if (headerEl) minInlineWidth.current = headerEl.clientWidth + 1;\n setLinksCollapsed(true);\n } else if (navSectionEl) navSectionEl.style.visibility = 'visible';\n },\n { root: intersectionRoot, threshold: 1 }\n );\n\n if (headerEl && navSectionEl?.firstElementChild && navSectionEl?.lastElementChild) {\n const firstNavItem = navSectionEl.firstElementChild;\n const lastNavItem = navSectionEl.lastElementChild;\n\n intersectionObserver.observe(firstNavItem);\n\n if (lastNavItem !== firstNavItem) {\n intersectionObserver.observe(lastNavItem);\n }\n\n resizeObserver.observe(headerEl);\n }\n\n return () => {\n intersectionObserver.disconnect();\n resizeObserver.disconnect();\n };\n }, [headerEl, navSectionEl, navLinks, navAlignment, navPosition, linksCollapsed]);\n\n useEffect(() => {\n setHasMobileNav(!isSmallOrAbove || linksCollapsed);\n }, [isSmallOrAbove, linksCollapsed]);\n\n useEffect(() => {\n if (searchExpanded) searchInputRef.current?.focus();\n }, [searchExpanded]);\n\n useFocusWithin([searchContainerEl], isFocused => {\n if (!isFocused && searchExpanded && !searchInput?.value) {\n setSearchExpanded(false);\n }\n });\n\n useEffect(() => {\n if (!hasMobileNav && drawerOpen) {\n if (drawerContent === 'notifications' && notifications) {\n setNotificationsPopover(true);\n }\n setDrawerOpen(false);\n } else if (hasMobileNav && notificationsPopover) {\n setNotificationsPopover(false);\n openDrawer('notifications');\n }\n }, [hasMobileNav, drawerOpen]);\n\n const hasFooter = !!footer?.length;\n const useDefaultInlineLayout = isDefaultWSS || navPosition === 'inline';\n const shareLabel = shareApp?.label ?? t('app_shell_share');\n\n return (\n <>\n <WSSAppShellGlobalStyle\n navPosition={navPosition}\n hasFooter={hasFooter}\n hasMobileNav={hasMobileNav}\n isDefaultWSS={useDefaultInlineLayout}\n />\n <SkipLinks items={skipLinks} />\n <ThemeOverride theme={headerTheme}>\n <StyledAppHeader\n ref={headerRef}\n navPosition={navPosition}\n $isDefaultWSS={isDefaultWSS}\n $hasMobileNav={hasMobileNav}\n >\n <Flex\n container={{\n alignItems: 'center',\n justify: 'between',\n pad: navPosition === 'below' ? [1, 0] : 0\n }}\n >\n {useDefaultInlineLayout ? (\n <>\n <Flex container={{ alignItems: 'center' }}>\n {contexts && onContextClick && contexts.length > 1 && (\n <ContextSwitcher\n contexts={contexts}\n onContextClick={onContextClick}\n label={contextSwitcherLabel}\n container={{ justify: 'center', pad: [0, 0, 0, isDefaultWSS ? 1 : 0] }}\n />\n )}\n\n <Flex\n as={appInfoAs}\n container={{ alignItems: 'center', pad: [1, 4, 1, 1], gap: 1 }}\n href={appInfo.href}\n onClick={appInfo.onClick}\n target={appInfo.target}\n >\n <Image src={appInfo.imageSrc} alt={appInfo.appName} />\n {!hasMobileNav && (\n <Flex as='span' container={{ direction: 'row', gap: 1, alignItems: 'end' }}>\n <Text\n as={appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName}\n variant='h1'\n >\n {appInfo.appName}\n </Text>\n {appInfo.portalName && (\n <Text variant='secondary'>{appInfo.portalName}</Text>\n )}\n </Flex>\n )}\n </Flex>\n </Flex>\n\n {!hasMobileNav && navPosition === 'inline' && (\n <NavLinks\n ref={setNavSectionEl}\n navLinks={navLinks}\n navAlignment={navAlignment}\n navPosition={navPosition}\n isDefaultWSS\n />\n )}\n </>\n ) : (\n <Flex container={{ alignItems: 'center' }}>\n {contexts && onContextClick && contexts.length > 1 && (\n <ContextSwitcher\n contexts={contexts}\n onContextClick={onContextClick}\n label={contextSwitcherLabel}\n container={{ justify: 'center', pad: [0, 0, 0, isDefaultWSS ? 1 : 0] }}\n />\n )}\n\n {navPosition !== 'below' || hasMobileNav ? (\n <Flex\n as={appInfoAs}\n container={{ alignItems: 'center', pad: [1, 4, 1, 1], gap: 1 }}\n href={appInfo.href}\n onClick={appInfo.onClick}\n target={appInfo.target}\n >\n <Image src={appInfo.imageSrc} alt={appInfo.appName} />\n {!hasMobileNav && (\n <Flex as='span' container={{ direction: 'row', gap: 1, alignItems: 'end' }}>\n <Text\n as={appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName}\n variant='h1'\n >\n {appInfo.appName}\n </Text>\n {appInfo.portalName && (\n <Text variant='secondary'>{appInfo.portalName}</Text>\n )}\n </Flex>\n )}\n </Flex>\n ) : null}\n </Flex>\n )}\n\n <Flex\n as={StyledEndNavBlock}\n container={{ alignItems: 'center', gap: 1 }}\n mobile={hasMobileNav}\n >\n {!hasMobileNav && searchInput && (\n <div ref={setSearchContainerEl} role='search' aria-label={t('search')}>\n {searchExpanded ? (\n <SearchInput\n {...searchInput}\n ref={searchInputRef}\n onSearchSubmit={\n searchInput.onSearchSubmit\n ? value => {\n searchInput.onSearchSubmit?.(value);\n setSearchExpanded(false);\n }\n : undefined\n }\n />\n ) : (\n <Button\n icon\n variant='simple'\n label={t('search')}\n aria-label={t('expand_search')}\n onClick={() => setSearchExpanded(true)}\n >\n <Icon name='search' />\n </Button>\n )}\n </div>\n )}\n\n {onThemeModeChange && (\n <ThemeSwitcher themeMode={themeMode} onThemeModeChange={onThemeModeChange} />\n )}\n\n {notifications && (\n <>\n <Button\n ref={setNotificationsButtonEl}\n variant='simple'\n label={t('open_app_header_notifications')}\n icon\n onClick={() => {\n if (!hasMobileNav) {\n if (notificationsPopover) {\n setNotificationsPopover(false);\n notifications.onNotificationsClose?.();\n } else {\n setNotificationsPopover(true);\n notifications.onNotificationsOpen?.();\n }\n } else {\n openDrawer('notifications');\n }\n }}\n >\n <StyledNotificationCount>\n <Icon name='bell' />\n {!!notifications.count && (\n <StyledCountIcon variant='urgent'>{notifications.count}</StyledCountIcon>\n )}\n </StyledNotificationCount>\n </Button>\n <Popover\n ref={setPopoverEl}\n show={notificationsPopover}\n target={notificationsButtonEl}\n placement='bottom-end'\n >\n <Notifications {...notifications} popover />\n </Popover>\n </>\n )}\n\n {helpMenu && (\n <MenuButton\n variant='simple'\n icon='help'\n text={t('app_header_help')}\n iconOnly\n menu={{\n items: helpMenu\n }}\n />\n )}\n\n {portalSwitcher && <MenuButton {...portalSwitcher} />}\n\n {shareApp && (\n <Button variant='secondary' onClick={shareApp.onClick}>\n <StyledShareButtonContent name='share' set='budicon' />\n <span>{shareLabel}</span>\n </Button>\n )}\n\n {!hasMobileNav && (\n <Operator\n as={StyledAppHeaderOperator}\n actions={operator.actions}\n popover={{ placement: 'bottom-start' }}\n name={operator.avatar.name}\n >\n <Avatar {...operator.avatar} />\n </Operator>\n )}\n\n {hasMobileNav && (\n <Button\n as={StyledHamburgerMenu}\n label={t('open_app_header_drawer')}\n variant='simple'\n icon\n onClick={() => openDrawer('navigationOperator')}\n >\n <Icon name='bars' />\n </Button>\n )}\n </Flex>\n </Flex>\n\n {navPosition === 'below' &&\n !hasMobileNav &&\n (useDefaultInlineLayout ? (\n <NavLinks\n ref={setNavSectionEl}\n navLinks={navLinks}\n navAlignment={navAlignment}\n navPosition={navPosition}\n isDefaultWSS\n />\n ) : (\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Flex\n as={appInfoAs}\n container={{ alignItems: 'center', gap: 1 }}\n href={appInfo.href}\n onClick={appInfo.onClick}\n target={appInfo.target}\n >\n <Image src={appInfo.imageSrc} alt={appInfo.appName} />\n <Flex as='span' container={{ direction: 'row', gap: 1, alignItems: 'center' }}>\n <Text\n as={appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName}\n variant='h1'\n >\n {appInfo.appName}\n </Text>\n {appInfo.portalName && <Text variant='secondary'>{appInfo.portalName}</Text>}\n </Flex>\n </Flex>\n <NavLinks\n ref={setNavSectionEl}\n navLinks={navLinks}\n navAlignment={navAlignment}\n navPosition='below'\n isDefaultWSS={isDefaultWSS}\n />\n </Flex>\n ))}\n </StyledAppHeader>\n </ThemeOverride>\n\n <StyledMain\n navPosition={navPosition}\n $isDefaultWSS={useDefaultInlineLayout}\n $hasFooter={hasFooter}\n previewActive={previewActive}\n >\n {banners && <StyledBannerRegion>{banners}</StyledBannerRegion>}\n {main}\n </StyledMain>\n\n {footer && footer.length > 0 && <Footer links={footer} />}\n\n <Backdrop\n open={backdropOpen}\n transitionSpeed='none'\n onAfterTransitionIn={() => setDrawerOpen(true)}\n onBeforeTransitionOut={() => setDrawerOpen(false)}\n onClick={e => {\n if (e.currentTarget === e.target) setDrawerOpen(false);\n }}\n >\n <Drawer\n open={drawerOpen}\n onAfterClose={() => {\n closeDrawer();\n if (drawerContent === 'notifications') {\n notifications?.onNotificationsClose?.();\n }\n }}\n onAfterOpen={() => {\n if (drawerContent === 'notifications') {\n notifications?.onNotificationsOpen?.();\n }\n }}\n position='fixed'\n placement={end}\n size='min(26rem, calc(100vw - 5rem))'\n nullWhenClosed\n >\n {drawerContent === 'notifications' && notifications && (\n <Notifications {...notifications} onClose={() => setDrawerOpen(false)} />\n )}\n {drawerContent === 'navigationOperator' && (\n <MobileHeaderContent\n appInfo={appInfo}\n navLinks={navLinks}\n operator={operator}\n onClose={() => setDrawerOpen(false)}\n />\n )}\n </Drawer>\n </Backdrop>\n </>\n );\n});\n\nexport default AppShell;\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG7F,OAAO,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,aAAa,EACb,eAAe,EACf,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,IAAI,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BAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,cAAc,EAE/E,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,GACnC,CACH,IACM,GACA,IACV,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef, useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';\nimport type { ElementType, PropsWithoutRef } from 'react';\n\nimport {\n Avatar,\n Backdrop,\n Button,\n ThemeOverride,\n ContextSwitcher,\n debounce,\n Drawer,\n Flex,\n Icon,\n Image,\n Popover,\n registerIcon,\n SearchInput,\n SkipLinks,\n Text,\n useBreakpoint,\n useConsolidatedRef,\n useDirection,\n useElement,\n useEscape,\n useFocusWithin,\n useI18n,\n useOuterEvent,\n usePreviewManager,\n useTheme,\n VisuallyHiddenText,\n MenuButton,\n ThemeSwitcher\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent, SkipLinksProps } from '@pega/cosmos-react-core';\nimport Operator from '@pega/cosmos-react-core/lib/components/AppShell/Operator';\nimport { StyledAppHeaderOperator } from '@pega/cosmos-react-core/lib/components/AppShell/AppHeader.styles';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport * as shareExternalIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/share-external.icon';\nimport { getHeaderTheme } from '@pega/cosmos-react-core/lib/components/AppShell/style-utils';\nimport useThemeMode from '@pega/cosmos-react-core/lib/hooks/useThemeMode';\n\nimport Footer from '../Footer';\nimport type { FooterMenuProps } from '../Footer';\n\nimport type { AppShellProps, NavLinkProps } from './AppShell.types';\nimport { flattenMenuItems, toFooterMenuEntries } from './AppShell.utils';\nimport {\n WSSAppShellGlobalStyle,\n StyledAppHeader,\n StyledCountIcon,\n StyledHamburgerMenu,\n StyledMain,\n StyledNotificationCount,\n StyledMainMenuLink,\n StyledNav,\n StyledPrimaryName,\n StyledEndNavBlock,\n StyledBannerRegion,\n StyledShareButtonContent\n} from './AppShell.styles';\nimport Notifications from './Notifications';\nimport MobileHeaderContent from './MobileHeaderContent';\nimport NavLinks from './NavLinks';\nimport AppShellMenuControl from './AppShellMenuControl';\nimport { MegaMenuPanel, MegaMenuTriggers, useMegaMenu } from './MegaMenu';\n\nregisterIcon(shareExternalIcon);\n\nconst AppShell: ForwardRefForwardPropsComponent<AppShellProps> = forwardRef(function AppShell(\n props: PropsWithoutRef<AppShellProps>,\n ref: AppShellProps['ref']\n) {\n const {\n main,\n banners,\n appInfo,\n mainNav,\n navLinks: deprecatedNavLinks,\n operator,\n notifications,\n searchInput,\n contextSwitcher = {},\n navAlignment = 'end',\n navPosition = 'inline',\n isDefaultWSS = true,\n helpMenu,\n shareApp,\n portalSwitcher,\n footer\n } = props;\n const configuredMainMenu = Array.isArray(mainNav) ? undefined : mainNav;\n let legacyNavLinks: NavLinkProps[];\n if (Array.isArray(mainNav)) {\n legacyNavLinks = mainNav;\n } else if (mainNav !== undefined) {\n legacyNavLinks = configuredMainMenu?.fallbackLinks ?? [];\n } else {\n legacyNavLinks = deprecatedNavLinks ?? [];\n }\n const mainMenuVariant = configuredMainMenu?.variant ?? 'mega-menu';\n const configuredFooterMenu = footer && !Array.isArray(footer) ? footer : undefined;\n const footerLinks = Array.isArray(footer) ? footer : configuredFooterMenu?.fallbackLinks ?? [];\n const t = useI18n();\n const {\n contexts,\n onContextClick,\n label: contextSwitcherLabel = t('switch_to')\n } = contextSwitcher;\n const [backdropOpen, setBackdropOpen] = useState(false);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const [drawerContent, setDrawerContent] = useState('');\n const [notificationsPopover, setNotificationsPopover] = useState(false);\n const [searchExpanded, setSearchExpanded] = useState(false);\n const [linksCollapsed, setLinksCollapsed] = useState(false);\n const [hasMobileNav, setHasMobileNav] = useState(true);\n\n const [headerEl, setHeaderEl] = useElement<HTMLElement>();\n const [navSectionEl, setNavSectionEl] = useElement<HTMLDivElement>();\n const [popoverEl, setPopoverEl] = useElement<HTMLDivElement>();\n const [notificationsButtonEl, setNotificationsButtonEl] = useElement<HTMLButtonElement>();\n const [searchContainerEl, setSearchContainerEl] = useElement<HTMLDivElement>();\n const [footerEl, setFooterEl] = useElement<HTMLElement>();\n const [configuredFooterHeight, setConfiguredFooterHeight] = useState<string>();\n const searchInputRef = useRef<HTMLInputElement>(null);\n const minInlineWidth = useRef(0);\n const theme = useTheme();\n const { previewActive } = usePreviewManager();\n const { themeMode, onThemeModeChange } = useThemeMode();\n const headerTheme = useMemo(() => getHeaderTheme(theme), [theme]);\n\n const headerRef = useConsolidatedRef(setHeaderEl, ref);\n\n const isSmallOrAbove = useBreakpoint('sm');\n const configuredMainMenuItems = configuredMainMenu?.items;\n const resolvedMainMenu = useMemo(\n () => configuredMainMenuItems?.filter(Boolean) ?? [],\n [configuredMainMenuItems]\n );\n const resolvedFooterMenu = useMemo<FooterMenuProps | undefined>(() => {\n if (!configuredFooterMenu?.items.length) return undefined;\n if (configuredFooterMenu.variant === 'fat-footer') {\n const items = toFooterMenuEntries(configuredFooterMenu.items);\n return items.length ? { variant: 'fat-footer', items } : undefined;\n }\n\n const items = flattenMenuItems(configuredFooterMenu.items).map(item => ({\n type: 'link' as const,\n id: item.id,\n label: item.text,\n ...(item.onClick && { onClick: item.onClick })\n }));\n return items.length ? { variant: configuredFooterMenu.variant, items } : undefined;\n }, [configuredFooterMenu]);\n const hasConfiguredFooter = !!configuredFooterMenu;\n\n useEffect(() => {\n if (!footerEl || !hasConfiguredFooter) {\n setConfiguredFooterHeight(undefined);\n return undefined;\n }\n\n const measureFooter = () => {\n const root = footerEl.ownerDocument.documentElement;\n const rootFontSize = parseFloat(getComputedStyle(root).fontSize);\n const height = footerEl.getBoundingClientRect().height;\n if (rootFontSize > 0 && height > 0) {\n setConfiguredFooterHeight(`${height / rootFontSize}rem`);\n }\n };\n\n measureFooter();\n const observer = new ResizeObserver(measureFooter);\n observer.observe(footerEl);\n return () => observer.disconnect();\n }, [footerEl, hasConfiguredFooter]);\n\n const activeNavItems = resolvedMainMenu.length ? resolvedMainMenu : legacyNavLinks;\n const mainMenuPanelId = useId();\n const megaMenu = useMegaMenu({\n menus: resolvedMainMenu,\n navElement: navSectionEl,\n isMobile: hasMobileNav\n });\n const { end } = useDirection();\n\n let appInfoAs: ElementType = 'div';\n if (appInfo.href) appInfoAs = 'a';\n else if (appInfo.onClick) appInfoAs = BareButton;\n\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: { ariaLabel: t('main_content'), selector: 'main' }\n }\n ],\n [t]\n );\n\n const closeNotificationsPopover = useCallback(() => {\n if (!notificationsPopover) return;\n\n setNotificationsPopover(false);\n notifications?.onNotificationsClose?.();\n\n notificationsButtonEl?.focus();\n }, [notificationsPopover, notifications, notificationsButtonEl]);\n\n const closeDrawer = () => {\n setDrawerContent('');\n setBackdropOpen(false);\n };\n\n const openDrawer = (content: 'notifications' | 'navigationOperator') => {\n setDrawerContent(content);\n setBackdropOpen(true);\n };\n\n useOuterEvent('mousedown', [popoverEl, notificationsButtonEl], closeNotificationsPopover);\n\n useEscape(closeNotificationsPopover, popoverEl);\n\n const debouncedResize = debounce((entries: ResizeObserverEntry[]) => {\n if (entries[0].contentRect.width > minInlineWidth.current) {\n setLinksCollapsed(false);\n }\n }, 100);\n\n useEffect(() => {\n minInlineWidth.current = 0;\n\n if (isSmallOrAbove) {\n setLinksCollapsed(false);\n }\n }, [isSmallOrAbove, navAlignment, activeNavItems, mainMenuVariant, navPosition, isDefaultWSS]);\n\n useEffect(() => {\n if (!headerEl) return undefined;\n\n const resizeObserver = new ResizeObserver(debouncedResize);\n resizeObserver.observe(headerEl);\n\n let intersectionObserver: IntersectionObserver | undefined;\n\n if (navSectionEl?.firstElementChild && navSectionEl?.lastElementChild) {\n const firstNavItem = navSectionEl.firstElementChild;\n const lastNavItem = navSectionEl.lastElementChild;\n\n intersectionObserver = new IntersectionObserver(\n entries => {\n if (entries.some(({ intersectionRatio }) => intersectionRatio < 1) && !linksCollapsed) {\n minInlineWidth.current = headerEl.clientWidth + 1;\n setLinksCollapsed(true);\n } else {\n navSectionEl.style.visibility = 'visible';\n }\n },\n { root: navSectionEl, threshold: 1 }\n );\n\n intersectionObserver.observe(firstNavItem);\n\n if (lastNavItem !== firstNavItem) {\n intersectionObserver.observe(lastNavItem);\n }\n }\n\n return () => {\n intersectionObserver?.disconnect();\n resizeObserver.disconnect();\n };\n }, [\n headerEl,\n navSectionEl,\n activeNavItems,\n mainMenuVariant,\n navAlignment,\n navPosition,\n linksCollapsed\n ]);\n\n useEffect(() => {\n setHasMobileNav(!isSmallOrAbove || linksCollapsed);\n }, [isSmallOrAbove, linksCollapsed]);\n\n useEffect(() => {\n if (searchExpanded) searchInputRef.current?.focus();\n }, [searchExpanded]);\n\n useFocusWithin([searchContainerEl], isFocused => {\n if (!isFocused && searchExpanded && !searchInput?.value) {\n setSearchExpanded(false);\n }\n });\n\n useEffect(() => {\n if (!hasMobileNav && drawerOpen) {\n if (drawerContent === 'notifications' && notifications) {\n setNotificationsPopover(true);\n }\n setDrawerOpen(false);\n } else if (hasMobileNav && notificationsPopover) {\n setNotificationsPopover(false);\n openDrawer('notifications');\n }\n }, [hasMobileNav, drawerOpen]);\n\n const hasFooter = !!(footerLinks.length || resolvedFooterMenu);\n const useDefaultInlineLayout = isDefaultWSS || navPosition === 'inline';\n const renderMainMenu = () => {\n if (mainMenuVariant === 'individual-menus') {\n return resolvedMainMenu.map(menu => (\n <StyledMainMenuLink\n as={AppShellMenuControl}\n key={menu.id}\n menu={menu}\n $isDefaultWSS={isDefaultWSS}\n $navPosition={navPosition}\n />\n ));\n }\n\n return (\n <MegaMenuTriggers\n menus={resolvedMainMenu}\n openId={megaMenu.openMenuId}\n panelId={mainMenuPanelId}\n onOpenChange={megaMenu.onOpenChange}\n onTriggerOpen={megaMenu.onTriggerOpen}\n isDefaultWSS={isDefaultWSS}\n navPosition={navPosition}\n />\n );\n };\n const shareLabel = shareApp?.label ?? t('app_shell_share');\n let footerElement = null;\n if (resolvedFooterMenu) {\n footerElement = (\n <Footer\n source='menu'\n menu={resolvedFooterMenu}\n fallbackLinks={footerLinks}\n elementRef={setFooterEl}\n />\n );\n } else if (footerLinks.length) {\n footerElement = <Footer source='legacy' links={footerLinks} elementRef={setFooterEl} />;\n }\n\n return (\n <>\n <WSSAppShellGlobalStyle\n navPosition={navPosition}\n hasFooter={hasFooter}\n configuredFooterHeight={hasConfiguredFooter ? configuredFooterHeight : undefined}\n hasMobileNav={hasMobileNav}\n isDefaultWSS={useDefaultInlineLayout}\n />\n <SkipLinks items={skipLinks} />\n <ThemeOverride theme={headerTheme}>\n <StyledAppHeader\n ref={headerRef}\n navPosition={navPosition}\n $isDefaultWSS={isDefaultWSS}\n $hasMobileNav={hasMobileNav}\n >\n <Flex\n container={{\n alignItems: 'center',\n justify: 'between',\n pad: navPosition === 'below' ? [1, 0] : 0\n }}\n >\n {useDefaultInlineLayout ? (\n <>\n <Flex container={{ alignItems: 'center' }}>\n {contexts && onContextClick && contexts.length > 1 && (\n <ContextSwitcher\n contexts={contexts}\n onContextClick={onContextClick}\n label={contextSwitcherLabel}\n container={{ justify: 'center', pad: [0, 0, 0, isDefaultWSS ? 1 : 0] }}\n />\n )}\n\n <Flex\n as={appInfoAs}\n container={{ alignItems: 'center', pad: [1, 4, 1, 1], gap: 1 }}\n href={appInfo.href}\n onClick={appInfo.onClick}\n target={appInfo.target}\n >\n <Image src={appInfo.imageSrc} alt={appInfo.appName} />\n {!hasMobileNav && (\n <Flex as='span' container={{ direction: 'row', gap: 1, alignItems: 'end' }}>\n <Text\n as={appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName}\n variant='h1'\n >\n {appInfo.appName}\n </Text>\n {appInfo.portalName && (\n <Text variant='secondary'>{appInfo.portalName}</Text>\n )}\n </Flex>\n )}\n </Flex>\n </Flex>\n\n {!hasMobileNav &&\n navPosition === 'inline' &&\n (resolvedMainMenu.length ? (\n <Flex\n as={StyledNav}\n ref={setNavSectionEl}\n item={{ grow: 1, basis: '0' }}\n container={{ alignItems: 'center', gap: 0.5, justify: navAlignment }}\n >\n {renderMainMenu()}\n </Flex>\n ) : (\n <NavLinks\n ref={setNavSectionEl}\n navLinks={legacyNavLinks}\n navAlignment={navAlignment}\n navPosition={navPosition}\n isDefaultWSS\n />\n ))}\n\n {!hasMobileNav && navPosition !== 'inline' && resolvedMainMenu.length === 0 && (\n <NavLinks\n ref={setNavSectionEl}\n navLinks={legacyNavLinks}\n navAlignment={navAlignment}\n navPosition={navPosition}\n isDefaultWSS\n />\n )}\n </>\n ) : (\n <Flex container={{ alignItems: 'center' }}>\n {contexts && onContextClick && contexts.length > 1 && (\n <ContextSwitcher\n contexts={contexts}\n onContextClick={onContextClick}\n label={contextSwitcherLabel}\n container={{ justify: 'center', pad: [0, 0, 0, isDefaultWSS ? 1 : 0] }}\n />\n )}\n\n {navPosition !== 'below' || hasMobileNav ? (\n <Flex\n as={appInfoAs}\n container={{ alignItems: 'center', pad: [1, 4, 1, 1], gap: 1 }}\n href={appInfo.href}\n onClick={appInfo.onClick}\n target={appInfo.target}\n >\n <Image src={appInfo.imageSrc} alt={appInfo.appName} />\n {!hasMobileNav && (\n <Flex as='span' container={{ direction: 'row', gap: 1, alignItems: 'end' }}>\n <Text\n as={appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName}\n variant='h1'\n >\n {appInfo.appName}\n </Text>\n {appInfo.portalName && (\n <Text variant='secondary'>{appInfo.portalName}</Text>\n )}\n </Flex>\n )}\n </Flex>\n ) : null}\n </Flex>\n )}\n\n <Flex\n as={StyledEndNavBlock}\n container={{ alignItems: 'center', gap: 1 }}\n mobile={hasMobileNav}\n >\n {!hasMobileNav && searchInput && (\n <div ref={setSearchContainerEl} role='search' aria-label={t('search')}>\n {searchExpanded ? (\n <SearchInput\n {...searchInput}\n ref={searchInputRef}\n onSearchSubmit={\n searchInput.onSearchSubmit\n ? value => {\n searchInput.onSearchSubmit?.(value);\n setSearchExpanded(false);\n }\n : undefined\n }\n />\n ) : (\n <Button\n icon\n variant='simple'\n label={t('search')}\n aria-label={t('expand_search')}\n onClick={() => setSearchExpanded(true)}\n >\n <Icon name='search' />\n </Button>\n )}\n </div>\n )}\n\n {onThemeModeChange && (\n <ThemeSwitcher themeMode={themeMode} onThemeModeChange={onThemeModeChange} />\n )}\n\n {notifications && (\n <>\n <Button\n ref={setNotificationsButtonEl}\n variant='simple'\n label={t('open_app_header_notifications')}\n icon\n onClick={() => {\n if (!hasMobileNav) {\n if (notificationsPopover) {\n setNotificationsPopover(false);\n notifications.onNotificationsClose?.();\n } else {\n setNotificationsPopover(true);\n notifications.onNotificationsOpen?.();\n }\n } else {\n openDrawer('notifications');\n }\n }}\n >\n <StyledNotificationCount>\n <Icon name='bell' />\n {!!notifications.count && (\n <StyledCountIcon variant='urgent'>{notifications.count}</StyledCountIcon>\n )}\n </StyledNotificationCount>\n </Button>\n <Popover\n ref={setPopoverEl}\n show={notificationsPopover}\n target={notificationsButtonEl}\n placement='bottom-end'\n >\n <Notifications {...notifications} popover />\n </Popover>\n </>\n )}\n\n {helpMenu && (\n <MenuButton\n variant='simple'\n icon='help'\n text={t('app_header_help')}\n iconOnly\n menu={{\n items: helpMenu\n }}\n />\n )}\n\n {portalSwitcher && <MenuButton {...portalSwitcher} />}\n\n {shareApp &&\n (hasMobileNav ? (\n <Button variant='secondary' icon label={shareLabel} onClick={shareApp.onClick}>\n <StyledShareButtonContent name='share-external' set='budicon' />\n </Button>\n ) : (\n <Button variant='secondary' onClick={shareApp.onClick}>\n <StyledShareButtonContent name='share-external' set='budicon' />\n <span>{shareLabel}</span>\n </Button>\n ))}\n\n {!hasMobileNav && (\n <Operator\n as={StyledAppHeaderOperator}\n actions={operator.actions}\n popover={{ placement: 'bottom-start' }}\n name={operator.avatar.name}\n >\n <Avatar {...operator.avatar} />\n </Operator>\n )}\n\n {hasMobileNav && (\n <Button\n as={StyledHamburgerMenu}\n label={t('open_app_header_drawer')}\n variant='simple'\n icon\n onClick={() => {\n megaMenu.close();\n openDrawer('navigationOperator');\n }}\n >\n <Icon name='bars' />\n </Button>\n )}\n </Flex>\n </Flex>\n\n {navPosition === 'below' &&\n !hasMobileNav &&\n (useDefaultInlineLayout ? (\n <Flex container={{ justify: navAlignment }}>\n {resolvedMainMenu.length ? (\n <Flex\n as={StyledNav}\n ref={setNavSectionEl}\n item={{ grow: 1, basis: '0' }}\n container={{ alignItems: 'center', gap: 0.5, justify: navAlignment }}\n >\n {renderMainMenu()}\n </Flex>\n ) : (\n <NavLinks\n ref={setNavSectionEl}\n navLinks={legacyNavLinks}\n navAlignment={navAlignment}\n navPosition={navPosition}\n isDefaultWSS\n />\n )}\n </Flex>\n ) : (\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Flex\n as={appInfoAs}\n container={{ alignItems: 'center', gap: 1 }}\n href={appInfo.href}\n onClick={appInfo.onClick}\n target={appInfo.target}\n >\n <Image src={appInfo.imageSrc} alt={appInfo.appName} />\n <Flex as='span' container={{ direction: 'row', gap: 1, alignItems: 'center' }}>\n <Text\n as={appInfo.appNameHidden ? VisuallyHiddenText : StyledPrimaryName}\n variant='h1'\n >\n {appInfo.appName}\n </Text>\n {appInfo.portalName && <Text variant='secondary'>{appInfo.portalName}</Text>}\n </Flex>\n </Flex>\n {resolvedMainMenu.length ? (\n <Flex\n as={StyledNav}\n ref={setNavSectionEl}\n item={{ grow: 1 }}\n container={{ alignItems: 'center', gap: 0.5, justify: navAlignment }}\n >\n {renderMainMenu()}\n </Flex>\n ) : (\n <NavLinks\n ref={setNavSectionEl}\n navLinks={legacyNavLinks}\n navAlignment={navAlignment}\n navPosition='below'\n isDefaultWSS={isDefaultWSS}\n />\n )}\n </Flex>\n ))}\n </StyledAppHeader>\n {!hasMobileNav && mainMenuVariant === 'mega-menu' && megaMenu.openMenu && (\n <MegaMenuPanel\n menu={megaMenu.openMenu}\n panelId={mainMenuPanelId}\n panelRef={megaMenu.panelRef}\n onClose={megaMenu.onClose}\n onTabForwardExit={megaMenu.onTabForwardExit}\n onActionClose={megaMenu.onActionClose}\n focusOnOpen={megaMenu.focusOnOpen}\n />\n )}\n </ThemeOverride>\n\n <StyledMain\n navPosition={navPosition}\n $isDefaultWSS={useDefaultInlineLayout}\n $hasFooter={hasFooter}\n $hasConfiguredFooter={hasConfiguredFooter}\n previewActive={previewActive}\n >\n {banners && <StyledBannerRegion>{banners}</StyledBannerRegion>}\n {main}\n </StyledMain>\n\n {resolvedFooterMenu ? (\n <ThemeOverride theme={headerTheme}>{footerElement}</ThemeOverride>\n ) : (\n footerElement\n )}\n\n <Backdrop\n open={backdropOpen}\n transitionSpeed='none'\n onAfterTransitionIn={() => setDrawerOpen(true)}\n onBeforeTransitionOut={() => setDrawerOpen(false)}\n onClick={e => {\n if (e.currentTarget === e.target) setDrawerOpen(false);\n }}\n >\n <Drawer\n open={drawerOpen}\n onAfterClose={() => {\n closeDrawer();\n if (drawerContent === 'notifications') {\n notifications?.onNotificationsClose?.();\n }\n }}\n onAfterOpen={() => {\n if (drawerContent === 'notifications') {\n notifications?.onNotificationsOpen?.();\n }\n }}\n position='fixed'\n placement={end}\n size='min(26rem, calc(100vw - 5rem))'\n nullWhenClosed\n >\n {drawerContent === 'notifications' && notifications && (\n <Notifications {...notifications} onClose={() => setDrawerOpen(false)} />\n )}\n {drawerContent === 'navigationOperator' && (\n <MobileHeaderContent\n appInfo={appInfo}\n navLinks={\n resolvedMainMenu.length ? flattenMenuItems(resolvedMainMenu) : legacyNavLinks\n }\n operator={operator}\n onClose={() => setDrawerOpen(false)}\n />\n )}\n </Drawer>\n </Backdrop>\n </>\n );\n});\n\nexport default AppShell;\n"]}
|
|
@@ -3,6 +3,7 @@ export declare const footerHeight = "2.5rem";
|
|
|
3
3
|
export declare const WSSAppShellGlobalStyle: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & {
|
|
4
4
|
navPosition: AppShellProps["navPosition"];
|
|
5
5
|
hasFooter: boolean;
|
|
6
|
+
configuredFooterHeight?: string;
|
|
6
7
|
hasMobileNav: boolean;
|
|
7
8
|
isDefaultWSS: boolean;
|
|
8
9
|
}>;
|
|
@@ -18,39 +19,29 @@ export declare const StyledAppHeader: import("styled-components/dist/types").ISt
|
|
|
18
19
|
export declare const StyledEndNavBlock: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
19
20
|
mobile: boolean;
|
|
20
21
|
}>> & string;
|
|
21
|
-
export declare const StyledShareButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").
|
|
22
|
-
set?: string;
|
|
23
|
-
name: string;
|
|
24
|
-
emphasized?: boolean;
|
|
25
|
-
size?: "s" | "m" | "l" | "font-size";
|
|
26
|
-
} & {
|
|
27
|
-
background: string;
|
|
28
|
-
foreground?: string;
|
|
29
|
-
shape?: "square" | "circle";
|
|
30
|
-
} & Omit<import("@pega/cosmos-react-core").Attributes<"div">, "size" | "background" | "set" | "name" | "children" | "shape" | "foreground" | "emphasized">, never> | import("styled-components").FastOmit<import("@pega/cosmos-react-core").NoChildrenProp & {
|
|
31
|
-
set?: string;
|
|
32
|
-
name: string;
|
|
33
|
-
emphasized?: boolean;
|
|
34
|
-
size?: "s" | "m" | "l" | "font-size";
|
|
35
|
-
} & {
|
|
36
|
-
background?: never;
|
|
37
|
-
foreground?: never;
|
|
38
|
-
shape?: never;
|
|
39
|
-
} & Omit<import("@pega/cosmos-react-core").Attributes<"svg">, "size" | "background" | "set" | "name" | "children" | "shape" | "foreground" | "emphasized">, never>, import("styled-components/dist/types").BaseObject>> & string;
|
|
22
|
+
export declare const StyledShareButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("@pega/cosmos-react-core").IconProps & import("styled-components/dist/types").BaseObject, import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, keyof import("react").Component<any, {}, any>>;
|
|
40
23
|
export declare const StyledLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {
|
|
41
24
|
$isDefaultWSS?: AppShellProps["isDefaultWSS"];
|
|
42
25
|
$navPosition?: AppShellProps["navPosition"];
|
|
43
26
|
}>> & string;
|
|
27
|
+
export declare const StyledMainMenuLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "$isDefaultWSS" | "$navPosition"> & {
|
|
28
|
+
$isDefaultWSS?: AppShellProps["isDefaultWSS"];
|
|
29
|
+
$navPosition?: AppShellProps["navPosition"];
|
|
30
|
+
}, "ref"> & {
|
|
31
|
+
ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
32
|
+
}, never>> & string;
|
|
44
33
|
export declare const StyledMain: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {
|
|
45
34
|
navPosition: AppShellProps["navPosition"];
|
|
46
35
|
$isDefaultWSS: boolean;
|
|
47
36
|
$hasFooter: boolean;
|
|
37
|
+
$hasConfiguredFooter?: boolean;
|
|
48
38
|
previewActive: boolean;
|
|
49
39
|
}>> & string;
|
|
50
40
|
export declare const StyledModernAppHeaderOperator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
51
41
|
export declare const StyledHamburgerMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
52
42
|
export declare const StyledMobileNav: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
53
43
|
export declare const StyledMobileLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
44
|
+
export declare const StyledMobileNavHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
54
45
|
export declare const StyledLinkSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
55
46
|
export declare const StyledOperatorSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
56
47
|
export declare const HorizontalBreak: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,eAAO,MAAM,YAAY,WAAW,CAAC;AAiBrC,eAAO,MAAM,sBAAsB;iBACpB,aAAa,CAAC,aAAa,CAAC;eAC9B,OAAO;
|
|
1
|
+
{"version":3,"file":"AppShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,eAAO,MAAM,YAAY,WAAW,CAAC;AAiBrC,eAAO,MAAM,sBAAsB;iBACpB,aAAa,CAAC,aAAa,CAAC;eAC9B,OAAO;6BACO,MAAM;kBACjB,OAAO;kBACP,OAAO;EActB,CAAC;AAEF,eAAO,MAAM,SAAS,uNAUrB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;yLAY5B,CAAC;AAIH,eAAO,MAAM,eAAe;iBACb,aAAa,CAAC,aAAa,CAAC;mBAC1B,OAAO;mBACP,OAAO;YA8HtB,CAAC;AAIH,eAAO,MAAM,iBAAiB;YAAwB,OAAO;YAS3D,CAAC;AAEH,eAAO,MAAM,wBAAwB,kaAKnC,CAAC;AAIH,eAAO,MAAM,UAAU;oBACL,aAAa,CAAC,cAAc,CAAC;mBAC9B,aAAa,CAAC,aAAa,CAAC;YA6C3C,CAAC;AAIH,eAAO,MAAM,kBAAkB;oBAlDb,aAAa,CAAC,cAAc,CAAC;mBAC9B,aAAa,CAAC,aAAa,CAAC;;;mBA+D5C,CAAC;AAIF,eAAO,MAAM,UAAU;iBACR,aAAa,CAAC,aAAa,CAAC;mBAC1B,OAAO;gBACV,OAAO;2BACI,OAAO;mBACf,OAAO;YA4DtB,CAAC;AAIH,eAAO,MAAM,6BAA6B,6NAgBxC,CAAC;AAIH,eAAO,MAAM,mBAAmB,yOAI9B,CAAC;AAIH,eAAO,MAAM,eAAe,uNAU1B,CAAC;AAIH,eAAO,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