@red-hat-developer-hub/backstage-plugin-global-header 1.5.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/components/GlobalHeaderComponent.esm.js +15 -6
- package/dist/components/GlobalHeaderComponent.esm.js.map +1 -1
- package/dist/components/HeaderDropdownComponent/CreateDropdown.esm.js +1 -5
- package/dist/components/HeaderDropdownComponent/CreateDropdown.esm.js.map +1 -1
- package/dist/components/HeaderDropdownComponent/ProfileDropdown.esm.js +10 -2
- package/dist/components/HeaderDropdownComponent/ProfileDropdown.esm.js.map +1 -1
- package/dist/components/SearchComponent/SearchInput.esm.js +3 -3
- package/dist/components/SearchComponent/SearchInput.esm.js.map +1 -1
- package/dist/plugin.esm.js +1 -0
- package/dist/plugin.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-global-header
|
|
2
2
|
|
|
3
|
+
## 1.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0bd2f82: **Breaking change**: Use new theme package. Global header items will now use the `theme.rhdh?.general.appBarForegroundColor` colour if defined, and fall back to `theme.palette.text.primary`. This may cause your global header to not look correct in light mode when using the legacy theme.
|
|
8
|
+
|
|
9
|
+
## 1.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- f0f1eb6: Added avatar to the Profile dropdown
|
|
14
|
+
|
|
3
15
|
## 1.5.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -13,13 +13,22 @@ const GlobalHeaderComponent = ({
|
|
|
13
13
|
const filteredAndSorted = globalHeaderMountPoints.filter((component) => (component.config?.priority ?? 0) > -1).sort((a, b) => (b.config?.priority ?? 0) - (a.config?.priority ?? 0));
|
|
14
14
|
return filteredAndSorted;
|
|
15
15
|
}, [globalHeaderMountPoints]);
|
|
16
|
-
return /* @__PURE__ */ React.createElement(AppBar, { position: "sticky", component: "nav", id: "global-header" }, /* @__PURE__ */ React.createElement(
|
|
17
|
-
|
|
16
|
+
return /* @__PURE__ */ React.createElement(AppBar, { position: "sticky", component: "nav", id: "global-header" }, /* @__PURE__ */ React.createElement(
|
|
17
|
+
Toolbar,
|
|
18
18
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
sx: {
|
|
20
|
+
gap: 1,
|
|
21
|
+
color: (theme) => theme.rhdh?.general.appBarForegroundColor ?? theme.palette.text.primary
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
mountPoints.map((mountPoint, index) => /* @__PURE__ */ React.createElement(ErrorBoundary, { key: `header-component-${index}` }, /* @__PURE__ */ React.createElement(
|
|
25
|
+
mountPoint.Component,
|
|
26
|
+
{
|
|
27
|
+
...mountPoint.config?.props,
|
|
28
|
+
layout: mountPoint.config?.layout
|
|
29
|
+
}
|
|
30
|
+
)))
|
|
31
|
+
));
|
|
23
32
|
};
|
|
24
33
|
|
|
25
34
|
export { GlobalHeaderComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalHeaderComponent.esm.js","sources":["../../src/components/GlobalHeaderComponent.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 React, { useMemo } from 'react';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport AppBar from '@mui/material/AppBar';\nimport Toolbar from '@mui/material/Toolbar';\n\nimport { GlobalHeaderComponentMountPoint } from '../types';\n\n/**\n * Global Header Component properties\n * @public\n */\nexport interface GlobalHeaderComponentProps {\n globalHeaderMountPoints: GlobalHeaderComponentMountPoint[];\n}\n\nexport const GlobalHeaderComponent = ({\n globalHeaderMountPoints,\n}: GlobalHeaderComponentProps) => {\n const mountPoints = useMemo(() => {\n if (!globalHeaderMountPoints) {\n return [];\n }\n\n const filteredAndSorted = globalHeaderMountPoints\n .filter(component => (component.config?.priority ?? 0) > -1)\n .sort((a, b) => (b.config?.priority ?? 0) - (a.config?.priority ?? 0));\n\n return filteredAndSorted;\n }, [globalHeaderMountPoints]);\n\n return (\n <AppBar position=\"sticky\" component=\"nav\" id=\"global-header\">\n <Toolbar
|
|
1
|
+
{"version":3,"file":"GlobalHeaderComponent.esm.js","sources":["../../src/components/GlobalHeaderComponent.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 React, { useMemo } from 'react';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport AppBar from '@mui/material/AppBar';\nimport Toolbar from '@mui/material/Toolbar';\n\nimport { GlobalHeaderComponentMountPoint } from '../types';\n\n/**\n * Global Header Component properties\n * @public\n */\nexport interface GlobalHeaderComponentProps {\n globalHeaderMountPoints: GlobalHeaderComponentMountPoint[];\n}\n\nexport const GlobalHeaderComponent = ({\n globalHeaderMountPoints,\n}: GlobalHeaderComponentProps) => {\n const mountPoints = useMemo(() => {\n if (!globalHeaderMountPoints) {\n return [];\n }\n\n const filteredAndSorted = globalHeaderMountPoints\n .filter(component => (component.config?.priority ?? 0) > -1)\n .sort((a, b) => (b.config?.priority ?? 0) - (a.config?.priority ?? 0));\n\n return filteredAndSorted;\n }, [globalHeaderMountPoints]);\n\n return (\n <AppBar position=\"sticky\" component=\"nav\" id=\"global-header\">\n <Toolbar\n sx={{\n gap: 1,\n color: theme =>\n (theme as any).rhdh?.general.appBarForegroundColor ??\n theme.palette.text.primary,\n }}\n >\n {mountPoints.map((mountPoint, index) => (\n <ErrorBoundary key={`header-component-${index}`}>\n <mountPoint.Component\n {...mountPoint.config?.props}\n layout={mountPoint.config?.layout}\n />\n </ErrorBoundary>\n ))}\n </Toolbar>\n </AppBar>\n );\n};\n"],"names":[],"mappings":";;;;;AAiCO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,CAAkC,KAAA;AAChC,EAAM,MAAA,WAAA,GAAc,QAAQ,MAAM;AAChC,IAAA,IAAI,CAAC,uBAAyB,EAAA;AAC5B,MAAA,OAAO,EAAC;AAAA;AAGV,IAAM,MAAA,iBAAA,GAAoB,wBACvB,MAAO,CAAA,CAAA,SAAA,KAAA,CAAc,UAAU,MAAQ,EAAA,QAAA,IAAY,KAAK,CAAE,CAAA,CAAA,CAC1D,KAAK,CAAC,CAAA,EAAG,OAAO,CAAE,CAAA,MAAA,EAAQ,YAAY,CAAM,KAAA,CAAA,CAAE,MAAQ,EAAA,QAAA,IAAY,CAAE,CAAA,CAAA;AAEvE,IAAO,OAAA,iBAAA;AAAA,GACT,EAAG,CAAC,uBAAuB,CAAC,CAAA;AAE5B,EAAA,2CACG,MAAO,EAAA,EAAA,QAAA,EAAS,UAAS,SAAU,EAAA,KAAA,EAAM,IAAG,eAC3C,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,GAAK,EAAA,CAAA;AAAA,QACL,KAAA,EAAO,WACJ,KAAc,CAAA,IAAA,EAAM,QAAQ,qBAC7B,IAAA,KAAA,CAAM,QAAQ,IAAK,CAAA;AAAA;AACvB,KAAA;AAAA,IAEC,WAAA,CAAY,GAAI,CAAA,CAAC,UAAY,EAAA,KAAA,yCAC3B,aAAc,EAAA,EAAA,GAAA,EAAK,CAAoB,iBAAA,EAAA,KAAK,CAC3C,CAAA,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,UAAW,CAAA,SAAA;AAAA,MAAX;AAAA,QACE,GAAG,WAAW,MAAQ,EAAA,KAAA;AAAA,QACvB,MAAA,EAAQ,WAAW,MAAQ,EAAA;AAAA;AAAA,KAE/B,CACD;AAAA,GAEL,CAAA;AAEJ;;;;"}
|
|
@@ -24,11 +24,7 @@ const CreateDropdown = ({ layout }) => {
|
|
|
24
24
|
buttonProps: {
|
|
25
25
|
variant: "outlined",
|
|
26
26
|
sx: {
|
|
27
|
-
color: "
|
|
28
|
-
border: "1px solid rgba(255, 255, 255, 0.5)",
|
|
29
|
-
"&:hover, &.Mui-focusVisible": {
|
|
30
|
-
border: "1px solid #fff"
|
|
31
|
-
},
|
|
27
|
+
color: "inherit",
|
|
32
28
|
...layout
|
|
33
29
|
}
|
|
34
30
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateDropdown.esm.js","sources":["../../../src/components/HeaderDropdownComponent/CreateDropdown.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 React, { useMemo } from 'react';\n\nimport ArrowDropDownOutlinedIcon from '@mui/icons-material/ArrowDropDownOutlined';\n\nimport { MenuItemConfig } from './MenuSection';\nimport { useCreateDropdownMountPoints } from '../../hooks/useCreateDropdownMountPoints';\nimport { useDropdownManager } from '../../hooks';\nimport { HeaderDropdownComponent } from './HeaderDropdownComponent';\nimport Box from '@mui/material/Box';\n\n/**\n * @public\n * Props for each dropdown section component\n */\ninterface SectionComponentProps {\n handleClose: () => void;\n hideDivider: boolean;\n items?: MenuItemConfig[];\n}\n\n/**\n * @public\n * Props for Create Dropdown\n */\nexport interface CreateDropdownProps {\n layout?: React.CSSProperties;\n}\n\nexport const CreateDropdown = ({ layout }: CreateDropdownProps) => {\n const { anchorEl, handleOpen, handleClose } = useDropdownManager();\n\n const createDropdownMountPoints = useCreateDropdownMountPoints();\n\n const menuSections = useMemo(() => {\n return (createDropdownMountPoints ?? [])\n .map(mp => ({\n Component: mp.Component as React.ComponentType<SectionComponentProps>,\n priority: mp.config?.priority ?? 0,\n }))\n .sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));\n }, [createDropdownMountPoints]);\n\n if (menuSections.length === 0) {\n return null;\n }\n\n return (\n <HeaderDropdownComponent\n buttonContent={\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n Self-service <ArrowDropDownOutlinedIcon sx={{ ml: 1 }} />\n </Box>\n }\n buttonProps={{\n variant: 'outlined',\n sx: {\n color: '
|
|
1
|
+
{"version":3,"file":"CreateDropdown.esm.js","sources":["../../../src/components/HeaderDropdownComponent/CreateDropdown.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 React, { useMemo } from 'react';\n\nimport ArrowDropDownOutlinedIcon from '@mui/icons-material/ArrowDropDownOutlined';\n\nimport { MenuItemConfig } from './MenuSection';\nimport { useCreateDropdownMountPoints } from '../../hooks/useCreateDropdownMountPoints';\nimport { useDropdownManager } from '../../hooks';\nimport { HeaderDropdownComponent } from './HeaderDropdownComponent';\nimport Box from '@mui/material/Box';\n\n/**\n * @public\n * Props for each dropdown section component\n */\ninterface SectionComponentProps {\n handleClose: () => void;\n hideDivider: boolean;\n items?: MenuItemConfig[];\n}\n\n/**\n * @public\n * Props for Create Dropdown\n */\nexport interface CreateDropdownProps {\n layout?: React.CSSProperties;\n}\n\nexport const CreateDropdown = ({ layout }: CreateDropdownProps) => {\n const { anchorEl, handleOpen, handleClose } = useDropdownManager();\n\n const createDropdownMountPoints = useCreateDropdownMountPoints();\n\n const menuSections = useMemo(() => {\n return (createDropdownMountPoints ?? [])\n .map(mp => ({\n Component: mp.Component as React.ComponentType<SectionComponentProps>,\n priority: mp.config?.priority ?? 0,\n }))\n .sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));\n }, [createDropdownMountPoints]);\n\n if (menuSections.length === 0) {\n return null;\n }\n\n return (\n <HeaderDropdownComponent\n buttonContent={\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n Self-service <ArrowDropDownOutlinedIcon sx={{ ml: 1 }} />\n </Box>\n }\n buttonProps={{\n variant: 'outlined',\n sx: {\n color: 'inherit',\n ...layout,\n },\n }}\n onOpen={handleOpen}\n onClose={handleClose}\n anchorEl={anchorEl}\n >\n {menuSections.map((section, index) => (\n <section.Component\n key={`menu-section-${index.toString()}`}\n hideDivider={index === menuSections.length - 1}\n handleClose={handleClose}\n />\n ))}\n </HeaderDropdownComponent>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA4CO,MAAM,cAAiB,GAAA,CAAC,EAAE,MAAA,EAAkC,KAAA;AACjE,EAAA,MAAM,EAAE,QAAA,EAAU,UAAY,EAAA,WAAA,KAAgB,kBAAmB,EAAA;AAEjE,EAAA,MAAM,4BAA4B,4BAA6B,EAAA;AAE/D,EAAM,MAAA,YAAA,GAAe,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,GAAA,CAAA;AAAA,QAC7C;AAAA;AAAA,KAEH;AAAA,GACH;AAEJ;;;;"}
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useState, useEffect, useMemo } from 'react';
|
|
|
2
2
|
import { useUserProfile } from '@backstage/plugin-user-settings';
|
|
3
3
|
import AccountCircleOutlinedIcon from '@mui/icons-material/AccountCircleOutlined';
|
|
4
4
|
import KeyboardArrowDownOutlinedIcon from '@mui/icons-material/KeyboardArrowDownOutlined';
|
|
5
|
+
import Avatar from '@mui/material/Avatar';
|
|
5
6
|
import Typography from '@mui/material/Typography';
|
|
6
7
|
import { lighten } from '@mui/material/styles';
|
|
7
8
|
import Box from '@mui/material/Box';
|
|
@@ -12,7 +13,7 @@ import { useDropdownManager } from '../../hooks/useDropdownManager.esm.js';
|
|
|
12
13
|
|
|
13
14
|
const ProfileDropdown = ({ layout }) => {
|
|
14
15
|
const { anchorEl, handleOpen, handleClose } = useDropdownManager();
|
|
15
|
-
const { displayName } = useUserProfile();
|
|
16
|
+
const { displayName, profile } = useUserProfile();
|
|
16
17
|
const profileDropdownMountPoints = useProfileDropdownMountPoints();
|
|
17
18
|
const headerRef = useRef(null);
|
|
18
19
|
const [bgColor, setBgColor] = useState("#3C3F42");
|
|
@@ -46,7 +47,14 @@ const ProfileDropdown = ({ layout }) => {
|
|
|
46
47
|
return /* @__PURE__ */ React.createElement(
|
|
47
48
|
HeaderDropdownComponent,
|
|
48
49
|
{
|
|
49
|
-
buttonContent: /* @__PURE__ */ React.createElement(Box, { sx: { display: "flex", alignItems: "center", ...layout } }, displayName && /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
50
|
+
buttonContent: /* @__PURE__ */ React.createElement(Box, { sx: { display: "flex", alignItems: "center", ...layout } }, displayName && /* @__PURE__ */ React.createElement(React.Fragment, null, profile.picture ? /* @__PURE__ */ React.createElement(
|
|
51
|
+
Avatar,
|
|
52
|
+
{
|
|
53
|
+
src: profile.picture,
|
|
54
|
+
sx: { mr: 2, height: "32px", width: "32px" },
|
|
55
|
+
alt: "Profile picture"
|
|
56
|
+
}
|
|
57
|
+
) : /* @__PURE__ */ React.createElement(AccountCircleOutlinedIcon, { fontSize: "small", sx: { mr: 1 } }), /* @__PURE__ */ React.createElement(
|
|
50
58
|
Typography,
|
|
51
59
|
{
|
|
52
60
|
variant: "body2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileDropdown.esm.js","sources":["../../../src/components/HeaderDropdownComponent/ProfileDropdown.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 React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { useUserProfile } from '@backstage/plugin-user-settings';\nimport AccountCircleOutlinedIcon from '@mui/icons-material/AccountCircleOutlined';\nimport KeyboardArrowDownOutlinedIcon from '@mui/icons-material/KeyboardArrowDownOutlined';\nimport Typography from '@mui/material/Typography';\nimport { lighten } from '@mui/material/styles';\nimport Box from '@mui/material/Box';\nimport { MenuSection } from './MenuSection';\nimport { HeaderDropdownComponent } from './HeaderDropdownComponent';\nimport { useProfileDropdownMountPoints } from '../../hooks/useProfileDropdownMountPoints';\nimport { useDropdownManager } from '../../hooks';\n\n/**\n * @public\n * Props for Profile Dropdown\n */\nexport interface ProfileDropdownProps {\n layout?: React.CSSProperties;\n}\n\nexport const ProfileDropdown = ({ layout }: ProfileDropdownProps) => {\n const { anchorEl, handleOpen, handleClose } = useDropdownManager();\n const { displayName } = useUserProfile();\n\n const profileDropdownMountPoints = useProfileDropdownMountPoints();\n\n const headerRef = useRef<HTMLElement | null>(null);\n const [bgColor, setBgColor] = useState('#3C3F42');\n\n useEffect(() => {\n if (headerRef.current) {\n const computedStyle = window.getComputedStyle(headerRef.current);\n const baseColor = computedStyle.backgroundColor;\n setBgColor(lighten(baseColor, 0.2));\n }\n }, []);\n\n useEffect(() => {\n const container = document.getElementById('global-header');\n if (container) {\n const computedStyle = window.getComputedStyle(container);\n const baseColor = computedStyle.backgroundColor;\n setBgColor(lighten(baseColor, 0.2));\n }\n }, []);\n\n const menuItems = useMemo(() => {\n return (profileDropdownMountPoints ?? [])\n .map(mp => ({\n Component: mp.Component,\n icon: mp.config?.props?.icon ?? '',\n label: mp.config?.props?.title ?? '',\n link: mp.config?.props?.link ?? '',\n priority: mp.config?.priority ?? 0,\n }))\n .sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));\n }, [profileDropdownMountPoints]);\n\n if (menuItems.length === 0) {\n return null;\n }\n\n return (\n <HeaderDropdownComponent\n buttonContent={\n <Box sx={{ display: 'flex', alignItems: 'center', ...layout }}>\n {displayName && (\n <>\n <AccountCircleOutlinedIcon fontSize=\"small\" sx={{ mr: 1 }} />\n <Typography\n variant=\"body2\"\n sx={{\n display: { xs: 'none', md: 'block' },\n fontWeight: 500,\n mr: '1rem',\n }}\n >\n {displayName}\n </Typography>\n </>\n )}\n <KeyboardArrowDownOutlinedIcon\n sx={{\n bgcolor: bgColor,\n borderRadius: '25%',\n }}\n />\n </Box>\n }\n buttonProps={{\n color: 'inherit',\n sx: {\n display: 'flex',\n alignItems: 'center',\n },\n }}\n onOpen={handleOpen}\n onClose={handleClose}\n anchorEl={anchorEl}\n >\n <MenuSection hideDivider items={menuItems} handleClose={handleClose} />\n </HeaderDropdownComponent>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProfileDropdown.esm.js","sources":["../../../src/components/HeaderDropdownComponent/ProfileDropdown.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 React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { useUserProfile } from '@backstage/plugin-user-settings';\nimport AccountCircleOutlinedIcon from '@mui/icons-material/AccountCircleOutlined';\nimport KeyboardArrowDownOutlinedIcon from '@mui/icons-material/KeyboardArrowDownOutlined';\nimport Avatar from '@mui/material/Avatar';\nimport Typography from '@mui/material/Typography';\nimport { lighten } from '@mui/material/styles';\nimport Box from '@mui/material/Box';\nimport { MenuSection } from './MenuSection';\nimport { HeaderDropdownComponent } from './HeaderDropdownComponent';\nimport { useProfileDropdownMountPoints } from '../../hooks/useProfileDropdownMountPoints';\nimport { useDropdownManager } from '../../hooks';\n\n/**\n * @public\n * Props for Profile Dropdown\n */\nexport interface ProfileDropdownProps {\n layout?: React.CSSProperties;\n}\n\nexport const ProfileDropdown = ({ layout }: ProfileDropdownProps) => {\n const { anchorEl, handleOpen, handleClose } = useDropdownManager();\n const { displayName, profile } = useUserProfile();\n\n const profileDropdownMountPoints = useProfileDropdownMountPoints();\n\n const headerRef = useRef<HTMLElement | null>(null);\n const [bgColor, setBgColor] = useState('#3C3F42');\n\n useEffect(() => {\n if (headerRef.current) {\n const computedStyle = window.getComputedStyle(headerRef.current);\n const baseColor = computedStyle.backgroundColor;\n setBgColor(lighten(baseColor, 0.2));\n }\n }, []);\n\n useEffect(() => {\n const container = document.getElementById('global-header');\n if (container) {\n const computedStyle = window.getComputedStyle(container);\n const baseColor = computedStyle.backgroundColor;\n setBgColor(lighten(baseColor, 0.2));\n }\n }, []);\n\n const menuItems = useMemo(() => {\n return (profileDropdownMountPoints ?? [])\n .map(mp => ({\n Component: mp.Component,\n icon: mp.config?.props?.icon ?? '',\n label: mp.config?.props?.title ?? '',\n link: mp.config?.props?.link ?? '',\n priority: mp.config?.priority ?? 0,\n }))\n .sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));\n }, [profileDropdownMountPoints]);\n\n if (menuItems.length === 0) {\n return null;\n }\n\n return (\n <HeaderDropdownComponent\n buttonContent={\n <Box sx={{ display: 'flex', alignItems: 'center', ...layout }}>\n {displayName && (\n <>\n {profile.picture ? (\n <Avatar\n src={profile.picture}\n sx={{ mr: 2, height: '32px', width: '32px' }}\n alt=\"Profile picture\"\n />\n ) : (\n <AccountCircleOutlinedIcon fontSize=\"small\" sx={{ mr: 1 }} />\n )}\n <Typography\n variant=\"body2\"\n sx={{\n display: { xs: 'none', md: 'block' },\n fontWeight: 500,\n mr: '1rem',\n }}\n >\n {displayName}\n </Typography>\n </>\n )}\n <KeyboardArrowDownOutlinedIcon\n sx={{\n bgcolor: bgColor,\n borderRadius: '25%',\n }}\n />\n </Box>\n }\n buttonProps={{\n color: 'inherit',\n sx: {\n display: 'flex',\n alignItems: 'center',\n },\n }}\n onOpen={handleOpen}\n onClose={handleClose}\n anchorEl={anchorEl}\n >\n <MenuSection hideDivider items={menuItems} handleClose={handleClose} />\n </HeaderDropdownComponent>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAqCO,MAAM,eAAkB,GAAA,CAAC,EAAE,MAAA,EAAmC,KAAA;AACnE,EAAA,MAAM,EAAE,QAAA,EAAU,UAAY,EAAA,WAAA,KAAgB,kBAAmB,EAAA;AACjE,EAAA,MAAM,EAAE,WAAA,EAAa,OAAQ,EAAA,GAAI,cAAe,EAAA;AAEhD,EAAA,MAAM,6BAA6B,6BAA8B,EAAA;AAEjE,EAAM,MAAA,SAAA,GAAY,OAA2B,IAAI,CAAA;AACjD,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,SAAS,CAAA;AAEhD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,UAAU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,EAAA,SAAA;AAAA,QACP,EAAI,EAAA;AAAA,UACF,OAAS,EAAA,MAAA;AAAA,UACT,UAAY,EAAA;AAAA;AACd,OACF;AAAA,MACA,MAAQ,EAAA,UAAA;AAAA,MACR,OAAS,EAAA,WAAA;AAAA,MACT;AAAA,KAAA;AAAA,wCAEC,WAAY,EAAA,EAAA,WAAA,EAAW,IAAC,EAAA,KAAA,EAAO,WAAW,WAA0B,EAAA;AAAA,GACvE;AAEJ;;;;"}
|
|
@@ -18,11 +18,11 @@ const SearchInput = ({
|
|
|
18
18
|
InputProps: {
|
|
19
19
|
...params.InputProps,
|
|
20
20
|
disableUnderline: true,
|
|
21
|
-
startAdornment: /* @__PURE__ */ React.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React.createElement(SearchIcon, { style: { color: "
|
|
21
|
+
startAdornment: /* @__PURE__ */ React.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React.createElement(SearchIcon, { style: { color: "inherit" } }))
|
|
22
22
|
},
|
|
23
23
|
sx: {
|
|
24
|
-
input: { color: "
|
|
25
|
-
button: { color: "
|
|
24
|
+
input: { color: "inherit" },
|
|
25
|
+
button: { color: "inherit" },
|
|
26
26
|
"& fieldset": { border: "none" }
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.esm.js","sources":["../../../src/components/SearchComponent/SearchInput.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 React from 'react';\nimport TextField from '@mui/material/TextField';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport SearchIcon from '@mui/icons-material/Search';\n\ninterface SearchInputProps {\n params: any;\n error: boolean;\n helperText: string;\n}\n\nexport const SearchInput = ({\n params,\n error,\n helperText,\n}: SearchInputProps) => (\n <TextField\n {...params}\n placeholder=\"Search...\"\n variant=\"standard\"\n error={error}\n helperText={helperText}\n InputProps={{\n ...params.InputProps,\n disableUnderline: true,\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon style={{ color: '
|
|
1
|
+
{"version":3,"file":"SearchInput.esm.js","sources":["../../../src/components/SearchComponent/SearchInput.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 React from 'react';\nimport TextField from '@mui/material/TextField';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport SearchIcon from '@mui/icons-material/Search';\n\ninterface SearchInputProps {\n params: any;\n error: boolean;\n helperText: string;\n}\n\nexport const SearchInput = ({\n params,\n error,\n helperText,\n}: SearchInputProps) => (\n <TextField\n {...params}\n placeholder=\"Search...\"\n variant=\"standard\"\n error={error}\n helperText={helperText}\n InputProps={{\n ...params.InputProps,\n disableUnderline: true,\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon style={{ color: 'inherit' }} />\n </InputAdornment>\n ),\n }}\n sx={{\n input: { color: 'inherit' },\n button: { color: 'inherit' },\n '& fieldset': { border: 'none' },\n }}\n />\n);\n"],"names":[],"mappings":";;;;;AA2BO,MAAM,cAAc,CAAC;AAAA,EAC1B,MAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CACE,qBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,SAAA;AAAA,EAAA;AAAA,IACE,GAAG,MAAA;AAAA,IACJ,WAAY,EAAA,WAAA;AAAA,IACZ,OAAQ,EAAA,UAAA;AAAA,IACR,KAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAY,EAAA;AAAA,MACV,GAAG,MAAO,CAAA,UAAA;AAAA,MACV,gBAAkB,EAAA,IAAA;AAAA,MAClB,cACE,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,QAAA,EAAS,OACvB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAO,EAAE,KAAA,EAAO,SAAU,EAAA,EAAG,CAC3C;AAAA,KAEJ;AAAA,IACA,EAAI,EAAA;AAAA,MACF,KAAA,EAAO,EAAE,KAAA,EAAO,SAAU,EAAA;AAAA,MAC1B,MAAA,EAAQ,EAAE,KAAA,EAAO,SAAU,EAAA;AAAA,MAC3B,YAAA,EAAc,EAAE,MAAA,EAAQ,MAAO;AAAA;AACjC;AACF;;;;"}
|
package/dist/plugin.esm.js
CHANGED
|
@@ -15,6 +15,7 @@ import '@mui/material/Tooltip';
|
|
|
15
15
|
import '@backstage/plugin-user-settings';
|
|
16
16
|
import '@mui/icons-material/AccountCircleOutlined';
|
|
17
17
|
import '@mui/icons-material/KeyboardArrowDownOutlined';
|
|
18
|
+
import '@mui/material/Avatar';
|
|
18
19
|
import '@mui/material/Divider';
|
|
19
20
|
import '@backstage/core-components';
|
|
20
21
|
import '@mui/material/ListSubheader';
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.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\nimport React from 'react';\n\nimport {\n createPlugin,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\n\nimport { GlobalHeaderComponentProps } from './components/GlobalHeaderComponent';\nimport { MenuItemLinkProps } from './components/MenuItemLink/MenuItemLink';\nimport { SoftwareTemplatesSectionProps } from './components/HeaderDropdownComponent/SoftwareTemplatesSection';\nimport { RegisterAComponentSectionProps } from './components/HeaderDropdownComponent/RegisterAComponentSection';\nimport { CreateDropdownProps } from './components/HeaderDropdownComponent/CreateDropdown';\nimport { ProfileDropdownProps } from './components/HeaderDropdownComponent/ProfileDropdown';\n\nexport type { GlobalHeaderComponentProps } from './components/GlobalHeaderComponent';\n\nexport type { HeaderButtonProps } from './components/HeaderButton/HeaderButton';\nexport type { HeaderIconProps } from './components/HeaderIcon/HeaderIcon';\nexport type { HeaderIconButtonProps } from './components/HeaderIconButton/HeaderIconButton';\nexport type { CreateDropdownProps } from './components/HeaderDropdownComponent/CreateDropdown';\nexport type { ProfileDropdownProps } from './components/HeaderDropdownComponent/ProfileDropdown';\n\nexport type { MenuItemLinkProps } from './components/MenuItemLink/MenuItemLink';\nexport type { MenuItemConfig } from './components/HeaderDropdownComponent/MenuSection';\nexport type { SoftwareTemplatesSectionProps } from './components/HeaderDropdownComponent/SoftwareTemplatesSection';\nexport type { RegisterAComponentSectionProps } from './components/HeaderDropdownComponent/RegisterAComponentSection';\nexport type { DividerProps } from './components/Divider/Divider';\nexport type { SpacerProps } from './components/Spacer/Spacer';\nexport type { SupportButtonProps } from './components/SupportButton/SupportButton';\nexport type { NotificationButtonProps } from './components/NotificationButton/NotificationButton';\n\nexport type {\n NotificationBannerProps,\n NotificationBannerDismiss,\n} from './components/NotificationBanner';\n\nexport type {\n GlobalHeaderComponentMountPoint,\n GlobalHeaderComponentMountPointConfig,\n} from './types';\n\nexport { defaultGlobalHeaderComponentsMountPoints } from './defaultMountPoints/defaultMountPoints';\n\n/**\n * Global Header Plugin\n *\n * @public\n */\nexport const globalHeaderPlugin = createPlugin({\n id: 'global-header',\n});\n\n/**\n * Global Header\n *\n * @public\n */\nexport const GlobalHeader = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'GlobalHeader',\n component: {\n lazy: () => import('./components/GlobalHeader').then(m => m.GlobalHeader),\n },\n }),\n);\n\n/**\n * Global Header Component\n *\n * @public\n */\nexport const GlobalHeaderComponent: React.ComponentType<GlobalHeaderComponentProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'GlobalHeaderComponent',\n component: {\n lazy: () =>\n import('./components/GlobalHeaderComponent').then(\n m => m.GlobalHeaderComponent,\n ),\n },\n }),\n );\n\n/**\n * @public\n */\nexport const HeaderButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderButton',\n component: {\n lazy: () =>\n import('./components/HeaderButton/HeaderButton').then(\n m => m.HeaderButton,\n ),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const HeaderIcon = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderIcon',\n component: {\n lazy: () =>\n import('./components/HeaderIcon/HeaderIcon').then(m => m.HeaderIcon),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const HeaderIconButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderIconButton',\n component: {\n lazy: () =>\n import('./components/HeaderIconButton/HeaderIconButton').then(\n m => m.HeaderIconButton,\n ),\n },\n }),\n);\n\n/**\n * Search Component\n *\n * @public\n */\nexport const SearchComponent: React.ComponentType = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'SearchComponent',\n component: {\n lazy: () =>\n import('./components/SearchComponent/SearchComponent').then(\n m => m.SearchComponent,\n ),\n },\n }),\n);\n\n/**\n * Create Dropdown\n *\n * @public\n */\nexport const CreateDropdown: React.ComponentType<CreateDropdownProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'CreateDropdown',\n component: {\n lazy: () =>\n import('./components/HeaderDropdownComponent/CreateDropdown').then(\n m => m.CreateDropdown,\n ),\n },\n }),\n );\n\n/**\n * Profile Dropdown\n *\n * @public\n */\nexport const ProfileDropdown: React.ComponentType<ProfileDropdownProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'ProfileDropdown',\n component: {\n lazy: () =>\n import('./components/HeaderDropdownComponent/ProfileDropdown').then(\n m => m.ProfileDropdown,\n ),\n },\n }),\n );\n\n/**\n * Software Templates List\n *\n * @public\n */\nexport const SoftwareTemplatesSection: React.ComponentType<SoftwareTemplatesSectionProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'SoftwareTemplatesSection',\n component: {\n lazy: () =>\n import(\n './components/HeaderDropdownComponent/SoftwareTemplatesSection'\n ).then(m => m.SoftwareTemplatesSection),\n },\n }),\n );\n\n/**\n * Register A Component Link\n *\n * @public\n */\nexport const RegisterAComponentSection: React.ComponentType<RegisterAComponentSectionProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'RegisterAComponentSection',\n component: {\n lazy: () =>\n import(\n './components/HeaderDropdownComponent/RegisterAComponentSection'\n ).then(m => m.RegisterAComponentSection),\n },\n }),\n );\n\n/**\n * Header Link\n *\n * @public\n */\nexport const MenuItemLink: React.ComponentType<MenuItemLinkProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'MenuItemLink',\n component: {\n lazy: () =>\n import('./components/MenuItemLink/MenuItemLink').then(\n m => m.MenuItemLink,\n ),\n },\n }),\n );\n\n/**\n * Header Logout Button\n *\n * @public\n */\nexport const LogoutButton: React.ComponentType = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'LogoutButton',\n component: {\n lazy: () =>\n import('./components/LogoutButton/LogoutButton').then(\n m => m.LogoutButton,\n ),\n },\n }),\n);\n\n/**\n * Spacer component that allow users to add a flexibel spacing between components.\n *\n * Supports two props: `growFactor` with default 1 and `minWidth` width default 8 pixels.\n *\n * @public\n */\nexport const Spacer = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'Spacer',\n component: {\n lazy: () => import('./components/Spacer/Spacer').then(m => m.Spacer),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const Divider = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'Divider',\n component: {\n lazy: () => import('./components/Divider/Divider').then(m => m.Divider),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const SupportButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'SupportButton',\n component: {\n lazy: () =>\n import('./components/SupportButton/SupportButton').then(\n m => m.SupportButton,\n ),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const NotificationButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'NotificationButton',\n component: {\n lazy: () =>\n import('./components/NotificationButton/NotificationButton').then(\n m => m.NotificationButton,\n ),\n },\n }),\n);\n\n/**\n * NotificationBanner\n *\n * @public\n */\nexport const NotificationBanner = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'NotificationBanner',\n component: {\n lazy: () =>\n import('./components/NotificationBanner').then(\n m => m.NotificationBanner,\n ),\n },\n }),\n);\n\n/**\n * Starred Dropdown\n *\n * @public\n */\nexport const StarredDropdown = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'StarredDropdown',\n component: {\n lazy: () =>\n import('./components/HeaderDropdownComponent/StarredDropdown').then(\n m => m.StarredDropdown,\n ),\n },\n }),\n);\n\n/**\n * Application Launcher Dropdown\n *\n * @public\n */\nexport const ApplicationLauncherDropdown = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'ApplicationLauncherDropdown',\n component: {\n lazy: () =>\n import(\n './components/HeaderDropdownComponent/ApplicationLauncherDropdown'\n ).then(m => m.ApplicationLauncherDropdown),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEO,MAAM,qBAAqB,YAAa,CAAA;AAAA,EA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IAAM,EAAA,MACJ,OAAO,2DAAoD,CAAE,CAAA,IAAA;AAAA,QAC3D,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOO,MAAM,qBAAqB,kBAAmB,CAAA,OAAA;AAAA,EACnD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,wCAAiC,CAAE,CAAA,IAAA;AAAA,QACxC,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOO,MAAM,kBAAkB,kBAAmB,CAAA,OAAA;AAAA,EAChD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,iBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,6DAAsD,CAAE,CAAA,IAAA;AAAA,QAC7D,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOO,MAAM,8BAA8B,kBAAmB,CAAA,OAAA;AAAA,EAC5D,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,6BAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MACJ,OACE,yEACF,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,2BAA2B;AAAA;AAC7C,GACD;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.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\nimport React from 'react';\n\nimport {\n createPlugin,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\n\nimport { GlobalHeaderComponentProps } from './components/GlobalHeaderComponent';\nimport { MenuItemLinkProps } from './components/MenuItemLink/MenuItemLink';\nimport { SoftwareTemplatesSectionProps } from './components/HeaderDropdownComponent/SoftwareTemplatesSection';\nimport { RegisterAComponentSectionProps } from './components/HeaderDropdownComponent/RegisterAComponentSection';\nimport { CreateDropdownProps } from './components/HeaderDropdownComponent/CreateDropdown';\nimport { ProfileDropdownProps } from './components/HeaderDropdownComponent/ProfileDropdown';\n\nexport type { GlobalHeaderComponentProps } from './components/GlobalHeaderComponent';\n\nexport type { HeaderButtonProps } from './components/HeaderButton/HeaderButton';\nexport type { HeaderIconProps } from './components/HeaderIcon/HeaderIcon';\nexport type { HeaderIconButtonProps } from './components/HeaderIconButton/HeaderIconButton';\nexport type { CreateDropdownProps } from './components/HeaderDropdownComponent/CreateDropdown';\nexport type { ProfileDropdownProps } from './components/HeaderDropdownComponent/ProfileDropdown';\n\nexport type { MenuItemLinkProps } from './components/MenuItemLink/MenuItemLink';\nexport type { MenuItemConfig } from './components/HeaderDropdownComponent/MenuSection';\nexport type { SoftwareTemplatesSectionProps } from './components/HeaderDropdownComponent/SoftwareTemplatesSection';\nexport type { RegisterAComponentSectionProps } from './components/HeaderDropdownComponent/RegisterAComponentSection';\nexport type { DividerProps } from './components/Divider/Divider';\nexport type { SpacerProps } from './components/Spacer/Spacer';\nexport type { SupportButtonProps } from './components/SupportButton/SupportButton';\nexport type { NotificationButtonProps } from './components/NotificationButton/NotificationButton';\n\nexport type {\n NotificationBannerProps,\n NotificationBannerDismiss,\n} from './components/NotificationBanner';\n\nexport type {\n GlobalHeaderComponentMountPoint,\n GlobalHeaderComponentMountPointConfig,\n} from './types';\n\nexport { defaultGlobalHeaderComponentsMountPoints } from './defaultMountPoints/defaultMountPoints';\n\n/**\n * Global Header Plugin\n *\n * @public\n */\nexport const globalHeaderPlugin = createPlugin({\n id: 'global-header',\n});\n\n/**\n * Global Header\n *\n * @public\n */\nexport const GlobalHeader = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'GlobalHeader',\n component: {\n lazy: () => import('./components/GlobalHeader').then(m => m.GlobalHeader),\n },\n }),\n);\n\n/**\n * Global Header Component\n *\n * @public\n */\nexport const GlobalHeaderComponent: React.ComponentType<GlobalHeaderComponentProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'GlobalHeaderComponent',\n component: {\n lazy: () =>\n import('./components/GlobalHeaderComponent').then(\n m => m.GlobalHeaderComponent,\n ),\n },\n }),\n );\n\n/**\n * @public\n */\nexport const HeaderButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderButton',\n component: {\n lazy: () =>\n import('./components/HeaderButton/HeaderButton').then(\n m => m.HeaderButton,\n ),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const HeaderIcon = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderIcon',\n component: {\n lazy: () =>\n import('./components/HeaderIcon/HeaderIcon').then(m => m.HeaderIcon),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const HeaderIconButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderIconButton',\n component: {\n lazy: () =>\n import('./components/HeaderIconButton/HeaderIconButton').then(\n m => m.HeaderIconButton,\n ),\n },\n }),\n);\n\n/**\n * Search Component\n *\n * @public\n */\nexport const SearchComponent: React.ComponentType = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'SearchComponent',\n component: {\n lazy: () =>\n import('./components/SearchComponent/SearchComponent').then(\n m => m.SearchComponent,\n ),\n },\n }),\n);\n\n/**\n * Create Dropdown\n *\n * @public\n */\nexport const CreateDropdown: React.ComponentType<CreateDropdownProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'CreateDropdown',\n component: {\n lazy: () =>\n import('./components/HeaderDropdownComponent/CreateDropdown').then(\n m => m.CreateDropdown,\n ),\n },\n }),\n );\n\n/**\n * Profile Dropdown\n *\n * @public\n */\nexport const ProfileDropdown: React.ComponentType<ProfileDropdownProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'ProfileDropdown',\n component: {\n lazy: () =>\n import('./components/HeaderDropdownComponent/ProfileDropdown').then(\n m => m.ProfileDropdown,\n ),\n },\n }),\n );\n\n/**\n * Software Templates List\n *\n * @public\n */\nexport const SoftwareTemplatesSection: React.ComponentType<SoftwareTemplatesSectionProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'SoftwareTemplatesSection',\n component: {\n lazy: () =>\n import(\n './components/HeaderDropdownComponent/SoftwareTemplatesSection'\n ).then(m => m.SoftwareTemplatesSection),\n },\n }),\n );\n\n/**\n * Register A Component Link\n *\n * @public\n */\nexport const RegisterAComponentSection: React.ComponentType<RegisterAComponentSectionProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'RegisterAComponentSection',\n component: {\n lazy: () =>\n import(\n './components/HeaderDropdownComponent/RegisterAComponentSection'\n ).then(m => m.RegisterAComponentSection),\n },\n }),\n );\n\n/**\n * Header Link\n *\n * @public\n */\nexport const MenuItemLink: React.ComponentType<MenuItemLinkProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'MenuItemLink',\n component: {\n lazy: () =>\n import('./components/MenuItemLink/MenuItemLink').then(\n m => m.MenuItemLink,\n ),\n },\n }),\n );\n\n/**\n * Header Logout Button\n *\n * @public\n */\nexport const LogoutButton: React.ComponentType = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'LogoutButton',\n component: {\n lazy: () =>\n import('./components/LogoutButton/LogoutButton').then(\n m => m.LogoutButton,\n ),\n },\n }),\n);\n\n/**\n * Spacer component that allow users to add a flexibel spacing between components.\n *\n * Supports two props: `growFactor` with default 1 and `minWidth` width default 8 pixels.\n *\n * @public\n */\nexport const Spacer = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'Spacer',\n component: {\n lazy: () => import('./components/Spacer/Spacer').then(m => m.Spacer),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const Divider = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'Divider',\n component: {\n lazy: () => import('./components/Divider/Divider').then(m => m.Divider),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const SupportButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'SupportButton',\n component: {\n lazy: () =>\n import('./components/SupportButton/SupportButton').then(\n m => m.SupportButton,\n ),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const NotificationButton = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'NotificationButton',\n component: {\n lazy: () =>\n import('./components/NotificationButton/NotificationButton').then(\n m => m.NotificationButton,\n ),\n },\n }),\n);\n\n/**\n * NotificationBanner\n *\n * @public\n */\nexport const NotificationBanner = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'NotificationBanner',\n component: {\n lazy: () =>\n import('./components/NotificationBanner').then(\n m => m.NotificationBanner,\n ),\n },\n }),\n);\n\n/**\n * Starred Dropdown\n *\n * @public\n */\nexport const StarredDropdown = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'StarredDropdown',\n component: {\n lazy: () =>\n import('./components/HeaderDropdownComponent/StarredDropdown').then(\n m => m.StarredDropdown,\n ),\n },\n }),\n);\n\n/**\n * Application Launcher Dropdown\n *\n * @public\n */\nexport const ApplicationLauncherDropdown = globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'ApplicationLauncherDropdown',\n component: {\n lazy: () =>\n import(\n './components/HeaderDropdownComponent/ApplicationLauncherDropdown'\n ).then(m => m.ApplicationLauncherDropdown),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEO,MAAM,qBAAqB,YAAa,CAAA;AAAA,EAC7C,EAAI,EAAA;AACN,CAAC;AAOM,MAAM,eAAe,kBAAmB,CAAA,OAAA;AAAA,EAC7C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,cAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,M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AAA;AAAA,IACvB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,wCAAiC,CAAE,CAAA,IAAA;AAAA,QACxC,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOO,MAAM,kBAAkB,kBAAmB,CAAA,OAAA;AAAA,EAChD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,iBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,6DAAsD,CAAE,CAAA,IAAA;AAAA,QAC7D,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOO,MAAM,8BAA8B,kBAAmB,CAAA,OAAA;AAAA,EAC5D,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,6BAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MACJ,OACE,yEACF,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,2BAA2B;AAAA;AAC7C,GACD;AACH;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-global-header",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"main": "dist/index.esm.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@backstage/plugin-search-common": "^1.2.17",
|
|
68
68
|
"@backstage/test-utils": "^1.7.5",
|
|
69
69
|
"@openshift/dynamic-plugin-sdk": "^5.0.1",
|
|
70
|
-
"@
|
|
70
|
+
"@red-hat-developer-hub/backstage-plugin-theme": "^0.8.1",
|
|
71
71
|
"@testing-library/jest-dom": "^6.0.0",
|
|
72
72
|
"@testing-library/react": "^14.0.0",
|
|
73
73
|
"@testing-library/user-event": "^14.0.0",
|