@red-hat-developer-hub/backstage-plugin-global-header 1.20.3 → 1.21.1

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 (67) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +92 -8
  3. package/config.d.ts +75 -33
  4. package/dist/alpha/components/ApplicationLauncherDropdown.esm.js +35 -0
  5. package/dist/alpha/components/ApplicationLauncherDropdown.esm.js.map +1 -0
  6. package/dist/alpha/components/GlobalHeader.esm.js +36 -0
  7. package/dist/alpha/components/GlobalHeader.esm.js.map +1 -0
  8. package/dist/alpha/components/GlobalHeaderDropdown.esm.js +60 -0
  9. package/dist/alpha/components/GlobalHeaderDropdown.esm.js.map +1 -0
  10. package/dist/alpha/components/GlobalHeaderDropdownContent.esm.js +52 -0
  11. package/dist/alpha/components/GlobalHeaderDropdownContent.esm.js.map +1 -0
  12. package/dist/alpha/components/GlobalHeaderMenuItem.esm.js +39 -0
  13. package/dist/alpha/components/GlobalHeaderMenuItem.esm.js.map +1 -0
  14. package/dist/alpha/components/HelpDropdown.esm.js +32 -0
  15. package/dist/alpha/components/HelpDropdown.esm.js.map +1 -0
  16. package/dist/alpha/components/MyProfileMenuItem.esm.js +58 -0
  17. package/dist/alpha/components/MyProfileMenuItem.esm.js.map +1 -0
  18. package/dist/alpha/components/ProfileDropdown.esm.js +97 -0
  19. package/dist/alpha/components/ProfileDropdown.esm.js.map +1 -0
  20. package/dist/alpha/defaults/index.esm.js +26 -0
  21. package/dist/alpha/defaults/index.esm.js.map +1 -0
  22. package/dist/alpha/defaults/menuItemExtensions.esm.js +67 -0
  23. package/dist/alpha/defaults/menuItemExtensions.esm.js.map +1 -0
  24. package/dist/alpha/defaults/rhdhLogo.esm.js +7 -0
  25. package/dist/alpha/defaults/rhdhLogo.esm.js.map +1 -0
  26. package/dist/alpha/defaults/toolbarExtensions.esm.js +74 -0
  27. package/dist/alpha/defaults/toolbarExtensions.esm.js.map +1 -0
  28. package/dist/alpha/extensions/GlobalHeaderContext.esm.js +31 -0
  29. package/dist/alpha/extensions/GlobalHeaderContext.esm.js.map +1 -0
  30. package/dist/alpha/extensions/blueprints.esm.js +112 -0
  31. package/dist/alpha/extensions/blueprints.esm.js.map +1 -0
  32. package/dist/alpha/extensions/dataRefs.esm.js +11 -0
  33. package/dist/alpha/extensions/dataRefs.esm.js.map +1 -0
  34. package/dist/alpha/extensions/globalHeaderModule.esm.js +72 -0
  35. package/dist/alpha/extensions/globalHeaderModule.esm.js.map +1 -0
  36. package/dist/alpha/plugin.esm.js +28 -0
  37. package/dist/alpha/plugin.esm.js.map +1 -0
  38. package/dist/alpha/utils/menuItemGrouping.esm.js +52 -0
  39. package/dist/alpha/utils/menuItemGrouping.esm.js.map +1 -0
  40. package/dist/alpha/utils/readConfigComponents.esm.js +29 -0
  41. package/dist/alpha/utils/readConfigComponents.esm.js.map +1 -0
  42. package/dist/alpha/utils/readConfigMenuItems.esm.js +19 -0
  43. package/dist/alpha/utils/readConfigMenuItems.esm.js.map +1 -0
  44. package/dist/alpha.d.ts +1255 -0
  45. package/dist/alpha.esm.js +28 -0
  46. package/dist/alpha.esm.js.map +1 -0
  47. package/dist/components/HeaderDropdownComponent/HeaderDropdownComponent.esm.js +23 -15
  48. package/dist/components/HeaderDropdownComponent/HeaderDropdownComponent.esm.js.map +1 -1
  49. package/dist/components/HeaderDropdownComponent/MenuSection.esm.js +15 -3
  50. package/dist/components/HeaderDropdownComponent/MenuSection.esm.js.map +1 -1
  51. package/dist/components/HeaderIcon/HeaderIcon.esm.js +5 -1
  52. package/dist/components/HeaderIcon/HeaderIcon.esm.js.map +1 -1
  53. package/dist/components/HeaderIconButton/HeaderIconButton.esm.js +3 -5
  54. package/dist/components/HeaderIconButton/HeaderIconButton.esm.js.map +1 -1
  55. package/dist/components/LogoutButton/LogoutButton.esm.js +4 -2
  56. package/dist/components/LogoutButton/LogoutButton.esm.js.map +1 -1
  57. package/dist/components/MenuItemLink/MenuItemLink.esm.js.map +1 -1
  58. package/dist/defaultMountPoints/defaultMountPoints.esm.js +7 -10
  59. package/dist/defaultMountPoints/defaultMountPoints.esm.js.map +1 -1
  60. package/dist/hooks/useDropdownManager.esm.js +10 -5
  61. package/dist/hooks/useDropdownManager.esm.js.map +1 -1
  62. package/dist/index.d.ts +7 -66
  63. package/dist/index.esm.js.map +1 -1
  64. package/dist/plugin.esm.js +6 -7
  65. package/dist/plugin.esm.js.map +1 -1
  66. package/dist/types/index.d-CdKdPbQ2.d.ts +67 -0
  67. package/package.json +57 -37
@@ -0,0 +1,28 @@
1
+ import { createFrontendModule } from '@backstage/frontend-plugin-api';
2
+ import { TranslationBlueprint } from '@backstage/plugin-app-react';
3
+ import { globalHeaderTranslations } from './translations/index.esm.js';
4
+ export { default } from './alpha/plugin.esm.js';
5
+ export { globalHeaderModule } from './alpha/extensions/globalHeaderModule.esm.js';
6
+ export { GlobalHeaderComponentBlueprint, GlobalHeaderMenuItemBlueprint } from './alpha/extensions/blueprints.esm.js';
7
+ export { globalHeaderComponentDataRef, globalHeaderMenuItemDataRef } from './alpha/extensions/dataRefs.esm.js';
8
+ export { useGlobalHeaderComponents, useGlobalHeaderMenuItems } from './alpha/extensions/GlobalHeaderContext.esm.js';
9
+ export { HeaderIconButton as GlobalHeaderIconButton } from './components/HeaderIconButton/HeaderIconButton.esm.js';
10
+ export { GlobalHeaderMenuItem } from './alpha/components/GlobalHeaderMenuItem.esm.js';
11
+ export { GlobalHeaderDropdown } from './alpha/components/GlobalHeaderDropdown.esm.js';
12
+ export { defaultMenuItemExtensions, defaultToolbarExtensions } from './alpha/defaults/index.esm.js';
13
+ export { globalHeaderTranslationRef } from './translations/ref.esm.js';
14
+ export { applicationLauncherDropdownExtension, companyLogoExtension, dividerExtension, helpDropdownExtension, notificationButtonExtension, profileDropdownExtension, searchExtension, selfServiceButtonExtension, spacerExtension, starredDropdownExtension } from './alpha/defaults/toolbarExtensions.esm.js';
15
+ export { appLauncherDevHubMenuItemExtension, appLauncherRhdhLocalMenuItemExtension, logoutMenuItemExtension, myProfileMenuItemExtension, settingsMenuItemExtension, supportButtonMenuItemExtension } from './alpha/defaults/menuItemExtensions.esm.js';
16
+
17
+ const globalHeaderTranslation = TranslationBlueprint.make({
18
+ params: {
19
+ resource: globalHeaderTranslations
20
+ }
21
+ });
22
+ const globalHeaderTranslationsModule = createFrontendModule({
23
+ pluginId: "app",
24
+ extensions: [globalHeaderTranslation]
25
+ });
26
+
27
+ export { globalHeaderTranslations, globalHeaderTranslationsModule };
28
+ //# sourceMappingURL=alpha.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * New Frontend System API surface for the global header plugin.\n *\n * @alpha\n * @packageDocumentation\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { TranslationBlueprint } from '@backstage/plugin-app-react';\nimport { globalHeaderTranslations } from '../translations';\n\n// ── Core: plugin + module ──────────────────────────────────────────────\n\nexport { default } from './plugin';\nexport { globalHeaderModule } from './extensions/globalHeaderModule';\n\n// ── Blueprints: for other plugins to contribute header items ───────────\n\nexport {\n GlobalHeaderComponentBlueprint,\n GlobalHeaderMenuItemBlueprint,\n} from './extensions/blueprints';\nexport type {\n ToolbarComponentParams,\n MenuItemParams,\n} from './extensions/blueprints';\n\n// ── Data refs ──────────────────────────────────────────────────────────\n\nexport {\n globalHeaderComponentDataRef,\n globalHeaderMenuItemDataRef,\n} from './extensions/dataRefs';\n\n// ── Context hooks for custom dropdown components ───────────────────────\n\nexport {\n useGlobalHeaderComponents,\n useGlobalHeaderMenuItems,\n} from './extensions/GlobalHeaderContext';\n\n// ── Types ──────────────────────────────────────────────────────────────\n\nexport type {\n GlobalHeaderComponentData,\n GlobalHeaderMenuItemData,\n} from './types';\n\n// ── Building block components for plugin authors ───────────────────────\n\nexport { HeaderIconButton as GlobalHeaderIconButton } from '../components/HeaderIconButton/HeaderIconButton';\nexport type { HeaderIconButtonProps } from '../components/HeaderIconButton/HeaderIconButton';\nexport { GlobalHeaderMenuItem } from './components/GlobalHeaderMenuItem';\nexport type { GlobalHeaderMenuItemProps } from './components/GlobalHeaderMenuItem';\nexport { GlobalHeaderDropdown } from './components/GlobalHeaderDropdown';\nexport type { GlobalHeaderDropdownProps } from './components/GlobalHeaderDropdown';\n\n// ── Default extensions (collections + individual for cherry-picking) ───\n\nexport * from './defaults';\n\n// ── Translations ───────────────────────────────────────────────────────\n\nexport { globalHeaderTranslationRef } from '../translations/ref';\nexport { globalHeaderTranslations } from '../translations';\n\nconst globalHeaderTranslation = TranslationBlueprint.make({\n params: {\n resource: globalHeaderTranslations,\n },\n});\n\n/**\n * App module that registers global header translations.\n * @alpha\n */\nexport const globalHeaderTranslationsModule = createFrontendModule({\n pluginId: 'app',\n extensions: [globalHeaderTranslation],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkFA,MAAM,uBAAA,GAA0B,qBAAqB,IAAK,CAAA;AAAA,EACxD,MAAQ,EAAA;AAAA,IACN,QAAU,EAAA;AAAA;AAEd,CAAC,CAAA;AAMM,MAAM,iCAAiC,oBAAqB,CAAA;AAAA,EACjE,QAAU,EAAA,KAAA;AAAA,EACV,UAAA,EAAY,CAAC,uBAAuB;AACtC,CAAC;;;;"}
@@ -6,23 +6,22 @@ import Box from '@mui/material/Box';
6
6
  import IconButton from '@mui/material/IconButton';
7
7
  import Tooltip from '@mui/material/Tooltip';
8
8
 
9
+ const paperStyle = (theme) => ({
10
+ borderRadius: "4px",
11
+ background: theme.palette.background.paper,
12
+ border: `1px solid ${theme.palette.divider}`,
13
+ boxShadow: theme.palette.mode === "dark" ? "0 2px 6px 2px rgba(0,0,0,0.50), 0 1px 2px 0 rgba(0,0,0,0.50)" : "0 2px 6px 2px rgba(0,0,0,0.15), 0 1px 2px 0 rgba(0,0,0,0.30)",
14
+ maxHeight: "60vh",
15
+ overflow: "auto"
16
+ });
9
17
  const menuListStyle = (theme) => ({
10
18
  fontSize: "0.875rem",
11
- boxSizing: "border-box",
12
19
  padding: 0,
13
20
  margin: 0,
14
21
  minWidth: "160px",
15
- borderRadius: "4px",
16
22
  textDecoration: "none",
17
23
  listStyle: "none",
18
- overflow: "auto",
19
- outline: "1px solid transparent",
20
- background: theme.palette.background.paper,
21
- border: `1px solid ${theme.palette.divider}`,
22
- color: theme.palette.mode === "dark" ? theme.palette.text.disabled : theme.palette.text.primary,
23
- boxShadow: theme.palette.mode === "dark" ? "0 2px 6px 2px rgba(0,0,0,0.50), 0 1px 2px 0 rgba(0,0,0,0.50)" : "0 2px 6px 2px rgba(0,0,0,0.15), 0 1px 2px 0 rgba(0,0,0,0.30)",
24
- maxHeight: "60vh",
25
- zIndex: 1
24
+ color: theme.palette.mode === "dark" ? theme.palette.text.disabled : theme.palette.text.primary
26
25
  });
27
26
  const HeaderDropdownComponent = ({
28
27
  buttonContent,
@@ -33,27 +32,30 @@ const HeaderDropdownComponent = ({
33
32
  anchorEl,
34
33
  isIconButton = false,
35
34
  size = "small",
36
- tooltip
35
+ tooltip,
36
+ menuListRef
37
37
  }) => {
38
38
  const id = useId();
39
+ const menuId = `${id}-menu`;
39
40
  const commonButtonProps = {
40
41
  ...buttonProps,
41
42
  onClick: (event) => {
42
43
  onOpen(event);
43
44
  setTimeout(() => {
44
- document.getElementById(`${id}-menu`)?.getElementsByTagName("a")[0]?.focus();
45
+ document.getElementById(menuId)?.querySelector('[role="menuitem"]')?.focus();
45
46
  }, 0);
46
47
  },
47
48
  "aria-haspopup": true,
48
- "aria-controls": id,
49
- "aria-expanded": anchorEl ? true : void 0
49
+ "aria-controls": menuId,
50
+ "aria-expanded": anchorEl ? true : void 0,
51
+ "aria-label": tooltip
50
52
  };
51
53
  return /* @__PURE__ */ jsxs(Box, { children: [
52
54
  /* @__PURE__ */ jsx(Tooltip, { title: tooltip, children: isIconButton ? /* @__PURE__ */ jsx(IconButton, { ...commonButtonProps, color: "inherit", size, children: buttonContent }) : /* @__PURE__ */ jsx(Button, { disableRipple: true, disableTouchRipple: true, ...commonButtonProps, children: buttonContent }) }),
53
55
  /* @__PURE__ */ jsx(
54
56
  Menu,
55
57
  {
56
- id: `${id}-menu`,
58
+ id: menuId,
57
59
  anchorEl,
58
60
  keepMounted: true,
59
61
  open: Boolean(anchorEl),
@@ -66,12 +68,18 @@ const HeaderDropdownComponent = ({
66
68
  vertical: "top",
67
69
  horizontal: "center"
68
70
  },
71
+ slotProps: {
72
+ paper: {
73
+ sx: (theme) => paperStyle(theme)
74
+ }
75
+ },
69
76
  sx: {
70
77
  '& ul[class*="MuiMenu-list"]': {
71
78
  py: 0
72
79
  }
73
80
  },
74
81
  MenuListProps: {
82
+ ref: menuListRef,
75
83
  "aria-labelledby": id,
76
84
  sx: (theme) => menuListStyle(theme)
77
85
  },
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderDropdownComponent.esm.js","sources":["../../../src/components/HeaderDropdownComponent/HeaderDropdownComponent.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useId } from 'react';\nimport type { ReactNode, ComponentProps, MouseEvent, FC } from 'react';\nimport Menu from '@mui/material/Menu';\nimport Button from '@mui/material/Button';\nimport { Theme } from '@mui/material/styles';\nimport Box from '@mui/material/Box';\nimport IconButton, { IconButtonProps } from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport { MenuItemConfig, MenuSectionConfig } from './MenuSection';\n\ninterface HeaderDropdownProps {\n buttonContent: ReactNode;\n children: ReactNode;\n menuSections?: MenuSectionConfig[];\n menuBottomItems?: MenuItemConfig[];\n buttonProps?: ComponentProps<typeof Button>;\n onOpen: (event: MouseEvent<HTMLElement>) => void;\n onClose: () => void;\n anchorEl: HTMLElement | null;\n isIconButton?: boolean;\n tooltip?: string;\n size?: IconButtonProps['size'];\n}\n\nconst menuListStyle = (theme: Theme) => ({\n fontSize: '0.875rem',\n boxSizing: 'border-box',\n padding: 0,\n margin: 0,\n minWidth: '160px',\n borderRadius: '4px',\n textDecoration: 'none',\n listStyle: 'none',\n overflow: 'auto',\n outline: '1px solid transparent',\n background: theme.palette.background.paper,\n border: `1px solid ${theme.palette.divider}`,\n color:\n theme.palette.mode === 'dark'\n ? theme.palette.text.disabled\n : theme.palette.text.primary,\n boxShadow:\n theme.palette.mode === 'dark'\n ? '0 2px 6px 2px rgba(0,0,0,0.50), 0 1px 2px 0 rgba(0,0,0,0.50)'\n : '0 2px 6px 2px rgba(0,0,0,0.15), 0 1px 2px 0 rgba(0,0,0,0.30)',\n maxHeight: '60vh',\n zIndex: 1,\n});\n\nexport const HeaderDropdownComponent: FC<HeaderDropdownProps> = ({\n buttonContent,\n children,\n buttonProps,\n onOpen,\n onClose,\n anchorEl,\n isIconButton = false,\n size = 'small',\n tooltip,\n}) => {\n const id = useId();\n\n const commonButtonProps = {\n ...buttonProps,\n onClick: (event: MouseEvent<HTMLElement>) => {\n onOpen(event);\n // focus the menu when opened\n // TODO: investigate why MUI isn't doing this for us\n setTimeout(() => {\n document\n .getElementById(`${id}-menu`)\n ?.getElementsByTagName('a')[0]\n ?.focus();\n }, 0);\n },\n 'aria-haspopup': true,\n 'aria-controls': id,\n 'aria-expanded': anchorEl ? true : undefined,\n };\n\n return (\n <Box>\n <Tooltip title={tooltip}>\n {isIconButton ? (\n <IconButton {...commonButtonProps} color=\"inherit\" size={size}>\n {buttonContent}\n </IconButton>\n ) : (\n <Button disableRipple disableTouchRipple {...commonButtonProps}>\n {buttonContent}\n </Button>\n )}\n </Tooltip>\n <Menu\n id={`${id}-menu`}\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={onClose}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n sx={{\n '& ul[class*=\"MuiMenu-list\"]': {\n py: 0,\n },\n }}\n MenuListProps={{\n 'aria-labelledby': id,\n sx: theme => menuListStyle(theme),\n }}\n >\n {children}\n </Menu>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAwCA,MAAM,aAAA,GAAgB,CAAC,KAAkB,MAAA;AAAA,EACvC,QAAU,EAAA,UAAA;AAAA,EACV,SAAW,EAAA,YAAA;AAAA,EACX,OAAS,EAAA,CAAA;AAAA,EACT,MAAQ,EAAA,CAAA;AAAA,EACR,QAAU,EAAA,OAAA;AAAA,EACV,YAAc,EAAA,KAAA;AAAA,EACd,cAAgB,EAAA,MAAA;AAAA,EAChB,SAAW,EAAA,MAAA;AAAA,EACX,QAAU,EAAA,MAAA;AAAA,EACV,OAAS,EAAA,uBAAA;AAAA,EACT,UAAA,EAAY,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA,KAAA;AAAA,EACrC,MAAQ,EAAA,CAAA,UAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,OAAO,CAAA,CAAA;AAAA,EAC1C,KAAA,EACE,KAAM,CAAA,OAAA,CAAQ,IAAS,KAAA,MAAA,GACnB,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,QAAA,GACnB,KAAM,CAAA,OAAA,CAAQ,IAAK,CAA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AAAA,oBACA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,EAAA,EAAI,GAAG,EAAE,CAAA,KAAA,CAAA;AAAA,QACT,QAAA;AAAA,QACA,WAAW,EAAA,IAAA;AAAA,QACX,IAAA,EAAM,QAAQ,QAAQ,CAAA;AAAA,QACtB,OAAA;AAAA,QACA,YAAc,EAAA;AAAA,UACZ,QAAU,EAAA,QAAA;AAAA,UACV,UAAY,EAAA;AAAA,SACd;AAAA,QACA,eAAiB,EAAA;AAAA,UACf,QAAU,EAAA,KAAA;AAAA,UACV,UAAY,EAAA;AAAA,SACd;AAAA,QACA,EAAI,EAAA;AAAA,UACF,6BAA+B,EAAA;AAAA,YAC7B,EAAI,EAAA;AAAA;AACN,SACF;AAAA,QACA,aAAe,EAAA;AAAA,UACb,iBAAmB,EAAA,EAAA;AAAA,UACnB,EAAA,EAAI,CAAS,KAAA,KAAA,aAAA,CAAc,KAAK;AAAA,SAClC;AAAA,QAEC;AAAA;AAAA;AACH,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"HeaderDropdownComponent.esm.js","sources":["../../../src/components/HeaderDropdownComponent/HeaderDropdownComponent.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useId } from 'react';\nimport type { ReactNode, ComponentProps, MouseEvent, FC, Ref } from 'react';\nimport Menu from '@mui/material/Menu';\nimport Button from '@mui/material/Button';\nimport { Theme } from '@mui/material/styles';\nimport Box from '@mui/material/Box';\nimport IconButton, { IconButtonProps } from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport { MenuItemConfig, MenuSectionConfig } from './MenuSection';\n\ninterface HeaderDropdownProps {\n buttonContent: ReactNode;\n children: ReactNode;\n menuSections?: MenuSectionConfig[];\n menuBottomItems?: MenuItemConfig[];\n buttonProps?: ComponentProps<typeof Button>;\n onOpen: (event: MouseEvent<HTMLElement>) => void;\n onClose: () => void;\n anchorEl: HTMLElement | null;\n isIconButton?: boolean;\n tooltip?: string;\n size?: IconButtonProps['size'];\n /** Ref forwarded to the underlying MUI MenuList (`<ul>`). */\n menuListRef?: Ref<HTMLUListElement | null>;\n}\n\nconst paperStyle = (theme: Theme) => ({\n borderRadius: '4px',\n background: theme.palette.background.paper,\n border: `1px solid ${theme.palette.divider}`,\n boxShadow:\n theme.palette.mode === 'dark'\n ? '0 2px 6px 2px rgba(0,0,0,0.50), 0 1px 2px 0 rgba(0,0,0,0.50)'\n : '0 2px 6px 2px rgba(0,0,0,0.15), 0 1px 2px 0 rgba(0,0,0,0.30)',\n maxHeight: '60vh',\n overflow: 'auto',\n});\n\nconst menuListStyle = (theme: Theme) => ({\n fontSize: '0.875rem',\n padding: 0,\n margin: 0,\n minWidth: '160px',\n textDecoration: 'none',\n listStyle: 'none',\n color:\n theme.palette.mode === 'dark'\n ? theme.palette.text.disabled\n : theme.palette.text.primary,\n});\n\nexport const HeaderDropdownComponent: FC<HeaderDropdownProps> = ({\n buttonContent,\n children,\n buttonProps,\n onOpen,\n onClose,\n anchorEl,\n isIconButton = false,\n size = 'small',\n tooltip,\n menuListRef,\n}) => {\n const id = useId();\n\n const menuId = `${id}-menu`;\n\n const commonButtonProps = {\n ...buttonProps,\n onClick: (event: MouseEvent<HTMLElement>) => {\n onOpen(event);\n // Defer focus until MUI finishes rendering the menu into the DOM.\n setTimeout(() => {\n document\n .getElementById(menuId)\n ?.querySelector<HTMLElement>('[role=\"menuitem\"]')\n ?.focus();\n }, 0);\n },\n 'aria-haspopup': true,\n 'aria-controls': menuId,\n 'aria-expanded': anchorEl ? true : undefined,\n 'aria-label': tooltip,\n };\n\n return (\n <Box>\n <Tooltip title={tooltip}>\n {isIconButton ? (\n <IconButton {...commonButtonProps} color=\"inherit\" size={size}>\n {buttonContent}\n </IconButton>\n ) : (\n <Button disableRipple disableTouchRipple {...commonButtonProps}>\n {buttonContent}\n </Button>\n )}\n </Tooltip>\n <Menu\n id={menuId}\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={onClose}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n slotProps={{\n paper: {\n sx: theme => paperStyle(theme as Theme),\n },\n }}\n sx={{\n '& ul[class*=\"MuiMenu-list\"]': {\n py: 0,\n },\n }}\n MenuListProps={{\n ref: menuListRef as Ref<HTMLUListElement>,\n 'aria-labelledby': id,\n sx: theme => menuListStyle(theme),\n }}\n >\n {children}\n </Menu>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA0CA,MAAM,UAAA,GAAa,CAAC,KAAkB,MAAA;AAAA,EACpC,YAAc,EAAA,KAAA;AAAA,EACd,UAAA,EAAY,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA,KAAA;AAAA,EACrC,MAAQ,EAAA,CAAA,UAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,OAAO,CAAA,CAAA;AAAA,EAC1C,SACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SACnB,8DACA,GAAA,8DAAA;AAAA,EACN,SAAW,EAAA,MAAA;AAAA,EACX,QAAU,EAAA;AACZ,CAAA,CAAA;AAEA,MAAM,aAAA,GAAgB,CAAC,KAAkB,MAAA;AAAA,EACvC,QAAU,EAAA,UAAA;AAAA,EACV,OAAS,EAAA,CAAA;AAAA,EACT,MAAQ,EAAA,CAAA;AAAA,EACR,QAAU,EAAA,OAAA;AAAA,EACV,cAAgB,EAAA,MAAA;AAAA,EAChB,SAAW,EAAA,MAAA;AA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A,GAAG,iBAC1C,EAAA,QAAA,EAAA,aAAA,EACH,CAEJ,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA,MAAA;AAAA,QACJ,QAAA;AAAA,QACA,WAAW,EAAA,IAAA;AAAA,QACX,IAAA,EAAM,QAAQ,QAAQ,CAAA;AAAA,QACtB,OAAA;AAAA,QACA,YAAc,EAAA;AAAA,UACZ,QAAU,EAAA,QAAA;AAAA,UACV,UAAY,EAAA;AAAA,SACd;AAAA,QACA,eAAiB,EAAA;AAAA,UACf,QAAU,EAAA,KAAA;AAAA,UACV,UAAY,EAAA;AAAA,SACd;AAAA,QACA,SAAW,EAAA;AAAA,UACT,KAAO,EAAA;AAAA,YACL,EAAA,EAAI,CAAS,KAAA,KAAA,UAAA,CAAW,KAAc;AAAA;AACxC,SACF;AAAA,QACA,EAAI,EAAA;AAAA,UACF,6BAA+B,EAAA;AAAA,YAC7B,EAAI,EAAA;AAAA;AACN,SACF;AAAA,QACA,aAAe,EAAA;AAAA,UACb,GAAK,EAAA,WAAA;AAAA,UACL,iBAAmB,EAAA,EAAA;AAAA,UACnB,EAAA,EAAI,CAAS,KAAA,KAAA,aAAA,CAAc,KAAK;AAAA,SAClC;AAAA,QAEC;AAAA;AAAA;AACH,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -62,13 +62,25 @@ const MenuSection = ({
62
62
  }
63
63
  ),
64
64
  items.map(
65
- ({ icon, label, labelKey, subLabel, subLabelKey, link, Component }, index) => /* @__PURE__ */ jsx(
65
+ ({
66
+ icon,
67
+ label,
68
+ labelKey,
69
+ subLabel,
70
+ subLabelKey,
71
+ link,
72
+ onClick,
73
+ Component
74
+ }, index) => /* @__PURE__ */ jsx(
66
75
  MenuItem,
67
76
  {
68
77
  disableRipple: true,
69
78
  disableTouchRipple: true,
70
- onClick: handleClose,
71
- sx: { py: 0.5 },
79
+ onClick: () => {
80
+ onClick?.();
81
+ handleClose();
82
+ },
83
+ sx: { py: 0.5, color: "inherit", textDecoration: "none" },
72
84
  component: link ? Link : Fragment$1,
73
85
  to: link,
74
86
  children: /* @__PURE__ */ jsx(
@@ -1 +1 @@
1
- {"version":3,"file":"MenuSection.esm.js","sources":["../../../src/components/HeaderDropdownComponent/MenuSection.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Fragment } from 'react';\nimport type { ComponentType, FC } from 'react';\nimport Divider from '@mui/material/Divider';\nimport Box from '@mui/material/Box';\nimport MenuItem, { MenuItemProps } from '@mui/material/MenuItem';\nimport { Link } from '@backstage/core-components';\nimport { MenuItemLinkProps } from '../MenuItemLink/MenuItemLink';\nimport ListSubheader from '@mui/material/ListSubheader';\nimport { useTranslation } from '../../hooks/useTranslation';\n\n/**\n * Menu item configuration\n *\n * @public\n */\nexport interface MenuItemConfig {\n Component: ComponentType<MenuItemLinkProps | MenuItemProps | {}>;\n label: string;\n labelKey?: string;\n icon?: string;\n subLabel?: string;\n subLabelKey?: string;\n link?: string;\n}\n\nexport interface MenuSectionConfig {\n sectionLabel?: string;\n optionalLink?: string;\n optionalLinkLabel?: string;\n items: MenuItemConfig[];\n hideDivider?: boolean;\n handleClose: () => void;\n}\n\nexport const MenuSection: FC<MenuSectionConfig> = ({\n sectionLabel,\n optionalLink,\n optionalLinkLabel,\n items,\n hideDivider = false,\n handleClose,\n}) => {\n const { t } = useTranslation();\n const hasClickableSubheader =\n optionalLink && optionalLinkLabel && items.length > 0;\n\n // Check if sectionLabel looks like a translation key (contains dots)\n const translatedSectionLabel =\n sectionLabel && sectionLabel.includes('.')\n ? t(sectionLabel as any, {}) || sectionLabel // Fallback to original if translation fails\n : sectionLabel;\n\n return (\n <>\n {sectionLabel && (\n <MenuItem\n sx={{\n p: 0,\n }}\n disableRipple\n disableTouchRipple\n component={hasClickableSubheader ? Link : Fragment}\n to={optionalLink}\n onClick={handleClose}\n >\n <ListSubheader\n sx={{\n backgroundColor: 'transparent',\n m: 0,\n color: 'text.disabled',\n lineHeight: 2,\n mt: '0.5rem',\n fontWeight: 400,\n }}\n >\n {translatedSectionLabel}\n </ListSubheader>\n\n {optionalLinkLabel && (\n <Box\n sx={{\n fontSize: '0.875em',\n mr: 2,\n flexGrow: 1,\n textAlign: 'right',\n mt: '0.5rem',\n }}\n >\n {optionalLinkLabel}\n </Box>\n )}\n </MenuItem>\n )}\n\n {items.map(\n (\n { icon, label, labelKey, subLabel, subLabelKey, link, Component },\n index,\n ) => (\n <MenuItem\n key={`menu-item-${index.toString()}`}\n disableRipple\n disableTouchRipple\n onClick={handleClose}\n sx={{ py: 0.5 }}\n component={link ? Link : Fragment}\n to={link}\n >\n <Component\n icon={icon}\n to={link!}\n title={label}\n titleKey={labelKey}\n subTitle={subLabel}\n subTitleKey={subLabelKey}\n onClick={handleClose}\n />\n </MenuItem>\n ),\n )}\n {!hideDivider && <Divider sx={{ my: 0.5 }} />}\n </>\n );\n};\n"],"names":["Fragment"],"mappings":";;;;;;;;;AAkDO,MAAM,cAAqC,CAAC;AAAA,EACjD,YAAA;AAAA,EACA,YAAA;AAAA,EACA,iBAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAc,GAAA,KAAA;AAAA,EACd;AACF,CAAM,KAAA;AACJ,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,qBACJ,GAAA,YAAA,IAAgB,iBAAqB,IAAA,KAAA,CAAM,MAAS,GAAA,CAAA;AAGtD,EAAM,MAAA,sBAAA,GACJ,YAAgB,IAAA,YAAA,CAAa,QAAS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AC,QAAA;AAAA,QAAA;AAAA,UAEC,aAAa,EAAA,IAAA;AAAA,UACb,kBAAkB,EAAA,IAAA;AAAA,UAClB,OAAS,EAAA,WAAA;AAAA,UACT,EAAA,EAAI,EAAE,EAAA,EAAI,GAAI,EAAA;AAAA,UACd,SAAA,EAAW,OAAO,IAAOA,GAAAA,UAAAA;AAAA,UACzB,EAAI,EAAA,IAAA;AAAA,UAEJ,QAAA,kBAAA,GAAA;AAAA,YAAC,SAAA;AAAA,YAAA;AAAA,cACC,IAAA;AAAA,cACA,EAAI,EAAA,IAAA;AAAA,cACJ,KAAO,EAAA,KAAA;AAAA,cACP,QAAU,EAAA,QAAA;AAAA,cACV,QAAU,EAAA,QAAA;AAAA,cACV,WAAa,EAAA,WAAA;AAAA,cACb,OAAS,EAAA;AAAA;AAAA;AACX,SAAA;AAAA,QAhBK,CAAA,UAAA,EAAa,KAAM,CAAA,QAAA,EAAU,CAAA;AAAA;AAiBpC,KAEJ;AAAA,IACC,CAAC,+BAAgB,GAAA,CAAA,OAAA,EAAA,EAAQ,IAAI,EAAE,EAAA,EAAI,KAAO,EAAA;AAAA,GAC7C,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"MenuSection.esm.js","sources":["../../../src/components/HeaderDropdownComponent/MenuSection.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Fragment } from 'react';\nimport type { ComponentType, FC } from 'react';\nimport Divider from '@mui/material/Divider';\nimport Box from '@mui/material/Box';\nimport MenuItem, { MenuItemProps } from '@mui/material/MenuItem';\nimport { Link } from '@backstage/core-components';\nimport { MenuItemLinkProps } from '../MenuItemLink/MenuItemLink';\nimport ListSubheader from '@mui/material/ListSubheader';\nimport { useTranslation } from '../../hooks/useTranslation';\n\n/**\n * Menu item configuration\n *\n * @public\n */\nexport interface MenuItemConfig {\n Component: ComponentType<MenuItemLinkProps | MenuItemProps | {}>;\n label: string;\n labelKey?: string;\n icon?: string;\n subLabel?: string;\n subLabelKey?: string;\n link?: string;\n onClick?: () => void;\n}\n\nexport interface MenuSectionConfig {\n sectionLabel?: string;\n optionalLink?: string;\n optionalLinkLabel?: string;\n items: MenuItemConfig[];\n hideDivider?: boolean;\n handleClose: () => void;\n}\n\nexport const MenuSection: FC<MenuSectionConfig> = ({\n sectionLabel,\n optionalLink,\n optionalLinkLabel,\n items,\n hideDivider = false,\n handleClose,\n}) => {\n const { t } = useTranslation();\n const hasClickableSubheader =\n optionalLink && optionalLinkLabel && items.length > 0;\n\n // Check if sectionLabel looks like a translation key (contains dots)\n const translatedSectionLabel =\n sectionLabel && sectionLabel.includes('.')\n ? t(sectionLabel as any, {}) || sectionLabel // Fallback to original if translation fails\n : sectionLabel;\n\n return (\n <>\n {sectionLabel && (\n <MenuItem\n sx={{\n p: 0,\n }}\n disableRipple\n disableTouchRipple\n component={hasClickableSubheader ? Link : Fragment}\n to={optionalLink}\n onClick={handleClose}\n >\n <ListSubheader\n sx={{\n backgroundColor: 'transparent',\n m: 0,\n color: 'text.disabled',\n lineHeight: 2,\n mt: '0.5rem',\n fontWeight: 400,\n }}\n >\n {translatedSectionLabel}\n </ListSubheader>\n\n {optionalLinkLabel && (\n <Box\n sx={{\n fontSize: '0.875em',\n mr: 2,\n flexGrow: 1,\n textAlign: 'right',\n mt: '0.5rem',\n }}\n >\n {optionalLinkLabel}\n </Box>\n )}\n </MenuItem>\n )}\n\n {items.map(\n (\n {\n icon,\n label,\n labelKey,\n subLabel,\n subLabelKey,\n link,\n onClick,\n Component,\n },\n index,\n ) => (\n <MenuItem\n key={`menu-item-${index.toString()}`}\n disableRipple\n disableTouchRipple\n onClick={() => {\n onClick?.();\n handleClose();\n }}\n sx={{ py: 0.5, color: 'inherit', textDecoration: 'none' }}\n component={link ? Link : Fragment}\n to={link}\n >\n <Component\n icon={icon}\n to={link!}\n title={label}\n titleKey={labelKey}\n subTitle={subLabel}\n subTitleKey={subLabelKey}\n onClick={handleClose}\n />\n </MenuItem>\n ),\n )}\n {!hideDivider && <Divider sx={{ my: 0.5 }} />}\n </>\n );\n};\n"],"names":["Fragment"],"mappings":";;;;;;;;;AAmDO,MAAM,cAAqC,CAAC;AAAA,EACjD,YAAA;AAAA,EACA,YAAA;AAAA,EACA,iBAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAc,GAAA,KAAA;AAAA,EACd;AACF,CAAM,KAAA;AACJ,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,qBACJ,GAAA,YAAA,IAAgB,iBAAqB,IAAA,KAAA,CAAM,MAAS,GAAA,CAAA;AAGtD,EAAM,MAAA,sBAAA,GACJ,YAAgB,IAAA,YAAA,CAAa,QAAS,CAAA,GAAG,CACrC,GAAA,CAAA,CAAE,YAAqB,EAAA,EAAE,CAAA,IAAK,YAC9B,GAAA,YAAA;AAEN,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IACC,YAAA,oBAAA,IAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,CAAG,EAAA;AAAA,SACL;AAAA,QACA,aAAa,EAAA,IAAA;AAAA,QACb,kBAAkB,EAAA,IAAA;AAAA,QAClB,SAAA,EAAW,wBAAwB,IAAOA,GAAAA,UAAAA;AAAA,QAC1C,EAAI,EAAA,YAAA;AAAA,QACJ,OAAS,EAAA,WAAA;AAAA,QAET,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,aAAA;AAAA,YAAA;AAAA,cACC,EAAI,EAAA;AAAA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,QAAA;AAAA,cACV,QAAU,EAAA,QAAA;AAAA,cACV,WAAa,EAAA,WAAA;AAAA,cACb,OAAS,EAAA;AAAA;AAAA;AACX,SAAA;AAAA,QAnBK,CAAA,UAAA,EAAa,KAAM,CAAA,QAAA,EAAU,CAAA;AAAA;AAoBpC,KAEJ;AAAA,IACC,CAAC,+BAAgB,GAAA,CAAA,OAAA,EAAA,EAAQ,IAAI,EAAE,EAAA,EAAI,KAAO,EAAA;AAAA,GAC7C,EAAA,CAAA;AAEJ;;;;"}
@@ -3,6 +3,9 @@ import { useApp } from '@backstage/core-plugin-api';
3
3
  import MuiIcon from '@mui/material/Icon';
4
4
  import Box from '@mui/material/Box';
5
5
 
6
+ function toMaterialIconLigature(name) {
7
+ return name.replace(/[A-Z]/g, (m) => `_${m.toLowerCase()}`);
8
+ }
6
9
  const HeaderIcon = ({
7
10
  icon,
8
11
  size = "small",
@@ -31,13 +34,14 @@ const HeaderIcon = ({
31
34
  }
32
35
  );
33
36
  }
37
+ const ligature = toMaterialIconLigature(icon);
34
38
  return /* @__PURE__ */ jsx(
35
39
  MuiIcon,
36
40
  {
37
41
  fontSize: size,
38
42
  baseClassName: "material-icons-outlined",
39
43
  sx: layout,
40
- children: icon
44
+ children: ligature
41
45
  }
42
46
  );
43
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderIcon.esm.js","sources":["../../../src/components/HeaderIcon/HeaderIcon.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { CSSProperties } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\nimport MuiIcon from '@mui/material/Icon';\nimport Box from '@mui/material/Box';\n\n/**\n * @public\n */\nexport interface HeaderIconProps {\n icon: string;\n size?: 'small' | 'medium' | 'large';\n layout?: CSSProperties;\n}\n\n/**\n * @public\n */\nexport const HeaderIcon = ({\n icon,\n size = 'small',\n layout,\n}: HeaderIconProps) => {\n const app = useApp();\n if (!icon) {\n return null;\n }\n\n const SystemIcon = app.getSystemIcon(icon);\n if (SystemIcon) {\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', ...layout }}>\n <SystemIcon fontSize={size} />\n </Box>\n );\n }\n\n if (icon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(icon)}`;\n return (\n <MuiIcon fontSize={size} sx={layout}>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n icon.startsWith('https://') ||\n icon.startsWith('http://') ||\n icon.startsWith('/')\n ) {\n return (\n <MuiIcon\n fontSize={size}\n baseClassName=\"material-icons-outlined\"\n sx={layout}\n >\n <img src={icon} alt=\"\" height=\"100%\" width=\"100%\" />\n </MuiIcon>\n );\n }\n\n return (\n <MuiIcon\n fontSize={size}\n baseClassName=\"material-icons-outlined\"\n sx={layout}\n >\n {icon}\n </MuiIcon>\n );\n};\n"],"names":[],"mappings":";;;;;AAgCO,MAAM,aAAa,CAAC;AAAA,EACzB,IAAA;AAAA,EACA,IAAO,GAAA,OAAA;AAAA,EACP;AACF,CAAuB,KAAA;AACrB,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA;AAAA;AAGT,EAAM,MAAA,UAAA,GAAa,GAAI,CAAA,aAAA,CAAc,IAAI,CAAA;AACzC,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,uBACG,GAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,EAAE,SAAS,MAAQ,EAAA,UAAA,EAAY,QAAU,EAAA,GAAG,QACnD,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,QAAA,EAAU,MAAM,CAC9B,EAAA,CAAA;AAAA;AAIJ,EAAI,IAAA,IAAA,CAAK,UAAW,CAAA,MAAM,CAAG,EAAA;AAC3B,IAAA,MAAM,UAAa,GAAA,CAAA,0BAAA,EAA6B,IAAK,CAAA,IAAI,CAAC,CAAA,CAAA;AAC1D,IAAA,uBACG,GAAA,CAAA,OAAA,EAAA,EAAQ,QAAU,EAAA,IAAA,EAAM,EAAI,EAAA,MAAA,EAC3B,QAAC,kBAAA,GAAA,CAAA,KAAA,EAAA,EAAI,GAAK,EAAA,UAAA,EAAY,GAAI,EAAA,EAAA,EAAG,CAC/B,EAAA,CAAA;AAAA;AAIJ,EACE,IAAA,IAAA,CAAK,UAAW,CAAA,UAAU,CAC1B,IAAA,IAAA,CAAK,UAAW,CAAA,SAAS,CACzB,IAAA,IAAA,CAAK,UAAW,CAAA,GAAG,CACnB,EAAA;AACA,IACE,uBAAA,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,QAAU,EAAA,IAAA;AAAA,QACV,aAAc,EAAA,yBAAA;AAAA,QACd,EAAI,EAAA,MAAA;AAAA,QAEJ,QAAA,kBAAA,GAAA,CAAC,SAAI,GAAK,EAAA,IAAA,EAAM,KAAI,EAAG,EAAA,MAAA,EAAO,MAAO,EAAA,KAAA,EAAM,MAAO,EAAA;AAAA;AAAA,KACpD;AAAA;AAIJ,EACE,uBAAA,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,QAAU,EAAA,IAAA;AAAA,MACV,aAAc,EAAA,yBAAA;AAAA,MACd,EAAI,EAAA,MAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
1
+ {"version":3,"file":"HeaderIcon.esm.js","sources":["../../../src/components/HeaderIcon/HeaderIcon.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { CSSProperties } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\nimport MuiIcon from '@mui/material/Icon';\nimport Box from '@mui/material/Box';\n\n/**\n * @public\n */\nexport interface HeaderIconProps {\n icon: string;\n size?: 'small' | 'medium' | 'large';\n layout?: CSSProperties;\n}\n\n/**\n * Converts camelCase icon names to snake_case for Material Icons ligatures.\n * e.g. `manageAccounts` -> `manage_accounts`, `accountCircle` -> `account_circle`\n */\nfunction toMaterialIconLigature(name: string): string {\n return name.replace(/[A-Z]/g, m => `_${m.toLowerCase()}`);\n}\n\n/**\n * @public\n */\nexport const HeaderIcon = ({\n icon,\n size = 'small',\n layout,\n}: HeaderIconProps) => {\n const app = useApp();\n if (!icon) {\n return null;\n }\n\n const SystemIcon = app.getSystemIcon(icon);\n if (SystemIcon) {\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', ...layout }}>\n <SystemIcon fontSize={size} />\n </Box>\n );\n }\n\n if (icon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(icon)}`;\n return (\n <MuiIcon fontSize={size} sx={layout}>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n icon.startsWith('https://') ||\n icon.startsWith('http://') ||\n icon.startsWith('/')\n ) {\n return (\n <MuiIcon\n fontSize={size}\n baseClassName=\"material-icons-outlined\"\n sx={layout}\n >\n <img src={icon} alt=\"\" height=\"100%\" width=\"100%\" />\n </MuiIcon>\n );\n }\n\n const ligature = toMaterialIconLigature(icon);\n return (\n <MuiIcon\n fontSize={size}\n baseClassName=\"material-icons-outlined\"\n sx={layout}\n >\n {ligature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uBAAA,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,QAAU,EAAA,IAAA;AAAA,QACV,aAAc,EAAA,yBAAA;AAAA,QACd,EAAI,EAAA,MAAA;AAAA,QAEJ,QAAA,kBAAA,GAAA,CAAC,SAAI,GAAK,EAAA,IAAA,EAAM,KAAI,EAAG,EAAA,MAAA,EAAO,MAAO,EAAA,KAAA,EAAM,MAAO,EAAA;AAAA;AAAA,KACpD;AAAA;AAIJ,EAAM,MAAA,QAAA,GAAW,uBAAuB,IAAI,CAAA;AAC5C,EACE,uBAAA,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,QAAU,EAAA,IAAA;AAAA,MACV,aAAc,EAAA,yBAAA;AAAA,MACd,EAAI,EAAA,MAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Link as Link$1 } from '@backstage/core-components';
3
- import Box from '@mui/material/Box';
4
3
  import IconButton from '@mui/material/IconButton';
5
4
  import Tooltip from '@mui/material/Tooltip';
6
5
  import { HeaderIcon } from '../HeaderIcon/HeaderIcon.esm.js';
@@ -16,8 +15,7 @@ const HeaderIconButton = ({
16
15
  color = "inherit",
17
16
  size = "small",
18
17
  ariaLabel,
19
- to,
20
- layout
18
+ to
21
19
  }) => {
22
20
  const { t } = useTranslation();
23
21
  const displayTitle = translateWithFallback(t, titleKey, title);
@@ -25,7 +23,7 @@ const HeaderIconButton = ({
25
23
  console.warn("HeaderIconButton has no title:", { icon, to });
26
24
  }
27
25
  const linkProps = { to };
28
- return /* @__PURE__ */ jsx(Box, { sx: layout, children: /* @__PURE__ */ jsx(Tooltip, { title: tooltip ?? displayTitle, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
26
+ return /* @__PURE__ */ jsx(Tooltip, { title: tooltip ?? displayTitle, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
29
27
  IconButton,
30
28
  {
31
29
  LinkComponent: Link,
@@ -35,7 +33,7 @@ const HeaderIconButton = ({
35
33
  ...linkProps,
36
34
  children: /* @__PURE__ */ jsx(HeaderIcon, { icon, size })
37
35
  }
38
- ) }) }) });
36
+ ) }) });
39
37
  };
40
38
 
41
39
  export { HeaderIconButton };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderIconButton.esm.js","sources":["../../../src/components/HeaderIconButton/HeaderIconButton.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { CSSProperties } from 'react';\nimport { Link as BackstageLink } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\nimport IconButton, { IconButtonProps } from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\n\nimport { HeaderIcon } from '../HeaderIcon/HeaderIcon';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { translateWithFallback } from '../../utils/translationUtils';\n\n/**\n * @public\n */\nexport interface HeaderIconButtonProps {\n title: string;\n titleKey?: string;\n icon: string;\n tooltip?: string;\n color?: 'inherit' | 'primary' | 'secondary' | 'default';\n size?: 'small' | 'medium' | 'large';\n ariaLabel?: string;\n to: string;\n layout?: CSSProperties;\n}\n\n// Backstage Link automatically detects external links and emits analytic events.\nconst Link = (props: any) => (\n <BackstageLink {...props} color=\"inherit\" externalLinkIcon={false} />\n);\n\nexport const HeaderIconButton = ({\n title,\n titleKey,\n icon,\n tooltip,\n color = 'inherit',\n size = 'small',\n ariaLabel,\n to,\n layout,\n}: HeaderIconButtonProps) => {\n const { t } = useTranslation();\n const displayTitle = translateWithFallback(t, titleKey, title);\n if (!displayTitle) {\n // eslint-disable-next-line no-console\n console.warn('HeaderIconButton has no title:', { icon, to });\n }\n\n const linkProps = { to } as IconButtonProps;\n\n return (\n <Box sx={layout}>\n <Tooltip title={tooltip ?? displayTitle}>\n <div>\n <IconButton\n LinkComponent={Link}\n color={color}\n size={size}\n aria-label={ariaLabel ?? displayTitle}\n {...linkProps} // to={to} isn't supported\n >\n <HeaderIcon icon={icon} size={size} />\n </IconButton>\n </div>\n </Tooltip>\n </Box>\n );\n};\n"],"names":["BackstageLink"],"mappings":";;;;;;;;;AA2CA,MAAM,IAAA,GAAO,CAAC,KAAA,qBACX,GAAA,CAAAA,MAAA,EAAA,EAAe,GAAG,KAAO,EAAA,KAAA,EAAM,SAAU,EAAA,gBAAA,EAAkB,KAAO,EAAA,CAAA;AAG9D,MAAM,mBAAmB,CAAC;AAAA,EAC/B,KAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAQ,GAAA,SAAA;AAAA,EACR,IAAO,GAAA,OAAA;AAAA,EACP,SAAA;AAAA,EACA,EAAA;AAAA,EACA;AACF,CAA6B,KAAA;AAC3B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,YAAe,GAAA,qBAAA,CAAsB,CAAG,EAAA,QAAA,EAAU,KAAK,CAAA;AAC7D,EAAA,IAAI,CAAC,YAAc,EAAA;AAEjB,IAAA,OAAA,CAAQ,IAAK,CAAA,gCAAA,EAAkC,EAAE,IAAA,EAAM,IAAI,CAAA;AAAA;AAG7D,EAAM,MAAA,SAAA,GAAY,EAAE,EAAG,EAAA;AAEvB,EACE,uBAAA,GAAA,CAAC,GAAI,EAAA,EAAA,EAAA,EAAI,MACP,EAAA,QAAA,kBAAA,GAAA,CAAC,WAAQ,KAAO,EAAA,OAAA,IAAW,YACzB,EAAA,QAAA,kBAAA,GAAA,CAAC,KACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,aAAe,EAAA,IAAA;AAAA,MACf,KAAA;AAAA,MACA,IAAA;AAAA,MACA,cAAY,SAAa,IAAA,YAAA;AAAA,MACxB,GAAG,SAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,IAAA,EAAY,IAAY,EAAA;AAAA;AAAA,GACtC,EACF,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"HeaderIconButton.esm.js","sources":["../../../src/components/HeaderIconButton/HeaderIconButton.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Link as BackstageLink } from '@backstage/core-components';\n\nimport IconButton, { IconButtonProps } from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\n\nimport { HeaderIcon } from '../HeaderIcon/HeaderIcon';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { translateWithFallback } from '../../utils/translationUtils';\n\n/**\n * @public\n */\nexport interface HeaderIconButtonProps {\n title: string;\n titleKey?: string;\n icon: string;\n tooltip?: string;\n color?: 'inherit' | 'primary' | 'secondary' | 'default';\n size?: 'small' | 'medium' | 'large';\n ariaLabel?: string;\n to: string;\n}\n\nconst Link = (props: any) => (\n <BackstageLink {...props} color=\"inherit\" externalLinkIcon={false} />\n);\n\n/** @public */\nexport const HeaderIconButton = ({\n title,\n titleKey,\n icon,\n tooltip,\n color = 'inherit',\n size = 'small',\n ariaLabel,\n to,\n}: HeaderIconButtonProps) => {\n const { t } = useTranslation();\n const displayTitle = translateWithFallback(t, titleKey, title);\n if (!displayTitle) {\n // eslint-disable-next-line no-console\n console.warn('HeaderIconButton has no title:', { icon, to });\n }\n\n const linkProps = { to } as IconButtonProps;\n\n return (\n <Tooltip title={tooltip ?? displayTitle}>\n <div>\n <IconButton\n LinkComponent={Link}\n color={color}\n size={size}\n aria-label={ariaLabel ?? displayTitle}\n {...linkProps}\n >\n <HeaderIcon icon={icon} size={size} />\n </IconButton>\n </div>\n </Tooltip>\n );\n};\n"],"names":["BackstageLink"],"mappings":";;;;;;;;AAuCA,MAAM,IAAA,GAAO,CAAC,KAAA,qBACX,GAAA,CAAAA,MAAA,EAAA,EAAe,GAAG,KAAO,EAAA,KAAA,EAAM,SAAU,EAAA,gBAAA,EAAkB,KAAO,EAAA,CAAA;AAI9D,MAAM,mBAAmB,CAAC;AAAA,EAC/B,KAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAQ,GAAA,SAAA;AAAA,EACR,IAAO,GAAA,OAAA;AAAA,EACP,SAAA;AAAA,EACA;AACF,CAA6B,KAAA;AAC3B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,YAAe,GAAA,qBAAA,CAAsB,CAAG,EAAA,QAAA,EAAU,KAAK,CAAA;AAC7D,EAAA,IAAI,CAAC,YAAc,EAAA;AAEjB,IAAA,OAAA,CAAQ,IAAK,CAAA,gCAAA,EAAkC,EAAE,IAAA,EAAM,IAAI,CAAA;AAAA;AAG7D,EAAM,MAAA,SAAA,GAAY,EAAE,EAAG,EAAA;AAEvB,EAAA,2BACG,OAAQ,EAAA,EAAA,KAAA,EAAO,OAAW,IAAA,YAAA,EACzB,8BAAC,KACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,aAAe,EAAA,IAAA;AAAA,MACf,KAAA;AAAA,MACA,IAAA;AAAA,MACA,cAAY,SAAa,IAAA,YAAA;AAAA,MACxB,GAAG,SAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,IAAA,EAAY,IAAY,EAAA;AAAA;AAAA,KAExC,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -5,7 +5,9 @@ import Divider from '@mui/material/Divider';
5
5
  import { MenuItemLinkContent } from '../MenuItemLink/MenuItemLinkContent.esm.js';
6
6
  import { useTranslation } from '../../hooks/useTranslation.esm.js';
7
7
 
8
- const LogoutButton = () => {
8
+ const LogoutButton = ({
9
+ hideDivider = false
10
+ }) => {
9
11
  const errorApi = useApi(errorApiRef);
10
12
  const identityApi = useApi(identityApiRef);
11
13
  const { t } = useTranslation();
@@ -13,7 +15,7 @@ const LogoutButton = () => {
13
15
  identityApi.signOut().catch((error) => errorApi.post(error));
14
16
  };
15
17
  return /* @__PURE__ */ jsxs(Fragment, { children: [
16
- /* @__PURE__ */ jsx(Divider, {}),
18
+ !hideDivider && /* @__PURE__ */ jsx(Divider, {}),
17
19
  /* @__PURE__ */ jsx(
18
20
  MenuItem,
19
21
  {
@@ -1 +1 @@
1
- {"version":3,"file":"LogoutButton.esm.js","sources":["../../../src/components/LogoutButton/LogoutButton.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n errorApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\n\nimport MenuItem from '@mui/material/MenuItem';\nimport Divider from '@mui/material/Divider';\n\nimport { MenuItemLinkContent } from '../MenuItemLink/MenuItemLinkContent';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const LogoutButton = () => {\n const errorApi = useApi(errorApiRef);\n const identityApi = useApi(identityApiRef);\n const { t } = useTranslation();\n\n const handleLogout = () => {\n identityApi.signOut().catch(error => errorApi.post(error));\n };\n\n return (\n <>\n <Divider />\n <MenuItem\n onClick={handleLogout}\n sx={{\n cursor: 'pointer',\n width: '100%',\n color: 'inherit',\n }}\n >\n <MenuItemLinkContent icon=\"logout\" label={t('profile.signOut')} />\n </MenuItem>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA4BO,MAAM,eAAe,MAAM;AAChC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,MAAM,eAAe,MAAM;AACzB,IAAA,WAAA,CAAY,SAAU,CAAA,KAAA,CAAM,WAAS,QAAS,CAAA,IAAA,CAAK,KAAK,CAAC,CAAA;AAAA,GAC3D;AAEA,EAAA,uBAEI,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,CAAA;AAAA,oBACT,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA,YAAA;AAAA,QACT,EAAI,EAAA;AAAA,UACF,MAAQ,EAAA,SAAA;AAAA,UACR,KAAO,EAAA,MAAA;AAAA,UACP,KAAO,EAAA;AAAA,SACT;AAAA,QAEA,8BAAC,mBAAoB,EAAA,EAAA,IAAA,EAAK,UAAS,KAAO,EAAA,CAAA,CAAE,iBAAiB,CAAG,EAAA;AAAA;AAAA;AAClE,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"LogoutButton.esm.js","sources":["../../../src/components/LogoutButton/LogoutButton.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n errorApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\n\nimport MenuItem from '@mui/material/MenuItem';\nimport Divider from '@mui/material/Divider';\n\nimport { MenuItemLinkContent } from '../MenuItemLink/MenuItemLinkContent';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const LogoutButton = ({\n hideDivider = false,\n}: {\n hideDivider?: boolean;\n}) => {\n const errorApi = useApi(errorApiRef);\n const identityApi = useApi(identityApiRef);\n const { t } = useTranslation();\n\n const handleLogout = () => {\n identityApi.signOut().catch(error => errorApi.post(error));\n };\n\n return (\n <>\n {!hideDivider && <Divider />}\n <MenuItem\n onClick={handleLogout}\n sx={{\n cursor: 'pointer',\n width: '100%',\n color: 'inherit',\n }}\n >\n <MenuItemLinkContent icon=\"logout\" label={t('profile.signOut')} />\n </MenuItem>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA4BO,MAAM,eAAe,CAAC;AAAA,EAC3B,WAAc,GAAA;AAChB,CAEM,KAAA;AACJ,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,MAAM,eAAe,MAAM;AACzB,IAAA,WAAA,CAAY,SAAU,CAAA,KAAA,CAAM,WAAS,QAAS,CAAA,IAAA,CAAK,KAAK,CAAC,CAAA;AAAA,GAC3D;AAEA,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IAAC,CAAA,WAAA,wBAAgB,OAAQ,EAAA,EAAA,CAAA;AAAA,oBAC1B,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA,YAAA;AAAA,QACT,EAAI,EAAA;AAAA,UACF,MAAQ,EAAA,SAAA;AAAA,UACR,KAAO,EAAA,MAAA;AAAA,UACP,KAAO,EAAA;AAAA,SACT;AAAA,QAEA,8BAAC,mBAAoB,EAAA,EAAA,IAAA,EAAK,UAAS,KAAO,EAAA,CAAA,CAAE,iBAAiB,CAAG,EAAA;AAAA;AAAA;AAClE,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItemLink.esm.js","sources":["../../../src/components/MenuItemLink/MenuItemLink.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Tooltip from '@mui/material/Tooltip';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { MenuItemLinkContent } from './MenuItemLinkContent';\nimport { translateWithFallback } from '../../utils/translationUtils';\n\n/**\n * Header Icon Button properties\n * @public\n */\nexport interface MenuItemLinkProps {\n to: string;\n title?: string;\n titleKey?: string;\n subTitle?: string;\n subTitleKey?: string;\n icon?: string;\n tooltip?: string;\n}\n\nexport const MenuItemLink = ({\n to,\n title,\n titleKey,\n subTitle,\n subTitleKey,\n icon,\n tooltip,\n}: MenuItemLinkProps) => {\n const { t } = useTranslation();\n const isExternalLink = Boolean(\n to && (to.startsWith('http://') || to.startsWith('https://')),\n );\n\n const translatedTitle = translateWithFallback(t, titleKey, title);\n const translatedSubTitle = translateWithFallback(t, subTitleKey, subTitle);\n\n const headerLinkContent = () => (\n <MenuItemLinkContent\n icon={icon}\n label={translatedTitle}\n subLabel={translatedSubTitle}\n isExternalLink={isExternalLink}\n />\n );\n\n return (\n <>\n {tooltip && (\n <Tooltip title={tooltip}>\n <div>{headerLinkContent()}</div>\n </Tooltip>\n )}\n {!tooltip && headerLinkContent()}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;AAmCO,MAAM,eAAe,CAAC;AAAA,EAC3B,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAyB,KAAA;AACvB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,cAAiB,GAAA,OAAA;AAAA,IACrB,OAAO,EAAG,CAAA,UAAA,CAAW,SAAS,CAAK,IAAA,EAAA,CAAG,WAAW,UAAU,CAAA;AAAA,GAC7D;AAEA,EAAA,MAAM,eAAkB,GAAA,qBAAA,CAAsB,CAAG,EAAA,QAAA,EAAU,KAAK,CAAA;AAChE,EAAA,MAAM,kBAAqB,GAAA,qBAAA,CAAsB,CAAG,EAAA,WAAA,EAAa,QAAQ,CAAA;AAEzE,EAAA,MAAM,oBAAoB,sBACxB,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,KAAO,EAAA,eAAA;AAAA,MACP,QAAU,EAAA,kBAAA;AAAA,MACV;AAAA;AAAA,GACF;AAGF,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IACC,OAAA,oBAAA,GAAA,CAAC,WAAQ,KAAO,EAAA,OAAA,EACd,8BAAC,KAAK,EAAA,EAAA,QAAA,EAAA,iBAAA,IAAoB,CAC5B,EAAA,CAAA;AAAA,IAED,CAAC,WAAW,iBAAkB;AAAA,GACjC,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"MenuItemLink.esm.js","sources":["../../../src/components/MenuItemLink/MenuItemLink.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Tooltip from '@mui/material/Tooltip';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { MenuItemLinkContent } from './MenuItemLinkContent';\nimport { translateWithFallback } from '../../utils/translationUtils';\n\n/**\n * Header Icon Button properties\n * @public\n */\nexport interface MenuItemLinkProps {\n to: string;\n title?: string;\n titleKey?: string;\n subTitle?: string;\n subTitleKey?: string;\n icon?: string;\n tooltip?: string;\n}\n\n/** @public */\nexport const MenuItemLink = ({\n to,\n title,\n titleKey,\n subTitle,\n subTitleKey,\n icon,\n tooltip,\n}: MenuItemLinkProps) => {\n const { t } = useTranslation();\n const isExternalLink = Boolean(\n to && (to.startsWith('http://') || to.startsWith('https://')),\n );\n\n const translatedTitle = translateWithFallback(t, titleKey, title);\n const translatedSubTitle = translateWithFallback(t, subTitleKey, subTitle);\n\n const headerLinkContent = () => (\n <MenuItemLinkContent\n icon={icon}\n label={translatedTitle}\n subLabel={translatedSubTitle}\n isExternalLink={isExternalLink}\n />\n );\n\n return (\n <>\n {tooltip && (\n <Tooltip title={tooltip}>\n <div>{headerLinkContent()}</div>\n </Tooltip>\n )}\n {!tooltip && headerLinkContent()}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;AAoCO,MAAM,eAAe,CAAC;AAAA,EAC3B,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAyB,KAAA;AACvB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,cAAiB,GAAA,OAAA;AAAA,IACrB,OAAO,EAAG,CAAA,UAAA,CAAW,SAAS,CAAK,IAAA,EAAA,CAAG,WAAW,UAAU,CAAA;AAAA,GAC7D;AAEA,EAAA,MAAM,eAAkB,GAAA,qBAAA,CAAsB,CAAG,EAAA,QAAA,EAAU,KAAK,CAAA;AAChE,EAAA,MAAM,kBAAqB,GAAA,qBAAA,CAAsB,CAAG,EAAA,WAAA,EAAa,QAAQ,CAAA;AAEzE,EAAA,MAAM,oBAAoB,sBACxB,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,KAAO,EAAA,eAAA;AAAA,MACP,QAAU,EAAA,kBAAA;AAAA,MACV;AAAA;AAAA,GACF;AAGF,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IACC,OAAA,oBAAA,GAAA,CAAC,WAAQ,KAAO,EAAA,OAAA,EACd,8BAAC,KAAK,EAAA,EAAA,QAAA,EAAA,iBAAA,IAAoB,CAC5B,EAAA,CAAA;AAAA,IAED,CAAC,WAAW,iBAAkB;AAAA,GACjC,EAAA,CAAA;AAEJ;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { LogoutButton } from '../components/LogoutButton/LogoutButton.esm.js';
2
- import { CreateDropdown } from '../components/HeaderDropdownComponent/CreateDropdown.esm.js';
3
2
  import { ProfileDropdown } from '../components/HeaderDropdownComponent/ProfileDropdown.esm.js';
4
3
  import { RegisterAComponentSection } from '../components/HeaderDropdownComponent/RegisterAComponentSection.esm.js';
5
4
  import { SoftwareTemplatesSection } from '../components/HeaderDropdownComponent/SoftwareTemplatesSection.esm.js';
6
5
  import { SearchComponent } from '../components/SearchComponent/SearchComponent.esm.js';
6
+ import { HeaderIconButton } from '../components/HeaderIconButton/HeaderIconButton.esm.js';
7
7
  import { SupportButton } from '../components/SupportButton/SupportButton.esm.js';
8
8
  import { NotificationButton } from '../components/NotificationButton/NotificationButton.esm.js';
9
9
  import { Divider } from '../components/Divider/Divider.esm.js';
@@ -45,19 +45,16 @@ const defaultGlobalHeaderComponentsMountPoints = [
45
45
  }
46
46
  }
47
47
  },
48
- // Notice: 1.5 ships with a Create link instead of a dropdown!!!
49
48
  {
50
- Component: CreateDropdown,
49
+ Component: HeaderIconButton,
51
50
  config: {
52
51
  priority: 90,
53
- layout: {
54
- display: {
55
- sm: "none",
56
- md: "block"
57
- },
58
- mr: 1.5
52
+ props: {
53
+ title: "Self-service",
54
+ titleKey: "create.title",
55
+ icon: "addCircleOutline",
56
+ to: "/create"
59
57
  }
60
- // I don't used MUI v5 specific `sx` types here to allow us changing the implementation later
61
58
  }
62
59
  },
63
60
  {
@@ -1 +1 @@
1
- {"version":3,"file":"defaultMountPoints.esm.js","sources":["../../src/defaultMountPoints/defaultMountPoints.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { CSSProperties, ComponentType } from 'react';\nimport { LogoutButton } from '../components/LogoutButton/LogoutButton';\nimport { CreateDropdown } from '../components/HeaderDropdownComponent/CreateDropdown';\nimport { ProfileDropdown } from '../components/HeaderDropdownComponent/ProfileDropdown';\nimport { RegisterAComponentSection } from '../components/HeaderDropdownComponent/RegisterAComponentSection';\nimport { SoftwareTemplatesSection } from '../components/HeaderDropdownComponent/SoftwareTemplatesSection';\nimport { SearchComponent } from '../components/SearchComponent/SearchComponent';\nimport { SupportButton } from '../components/SupportButton/SupportButton';\nimport {\n ApplicationLauncherDropdownMountPoint,\n CreateDropdownMountPoint,\n GlobalHeaderComponentMountPoint,\n HelpDropdownMountPoint,\n ProfileDropdownMountPoint,\n} from '../types';\nimport { NotificationButton } from '../components/NotificationButton/NotificationButton';\nimport { Divider } from '../components/Divider/Divider';\nimport { MenuItemLink } from '../components/MenuItemLink/MenuItemLink';\nimport { Spacer } from '../components/Spacer/Spacer';\nimport { StarredDropdown } from '../components/HeaderDropdownComponent/StarredDropdown';\nimport { ApplicationLauncherDropdown } from '../components/HeaderDropdownComponent/ApplicationLauncherDropdown';\nimport { CompanyLogo } from '../components/CompanyLogo/CompanyLogo';\nimport { HelpDropdown } from '../components/HeaderDropdownComponent/HelpDropdown';\n\n/**\n * default Global Header Components mount points\n *\n * @public\n */\nexport const defaultGlobalHeaderComponentsMountPoints: GlobalHeaderComponentMountPoint[] =\n [\n {\n Component: CompanyLogo,\n config: {\n priority: 200,\n props: {\n to: '/catalog',\n logo: {\n light:\n 'data:image/svg+xml,%3Csvg%20width%3D%22451.199%22%20height%3D%2279.993%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20style%3D%22fill%3A%23000%22%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20169.9661%207.67311)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M25.629191-15.26571q0-3.87018-1.032048-6.665309-1.032048-2.79513-2.881134-4.601214-1.806084-1.849086-4.343201-2.709126-2.494116-.86004-5.461254-.86004H3.9561839V0h7.3533421q3.01014%200%205.633262-.81703798Q19.56591-1.677078%2021.500999-3.5261639q1.93509-1.849086%203.01014-4.7302199%201.118052-2.9241362%201.118052-7.0093262zm-3.354156.129006q0%203.22515-.731034%205.5472582-.731034%202.279106-2.107097%203.7411739-1.376064%201.462068-3.311154%202.1501-1.93509.64503-4.386204.64503H7.3103398V-27.048257h4.3432022q5.203242%200%207.912368%203.053142%202.709125%203.053142%202.709125%208.858411zM51.043415%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142H32.208539V0Zm28.553323-30.101399h-3.44016L69.405264-9.5894458l-.516024%201.548072q-.258012.86004-.559026%201.72008-.258012.8600399-.473021%201.6340759-.21501.731034-.344016%201.118052-.129006-.387018-.344016-1.118052-.21501-.731034-.473022-1.5480719-.258012-.86004-.559026-1.72008-.258012-.86004-.473022-1.548072L58.955779-30.101399h-3.526164L65.664091%200h3.698171zM104.62387%200v-3.0531419H89.143149V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.835691v-3.053142H85.788993V0Zm24.64014%200v-3.0531419h-14.8787V-30.101399h-3.35415V0Zm29.06938-15.093702q0-3.397158-.90304-6.235289-.90304-2.838132-2.53712-4.902228t-3.95618-3.182148q-2.27911-1.161054-5.07424-1.161054-2.79513%200-5.11724%201.161054-2.3221%201.161054-3.95618%203.22515t-2.53712%204.94523q-.90304%202.838131-.90304%206.235289%200%203.397158.86004%206.2352902.90304%202.838132%202.53712%204.9022279%201.63407%202.0640959%203.91318%203.22514992%202.32211%201.11805197%205.11724%201.11805197t5.11723-1.16105397q2.32211-1.16105402%203.95619-3.22514992%201.67708-2.0640959%202.58012-4.9022279.90304-2.8811342.90304-6.2782922zm-3.35416.086q0%202.838132-.68803%205.1602403-.68803%202.2791059-1.89209%203.9131819-1.20405%201.5910739-2.88113%202.4941159-1.67708.86004-3.61217.86004-1.97809%200-3.65517-.86004-1.67707-.903042-2.92413-2.5371179-1.20406-1.677078-1.93509-3.9561839-.68803-2.3221083-.68803-5.1602403t.68803-5.117237q.68803-2.322108%201.89209-3.913182%201.20405-1.634076%202.83813-2.494116%201.67708-.903042%203.61217-.903042%201.97809%200%203.65516.903042%201.67708.86004%202.92414%202.537118%201.24706%201.634076%201.93509%203.956184.73103%202.279105.73103%205.117237zm30.83244-6.106283q0-2.279106-.73104-3.956184-.73103-1.72008-2.02109-2.838132-1.29006-1.118052-3.05314-1.634076-1.72008-.559026-3.78418-.559026H164.9557V0h3.35415v-11.82555h7.31034q2.23611%200%204.12819-.602028%201.89209-.602028%203.22515-1.763082%201.33307-1.204056%202.0641-2.924136.77404-1.763082.77404-3.999185zm-3.35416.129006q0%206.106283-6.79432%206.106283h-7.35334v-12.169565h7.78336q3.09615%200%204.73022%201.591074%201.63408%201.548072%201.63408%204.472208zM210.32281%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142h-18.18984V0Zm27.69329-21.587003q0-2.193102-.73103-3.784176-.73104-1.591074-1.9781-2.623122-1.24705-1.07505-2.96713-1.591074t-3.69818-.516024h-11.91155V0h3.35416v-12.814596h7.13833L233.6729%200h3.87018l-6.62231-13.072608q3.22515-.688032%205.16024-2.838132%201.93509-2.1501%201.93509-5.676263zm-3.35416.129006q0%202.838131-1.63407%204.257197-1.59108%201.376064-4.94523%201.376064h-7.99837v-11.223521h8.42839q3.01014%200%204.55821%201.419066%201.59107%201.376064%201.59107%204.171194zM277.49192%200v-30.101399h-3.35415v12.857597h-14.9647v-12.857597h-3.35415V0h3.35415v-14.19066h14.9647V0Zm29.37035-12.298572v-17.802827h-3.35415v17.888831q0%204.9022282-1.67708%207.2673381-1.67708%202.36511-5.59026%202.36511-7.69736%200-7.69736-9.7184521v-17.802827h-3.35416v17.888831q0%206.2782922%202.70913%209.5034421%202.75213%203.18214789%208.17038%203.18214789%205.46125%200%208.12738-3.22514989%202.66612-3.2681519%202.66612-9.5464441zm28.2523%203.3971582q0-1.8060842-.51603-3.0961442-.51602-1.333062-1.33306-2.193102-.81704-.903042-1.84909-1.419066-1.03204-.559026-2.06409-.817038%201.93509-.688032%203.13914-2.1501%201.20406-1.505069%201.20406-3.999185%200-1.93509-.60203-3.354156-.60203-1.419066-1.72008-2.322108-1.07505-.946044-2.58012-1.376064-1.46207-.473022-3.26815-.473022h-11.00851V0h10.7935q4.77322%200%207.26734-2.1931019%202.53712-2.236104%202.53712-6.7083119zm-4.77323-13.5456292q0%201.978092-1.20405%203.397157-1.20406%201.376064-3.99919%201.376064h-7.26734v-9.374435h7.52535q2.53712%200%203.74118%201.29006%201.20405%201.247058%201.20405%203.311154zm1.41907%2013.7176372q0%202.58012-1.41907%204.1281919-1.41906%201.548072-4.81622%201.548072h-7.65436V-14.663682h7.48235q2.96714%200%204.68722%201.548072%201.72008%201.548072%201.72008%204.3862042z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-5.23714%2079.36255)%22%20aria-label%3D%22DEVELOPER%20HUB%22%2F%3E%3Cpath%20d%3D%22m18.792026%200-3.92084-7.4776021q1.624348-.7281561%202.576552-2.1284561.952204-1.4002998.952204-3.6127738%200-1.736372-.56012-2.94063-.532114-1.232264-1.54033-1.988426t-2.436522-1.092234q-1.4003-.364078-3.108666-.364078H1.988426V0h5.3491461v-6.6094161h2.1844681L12.714724%200Zm-5.797242-13.078802q0%201.064228-.56012%201.624348t-1.904408.56012H7.3375721v-4.284918h3.2767019q1.288276%200%201.82039.588126.56012.588126.56012%201.512324zM37.219965%200v-4.5649781h-9.830106v-3.36072h5.797242v-4.5089659h-5.797242v-2.604558h9.634064V-19.6042H22.012707V0Zm20.388361-9.9141242q0-2.7725938-.728156-4.6209898-.70015-1.848396-2.016432-2.968636-1.288276-1.148246-3.164678-1.624348-1.876402-.476102-4.172894-.476102h-6.86147V0h6.357362q2.604558%200%204.564978-.50410801Q53.575462-1.036222%2054.91975-2.184468q1.344288-1.1762521%202.016432-3.0526541.672144-1.904408.672144-4.6770021zm-5.573194.084018q0%201.456312-.252054%202.4645281-.252054.98021-.84018%201.596342-.56012.588126-1.456312.868186-.896192.252054-2.156462.252054h-1.176252V-14.955204h1.344288q1.26027%200%202.128456.308066.868186.28006%201.4003.896192.532114.616132.756162%201.596342.252054.98021.252054%202.3244978z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-2.65123%2027.43044)%22%20aria-label%3D%22RED%22%2F%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20442.7922%2047.06522)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M19.18411%200v-19.6042h-5.545188v7.14153H7.5336141v-7.14153H1.988426V0h5.5451881v-7.7296561h6.1053079V0Zm22.488833%200-7.113524-19.6042h-5.489176L21.956719%200h5.825248l1.064228-3.4447381h5.88126L35.791683%200Zm-8.26177-7.7576621h-3.248696l.364078-1.2882761q.252054-.924198.448096-1.6243478.196042-.70015.336072-1.26027.168036-.56012.28006-1.036222.112024-.476102.196042-.98021.08402.504108.196042.98021l.252054%201.008216q.168036.56012.364078%201.26027.196042.7001498.448096%201.6523538zm23.973112-7.1135239V-19.6042H40.972768v4.733014h5.489177V0h5.433164v-14.871186z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%2089.90877%2027.43044)%22%20aria-label%3D%22HAT%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E',\n dark: 'data:image/svg+xml,%3Csvg%20width%3D%22451.199%22%20height%3D%2279.993%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20style%3D%22fill%3A%23fff%22%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20169.9661%207.67311)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M25.629191-15.26571q0-3.87018-1.032048-6.665309-1.032048-2.79513-2.881134-4.601214-1.806084-1.849086-4.343201-2.709126-2.494116-.86004-5.461254-.86004H3.9561839V0h7.3533421q3.01014%200%205.633262-.81703798Q19.56591-1.677078%2021.500999-3.5261639q1.93509-1.849086%203.01014-4.7302199%201.118052-2.9241362%201.118052-7.0093262zm-3.354156.129006q0%203.22515-.731034%205.5472582-.731034%202.279106-2.107097%203.7411739-1.376064%201.462068-3.311154%202.1501-1.93509.64503-4.386204.64503H7.3103398V-27.048257h4.3432022q5.203242%200%207.912368%203.053142%202.709125%203.053142%202.709125%208.858411zM51.043415%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142H32.208539V0Zm28.553323-30.101399h-3.44016L69.405264-9.5894458l-.516024%201.548072q-.258012.86004-.559026%201.72008-.258012.8600399-.473021%201.6340759-.21501.731034-.344016%201.118052-.129006-.387018-.344016-1.118052-.21501-.731034-.473022-1.5480719-.258012-.86004-.559026-1.72008-.258012-.86004-.473022-1.548072L58.955779-30.101399h-3.526164L65.664091%200h3.698171zM104.62387%200v-3.0531419H89.143149V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.835691v-3.053142H85.788993V0Zm24.64014%200v-3.0531419h-14.8787V-30.101399h-3.35415V0Zm29.06938-15.093702q0-3.397158-.90304-6.235289-.90304-2.838132-2.53712-4.902228t-3.95618-3.182148q-2.27911-1.161054-5.07424-1.161054-2.79513%200-5.11724%201.161054-2.3221%201.161054-3.95618%203.22515t-2.53712%204.94523q-.90304%202.838131-.90304%206.235289%200%203.397158.86004%206.2352902.90304%202.838132%202.53712%204.9022279%201.63407%202.0640959%203.91318%203.22514992%202.32211%201.11805197%205.11724%201.11805197t5.11723-1.16105397q2.32211-1.16105402%203.95619-3.22514992%201.67708-2.0640959%202.58012-4.9022279.90304-2.8811342.90304-6.2782922zm-3.35416.086q0%202.838132-.68803%205.1602403-.68803%202.2791059-1.89209%203.9131819-1.20405%201.5910739-2.88113%202.4941159-1.67708.86004-3.61217.86004-1.97809%200-3.65517-.86004-1.67707-.903042-2.92413-2.5371179-1.20406-1.677078-1.93509-3.9561839-.68803-2.3221083-.68803-5.1602403t.68803-5.117237q.68803-2.322108%201.89209-3.913182%201.20405-1.634076%202.83813-2.494116%201.67708-.903042%203.61217-.903042%201.97809%200%203.65516.903042%201.67708.86004%202.92414%202.537118%201.24706%201.634076%201.93509%203.956184.73103%202.279105.73103%205.117237zm30.83244-6.106283q0-2.279106-.73104-3.956184-.73103-1.72008-2.02109-2.838132-1.29006-1.118052-3.05314-1.634076-1.72008-.559026-3.78418-.559026H164.9557V0h3.35415v-11.82555h7.31034q2.23611%200%204.12819-.602028%201.89209-.602028%203.22515-1.763082%201.33307-1.204056%202.0641-2.924136.77404-1.763082.77404-3.999185zm-3.35416.129006q0%206.106283-6.79432%206.106283h-7.35334v-12.169565h7.78336q3.09615%200%204.73022%201.591074%201.63408%201.548072%201.63408%204.472208zM210.32281%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142h-18.18984V0Zm27.69329-21.587003q0-2.193102-.73103-3.784176-.73104-1.591074-1.9781-2.623122-1.24705-1.07505-2.96713-1.591074t-3.69818-.516024h-11.91155V0h3.35416v-12.814596h7.13833L233.6729%200h3.87018l-6.62231-13.072608q3.22515-.688032%205.16024-2.838132%201.93509-2.1501%201.93509-5.676263zm-3.35416.129006q0%202.838131-1.63407%204.257197-1.59108%201.376064-4.94523%201.376064h-7.99837v-11.223521h8.42839q3.01014%200%204.55821%201.419066%201.59107%201.376064%201.59107%204.171194zM277.49192%200v-30.101399h-3.35415v12.857597h-14.9647v-12.857597h-3.35415V0h3.35415v-14.19066h14.9647V0Zm29.37035-12.298572v-17.802827h-3.35415v17.888831q0%204.9022282-1.67708%207.2673381-1.67708%202.36511-5.59026%202.36511-7.69736%200-7.69736-9.7184521v-17.802827h-3.35416v17.888831q0%206.2782922%202.70913%209.5034421%202.75213%203.18214789%208.17038%203.18214789%205.46125%200%208.12738-3.22514989%202.66612-3.2681519%202.66612-9.5464441zm28.2523%203.3971582q0-1.8060842-.51603-3.0961442-.51602-1.333062-1.33306-2.193102-.81704-.903042-1.84909-1.419066-1.03204-.559026-2.06409-.817038%201.93509-.688032%203.13914-2.1501%201.20406-1.505069%201.20406-3.999185%200-1.93509-.60203-3.354156-.60203-1.419066-1.72008-2.322108-1.07505-.946044-2.58012-1.376064-1.46207-.473022-3.26815-.473022h-11.00851V0h10.7935q4.77322%200%207.26734-2.1931019%202.53712-2.236104%202.53712-6.7083119zm-4.77323-13.5456292q0%201.978092-1.20405%203.397157-1.20406%201.376064-3.99919%201.376064h-7.26734v-9.374435h7.52535q2.53712%200%203.74118%201.29006%201.20405%201.247058%201.20405%203.311154zm1.41907%2013.7176372q0%202.58012-1.41907%204.1281919-1.41906%201.548072-4.81622%201.548072h-7.65436V-14.663682h7.48235q2.96714%200%204.68722%201.548072%201.72008%201.548072%201.72008%204.3862042z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-5.23714%2079.36255)%22%20aria-label%3D%22DEVELOPER%20HUB%22%2F%3E%3Cpath%20d%3D%22m18.792026%200-3.92084-7.4776021q1.624348-.7281561%202.576552-2.1284561.952204-1.4002998.952204-3.6127738%200-1.736372-.56012-2.94063-.532114-1.232264-1.54033-1.988426t-2.436522-1.092234q-1.4003-.364078-3.108666-.364078H1.988426V0h5.3491461v-6.6094161h2.1844681L12.714724%200Zm-5.797242-13.078802q0%201.064228-.56012%201.624348t-1.904408.56012H7.3375721v-4.284918h3.2767019q1.288276%200%201.82039.588126.56012.588126.56012%201.512324zM37.219965%200v-4.5649781h-9.830106v-3.36072h5.797242v-4.5089659h-5.797242v-2.604558h9.634064V-19.6042H22.012707V0Zm20.388361-9.9141242q0-2.7725938-.728156-4.6209898-.70015-1.848396-2.016432-2.968636-1.288276-1.148246-3.164678-1.624348-1.876402-.476102-4.172894-.476102h-6.86147V0h6.357362q2.604558%200%204.564978-.50410801Q53.575462-1.036222%2054.91975-2.184468q1.344288-1.1762521%202.016432-3.0526541.672144-1.904408.672144-4.6770021zm-5.573194.084018q0%201.456312-.252054%202.4645281-.252054.98021-.84018%201.596342-.56012.588126-1.456312.868186-.896192.252054-2.156462.252054h-1.176252V-14.955204h1.344288q1.26027%200%202.128456.308066.868186.28006%201.4003.896192.532114.616132.756162%201.596342.252054.98021.252054%202.3244978z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-2.65123%2027.43044)%22%20aria-label%3D%22RED%22%2F%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20442.7922%2047.06522)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M19.18411%200v-19.6042h-5.545188v7.14153H7.5336141v-7.14153H1.988426V0h5.5451881v-7.7296561h6.1053079V0Zm22.488833%200-7.113524-19.6042h-5.489176L21.956719%200h5.825248l1.064228-3.4447381h5.88126L35.791683%200Zm-8.26177-7.7576621h-3.248696l.364078-1.2882761q.252054-.924198.448096-1.6243478.196042-.70015.336072-1.26027.168036-.56012.28006-1.036222.112024-.476102.196042-.98021.08402.504108.196042.98021l.252054%201.008216q.168036.56012.364078%201.26027.196042.7001498.448096%201.6523538zm23.973112-7.1135239V-19.6042H40.972768v4.733014h5.489177V0h5.433164v-14.871186z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%2089.90877%2027.43044)%22%20aria-label%3D%22HAT%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E',\n },\n },\n },\n },\n {\n Component: SearchComponent,\n config: {\n priority: 100, // the greater the number, the more to the left it will be\n },\n },\n {\n Component: Spacer,\n config: {\n priority: 99, // the greater the number, the more to the left it will be\n props: {\n growFactor: 0,\n },\n },\n },\n // Notice: 1.5 ships with a Create link instead of a dropdown!!!\n {\n Component: CreateDropdown,\n config: {\n priority: 90,\n layout: {\n display: {\n sm: 'none',\n md: 'block',\n },\n mr: 1.5,\n } as any as CSSProperties, // I don't used MUI v5 specific `sx` types here to allow us changing the implementation later\n },\n },\n {\n Component: StarredDropdown,\n config: {\n priority: 85,\n },\n },\n {\n Component: ApplicationLauncherDropdown,\n config: {\n priority: 82,\n },\n },\n {\n Component: HelpDropdown,\n config: {\n priority: 80,\n },\n },\n {\n Component: NotificationButton,\n config: {\n priority: 70,\n },\n },\n {\n Component: Divider,\n config: {\n priority: 50,\n },\n },\n {\n Component: ProfileDropdown,\n config: {\n priority: 10, // the greater the number, the more to the left it will be\n },\n },\n ];\n\nexport const defaultCreateDropdownMountPoints: CreateDropdownMountPoint[] = [\n {\n Component: SoftwareTemplatesSection as ComponentType,\n config: {\n priority: 200,\n },\n },\n {\n Component: RegisterAComponentSection as ComponentType,\n config: {\n priority: 100,\n },\n },\n];\n\nexport const defaultProfileDropdownMountPoints: ProfileDropdownMountPoint[] = [\n {\n Component: MenuItemLink as ComponentType,\n config: {\n priority: 200,\n props: {\n title: 'Settings',\n titleKey: 'profile.settings',\n link: '/settings',\n icon: 'manageAccounts',\n },\n },\n },\n {\n Component: MenuItemLink as ComponentType,\n config: {\n priority: 150,\n props: {\n title: 'My profile',\n titleKey: 'profile.myProfile',\n icon: 'account',\n type: 'myProfile', // Semantic identifier\n },\n },\n },\n {\n Component: LogoutButton,\n config: {\n priority: 100,\n },\n },\n];\n\nexport const defaultHelpDropdownMountPoints: HelpDropdownMountPoint[] = [\n {\n Component: MenuItemLink as ComponentType,\n config: {\n priority: 100,\n props: {\n title: 'Quick start',\n titleKey: 'help.quickStart',\n icon: 'quickstart',\n link: 'https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/',\n },\n },\n },\n {\n Component: SupportButton,\n config: {\n priority: 10,\n },\n },\n];\n\nexport const defaultApplicationLauncherDropdownMountPoints: ApplicationLauncherDropdownMountPoint[] =\n [\n {\n Component: MenuItemLink as ComponentType,\n config: {\n section: 'applicationLauncher.sections.documentation',\n priority: 150,\n props: {\n title: 'Developer Hub',\n titleKey: 'applicationLauncher.developerHub',\n icon: 'developerHub',\n link: 'https://docs.redhat.com/en/documentation/red_hat_developer_hub',\n },\n },\n },\n {\n Component: MenuItemLink as ComponentType,\n config: {\n section: 'applicationLauncher.sections.developerTools',\n priority: 130,\n props: {\n title: 'RHDH Local',\n titleKey: 'applicationLauncher.rhdhLocal',\n icon: 'developerHub',\n link: 'https://github.com/redhat-developer/rhdh-local',\n },\n },\n },\n ];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA4CO,MAAM,wCACX,GAAA;AAAA,EACE;AAAA,IACE,SAAW,EAAA,WAAA;AAAA,IACX,MAAQ,EAAA;AAAA,MACN,QAAU,EAAA,GAAA;AAAA,MACV,KAAO,EAAA;AAAA,QACL,EAAI,EAAA,UAAA;AAAA,QACJ,IAAM,EAAA;AAAA,UACJ,KACE,EAAA,yuTAAA;AAAA,UACF,IAAM,EAAA;AAAA;AACR;AACF;AACF,GACF;AAAA,EACA;AAAA,IACE,SAAW,EAAA,eAAA;AAAA,IACX,MAAQ,EAAA;AAAA,MACN,QAAU,EAAA;AAAA;AAAA;AACZ,GACF;AAAA,EACA;AAAA,IACE,SAAW,EAAA,MAAA;AAAA,IACX,MAAQ,EAAA;AAA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,kCAAA;AAAA,QACV,IAAM,EAAA,cAAA;AAAA,QACN,IAAM,EAAA;AAAA;AACR;AACF,GACF;AAAA,EACA;AAAA,IACE,SAAW,EAAA,YAAA;AAAA,IACX,MAAQ,EAAA;AAAA,MACN,OAAS,EAAA,6CAAA;AAAA,MACT,QAAU,EAAA,GAAA;AAAA,MACV,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,YAAA;AAAA,QACP,QAAU,EAAA,+BAAA;AAAA,QACV,IAAM,EAAA,cAAA;AAAA,QACN,IAAM,EAAA;AAAA;AACR;AACF;AAEJ;;;;"}
1
+ {"version":3,"file":"defaultMountPoints.esm.js","sources":["../../src/defaultMountPoints/defaultMountPoints.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { ComponentType } from 'react';\nimport { LogoutButton } from '../components/LogoutButton/LogoutButton';\nimport { ProfileDropdown } from '../components/HeaderDropdownComponent/ProfileDropdown';\nimport { RegisterAComponentSection } from '../components/HeaderDropdownComponent/RegisterAComponentSection';\nimport { SoftwareTemplatesSection } from '../components/HeaderDropdownComponent/SoftwareTemplatesSection';\nimport { SearchComponent } from '../components/SearchComponent/SearchComponent';\nimport { HeaderIconButton } from '../components/HeaderIconButton/HeaderIconButton';\nimport { SupportButton } from '../components/SupportButton/SupportButton';\nimport {\n ApplicationLauncherDropdownMountPoint,\n CreateDropdownMountPoint,\n GlobalHeaderComponentMountPoint,\n HelpDropdownMountPoint,\n ProfileDropdownMountPoint,\n} from '../types';\nimport { NotificationButton } from '../components/NotificationButton/NotificationButton';\nimport { Divider } from '../components/Divider/Divider';\nimport { MenuItemLink } from '../components/MenuItemLink/MenuItemLink';\nimport { Spacer } from '../components/Spacer/Spacer';\nimport { StarredDropdown } from '../components/HeaderDropdownComponent/StarredDropdown';\nimport { ApplicationLauncherDropdown } from '../components/HeaderDropdownComponent/ApplicationLauncherDropdown';\nimport { CompanyLogo } from '../components/CompanyLogo/CompanyLogo';\nimport { HelpDropdown } from '../components/HeaderDropdownComponent/HelpDropdown';\n\n/**\n * default Global Header Components mount points\n *\n * @public\n */\nexport const defaultGlobalHeaderComponentsMountPoints: GlobalHeaderComponentMountPoint[] =\n [\n {\n Component: CompanyLogo,\n config: {\n priority: 200,\n props: {\n to: '/catalog',\n logo: {\n light:\n 'data:image/svg+xml,%3Csvg%20width%3D%22451.199%22%20height%3D%2279.993%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20style%3D%22fill%3A%23000%22%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20169.9661%207.67311)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M25.629191-15.26571q0-3.87018-1.032048-6.665309-1.032048-2.79513-2.881134-4.601214-1.806084-1.849086-4.343201-2.709126-2.494116-.86004-5.461254-.86004H3.9561839V0h7.3533421q3.01014%200%205.633262-.81703798Q19.56591-1.677078%2021.500999-3.5261639q1.93509-1.849086%203.01014-4.7302199%201.118052-2.9241362%201.118052-7.0093262zm-3.354156.129006q0%203.22515-.731034%205.5472582-.731034%202.279106-2.107097%203.7411739-1.376064%201.462068-3.311154%202.1501-1.93509.64503-4.386204.64503H7.3103398V-27.048257h4.3432022q5.203242%200%207.912368%203.053142%202.709125%203.053142%202.709125%208.858411zM51.043415%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142H32.208539V0Zm28.553323-30.101399h-3.44016L69.405264-9.5894458l-.516024%201.548072q-.258012.86004-.559026%201.72008-.258012.8600399-.473021%201.6340759-.21501.731034-.344016%201.118052-.129006-.387018-.344016-1.118052-.21501-.731034-.473022-1.5480719-.258012-.86004-.559026-1.72008-.258012-.86004-.473022-1.548072L58.955779-30.101399h-3.526164L65.664091%200h3.698171zM104.62387%200v-3.0531419H89.143149V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.835691v-3.053142H85.788993V0Zm24.64014%200v-3.0531419h-14.8787V-30.101399h-3.35415V0Zm29.06938-15.093702q0-3.397158-.90304-6.235289-.90304-2.838132-2.53712-4.902228t-3.95618-3.182148q-2.27911-1.161054-5.07424-1.161054-2.79513%200-5.11724%201.161054-2.3221%201.161054-3.95618%203.22515t-2.53712%204.94523q-.90304%202.838131-.90304%206.235289%200%203.397158.86004%206.2352902.90304%202.838132%202.53712%204.9022279%201.63407%202.0640959%203.91318%203.22514992%202.32211%201.11805197%205.11724%201.11805197t5.11723-1.16105397q2.32211-1.16105402%203.95619-3.22514992%201.67708-2.0640959%202.58012-4.9022279.90304-2.8811342.90304-6.2782922zm-3.35416.086q0%202.838132-.68803%205.1602403-.68803%202.2791059-1.89209%203.9131819-1.20405%201.5910739-2.88113%202.4941159-1.67708.86004-3.61217.86004-1.97809%200-3.65517-.86004-1.67707-.903042-2.92413-2.5371179-1.20406-1.677078-1.93509-3.9561839-.68803-2.3221083-.68803-5.1602403t.68803-5.117237q.68803-2.322108%201.89209-3.913182%201.20405-1.634076%202.83813-2.494116%201.67708-.903042%203.61217-.903042%201.97809%200%203.65516.903042%201.67708.86004%202.92414%202.537118%201.24706%201.634076%201.93509%203.956184.73103%202.279105.73103%205.117237zm30.83244-6.106283q0-2.279106-.73104-3.956184-.73103-1.72008-2.02109-2.838132-1.29006-1.118052-3.05314-1.634076-1.72008-.559026-3.78418-.559026H164.9557V0h3.35415v-11.82555h7.31034q2.23611%200%204.12819-.602028%201.89209-.602028%203.22515-1.763082%201.33307-1.204056%202.0641-2.924136.77404-1.763082.77404-3.999185zm-3.35416.129006q0%206.106283-6.79432%206.106283h-7.35334v-12.169565h7.78336q3.09615%200%204.73022%201.591074%201.63408%201.548072%201.63408%204.472208zM210.32281%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142h-18.18984V0Zm27.69329-21.587003q0-2.193102-.73103-3.784176-.73104-1.591074-1.9781-2.623122-1.24705-1.07505-2.96713-1.591074t-3.69818-.516024h-11.91155V0h3.35416v-12.814596h7.13833L233.6729%200h3.87018l-6.62231-13.072608q3.22515-.688032%205.16024-2.838132%201.93509-2.1501%201.93509-5.676263zm-3.35416.129006q0%202.838131-1.63407%204.257197-1.59108%201.376064-4.94523%201.376064h-7.99837v-11.223521h8.42839q3.01014%200%204.55821%201.419066%201.59107%201.376064%201.59107%204.171194zM277.49192%200v-30.101399h-3.35415v12.857597h-14.9647v-12.857597h-3.35415V0h3.35415v-14.19066h14.9647V0Zm29.37035-12.298572v-17.802827h-3.35415v17.888831q0%204.9022282-1.67708%207.2673381-1.67708%202.36511-5.59026%202.36511-7.69736%200-7.69736-9.7184521v-17.802827h-3.35416v17.888831q0%206.2782922%202.70913%209.5034421%202.75213%203.18214789%208.17038%203.18214789%205.46125%200%208.12738-3.22514989%202.66612-3.2681519%202.66612-9.5464441zm28.2523%203.3971582q0-1.8060842-.51603-3.0961442-.51602-1.333062-1.33306-2.193102-.81704-.903042-1.84909-1.419066-1.03204-.559026-2.06409-.817038%201.93509-.688032%203.13914-2.1501%201.20406-1.505069%201.20406-3.999185%200-1.93509-.60203-3.354156-.60203-1.419066-1.72008-2.322108-1.07505-.946044-2.58012-1.376064-1.46207-.473022-3.26815-.473022h-11.00851V0h10.7935q4.77322%200%207.26734-2.1931019%202.53712-2.236104%202.53712-6.7083119zm-4.77323-13.5456292q0%201.978092-1.20405%203.397157-1.20406%201.376064-3.99919%201.376064h-7.26734v-9.374435h7.52535q2.53712%200%203.74118%201.29006%201.20405%201.247058%201.20405%203.311154zm1.41907%2013.7176372q0%202.58012-1.41907%204.1281919-1.41906%201.548072-4.81622%201.548072h-7.65436V-14.663682h7.48235q2.96714%200%204.68722%201.548072%201.72008%201.548072%201.72008%204.3862042z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-5.23714%2079.36255)%22%20aria-label%3D%22DEVELOPER%20HUB%22%2F%3E%3Cpath%20d%3D%22m18.792026%200-3.92084-7.4776021q1.624348-.7281561%202.576552-2.1284561.952204-1.4002998.952204-3.6127738%200-1.736372-.56012-2.94063-.532114-1.232264-1.54033-1.988426t-2.436522-1.092234q-1.4003-.364078-3.108666-.364078H1.988426V0h5.3491461v-6.6094161h2.1844681L12.714724%200Zm-5.797242-13.078802q0%201.064228-.56012%201.624348t-1.904408.56012H7.3375721v-4.284918h3.2767019q1.288276%200%201.82039.588126.56012.588126.56012%201.512324zM37.219965%200v-4.5649781h-9.830106v-3.36072h5.797242v-4.5089659h-5.797242v-2.604558h9.634064V-19.6042H22.012707V0Zm20.388361-9.9141242q0-2.7725938-.728156-4.6209898-.70015-1.848396-2.016432-2.968636-1.288276-1.148246-3.164678-1.624348-1.876402-.476102-4.172894-.476102h-6.86147V0h6.357362q2.604558%200%204.564978-.50410801Q53.575462-1.036222%2054.91975-2.184468q1.344288-1.1762521%202.016432-3.0526541.672144-1.904408.672144-4.6770021zm-5.573194.084018q0%201.456312-.252054%202.4645281-.252054.98021-.84018%201.596342-.56012.588126-1.456312.868186-.896192.252054-2.156462.252054h-1.176252V-14.955204h1.344288q1.26027%200%202.128456.308066.868186.28006%201.4003.896192.532114.616132.756162%201.596342.252054.98021.252054%202.3244978z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-2.65123%2027.43044)%22%20aria-label%3D%22RED%22%2F%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20442.7922%2047.06522)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M19.18411%200v-19.6042h-5.545188v7.14153H7.5336141v-7.14153H1.988426V0h5.5451881v-7.7296561h6.1053079V0Zm22.488833%200-7.113524-19.6042h-5.489176L21.956719%200h5.825248l1.064228-3.4447381h5.88126L35.791683%200Zm-8.26177-7.7576621h-3.248696l.364078-1.2882761q.252054-.924198.448096-1.6243478.196042-.70015.336072-1.26027.168036-.56012.28006-1.036222.112024-.476102.196042-.98021.08402.504108.196042.98021l.252054%201.008216q.168036.56012.364078%201.26027.196042.7001498.448096%201.6523538zm23.973112-7.1135239V-19.6042H40.972768v4.733014h5.489177V0h5.433164v-14.871186z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%2089.90877%2027.43044)%22%20aria-label%3D%22HAT%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E',\n dark: 'data:image/svg+xml,%3Csvg%20width%3D%22451.199%22%20height%3D%2279.993%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20style%3D%22fill%3A%23fff%22%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20169.9661%207.67311)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M25.629191-15.26571q0-3.87018-1.032048-6.665309-1.032048-2.79513-2.881134-4.601214-1.806084-1.849086-4.343201-2.709126-2.494116-.86004-5.461254-.86004H3.9561839V0h7.3533421q3.01014%200%205.633262-.81703798Q19.56591-1.677078%2021.500999-3.5261639q1.93509-1.849086%203.01014-4.7302199%201.118052-2.9241362%201.118052-7.0093262zm-3.354156.129006q0%203.22515-.731034%205.5472582-.731034%202.279106-2.107097%203.7411739-1.376064%201.462068-3.311154%202.1501-1.93509.64503-4.386204.64503H7.3103398V-27.048257h4.3432022q5.203242%200%207.912368%203.053142%202.709125%203.053142%202.709125%208.858411zM51.043415%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142H32.208539V0Zm28.553323-30.101399h-3.44016L69.405264-9.5894458l-.516024%201.548072q-.258012.86004-.559026%201.72008-.258012.8600399-.473021%201.6340759-.21501.731034-.344016%201.118052-.129006-.387018-.344016-1.118052-.21501-.731034-.473022-1.5480719-.258012-.86004-.559026-1.72008-.258012-.86004-.473022-1.548072L58.955779-30.101399h-3.526164L65.664091%200h3.698171zM104.62387%200v-3.0531419H89.143149V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.835691v-3.053142H85.788993V0Zm24.64014%200v-3.0531419h-14.8787V-30.101399h-3.35415V0Zm29.06938-15.093702q0-3.397158-.90304-6.235289-.90304-2.838132-2.53712-4.902228t-3.95618-3.182148q-2.27911-1.161054-5.07424-1.161054-2.79513%200-5.11724%201.161054-2.3221%201.161054-3.95618%203.22515t-2.53712%204.94523q-.90304%202.838131-.90304%206.235289%200%203.397158.86004%206.2352902.90304%202.838132%202.53712%204.9022279%201.63407%202.0640959%203.91318%203.22514992%202.32211%201.11805197%205.11724%201.11805197t5.11723-1.16105397q2.32211-1.16105402%203.95619-3.22514992%201.67708-2.0640959%202.58012-4.9022279.90304-2.8811342.90304-6.2782922zm-3.35416.086q0%202.838132-.68803%205.1602403-.68803%202.2791059-1.89209%203.9131819-1.20405%201.5910739-2.88113%202.4941159-1.67708.86004-3.61217.86004-1.97809%200-3.65517-.86004-1.67707-.903042-2.92413-2.5371179-1.20406-1.677078-1.93509-3.9561839-.68803-2.3221083-.68803-5.1602403t.68803-5.117237q.68803-2.322108%201.89209-3.913182%201.20405-1.634076%202.83813-2.494116%201.67708-.903042%203.61217-.903042%201.97809%200%203.65516.903042%201.67708.86004%202.92414%202.537118%201.24706%201.634076%201.93509%203.956184.73103%202.279105.73103%205.117237zm30.83244-6.106283q0-2.279106-.73104-3.956184-.73103-1.72008-2.02109-2.838132-1.29006-1.118052-3.05314-1.634076-1.72008-.559026-3.78418-.559026H164.9557V0h3.35415v-11.82555h7.31034q2.23611%200%204.12819-.602028%201.89209-.602028%203.22515-1.763082%201.33307-1.204056%202.0641-2.924136.77404-1.763082.77404-3.999185zm-3.35416.129006q0%206.106283-6.79432%206.106283h-7.35334v-12.169565h7.78336q3.09615%200%204.73022%201.591074%201.63408%201.548072%201.63408%204.472208zM210.32281%200v-3.0531419h-15.48072V-14.534676h8.6004v-3.053142h-8.6004v-9.460439h14.83569v-3.053142h-18.18984V0Zm27.69329-21.587003q0-2.193102-.73103-3.784176-.73104-1.591074-1.9781-2.623122-1.24705-1.07505-2.96713-1.591074t-3.69818-.516024h-11.91155V0h3.35416v-12.814596h7.13833L233.6729%200h3.87018l-6.62231-13.072608q3.22515-.688032%205.16024-2.838132%201.93509-2.1501%201.93509-5.676263zm-3.35416.129006q0%202.838131-1.63407%204.257197-1.59108%201.376064-4.94523%201.376064h-7.99837v-11.223521h8.42839q3.01014%200%204.55821%201.419066%201.59107%201.376064%201.59107%204.171194zM277.49192%200v-30.101399h-3.35415v12.857597h-14.9647v-12.857597h-3.35415V0h3.35415v-14.19066h14.9647V0Zm29.37035-12.298572v-17.802827h-3.35415v17.888831q0%204.9022282-1.67708%207.2673381-1.67708%202.36511-5.59026%202.36511-7.69736%200-7.69736-9.7184521v-17.802827h-3.35416v17.888831q0%206.2782922%202.70913%209.5034421%202.75213%203.18214789%208.17038%203.18214789%205.46125%200%208.12738-3.22514989%202.66612-3.2681519%202.66612-9.5464441zm28.2523%203.3971582q0-1.8060842-.51603-3.0961442-.51602-1.333062-1.33306-2.193102-.81704-.903042-1.84909-1.419066-1.03204-.559026-2.06409-.817038%201.93509-.688032%203.13914-2.1501%201.20406-1.505069%201.20406-3.999185%200-1.93509-.60203-3.354156-.60203-1.419066-1.72008-2.322108-1.07505-.946044-2.58012-1.376064-1.46207-.473022-3.26815-.473022h-11.00851V0h10.7935q4.77322%200%207.26734-2.1931019%202.53712-2.236104%202.53712-6.7083119zm-4.77323-13.5456292q0%201.978092-1.20405%203.397157-1.20406%201.376064-3.99919%201.376064h-7.26734v-9.374435h7.52535q2.53712%200%203.74118%201.29006%201.20405%201.247058%201.20405%203.311154zm1.41907%2013.7176372q0%202.58012-1.41907%204.1281919-1.41906%201.548072-4.81622%201.548072h-7.65436V-14.663682h7.48235q2.96714%200%204.68722%201.548072%201.72008%201.548072%201.72008%204.3862042z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-5.23714%2079.36255)%22%20aria-label%3D%22DEVELOPER%20HUB%22%2F%3E%3Cpath%20d%3D%22m18.792026%200-3.92084-7.4776021q1.624348-.7281561%202.576552-2.1284561.952204-1.4002998.952204-3.6127738%200-1.736372-.56012-2.94063-.532114-1.232264-1.54033-1.988426t-2.436522-1.092234q-1.4003-.364078-3.108666-.364078H1.988426V0h5.3491461v-6.6094161h2.1844681L12.714724%200Zm-5.797242-13.078802q0%201.064228-.56012%201.624348t-1.904408.56012H7.3375721v-4.284918h3.2767019q1.288276%200%201.82039.588126.56012.588126.56012%201.512324zM37.219965%200v-4.5649781h-9.830106v-3.36072h5.797242v-4.5089659h-5.797242v-2.604558h9.634064V-19.6042H22.012707V0Zm20.388361-9.9141242q0-2.7725938-.728156-4.6209898-.70015-1.848396-2.016432-2.968636-1.288276-1.148246-3.164678-1.624348-1.876402-.476102-4.172894-.476102h-6.86147V0h6.357362q2.604558%200%204.564978-.50410801Q53.575462-1.036222%2054.91975-2.184468q1.344288-1.1762521%202.016432-3.0526541.672144-1.904408.672144-4.6770021zm-5.573194.084018q0%201.456312-.252054%202.4645281-.252054.98021-.84018%201.596342-.56012.588126-1.456312.868186-.896192.252054-2.156462.252054h-1.176252V-14.955204h1.344288q1.26027%200%202.128456.308066.868186.28006%201.4003.896192.532114.616132.756162%201.596342.252054.98021.252054%202.3244978z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20-2.65123%2027.43044)%22%20aria-label%3D%22RED%22%2F%3E%3Cpath%20d%3D%22M6.3052259-2.8329q0-.6232379-.226632-1.1574419-.218538-.534204-.615144-.922716-.388512-.396606-.922716-.615144-.534204-.226632-1.157442-.226632-.6232379%200-1.1574419.226632-.534204.218538-.93081.615144-.38851202.388512-.61514401.922716-.218538.534204-.218538%201.1574419%200%20.623238.218538%201.157442.22663199.534204.61514401.93081001.396606.388512.93081.61514399.534204.218538%201.1574419.218538.623238%200%201.157442-.218538.534204-.22663199.922716-.61514399.396606-.39660601.615144-.93081001.226632-.534204.226632-1.157442zm-.598956%200q0%20.52611-.178068.963186-.178068.428982-.48564.736554-.307572.30757201-.736554.47754601-.428982.169974-.922716.169974-.5018279%200-.9308099-.169974-.420888-.169974-.72846-.47754601-.307572-.307572-.48564-.736554-.178068-.437076-.178068-.963186%200-.5261099.178068-.9550919.178068-.437076.48564-.744648.307572-.307572.72846-.477546.428982-.169974.9308099-.169974.493734%200%20.922716.169974t.736554.477546q.307572.307572.48564.744648.178068.428982.178068.9550919zm-.825588%201.513578-.631332-1.206006q.259008-.12141.412794-.339948.16188-.2266319.16188-.5908619%200-.56658-.339948-.801306t-.898434-.234726H2.161098v3.1728479h.8660579V-2.38773h.356136l.518016%201.068408zm-.93081-2.1125339q0%20.169974-.097128.259008-.089034.089034-.307572.089034h-.518016v-.68799h.534204q.210444%200%20.299478.097128.089034.089034.089034.24282z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%20442.7922%2047.06522)%22%20aria-label%3D%22%C2%AE%22%2F%3E%3Cpath%20d%3D%22M19.18411%200v-19.6042h-5.545188v7.14153H7.5336141v-7.14153H1.988426V0h5.5451881v-7.7296561h6.1053079V0Zm22.488833%200-7.113524-19.6042h-5.489176L21.956719%200h5.825248l1.064228-3.4447381h5.88126L35.791683%200Zm-8.26177-7.7576621h-3.248696l.364078-1.2882761q.252054-.924198.448096-1.6243478.196042-.70015.336072-1.26027.168036-.56012.28006-1.036222.112024-.476102.196042-.98021.08402.504108.196042.98021l.252054%201.008216q.168036.56012.364078%201.26027.196042.7001498.448096%201.6523538zm23.973112-7.1135239V-19.6042H40.972768v4.733014h5.489177V0h5.433164v-14.871186z%22%20transform%3D%22matrix(1.33333%200%200%201.33333%2089.90877%2027.43044)%22%20aria-label%3D%22HAT%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E',\n },\n },\n },\n },\n {\n Component: SearchComponent,\n config: {\n priority: 100, // the greater the number, the more to the left it will be\n },\n },\n {\n Component: Spacer,\n config: {\n priority: 99, // the greater the number, the more to the left it will be\n props: {\n growFactor: 0,\n },\n },\n },\n {\n Component: HeaderIconButton as ComponentType,\n config: {\n priority: 90,\n props: {\n title: 'Self-service',\n titleKey: 'create.title',\n icon: 'addCircleOutline',\n to: '/create',\n },\n },\n },\n {\n Component: StarredDropdown,\n config: {\n priority: 85,\n },\n },\n {\n Component: ApplicationLauncherDropdown,\n config: {\n priority: 82,\n },\n },\n {\n Component: HelpDropdown,\n config: {\n priority: 80,\n },\n },\n {\n Component: NotificationButton,\n config: {\n priority: 70,\n },\n },\n {\n Component: Divider,\n config: {\n priority: 50,\n },\n },\n {\n Component: ProfileDropdown,\n config: {\n priority: 10, // the greater the number, the more to the left it will be\n },\n },\n ];\n\nexport const defaultCreateDropdownMountPoints: CreateDropdownMountPoint[] = [\n {\n Component: SoftwareTemplatesSection as ComponentType,\n config: {\n priority: 200,\n },\n },\n {\n Component: RegisterAComponentSection as ComponentType,\n config: {\n priority: 100,\n },\n },\n];\n\nexport const defaultProfileDropdownMountPoints: ProfileDropdownMountPoint[] = [\n {\n Component: MenuItemLink as ComponentType,\n config: {\n priority: 200,\n props: {\n title: 'Settings',\n titleKey: 'profile.settings',\n link: '/settings',\n icon: 'manageAccounts',\n },\n },\n },\n {\n Component: MenuItemLink as ComponentType,\n config: {\n priority: 150,\n props: {\n title: 'My profile',\n titleKey: 'profile.myProfile',\n icon: 'account',\n type: 'myProfile', // Semantic identifier\n },\n },\n },\n {\n Component: LogoutButton,\n config: {\n priority: 100,\n },\n },\n];\n\nexport const defaultHelpDropdownMountPoints: HelpDropdownMountPoint[] = [\n {\n Component: MenuItemLink as ComponentType,\n config: {\n priority: 100,\n props: {\n title: 'Quick start',\n titleKey: 'help.quickStart',\n icon: 'quickstart',\n link: 'https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/',\n },\n },\n },\n {\n Component: SupportButton,\n config: {\n priority: 10,\n },\n },\n];\n\nexport const defaultApplicationLauncherDropdownMountPoints: ApplicationLauncherDropdownMountPoint[] =\n [\n {\n Component: MenuItemLink as ComponentType,\n config: {\n section: 'applicationLauncher.sections.documentation',\n priority: 150,\n props: {\n title: 'Developer Hub',\n titleKey: 'applicationLauncher.developerHub',\n icon: 'developerHub',\n link: 'https://docs.redhat.com/en/documentation/red_hat_developer_hub',\n },\n },\n },\n {\n Component: MenuItemLink as ComponentType,\n config: {\n section: 'applicationLauncher.sections.developerTools',\n priority: 130,\n props: {\n title: 'RHDH Local',\n titleKey: 'applicationLauncher.rhdhLocal',\n icon: 'developerHub',\n link: 'https://github.com/redhat-developer/rhdh-local',\n },\n },\n },\n ];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA4CO,MAAM,wCACX,GAAA;AAAA,EACE;AAAA,IACE,SAAW,EAAA,WAAA;AAAA,IACX,MAAQ,EAAA;AAAA,MACN,QAAU,EAAA,GAAA;AAAA,MACV,KAAO,EAAA;AAAA,QACL,EAAI,EAAA,UAAA;AAAA,QACJ,IAAM,EAAA;AAAA,UACJ,KACE,EAAA,yuTAAA;AAAA,UACF,IAAM,EAAA;AAAA;AACR;AACF;AACF,GACF;AAAA,EACA;AAAA,IACE,SAAW,EAAA,eAAA;AAAA,IACX,MAAQ,EAAA;AAAA,MACN,QAAU,EAAA;AAAA;AAAA;AACZ,GACF;AAAA,EACA;AAAA,IACE,SAAW,EAAA,MAAA;AAAA,IACX,MAAQ,EAAA;AAAA,MACN,QAAU,EAAA,EAAA;AAAA;AAAA,MACV,KAAO,EAAA;AAAA,QACL,UAAY,EAAA;AAAA;AACd;AACF,GACF;AAAA,EACA;AAAA,IACE,SAAW,EAAA,gBAAA;AAAA,IACX,MAAQ,EAAA;AAAA,MACN,QAAU,EAAA,EAAA;AAAA,MACV,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,cAAA;AAAA,QACP,QAAU,EAAA,cAAA;AAAA,QACV,IA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AAM,EAAA,cAAA;AAAA,QACN,IAAM,EAAA;AAAA;AACR;AACF;AAEJ;;;;"}
@@ -1,13 +1,18 @@
1
- import { useState } from 'react';
1
+ import { useState, useCallback, useEffect } from 'react';
2
+ import { useLocation } from 'react-router-dom';
2
3
 
3
4
  const useDropdownManager = () => {
4
5
  const [anchorEl, setAnchorEl] = useState(null);
5
- const handleOpen = (event) => {
6
+ const location = useLocation();
7
+ const handleOpen = useCallback((event) => {
6
8
  setAnchorEl(event.currentTarget);
7
- };
8
- const handleClose = () => {
9
+ }, []);
10
+ const handleClose = useCallback(() => {
9
11
  setAnchorEl(null);
10
- };
12
+ }, []);
13
+ useEffect(() => {
14
+ setAnchorEl(null);
15
+ }, [location.pathname]);
11
16
  return {
12
17
  anchorEl,
13
18
  open: !!anchorEl,