@pega/cosmos-react-core 9.0.0-build.24.3 → 9.0.0-build.24.4

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.
Files changed (93) hide show
  1. package/lib/components/AppShell/AppNavigationPanel.d.ts +14 -0
  2. package/lib/components/AppShell/AppNavigationPanel.d.ts.map +1 -0
  3. package/lib/components/AppShell/AppNavigationPanel.js +159 -0
  4. package/lib/components/AppShell/AppNavigationPanel.js.map +1 -0
  5. package/lib/components/AppShell/AppNavigationPanel.types.d.ts +32 -0
  6. package/lib/components/AppShell/AppNavigationPanel.types.d.ts.map +1 -0
  7. package/lib/components/AppShell/AppNavigationPanel.types.js +2 -0
  8. package/lib/components/AppShell/AppNavigationPanel.types.js.map +1 -0
  9. package/lib/components/AppShell/AppShell.d.ts +1 -2
  10. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  11. package/lib/components/AppShell/AppShell.js +124 -259
  12. package/lib/components/AppShell/AppShell.js.map +1 -1
  13. package/lib/components/AppShell/AppShell.styles.d.ts +8 -5
  14. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  15. package/lib/components/AppShell/AppShell.styles.js +51 -50
  16. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  17. package/lib/components/AppShell/AppShell.types.d.ts +1 -2
  18. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  19. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  20. package/lib/components/AppShell/AppShellContext.d.ts +1 -1
  21. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  22. package/lib/components/AppShell/AppShellContext.js +1 -1
  23. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  24. package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -1
  25. package/lib/components/AppShell/AppShellSearch.js +2 -4
  26. package/lib/components/AppShell/AppShellSearch.js.map +1 -1
  27. package/lib/components/DateTime/DateTime.types.d.ts +6 -0
  28. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  29. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  30. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  31. package/lib/components/DateTime/Input/DateInput.js +2 -2
  32. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  33. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  34. package/lib/components/DateTime/Input/DateRangeInput.js +3 -2
  35. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  36. package/lib/components/DateTime/Input/DateTimeInput.d.ts +0 -6
  37. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  38. package/lib/components/DateTime/Input/DateTimeInput.js +4 -4
  39. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  40. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  41. package/lib/components/DateTime/Input/TimeRangeInput.js +3 -2
  42. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  43. package/lib/components/DateTime/Picker/DatePicker.js +1 -1
  44. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  45. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  46. package/lib/components/Dialog/FormDialog.js +3 -2
  47. package/lib/components/Dialog/FormDialog.js.map +1 -1
  48. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
  49. package/lib/components/Dialog/InfoDialog.js +3 -2
  50. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  51. package/lib/components/FormField/FormField.d.ts +2 -0
  52. package/lib/components/FormField/FormField.d.ts.map +1 -1
  53. package/lib/components/FormField/FormField.js +9 -7
  54. package/lib/components/FormField/FormField.js.map +1 -1
  55. package/lib/components/InlineEdit/InlineEdit.d.ts +26 -0
  56. package/lib/components/InlineEdit/InlineEdit.d.ts.map +1 -0
  57. package/lib/components/InlineEdit/InlineEdit.js +21 -0
  58. package/lib/components/InlineEdit/InlineEdit.js.map +1 -0
  59. package/lib/components/InlineEdit/InlineEdit.styles.d.ts +27 -0
  60. package/lib/components/InlineEdit/InlineEdit.styles.d.ts.map +1 -0
  61. package/lib/components/InlineEdit/InlineEdit.styles.js +49 -0
  62. package/lib/components/InlineEdit/InlineEdit.styles.js.map +1 -0
  63. package/lib/components/InlineEdit/InlineEdit.test-ids.d.ts +3 -0
  64. package/lib/components/InlineEdit/InlineEdit.test-ids.d.ts.map +1 -0
  65. package/lib/components/InlineEdit/InlineEdit.test-ids.js +4 -0
  66. package/lib/components/InlineEdit/InlineEdit.test-ids.js.map +1 -0
  67. package/lib/components/InlineEdit/index.d.ts +3 -0
  68. package/lib/components/InlineEdit/index.d.ts.map +1 -0
  69. package/lib/components/InlineEdit/index.js +2 -0
  70. package/lib/components/InlineEdit/index.js.map +1 -0
  71. package/lib/components/Modal/Modal.d.ts.map +1 -1
  72. package/lib/components/Modal/Modal.js +3 -2
  73. package/lib/components/Modal/Modal.js.map +1 -1
  74. package/lib/components/RadioCheck/RadioCheck.d.ts +3 -0
  75. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  76. package/lib/components/RadioCheck/RadioCheck.js +2 -2
  77. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  78. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  79. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +1 -0
  80. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  81. package/lib/hooks/index.d.ts +1 -0
  82. package/lib/hooks/index.d.ts.map +1 -1
  83. package/lib/hooks/index.js +1 -0
  84. package/lib/hooks/index.js.map +1 -1
  85. package/lib/hooks/useContentTabIndex.d.ts +17 -0
  86. package/lib/hooks/useContentTabIndex.d.ts.map +1 -0
  87. package/lib/hooks/useContentTabIndex.js +48 -0
  88. package/lib/hooks/useContentTabIndex.js.map +1 -0
  89. package/lib/index.d.ts +2 -0
  90. package/lib/index.d.ts.map +1 -1
  91. package/lib/index.js +2 -0
  92. package/lib/index.js.map +1 -1
  93. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import type { CaseTypeProps, LinkProps, UtilsProps } from './AppShell.types';
2
+ import type { AppNavigationPanelProps } from './AppNavigationPanel.types';
3
+ export declare const CaseTypes: ({ caseTypes, mobileNavBar }: {
4
+ caseTypes: CaseTypeProps[];
5
+ mobileNavBar?: boolean;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const Links: (props: {
8
+ links: LinkProps[];
9
+ mobileNavBar?: boolean;
10
+ }) => import("react/jsx-runtime").JSX.Element | null;
11
+ export declare const Utils: ({ items }: UtilsProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const AppNavigationPanel: ({ appInfo, navState, searchInput, searchLabel, onClick, caseTypes, links, cases, contextSwitcher, operator, utils, agent }: AppNavigationPanelProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default AppNavigationPanel;
14
+ //# sourceMappingURL=AppNavigationPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppNavigationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppNavigationPanel.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAIV,aAAa,EACb,SAAS,EAGT,UAAU,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,eAAO,MAAM,SAAS,GAAI,6BAGvB;IACD,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,4CA4BA,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO;IAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,mDA6B1E,CAAC;AAwDF,eAAO,MAAM,KAAK,GAAI,WAAW,UAAU,4CA4F1C,CAAC;AA8DF,QAAA,MAAM,kBAAkB,GAAI,4HAazB,uBAAuB,4CAgCzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,159 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState, useEffect, useCallback, useMemo, useContext } from 'react';
3
+ import Button from '../Button';
4
+ import Grid from '../Grid';
5
+ import Icon from '../Icon';
6
+ import Image from '../Image';
7
+ import Link from '../Link';
8
+ import Tooltip from '../Tooltip';
9
+ import VisuallyHiddenText from '../VisuallyHiddenText';
10
+ import { useI18n, useElement } from '../../hooks';
11
+ import { isValidElement } from '../../utils';
12
+ import NavigationList from './NavigationList';
13
+ import AppShellContext, { AppShellDrawerContext } from './AppShellContext';
14
+ import AppShellDrawer from './Drawer';
15
+ import { AppShellSearch } from './AppShellSearch';
16
+ import { StyledAppInfo, StyledCaseTypes, StyledScrollWrap, StyledUtils, StyledNavCasesList, StyledCountIcon, StyledUtilIconCount, StyledAppShellTooltip, StyledUtilsSeparator, StyledAIAssistant } from './AppShell.styles';
17
+ export const CaseTypes = ({ caseTypes, mobileNavBar }) => {
18
+ const t = useI18n();
19
+ const transformedCaseTypes = caseTypes.map(caseType => {
20
+ return {
21
+ ...caseType,
22
+ visual: caseType.icon ? _jsx(Icon, { name: caseType.icon }) : undefined,
23
+ primary: caseType.name
24
+ };
25
+ });
26
+ return useMemo(() => (_jsx(StyledCaseTypes, { children: _jsx(NavigationList, { items: [
27
+ {
28
+ primary: t('app_shell_create'),
29
+ visual: _jsx(Icon, { name: 'plus' }),
30
+ items: transformedCaseTypes
31
+ }
32
+ ], mobileNavBar: mobileNavBar }) })), [caseTypes, mobileNavBar]);
33
+ };
34
+ export const Links = (props) => {
35
+ const { links, mobileNavBar } = props;
36
+ const [transformedLinks, setTransformedLinks] = useState([]);
37
+ // TODO: Can this be a memo instead of a state and an effect?
38
+ const mergedNavLinks = (items) => {
39
+ return items.map((link) => {
40
+ return {
41
+ ...link,
42
+ primary: link.name,
43
+ 'aria-current': link.active ? 'page' : null,
44
+ visual: link.icon ? _jsx(Icon, { name: link.icon }) : null,
45
+ onClick: link.links ? undefined : link.onClick,
46
+ items: link.links ? mergedNavLinks(link.links) : undefined
47
+ };
48
+ });
49
+ };
50
+ useEffect(() => {
51
+ setTransformedLinks(mergedNavLinks(links));
52
+ }, [links]);
53
+ if (!links.length)
54
+ return null;
55
+ return (_jsx("div", { children: _jsx(NavigationList, { items: transformedLinks, mobileNavBar: mobileNavBar }) }));
56
+ };
57
+ const AIAssistant = ({ agent }) => (_jsx(StyledAIAssistant, { children: _jsx(NavigationList, { items: [
58
+ {
59
+ id: agent.id,
60
+ primary: agent.name,
61
+ visual: agent.icon,
62
+ 'aria-current': agent.active ? 'page' : null,
63
+ onClick: agent.onClick
64
+ }
65
+ ] }) }));
66
+ const Cases = (props) => {
67
+ const { cases } = props;
68
+ const setupCases = (items) => {
69
+ return items.map((item) => {
70
+ const { id, primary, secondary, collapsedItemInfo, visual = _jsx(Icon, { name: 'case-solid' }), active, onClick, onDismiss, ...restProps } = item;
71
+ return {
72
+ ...restProps,
73
+ id,
74
+ 'aria-current': active ? 'page' : undefined,
75
+ primary,
76
+ secondary,
77
+ collapsedItemInfo,
78
+ active: !!active,
79
+ onClick,
80
+ onDismiss,
81
+ visual
82
+ };
83
+ });
84
+ };
85
+ return (_jsx(StyledNavCasesList, { children: _jsx(NavigationList, { items: setupCases(cases) }) }));
86
+ };
87
+ export const Utils = ({ items }) => {
88
+ const { navOpen, navState, drawerOpen, setDrawerOpen } = useContext(AppShellContext);
89
+ const [item, setItem] = useState();
90
+ useEffect(() => {
91
+ if (drawerOpen && item) {
92
+ setItem(items?.find((utilItem) => !isValidElement(utilItem) && utilItem.name === item.name));
93
+ }
94
+ }, [items]);
95
+ const transform = useCallback((utilItem) => {
96
+ const uItem = { ...utilItem };
97
+ delete uItem.onDrawerClose;
98
+ delete uItem.onDrawerOpen;
99
+ return {
100
+ onClick: () => {
101
+ if (utilItem.drawerView) {
102
+ setItem(utilItem);
103
+ }
104
+ },
105
+ ...uItem,
106
+ primary: utilItem.name,
107
+ visual: utilItem.count ? (_jsxs(StyledUtilIconCount, { children: [utilItem.visual, _jsx(StyledCountIcon, { variant: 'urgent', id: `${utilItem.name}-count`, children: utilItem.count })] })) : (utilItem.visual),
108
+ collapseItems: !navOpen
109
+ };
110
+ }, [navOpen]);
111
+ const utilItems = useMemo(() => {
112
+ return [
113
+ ...(items ?? []).map(uItem => {
114
+ return isValidElement(uItem) ? uItem : transform(uItem);
115
+ })
116
+ ];
117
+ }, [items, transform]);
118
+ useEffect(() => {
119
+ if (item)
120
+ setDrawerOpen(true);
121
+ }, [item]);
122
+ useEffect(() => {
123
+ if (navState === 'closed' || navState === 'closing')
124
+ setDrawerOpen(false);
125
+ }, [navState]);
126
+ return (_jsxs(AppShellDrawerContext.Provider, { value: useMemo(() => ({
127
+ drawerOpen,
128
+ closeDrawer: () => {
129
+ setDrawerOpen(false);
130
+ },
131
+ openDrawer: setItem
132
+ }), [drawerOpen]), children: [_jsx(StyledUtils, { children: _jsx(NavigationList, { items: utilItems, collapsed: true }) }), item && (_jsx(AppShellDrawer, { drawerOpen: drawerOpen, setDrawerOpen: setDrawerOpen, content: item.drawerView, header: item.drawerHeader || item.name, onDrawerClose: () => {
133
+ setItem(undefined);
134
+ item.onDrawerClose?.();
135
+ }, onDrawerOpen: item.onDrawerOpen }))] }));
136
+ };
137
+ const AppInfo = ({ appInfo }) => {
138
+ const [appInfoEl, setAppInfoEl] = useElement();
139
+ const { navState } = useContext(AppShellContext);
140
+ const { appName, portalName, href: appInfoHref, onClick: appInfoOnClick, imageSrc: logoSrc, appNameHidden, ...appInfoRestProps } = appInfo;
141
+ let appInfoAs = 'div';
142
+ if (appInfoHref)
143
+ appInfoAs = Link;
144
+ else if (appInfoOnClick)
145
+ appInfoAs = Button;
146
+ return (_jsxs(_Fragment, { children: [_jsxs(StyledAppInfo, { as: Grid, forwardedAs: appInfoAs, variant: 'link', href: appInfoHref, onClick: appInfoOnClick, "aria-label": `${appName}${portalName ? ` - ${portalName}` : ''}`, ...appInfoRestProps, container: {
147
+ alignItems: 'center',
148
+ areas: portalName ? '"logo app" "logo portal"' : '"logo app"'
149
+ }, ref: setAppInfoEl, icon: true, children: [_jsx(Grid, { item: { area: 'logo' }, as: Image, src: logoSrc, alt: appName }), _jsx(Grid, { item: { area: 'app' }, as: appNameHidden ? VisuallyHiddenText : 'span', children: appName }), portalName && (_jsx(Grid, { item: { area: 'portal' }, as: 'span', children: portalName }))] }), navState === 'closed' && (!appNameHidden || portalName) && (_jsx(Tooltip, { target: appInfoEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: `${appNameHidden ? '' : appName} ${portalName ?? ''}`.trim() }))] }));
150
+ };
151
+ const AppNavigationPanel = ({ appInfo, navState, searchInput, searchLabel, onClick, caseTypes, links, cases, contextSwitcher, operator, utils, agent }) => {
152
+ return (_jsxs(_Fragment, { children: [appInfo && _jsx(AppInfo, { appInfo: appInfo }), searchInput && (_jsx(AppShellSearch, { searchLabel: searchLabel, collapsed: ['closed', 'closing'].includes(navState), searchInput: searchInput })), _jsxs(StyledScrollWrap, { container: { direction: 'column' }, item: { grow: 1 }, tabIndex: -1, onClick: (e) => {
153
+ // Ensure that clicks on the container (not on interactive child elements) trigger the onClick handler
154
+ if (e.target === e.currentTarget)
155
+ onClick?.();
156
+ }, children: [caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes }), links && _jsx(Links, { links: links }), cases && _jsx(Cases, { cases: cases }), ['open', 'opening'].includes(navState) && (_jsx(StyledUtilsSeparator, { navOpen: ['open', 'opening'].includes(navState) }))] }), ['closed', 'closing'].includes(navState) && _jsx(StyledUtilsSeparator, {}), _jsx(Utils, { operator: operator, contextSwitcher: contextSwitcher, items: utils }), agent && _jsx(AIAssistant, { agent: agent })] }));
157
+ };
158
+ export default AppNavigationPanel;
159
+ //# sourceMappingURL=AppNavigationPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppNavigationPanel.js","sourceRoot":"","sources":["../../../src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,EAC5E,KAAK,IAAI,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,GAAI,IACtC,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { useState, useEffect, useCallback, useMemo, useContext } from 'react';\nimport type { ElementType, MouseEvent } from 'react';\n\nimport Button from '../Button';\nimport Grid from '../Grid';\nimport Icon from '../Icon';\nimport Image from '../Image';\nimport Link from '../Link';\nimport Tooltip from '../Tooltip';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { useI18n, useElement } from '../../hooks';\nimport { isValidElement } from '../../utils';\n\nimport NavigationList from './NavigationList';\nimport AppShellContext, { AppShellDrawerContext } from './AppShellContext';\nimport AppShellDrawer from './Drawer';\nimport { AppShellSearch } from './AppShellSearch';\nimport {\n StyledAppInfo,\n StyledCaseTypes,\n StyledScrollWrap,\n StyledUtils,\n StyledNavCasesList,\n StyledCountIcon,\n StyledUtilIconCount,\n StyledAppShellTooltip,\n StyledUtilsSeparator,\n StyledAIAssistant\n} from './AppShell.styles';\nimport type {\n AgentProps,\n AppInfoProps,\n CaseProps,\n CaseTypeProps,\n LinkProps,\n NavListItemProps,\n UtilItemProps,\n UtilsProps\n} from './AppShell.types';\nimport type { AppNavigationPanelProps } from './AppNavigationPanel.types';\n\nexport const CaseTypes = ({\n caseTypes,\n mobileNavBar\n}: {\n caseTypes: CaseTypeProps[];\n mobileNavBar?: boolean;\n}) => {\n const t = useI18n();\n\n const transformedCaseTypes = caseTypes.map(caseType => {\n return {\n ...caseType,\n visual: caseType.icon ? <Icon name={caseType.icon} /> : undefined,\n primary: caseType.name\n };\n });\n\n return useMemo(\n () => (\n <StyledCaseTypes>\n <NavigationList\n items={[\n {\n primary: t('app_shell_create'),\n visual: <Icon name='plus' />,\n items: transformedCaseTypes\n }\n ]}\n mobileNavBar={mobileNavBar}\n />\n </StyledCaseTypes>\n ),\n [caseTypes, mobileNavBar]\n );\n};\n\nexport const Links = (props: { links: LinkProps[]; mobileNavBar?: boolean }) => {\n const { links, mobileNavBar } = props;\n const [transformedLinks, setTransformedLinks] = useState<NavListItemProps[]>([]);\n\n // TODO: Can this be a memo instead of a state and an effect?\n const mergedNavLinks = (items: LinkProps[]): NavListItemProps[] => {\n return items.map((link: LinkProps) => {\n return {\n ...link,\n primary: link.name,\n 'aria-current': link.active ? 'page' : null,\n visual: link.icon ? <Icon name={link.icon} /> : null,\n onClick: link.links ? undefined : link.onClick,\n items: link.links ? mergedNavLinks(link.links) : undefined\n };\n });\n };\n\n useEffect(() => {\n setTransformedLinks(mergedNavLinks(links));\n }, [links]);\n\n if (!links.length) return null;\n\n return (\n <div>\n <NavigationList items={transformedLinks} mobileNavBar={mobileNavBar} />\n </div>\n );\n};\n\nconst AIAssistant = ({ agent }: { agent: AgentProps }) => (\n <StyledAIAssistant>\n <NavigationList\n items={[\n {\n id: agent.id,\n primary: agent.name,\n visual: agent.icon,\n 'aria-current': agent.active ? 'page' : null,\n onClick: agent.onClick\n }\n ]}\n />\n </StyledAIAssistant>\n);\n\nconst Cases = (props: { cases: CaseProps[] }) => {\n const { cases } = props;\n\n const setupCases = (items: CaseProps[]): NavListItemProps[] => {\n return items.map((item: CaseProps) => {\n const {\n id,\n primary,\n secondary,\n collapsedItemInfo,\n visual = <Icon name='case-solid' />,\n active,\n onClick,\n onDismiss,\n ...restProps\n } = item;\n return {\n ...restProps,\n id,\n 'aria-current': active ? 'page' : undefined,\n primary,\n secondary,\n collapsedItemInfo,\n active: !!active,\n onClick,\n onDismiss,\n visual\n };\n });\n };\n\n return (\n <StyledNavCasesList>\n <NavigationList items={setupCases(cases)} />\n </StyledNavCasesList>\n );\n};\n\nexport const Utils = ({ items }: UtilsProps) => {\n const { navOpen, navState, drawerOpen, setDrawerOpen } = useContext(AppShellContext);\n const [item, setItem] = useState<UtilItemProps>();\n\n useEffect(() => {\n if (drawerOpen && item) {\n setItem(\n items?.find<UtilItemProps>(\n (utilItem): utilItem is UtilItemProps =>\n !isValidElement(utilItem) && utilItem.name === item.name\n )\n );\n }\n }, [items]);\n\n const transform = useCallback(\n (utilItem: UtilItemProps): NavListItemProps => {\n const uItem = { ...utilItem };\n delete uItem.onDrawerClose;\n delete uItem.onDrawerOpen;\n return {\n onClick: () => {\n if (utilItem.drawerView) {\n setItem(utilItem);\n }\n },\n ...uItem,\n primary: utilItem.name,\n visual: utilItem.count ? (\n <StyledUtilIconCount>\n {utilItem.visual}\n <StyledCountIcon variant='urgent' id={`${utilItem.name}-count`}>\n {utilItem.count}\n </StyledCountIcon>\n </StyledUtilIconCount>\n ) : (\n utilItem.visual\n ),\n collapseItems: !navOpen\n };\n },\n [navOpen]\n );\n\n const utilItems = useMemo(() => {\n return [\n ...(items ?? []).map(uItem => {\n return isValidElement(uItem) ? uItem : transform(uItem);\n })\n ];\n }, [items, transform]);\n\n useEffect(() => {\n if (item) setDrawerOpen(true);\n }, [item]);\n\n useEffect(() => {\n if (navState === 'closed' || navState === 'closing') setDrawerOpen(false);\n }, [navState]);\n\n return (\n <AppShellDrawerContext.Provider\n value={useMemo(\n () => ({\n drawerOpen,\n closeDrawer: () => {\n setDrawerOpen(false);\n },\n openDrawer: setItem\n }),\n [drawerOpen]\n )}\n >\n <StyledUtils>\n <NavigationList items={utilItems} collapsed />\n </StyledUtils>\n\n {item && (\n <AppShellDrawer\n drawerOpen={drawerOpen}\n setDrawerOpen={setDrawerOpen}\n content={item.drawerView}\n header={item.drawerHeader || item.name}\n onDrawerClose={() => {\n setItem(undefined);\n item.onDrawerClose?.();\n }}\n onDrawerOpen={item.onDrawerOpen}\n />\n )}\n </AppShellDrawerContext.Provider>\n );\n};\n\nconst AppInfo = ({ appInfo }: { appInfo: AppInfoProps }) => {\n const [appInfoEl, setAppInfoEl] = useElement<HTMLAnchorElement>();\n const { navState } = useContext(AppShellContext);\n\n const {\n appName,\n portalName,\n href: appInfoHref,\n onClick: appInfoOnClick,\n imageSrc: logoSrc,\n appNameHidden,\n ...appInfoRestProps\n } = appInfo;\n\n let appInfoAs: ElementType = 'div';\n if (appInfoHref) appInfoAs = Link;\n else if (appInfoOnClick) appInfoAs = Button;\n\n return (\n <>\n <StyledAppInfo\n as={Grid}\n forwardedAs={appInfoAs}\n variant='link'\n href={appInfoHref}\n onClick={appInfoOnClick}\n aria-label={`${appName}${portalName ? ` - ${portalName}` : ''}`}\n {...appInfoRestProps}\n container={{\n alignItems: 'center',\n areas: portalName ? '\"logo app\" \"logo portal\"' : '\"logo app\"'\n }}\n ref={setAppInfoEl}\n icon\n >\n <Grid item={{ area: 'logo' }} as={Image} src={logoSrc} alt={appName} />\n <Grid item={{ area: 'app' }} as={appNameHidden ? VisuallyHiddenText : 'span'}>\n {appName}\n </Grid>\n {portalName && (\n <Grid item={{ area: 'portal' }} as='span'>\n {portalName}\n </Grid>\n )}\n </StyledAppInfo>\n {navState === 'closed' && (!appNameHidden || portalName) && (\n <Tooltip\n target={appInfoEl}\n placement='right'\n as={StyledAppShellTooltip}\n showDelay='none'\n hideDelay='none'\n >\n {`${appNameHidden ? '' : appName} ${portalName ?? ''}`.trim()}\n </Tooltip>\n )}\n </>\n );\n};\n\nconst AppNavigationPanel = ({\n appInfo,\n navState,\n searchInput,\n searchLabel,\n onClick,\n caseTypes,\n links,\n cases,\n contextSwitcher,\n operator,\n utils,\n agent\n}: AppNavigationPanelProps) => {\n return (\n <>\n {appInfo && <AppInfo appInfo={appInfo} />}\n {searchInput && (\n <AppShellSearch\n searchLabel={searchLabel}\n collapsed={['closed', 'closing'].includes(navState)}\n searchInput={searchInput}\n />\n )}\n <StyledScrollWrap\n container={{ direction: 'column' }}\n item={{ grow: 1 }}\n tabIndex={-1}\n onClick={(e: MouseEvent<HTMLElement>) => {\n // Ensure that clicks on the container (not on interactive child elements) trigger the onClick handler\n if (e.target === e.currentTarget) onClick?.();\n }}\n >\n {caseTypes && caseTypes.length > 0 && <CaseTypes caseTypes={caseTypes} />}\n {links && <Links links={links} />}\n {cases && <Cases cases={cases} />}\n {['open', 'opening'].includes(navState) && (\n <StyledUtilsSeparator navOpen={['open', 'opening'].includes(navState)} />\n )}\n </StyledScrollWrap>\n {['closed', 'closing'].includes(navState) && <StyledUtilsSeparator />}\n <Utils operator={operator} contextSwitcher={contextSwitcher} items={utils} />\n {agent && <AIAssistant agent={agent} />}\n </>\n );\n};\n\nexport default AppNavigationPanel;\n"]}
@@ -0,0 +1,32 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { openCloseStates } from '../../hooks/useTransitionState';
3
+ import type { BaseProps, NoChildrenProp } from '../../types';
4
+ import type { SearchInputProps } from '../SearchInput';
5
+ import type { AgentProps, AppInfoProps, CaseProps, CaseTypeProps, ContextSwitcherProps, LinkProps, OperatorProps, UtilItemProps } from './AppShell.types';
6
+ export interface AppNavigationPanelProps extends BaseProps, NoChildrenProp {
7
+ /** Props related to the App Shell header. */
8
+ appInfo?: AppInfoProps;
9
+ /** Current transition state of the navigation panel. */
10
+ navState: (typeof openCloseStates)[keyof typeof openCloseStates];
11
+ /** Props for the search input rendered in the sidebar. */
12
+ searchInput?: SearchInputProps;
13
+ /** Aria-label for the search input. */
14
+ searchLabel: string;
15
+ /** Click event handler for the navigation container. */
16
+ onClick?: () => void;
17
+ /** Case types for the create case action. */
18
+ caseTypes?: CaseTypeProps[];
19
+ /** Navigation links. */
20
+ links?: LinkProps[];
21
+ /** Open cases. */
22
+ cases?: CaseProps[];
23
+ /** Context switcher configuration. */
24
+ contextSwitcher?: ContextSwitcherProps;
25
+ /** The active user of the application. */
26
+ operator?: OperatorProps;
27
+ /** Utility items rendered at the bottom of the sidebar. */
28
+ utils?: (UtilItemProps | ReactElement)[];
29
+ /** AI Assistant agent configuration. */
30
+ agent?: AgentProps;
31
+ }
32
+ //# sourceMappingURL=AppNavigationPanel.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppNavigationPanel.types.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppNavigationPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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NavigationPanel.types.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppNavigationPanel.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactElement } from 'react';\n\nimport type { openCloseStates } from '../../hooks/useTransitionState';\nimport type { BaseProps, NoChildrenProp } from '../../types';\nimport type { SearchInputProps } from '../SearchInput';\n\nimport type {\n AgentProps,\n AppInfoProps,\n CaseProps,\n CaseTypeProps,\n ContextSwitcherProps,\n LinkProps,\n OperatorProps,\n UtilItemProps\n} from './AppShell.types';\n\nexport interface AppNavigationPanelProps extends BaseProps, NoChildrenProp {\n /** Props related to the App Shell header. */\n appInfo?: AppInfoProps;\n /** Current transition state of the navigation panel. */\n navState: (typeof openCloseStates)[keyof typeof openCloseStates];\n /** Props for the search input rendered in the sidebar. */\n searchInput?: SearchInputProps;\n /** Aria-label for the search input. */\n searchLabel: string;\n /** Click event handler for the navigation container. */\n onClick?: () => void;\n /** Case types for the create case action. */\n caseTypes?: CaseTypeProps[];\n /** Navigation links. */\n links?: LinkProps[];\n /** Open cases. */\n cases?: CaseProps[];\n /** Context switcher configuration. */\n contextSwitcher?: ContextSwitcherProps;\n /** The active user of the application. */\n operator?: OperatorProps;\n /** Utility items rendered at the bottom of the sidebar. */\n utils?: (UtilItemProps | ReactElement)[];\n /** AI Assistant agent configuration. */\n agent?: AgentProps;\n}\n"]}
@@ -1,6 +1,5 @@
1
- import type { AppShellProps, UtilsProps } from './AppShell.types';
1
+ import type { AppShellProps } from './AppShell.types';
2
2
  export declare const appShellBottomOffsetCSSVar = "--appshell-bottom-offset";
3
- export declare const Utils: ({ contextSwitcher, operator, items, appHeader, shareApp }: UtilsProps) => import("react/jsx-runtime").JSX.Element;
4
3
  declare const AppShell: import("react").ForwardRefExoticComponent<AppShellProps & import("react").RefAttributes<HTMLDivElement>>;
5
4
  export default AppShell;
6
5
  //# sourceMappingURL=AppShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAEV,aAAa,EAMb,UAAU,EACX,MAAM,kBAAkB,CAAC;AAwB1B,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AA2HrE,eAAO,MAAM,KAAK,GAAI,2DAMnB,UAAU,4CAsMZ,CAAC;AAEF,QAAA,MAAM,QAAQ,0GA8dZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,aAAa,EAAiB,MAAM,kBAAkB,CAAC;AAwBrE,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAErE,QAAA,MAAM,QAAQ,0GAohBZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}