@red-hat-developer-hub/backstage-plugin-global-header 0.1.0 → 0.2.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 (44) hide show
  1. package/CHANGELOG.md +6 -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/NotificationButton/NotificationButton.esm.js +5 -3
  26. package/dist/components/NotificationButton/NotificationButton.esm.js.map +1 -1
  27. package/dist/components/SearchComponent/SearchComponent.esm.js +1 -2
  28. package/dist/components/SearchComponent/SearchComponent.esm.js.map +1 -1
  29. package/dist/components/SearchComponent/SearchInput.esm.js +0 -1
  30. package/dist/components/SearchComponent/SearchInput.esm.js.map +1 -1
  31. package/dist/components/Spacer/Spacer.esm.js +7 -2
  32. package/dist/components/Spacer/Spacer.esm.js.map +1 -1
  33. package/dist/components/SupportButton/SupportButton.esm.js +19 -10
  34. package/dist/components/SupportButton/SupportButton.esm.js.map +1 -1
  35. package/dist/defaultMountPoints/defaultMountPoints.esm.js +26 -12
  36. package/dist/defaultMountPoints/defaultMountPoints.esm.js.map +1 -1
  37. package/dist/hooks/useNotificationCount.esm.js +4 -7
  38. package/dist/hooks/useNotificationCount.esm.js.map +1 -1
  39. package/dist/index.d.ts +44 -57
  40. package/dist/plugin.esm.js +29 -1
  41. package/dist/plugin.esm.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/types.esm.js +0 -14
  44. package/dist/types.esm.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ interface NotificationButtonProps {
30
30
  size?: 'small' | 'medium' | 'large';
31
31
  badgeColor?: 'primary' | 'secondary' | 'default' | 'error' | 'info' | 'success' | 'warning';
32
32
  to?: string;
33
+ layout?: React$1.CSSProperties;
33
34
  }
34
35
 
35
36
  /**
@@ -41,6 +42,14 @@ interface SupportButtonProps {
41
42
  color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
42
43
  size?: 'small' | 'medium' | 'large';
43
44
  to?: string;
45
+ layout?: React$1.CSSProperties;
46
+ }
47
+
48
+ /**
49
+ * @public
50
+ */
51
+ interface DividerProps {
52
+ layout?: React$1.CSSProperties;
44
53
  }
45
54
 
46
55
  /**
@@ -49,6 +58,7 @@ interface SupportButtonProps {
49
58
  interface SpacerProps {
50
59
  growFactor?: number;
51
60
  minWidth?: number | string;
61
+ layout?: React$1.CSSProperties;
52
62
  }
53
63
 
54
64
  /**
@@ -62,7 +72,7 @@ interface HeaderIconButtonProps {
62
72
  size?: 'small' | 'medium' | 'large';
63
73
  ariaLabel?: string;
64
74
  to: string;
65
- style?: React$1.CSSProperties;
75
+ layout?: React$1.CSSProperties;
66
76
  }
67
77
 
68
78
  /**
@@ -71,7 +81,7 @@ interface HeaderIconButtonProps {
71
81
  interface HeaderIconProps {
72
82
  icon: string;
73
83
  size?: 'small' | 'medium' | 'large';
74
- styles?: React$1.CSSProperties;
84
+ layout?: React$1.CSSProperties;
75
85
  }
76
86
 
77
87
  /**
@@ -88,55 +98,15 @@ interface HeaderButtonProps {
88
98
  endIcon?: string;
89
99
  externalLinkIcon?: boolean;
90
100
  to: string;
91
- style?: React$1.CSSProperties;
101
+ layout?: React$1.CSSProperties;
92
102
  }
93
103
 
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
104
  /**
134
105
  * Global Header Config
135
106
  *
136
107
  * @public
137
108
  */
138
109
  interface GlobalHeaderComponentMountPointConfig {
139
- type?: ComponentType;
140
110
  priority?: number;
141
111
  }
142
112
  /**
@@ -145,16 +115,18 @@ interface GlobalHeaderComponentMountPointConfig {
145
115
  * @public
146
116
  */
147
117
  interface GlobalHeaderComponentMountPoint {
148
- Component: React.ComponentType<{}>;
118
+ Component: React.ComponentType<{
119
+ layout?: React.CSSProperties;
120
+ }>;
149
121
  config?: GlobalHeaderComponentMountPointConfig & {
150
- layout?: Record<string, any>;
151
122
  props?: Record<string, any>;
123
+ layout?: React.CSSProperties;
152
124
  };
153
125
  }
154
126
 
155
127
  /**
156
- * @public
157
128
  * Global Header Component properties
129
+ * @public
158
130
  */
159
131
  interface GlobalHeaderComponentProps {
160
132
  globalHeaderMountPoints: GlobalHeaderComponentMountPoint[];
@@ -192,6 +164,22 @@ type RegisterAComponentSectionProps = {
192
164
  handleClose: () => void;
193
165
  };
194
166
 
167
+ /**
168
+ * @public
169
+ * Props for Create Dropdown
170
+ */
171
+ interface CreateDropdownProps {
172
+ layout?: React$1.CSSProperties;
173
+ }
174
+
175
+ /**
176
+ * @public
177
+ * Props for Profile Dropdown
178
+ */
179
+ interface ProfileDropdownProps {
180
+ layout?: React$1.CSSProperties;
181
+ }
182
+
195
183
  /**
196
184
  * Menu item configuration
197
185
  *
@@ -199,7 +187,6 @@ type RegisterAComponentSectionProps = {
199
187
  */
200
188
  interface MenuItemConfig {
201
189
  Component: React$1.ComponentType<MenuItemLinkProps | {}>;
202
- type: string;
203
190
  label: string;
204
191
  icon?: string;
205
192
  subLabel?: string;
@@ -234,15 +221,15 @@ declare const GlobalHeaderComponent: React$1.ComponentType<GlobalHeaderComponent
234
221
  /**
235
222
  * @public
236
223
  */
237
- declare const HeaderButton: ({ title, tooltip, color, size, variant, ariaLabel, startIcon, endIcon, externalLinkIcon, to, style, }: HeaderButtonProps) => React$1.JSX.Element;
224
+ declare const HeaderButton: ({ title, tooltip, color, size, variant, ariaLabel, startIcon, endIcon, externalLinkIcon, to, layout, }: HeaderButtonProps) => React$1.JSX.Element;
238
225
  /**
239
226
  * @public
240
227
  */
241
- declare const HeaderIcon: ({ icon, size, styles, }: HeaderIconProps) => React$1.JSX.Element | null;
228
+ declare const HeaderIcon: ({ icon, size, layout, }: HeaderIconProps) => React$1.JSX.Element | null;
242
229
  /**
243
230
  * @public
244
231
  */
245
- declare const HeaderIconButton: ({ title, icon, tooltip, color, size, ariaLabel, to, style, }: HeaderIconButtonProps) => React$1.JSX.Element;
232
+ declare const HeaderIconButton: ({ title, icon, tooltip, color, size, ariaLabel, to, layout, }: HeaderIconButtonProps) => React$1.JSX.Element;
246
233
  /**
247
234
  * Search Component
248
235
  *
@@ -254,13 +241,13 @@ declare const SearchComponent: React$1.ComponentType;
254
241
  *
255
242
  * @public
256
243
  */
257
- declare const CreateDropdown: () => React$1.JSX.Element | null;
244
+ declare const CreateDropdown: React$1.ComponentType<CreateDropdownProps>;
258
245
  /**
259
246
  * Profile Dropdown
260
247
  *
261
248
  * @public
262
249
  */
263
- declare const ProfileDropdown: () => React$1.JSX.Element | null;
250
+ declare const ProfileDropdown: React$1.ComponentType<ProfileDropdownProps>;
264
251
  /**
265
252
  * Software Templates List
266
253
  *
@@ -292,19 +279,19 @@ declare const LogoutButton: React$1.ComponentType;
292
279
  *
293
280
  * @public
294
281
  */
295
- declare const Spacer: ({ growFactor, minWidth }: SpacerProps) => React$1.JSX.Element;
282
+ declare const Spacer: ({ growFactor, minWidth, layout, }: SpacerProps) => React$1.JSX.Element;
296
283
  /**
297
284
  * @public
298
285
  */
299
- declare const Divider: () => React$1.JSX.Element;
286
+ declare const Divider: ({ layout }: DividerProps) => React$1.JSX.Element;
300
287
  /**
301
288
  * @public
302
289
  */
303
- declare const SupportButton: ({ title, tooltip, color, size, to, }: SupportButtonProps) => React$1.JSX.Element | null;
290
+ declare const SupportButton: ({ title, tooltip, color, size, to, layout, }: SupportButtonProps) => React$1.JSX.Element | null;
304
291
  /**
305
292
  * @public
306
293
  */
307
- declare const NotificationButton: ({ title, tooltip, color, size, badgeColor, to, }: NotificationButtonProps) => React$1.JSX.Element | null;
294
+ declare const NotificationButton: ({ title, tooltip, color, size, badgeColor, to, layout, }: NotificationButtonProps) => React$1.JSX.Element | null;
308
295
  /**
309
296
  * NotificationBanner
310
297
  *
@@ -312,4 +299,4 @@ declare const NotificationButton: ({ title, tooltip, color, size, badgeColor, to
312
299
  */
313
300
  declare const NotificationBanner: (props: NotificationBannerProps) => React$1.JSX.Element | null;
314
301
 
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 };
302
+ 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,CAAE,CAAA,IAAA;AAAA,QAC/C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAKO,MAAM,aAAa,kBAAmB,CAAA,OAAA;AAAA,EAC3C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,YAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,2CAAoC,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,UAAU;AAAA;AACvE,GACD;AACH;A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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,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,CAAE,CAAA,IAAA;AAAA,QAC/C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAKO,MAAM,aAAa,kBAAmB,CAAA,OAAA;AAAA,EAC3C,wBAAyB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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": "0.2.0",
4
4
  "main": "dist/index.esm.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "Apache-2.0",
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;;;;"}