@red-hat-developer-hub/backstage-plugin-global-header 0.1.0 → 1.0.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/app-config.dynamic.yaml +29 -27
  3. package/dist/components/Divider/Divider.esm.js +2 -2
  4. package/dist/components/Divider/Divider.esm.js.map +1 -1
  5. package/dist/components/GlobalHeaderComponent.esm.js +2 -1
  6. package/dist/components/GlobalHeaderComponent.esm.js.map +1 -1
  7. package/dist/components/HeaderButton/HeaderButton.esm.js +5 -5
  8. package/dist/components/HeaderButton/HeaderButton.esm.js.map +1 -1
  9. package/dist/components/HeaderDropdownComponent/CreateDropdown.esm.js +4 -5
  10. package/dist/components/HeaderDropdownComponent/CreateDropdown.esm.js.map +1 -1
  11. package/dist/components/HeaderDropdownComponent/MenuSection.esm.js +2 -11
  12. package/dist/components/HeaderDropdownComponent/MenuSection.esm.js.map +1 -1
  13. package/dist/components/HeaderDropdownComponent/ProfileDropdown.esm.js +14 -5
  14. package/dist/components/HeaderDropdownComponent/ProfileDropdown.esm.js.map +1 -1
  15. package/dist/components/HeaderDropdownComponent/RegisterAComponentSection.esm.js +0 -2
  16. package/dist/components/HeaderDropdownComponent/RegisterAComponentSection.esm.js.map +1 -1
  17. package/dist/components/HeaderDropdownComponent/SoftwareTemplatesSection.esm.js +0 -2
  18. package/dist/components/HeaderDropdownComponent/SoftwareTemplatesSection.esm.js.map +1 -1
  19. package/dist/components/HeaderIcon/HeaderIcon.esm.js +14 -6
  20. package/dist/components/HeaderIcon/HeaderIcon.esm.js.map +1 -1
  21. package/dist/components/HeaderIconButton/HeaderIconButton.esm.js +5 -5
  22. package/dist/components/HeaderIconButton/HeaderIconButton.esm.js.map +1 -1
  23. package/dist/components/MenuItemLink/MenuItemLinkContent.esm.js +1 -1
  24. package/dist/components/MenuItemLink/MenuItemLinkContent.esm.js.map +1 -1
  25. package/dist/components/NotificationBanner.esm.js +12 -7
  26. package/dist/components/NotificationBanner.esm.js.map +1 -1
  27. package/dist/components/NotificationButton/NotificationButton.esm.js +5 -3
  28. package/dist/components/NotificationButton/NotificationButton.esm.js.map +1 -1
  29. package/dist/components/SearchComponent/SearchComponent.esm.js +1 -2
  30. package/dist/components/SearchComponent/SearchComponent.esm.js.map +1 -1
  31. package/dist/components/SearchComponent/SearchInput.esm.js +0 -1
  32. package/dist/components/SearchComponent/SearchInput.esm.js.map +1 -1
  33. package/dist/components/Spacer/Spacer.esm.js +7 -2
  34. package/dist/components/Spacer/Spacer.esm.js.map +1 -1
  35. package/dist/components/SupportButton/SupportButton.esm.js +19 -10
  36. package/dist/components/SupportButton/SupportButton.esm.js.map +1 -1
  37. package/dist/defaultMountPoints/defaultMountPoints.esm.js +26 -12
  38. package/dist/defaultMountPoints/defaultMountPoints.esm.js.map +1 -1
  39. package/dist/hooks/useNotificationCount.esm.js +4 -7
  40. package/dist/hooks/useNotificationCount.esm.js.map +1 -1
  41. package/dist/index.d.ts +47 -59
  42. package/dist/plugin.esm.js +29 -1
  43. package/dist/plugin.esm.js.map +1 -1
  44. package/package.json +2 -4
  45. package/dist/types.esm.js +0 -14
  46. package/dist/types.esm.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -13,10 +13,11 @@ interface NotificationBannerProps {
13
13
  id?: string;
14
14
  title: string;
15
15
  markdown?: boolean;
16
+ icon?: string;
16
17
  textColor?: string;
17
18
  backgroundColor?: string;
18
- border?: string;
19
- borderRadius?: string;
19
+ borderColor?: string;
20
+ layout?: React$1.CSSProperties;
20
21
  dismiss?: NotificationBannerDismiss;
21
22
  }
22
23
 
@@ -30,6 +31,7 @@ interface NotificationButtonProps {
30
31
  size?: 'small' | 'medium' | 'large';
31
32
  badgeColor?: 'primary' | 'secondary' | 'default' | 'error' | 'info' | 'success' | 'warning';
32
33
  to?: string;
34
+ layout?: React$1.CSSProperties;
33
35
  }
34
36
 
35
37
  /**
@@ -41,6 +43,14 @@ interface SupportButtonProps {
41
43
  color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
42
44
  size?: 'small' | 'medium' | 'large';
43
45
  to?: string;
46
+ layout?: React$1.CSSProperties;
47
+ }
48
+
49
+ /**
50
+ * @public
51
+ */
52
+ interface DividerProps {
53
+ layout?: React$1.CSSProperties;
44
54
  }
45
55
 
46
56
  /**
@@ -49,6 +59,7 @@ interface SupportButtonProps {
49
59
  interface SpacerProps {
50
60
  growFactor?: number;
51
61
  minWidth?: number | string;
62
+ layout?: React$1.CSSProperties;
52
63
  }
53
64
 
54
65
  /**
@@ -62,7 +73,7 @@ interface HeaderIconButtonProps {
62
73
  size?: 'small' | 'medium' | 'large';
63
74
  ariaLabel?: string;
64
75
  to: string;
65
- style?: React$1.CSSProperties;
76
+ layout?: React$1.CSSProperties;
66
77
  }
67
78
 
68
79
  /**
@@ -71,7 +82,7 @@ interface HeaderIconButtonProps {
71
82
  interface HeaderIconProps {
72
83
  icon: string;
73
84
  size?: 'small' | 'medium' | 'large';
74
- styles?: React$1.CSSProperties;
85
+ layout?: React$1.CSSProperties;
75
86
  }
76
87
 
77
88
  /**
@@ -88,55 +99,15 @@ interface HeaderButtonProps {
88
99
  endIcon?: string;
89
100
  externalLinkIcon?: boolean;
90
101
  to: string;
91
- style?: React$1.CSSProperties;
102
+ layout?: React$1.CSSProperties;
92
103
  }
93
104
 
94
- /**
95
- * Component
96
- *
97
- * @public
98
- */
99
- declare enum ComponentType {
100
- /**
101
- * Global Header spacer
102
- */
103
- SPACER = "spacer",
104
- /**
105
- * Global Header support button
106
- */
107
- SUPPORT_BUTTON = "support_button",
108
- /**
109
- * Global Header Component dropdown button
110
- */
111
- DROPDOWN_BUTTON = "dropdown_button",
112
- /**
113
- * Global Header Component icon button
114
- */
115
- ICON_BUTTON = "icon_button",
116
- /**
117
- * Global Header Component link
118
- */
119
- LINK = "link",
120
- /**
121
- * Global Header Component list
122
- */
123
- LIST = "list",
124
- /**
125
- * Global Header Component search
126
- */
127
- SEARCH = "search",
128
- /**
129
- * Global Header Component logout
130
- */
131
- LOGOUT = "logout"
132
- }
133
105
  /**
134
106
  * Global Header Config
135
107
  *
136
108
  * @public
137
109
  */
138
110
  interface GlobalHeaderComponentMountPointConfig {
139
- type?: ComponentType;
140
111
  priority?: number;
141
112
  }
142
113
  /**
@@ -145,16 +116,18 @@ interface GlobalHeaderComponentMountPointConfig {
145
116
  * @public
146
117
  */
147
118
  interface GlobalHeaderComponentMountPoint {
148
- Component: React.ComponentType<{}>;
119
+ Component: React.ComponentType<{
120
+ layout?: React.CSSProperties;
121
+ }>;
149
122
  config?: GlobalHeaderComponentMountPointConfig & {
150
- layout?: Record<string, any>;
151
123
  props?: Record<string, any>;
124
+ layout?: React.CSSProperties;
152
125
  };
153
126
  }
154
127
 
155
128
  /**
156
- * @public
157
129
  * Global Header Component properties
130
+ * @public
158
131
  */
159
132
  interface GlobalHeaderComponentProps {
160
133
  globalHeaderMountPoints: GlobalHeaderComponentMountPoint[];
@@ -192,6 +165,22 @@ type RegisterAComponentSectionProps = {
192
165
  handleClose: () => void;
193
166
  };
194
167
 
168
+ /**
169
+ * @public
170
+ * Props for Create Dropdown
171
+ */
172
+ interface CreateDropdownProps {
173
+ layout?: React$1.CSSProperties;
174
+ }
175
+
176
+ /**
177
+ * @public
178
+ * Props for Profile Dropdown
179
+ */
180
+ interface ProfileDropdownProps {
181
+ layout?: React$1.CSSProperties;
182
+ }
183
+
195
184
  /**
196
185
  * Menu item configuration
197
186
  *
@@ -199,7 +188,6 @@ type RegisterAComponentSectionProps = {
199
188
  */
200
189
  interface MenuItemConfig {
201
190
  Component: React$1.ComponentType<MenuItemLinkProps | {}>;
202
- type: string;
203
191
  label: string;
204
192
  icon?: string;
205
193
  subLabel?: string;
@@ -234,15 +222,15 @@ declare const GlobalHeaderComponent: React$1.ComponentType<GlobalHeaderComponent
234
222
  /**
235
223
  * @public
236
224
  */
237
- declare const HeaderButton: ({ title, tooltip, color, size, variant, ariaLabel, startIcon, endIcon, externalLinkIcon, to, style, }: HeaderButtonProps) => React$1.JSX.Element;
225
+ declare const HeaderButton: ({ title, tooltip, color, size, variant, ariaLabel, startIcon, endIcon, externalLinkIcon, to, layout, }: HeaderButtonProps) => React$1.JSX.Element;
238
226
  /**
239
227
  * @public
240
228
  */
241
- declare const HeaderIcon: ({ icon, size, styles, }: HeaderIconProps) => React$1.JSX.Element | null;
229
+ declare const HeaderIcon: ({ icon, size, layout, }: HeaderIconProps) => React$1.JSX.Element | null;
242
230
  /**
243
231
  * @public
244
232
  */
245
- declare const HeaderIconButton: ({ title, icon, tooltip, color, size, ariaLabel, to, style, }: HeaderIconButtonProps) => React$1.JSX.Element;
233
+ declare const HeaderIconButton: ({ title, icon, tooltip, color, size, ariaLabel, to, layout, }: HeaderIconButtonProps) => React$1.JSX.Element;
246
234
  /**
247
235
  * Search Component
248
236
  *
@@ -254,13 +242,13 @@ declare const SearchComponent: React$1.ComponentType;
254
242
  *
255
243
  * @public
256
244
  */
257
- declare const CreateDropdown: () => React$1.JSX.Element | null;
245
+ declare const CreateDropdown: React$1.ComponentType<CreateDropdownProps>;
258
246
  /**
259
247
  * Profile Dropdown
260
248
  *
261
249
  * @public
262
250
  */
263
- declare const ProfileDropdown: () => React$1.JSX.Element | null;
251
+ declare const ProfileDropdown: React$1.ComponentType<ProfileDropdownProps>;
264
252
  /**
265
253
  * Software Templates List
266
254
  *
@@ -292,19 +280,19 @@ declare const LogoutButton: React$1.ComponentType;
292
280
  *
293
281
  * @public
294
282
  */
295
- declare const Spacer: ({ growFactor, minWidth }: SpacerProps) => React$1.JSX.Element;
283
+ declare const Spacer: ({ growFactor, minWidth, layout, }: SpacerProps) => React$1.JSX.Element;
296
284
  /**
297
285
  * @public
298
286
  */
299
- declare const Divider: () => React$1.JSX.Element;
287
+ declare const Divider: ({ layout }: DividerProps) => React$1.JSX.Element;
300
288
  /**
301
289
  * @public
302
290
  */
303
- declare const SupportButton: ({ title, tooltip, color, size, to, }: SupportButtonProps) => React$1.JSX.Element | null;
291
+ declare const SupportButton: ({ title, tooltip, color, size, to, layout, }: SupportButtonProps) => React$1.JSX.Element | null;
304
292
  /**
305
293
  * @public
306
294
  */
307
- declare const NotificationButton: ({ title, tooltip, color, size, badgeColor, to, }: NotificationButtonProps) => React$1.JSX.Element | null;
295
+ declare const NotificationButton: ({ title, tooltip, color, size, badgeColor, to, layout, }: NotificationButtonProps) => React$1.JSX.Element | null;
308
296
  /**
309
297
  * NotificationBanner
310
298
  *
@@ -312,4 +300,4 @@ declare const NotificationButton: ({ title, tooltip, color, size, badgeColor, to
312
300
  */
313
301
  declare const NotificationBanner: (props: NotificationBannerProps) => React$1.JSX.Element | null;
314
302
 
315
- export { ComponentType, CreateDropdown, Divider, GlobalHeader, GlobalHeaderComponent, type GlobalHeaderComponentMountPoint, type GlobalHeaderComponentMountPointConfig, type GlobalHeaderComponentProps, HeaderButton, type HeaderButtonProps, HeaderIcon, HeaderIconButton, type HeaderIconButtonProps, type HeaderIconProps, LogoutButton, type MenuItemConfig, MenuItemLink, type MenuItemLinkProps, NotificationBanner, type NotificationBannerDismiss, type NotificationBannerProps, NotificationButton, type NotificationButtonProps, ProfileDropdown, RegisterAComponentSection, type RegisterAComponentSectionProps, SearchComponent, SoftwareTemplatesSection, type SoftwareTemplatesSectionProps, Spacer, type SpacerProps, SupportButton, type SupportButtonProps, defaultGlobalHeaderComponentsMountPoints, globalHeaderPlugin };
303
+ export { CreateDropdown, type CreateDropdownProps, Divider, type DividerProps, GlobalHeader, GlobalHeaderComponent, type GlobalHeaderComponentMountPoint, type GlobalHeaderComponentMountPointConfig, type GlobalHeaderComponentProps, HeaderButton, type HeaderButtonProps, HeaderIcon, HeaderIconButton, type HeaderIconButtonProps, type HeaderIconProps, LogoutButton, type MenuItemConfig, MenuItemLink, type MenuItemLinkProps, NotificationBanner, type NotificationBannerDismiss, type NotificationBannerProps, NotificationButton, type NotificationButtonProps, ProfileDropdown, type ProfileDropdownProps, RegisterAComponentSection, type RegisterAComponentSectionProps, SearchComponent, SoftwareTemplatesSection, type SoftwareTemplatesSectionProps, Spacer, type SpacerProps, SupportButton, type SupportButtonProps, defaultGlobalHeaderComponentsMountPoints, globalHeaderPlugin };
@@ -1,5 +1,33 @@
1
1
  import { createPlugin, createComponentExtension } from '@backstage/core-plugin-api';
2
- export { defaultGlobalHeaderComponentsMountPoints } from './defaultMountPoints/defaultMountPoints.esm.js';
2
+ import 'react';
3
+ import '@mui/material/Box';
4
+ import '@mui/material/Typography';
5
+ import '@mui/material/Icon';
6
+ import '@mui/material/styles';
7
+ import '@mui/icons-material/ArrowDropDownOutlined';
8
+ import '@scalprum/react-core';
9
+ import './components/HeaderDropdownComponent/HeaderDropdownComponent.esm.js';
10
+ import '@mui/icons-material/AccountCircleOutlined';
11
+ import '@mui/icons-material/KeyboardArrowDownOutlined';
12
+ import '@mui/material/Divider';
13
+ import '@mui/material/MenuItem';
14
+ import '@backstage/core-components';
15
+ import '@mui/material/Tooltip';
16
+ import 'react-router-dom';
17
+ import '@backstage/plugin-catalog-react';
18
+ import '@backstage/plugin-search-react';
19
+ import '@mui/material/Autocomplete';
20
+ import '@mui/material/TextField';
21
+ import '@mui/material/InputAdornment';
22
+ import '@mui/icons-material/Search';
23
+ import '@mui/material/ListItem';
24
+ import '@mui/icons-material/ArrowForward';
25
+ import '@mui/material/IconButton';
26
+ import '@mui/icons-material/HelpOutline';
27
+ import '@mui/material/Badge';
28
+ import '@mui/icons-material/NotificationsOutlined';
29
+ import '@backstage/plugin-notifications';
30
+ import '@backstage/plugin-signals-react';
3
31
 
4
32
  const globalHeaderPlugin = createPlugin({
5
33
  id: "global-header"
@@ -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';\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';\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 { 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 ComponentType,\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 = 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 = 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"],"names":[],"mappings":";;;AA4DO,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,MAAM,OAAO,kCAA2B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,YAAY;AAAA;AAC1E,GACD;AACH;AAOO,MAAM,wBACX,kBAAmB,CAAA,OAAA;AAAA,EACjB,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,uBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,2CAAoC,CAAE,CAAA,IAAA;AAAA,QAC3C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAKK,MAAM,eAAe,kBAAmB,CAAA,OAAA;AAAA,EAC7C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,cAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,+CAAwC,CA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AA,OAAA;AAAA,EACxC,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,SAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,qCAA8B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,OAAO;AAAA;AACxE,GACD;AACH;AAKO,MAAM,gBAAgB,kBAAmB,CAAA,OAAA;AAAA,EAC9C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,eAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,iDAA0C,CAAE,CAAA,IAAA;AAAA,QACjD,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAKO,MAAM,qBAAqB,kBAAmB,CAAA,OAAA;AAAA,EACnD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,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;;;;"}
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"],"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,MAAM,OAAO,kCAA2B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,YAAY;AAAA;AAC1E,GACD;AACH;AAOO,MAAM,wBACX,kBAAmB,CAAA,OAAA;AAAA,EACjB,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,uBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,2CAAoC,CAAE,CAAA,IAAA;AAAA,QAC3C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,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AA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,mCAA4B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,MAAM;AAAA;AACrE,GACD;AACH;AAKO,MAAM,UAAU,kBAAmB,CAAA,OAAA;AAAA,EACxC,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,SAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,qCAA8B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,OAAO;AAAA;AACxE,GACD;AACH;AAKO,MAAM,gBAAgB,kBAAmB,CAAA,OAAA;AAAA,EAC9C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,eAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,iDAA0C,CAAE,CAAA,IAAA;AAAA,QACjD,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAKO,MAAM,qBAAqB,kBAAmB,CAAA,OAAA;AAAA,EACnD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@red-hat-developer-hub/backstage-plugin-global-header",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "main": "dist/index.esm.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -52,8 +52,6 @@
52
52
  "@mui/material": "5.16.13",
53
53
  "@mui/styled-engine": "5.16.13",
54
54
  "@scalprum/react-core": "0.9.3",
55
- "react-dom": "18.3.1",
56
- "react-router-dom": "^6.26.2",
57
55
  "react-use": "^17.5.0"
58
56
  },
59
57
  "peerDependencies": {
@@ -77,7 +75,7 @@
77
75
  "react-router-dom": "^6.0.0"
78
76
  },
79
77
  "keywords": [
80
- "support:tech-preview",
78
+ "support:production",
81
79
  "lifecycle:active",
82
80
  "backstage",
83
81
  "plugin"
package/dist/types.esm.js DELETED
@@ -1,14 +0,0 @@
1
- var ComponentType = /* @__PURE__ */ ((ComponentType2) => {
2
- ComponentType2["SPACER"] = "spacer";
3
- ComponentType2["SUPPORT_BUTTON"] = "support_button";
4
- ComponentType2["DROPDOWN_BUTTON"] = "dropdown_button";
5
- ComponentType2["ICON_BUTTON"] = "icon_button";
6
- ComponentType2["LINK"] = "link";
7
- ComponentType2["LIST"] = "list";
8
- ComponentType2["SEARCH"] = "search";
9
- ComponentType2["LOGOUT"] = "logout";
10
- return ComponentType2;
11
- })(ComponentType || {});
12
-
13
- export { ComponentType };
14
- //# sourceMappingURL=types.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.esm.js","sources":["../src/types.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 * Component\n *\n * @public\n */\nexport enum ComponentType {\n /**\n * Global Header spacer\n */\n SPACER = 'spacer',\n /**\n * Global Header support button\n */\n SUPPORT_BUTTON = 'support_button',\n /**\n * Global Header Component dropdown button\n */\n DROPDOWN_BUTTON = 'dropdown_button',\n /**\n * Global Header Component icon button\n */\n ICON_BUTTON = 'icon_button',\n /**\n * Global Header Component link\n */\n LINK = 'link',\n /**\n * Global Header Component list\n */\n LIST = 'list',\n /**\n * Global Header Component search\n */\n SEARCH = 'search',\n /**\n * Global Header Component logout\n */\n LOGOUT = 'logout',\n}\n\n/**\n * Global Header Config\n *\n * @public\n */\nexport interface GlobalHeaderComponentMountPointConfig {\n type?: ComponentType;\n priority?: number;\n}\n\n/**\n * Create Dropdown Config\n *\n * @public\n */\nexport interface CreateDropdownMountPointConfig {\n type: ComponentType;\n priority?: number;\n props?: Record<string, any>;\n}\n/**\n * Profile Dropdown Config\n *\n * @public\n */\nexport interface ProfileDropdownMountPointConfig {\n type: ComponentType;\n priority?: number;\n icon?: string;\n title?: string;\n link?: string;\n props?: Record<string, any>;\n}\n\n/**\n * Global Header Component Mount Point\n *\n * @public\n */\nexport interface GlobalHeaderComponentMountPoint {\n Component: React.ComponentType<{}>;\n config?: GlobalHeaderComponentMountPointConfig & {\n layout?: Record<string, any>;\n props?: Record<string, any>;\n };\n}\n\n/**\n * Create Dropdown Mount Point\n *\n * @public\n */\nexport interface CreateDropdownMountPoint {\n Component: React.ComponentType;\n config?: CreateDropdownMountPointConfig & {\n props?: Record<string, any>;\n };\n}\n\n/**\n * Profile Dropdown Mount Point\n *\n * @public\n */\nexport interface ProfileDropdownMountPoint {\n Component: React.ComponentType;\n config?: ProfileDropdownMountPointConfig & {\n props?: Record<string, any>;\n };\n}\n\n/**\n * ScalprumState\n *\n * @public\n */\nexport interface ScalprumState {\n api?: {\n dynamicRootConfig?: {\n mountPoints?: {\n 'global.header/component': GlobalHeaderComponentMountPoint[];\n 'global.header/create': CreateDropdownMountPoint[];\n 'global.header/profile': ProfileDropdownMountPoint[];\n };\n };\n };\n}\n"],"names":["ComponentType"],"mappings":"AAqBY,IAAA,aAAA,qBAAAA,cAAL,KAAA;AAIL,EAAAA,eAAA,QAAS,CAAA,GAAA,QAAA;AAIT,EAAAA,eAAA,gBAAiB,CAAA,GAAA,gBAAA;AAIjB,EAAAA,eAAA,iBAAkB,CAAA,GAAA,iBAAA;AAIlB,EAAAA,eAAA,aAAc,CAAA,GAAA,aAAA;AAId,EAAAA,eAAA,MAAO,CAAA,GAAA,MAAA;AAIP,EAAAA,eAAA,MAAO,CAAA,GAAA,MAAA;AAIP,EAAAA,eAAA,QAAS,CAAA,GAAA,QAAA;AAIT,EAAAA,eAAA,QAAS,CAAA,GAAA,QAAA;AAhCC,EAAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA;;;;"}