@red-hat-developer-hub/backstage-plugin-global-header 0.0.4 → 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.
- package/CHANGELOG.md +27 -0
- package/app-config.dynamic.yaml +31 -38
- package/dist/components/Divider/Divider.esm.js +16 -0
- package/dist/components/Divider/Divider.esm.js.map +1 -0
- package/dist/components/GlobalHeader.esm.js +5 -90
- package/dist/components/GlobalHeader.esm.js.map +1 -1
- package/dist/components/GlobalHeaderComponent.esm.js +26 -0
- package/dist/components/GlobalHeaderComponent.esm.js.map +1 -0
- package/dist/components/HeaderButton/HeaderButton.esm.js +41 -0
- package/dist/components/HeaderButton/HeaderButton.esm.js.map +1 -0
- package/dist/components/HeaderDropdownComponent/CreateDropdown.esm.js +22 -56
- package/dist/components/HeaderDropdownComponent/CreateDropdown.esm.js.map +1 -1
- package/dist/components/HeaderDropdownComponent/HeaderDropdownComponent.esm.js +13 -10
- package/dist/components/HeaderDropdownComponent/HeaderDropdownComponent.esm.js.map +1 -1
- package/dist/components/HeaderDropdownComponent/MenuSection.esm.js +5 -14
- package/dist/components/HeaderDropdownComponent/MenuSection.esm.js.map +1 -1
- package/dist/components/HeaderDropdownComponent/ProfileDropdown.esm.js +47 -26
- package/dist/components/HeaderDropdownComponent/ProfileDropdown.esm.js.map +1 -1
- package/dist/components/HeaderDropdownComponent/RegisterAComponentSection.esm.js +4 -5
- package/dist/components/HeaderDropdownComponent/RegisterAComponentSection.esm.js.map +1 -1
- package/dist/components/HeaderDropdownComponent/SoftwareTemplatesSection.esm.js +48 -3
- package/dist/components/HeaderDropdownComponent/SoftwareTemplatesSection.esm.js.map +1 -1
- package/dist/components/{HeaderIconButtonComponent → HeaderIcon}/HeaderIcon.esm.js +19 -6
- package/dist/components/HeaderIcon/HeaderIcon.esm.js.map +1 -0
- package/dist/components/HeaderIconButton/HeaderIconButton.esm.js +37 -0
- package/dist/components/HeaderIconButton/HeaderIconButton.esm.js.map +1 -0
- package/dist/components/{HeaderButtonComponent → LogoutButton}/LogoutButton.esm.js +10 -2
- package/dist/components/LogoutButton/LogoutButton.esm.js.map +1 -0
- package/dist/components/{HeaderLinkComponent/HeaderLink.esm.js → MenuItemLink/MenuItemLink.esm.js} +6 -6
- package/dist/components/MenuItemLink/MenuItemLink.esm.js.map +1 -0
- package/dist/components/MenuItemLink/MenuItemLinkContent.esm.js +40 -0
- package/dist/components/MenuItemLink/MenuItemLinkContent.esm.js.map +1 -0
- package/dist/components/NotificationButton/NotificationButton.esm.js +38 -0
- package/dist/components/NotificationButton/NotificationButton.esm.js.map +1 -0
- package/dist/components/SearchComponent/SearchBar.esm.js +37 -7
- package/dist/components/SearchComponent/SearchBar.esm.js.map +1 -1
- package/dist/components/SearchComponent/SearchComponent.esm.js +1 -2
- package/dist/components/SearchComponent/SearchComponent.esm.js.map +1 -1
- package/dist/components/SearchComponent/SearchInput.esm.js +0 -1
- package/dist/components/SearchComponent/SearchInput.esm.js.map +1 -1
- package/dist/components/SearchComponent/SearchOption.esm.js +1 -1
- package/dist/components/SearchComponent/SearchOption.esm.js.map +1 -1
- package/dist/components/SearchComponent/SearchResultItem.esm.js +13 -1
- package/dist/components/SearchComponent/SearchResultItem.esm.js.map +1 -1
- package/dist/components/Spacer/Spacer.esm.js +21 -0
- package/dist/components/Spacer/Spacer.esm.js.map +1 -0
- package/dist/components/SupportButton/SupportButton.esm.js +45 -0
- package/dist/components/SupportButton/SupportButton.esm.js.map +1 -0
- package/dist/defaultMountPoints/defaultMountPoints.esm.js +107 -0
- package/dist/defaultMountPoints/defaultMountPoints.esm.js.map +1 -0
- package/dist/hooks/useCreateDropdownMountPoints.esm.js +4 -0
- package/dist/hooks/useCreateDropdownMountPoints.esm.js.map +1 -1
- package/dist/hooks/useDropdownManager.esm.js +7 -6
- package/dist/hooks/useDropdownManager.esm.js.map +1 -1
- package/dist/hooks/useNotificationCount.esm.js +51 -0
- package/dist/hooks/useNotificationCount.esm.js.map +1 -0
- package/dist/hooks/useProfileDropdownMountPoints.esm.js +4 -0
- package/dist/hooks/useProfileDropdownMountPoints.esm.js.map +1 -1
- package/dist/index.d.ts +177 -41
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/plugin.esm.js +109 -14
- package/dist/plugin.esm.js.map +1 -1
- package/package.json +6 -1
- package/dist/components/HeaderButtonComponent/HeaderButton.esm.js +0 -17
- package/dist/components/HeaderButtonComponent/HeaderButton.esm.js.map +0 -1
- package/dist/components/HeaderButtonComponent/LogoutButton.esm.js.map +0 -1
- package/dist/components/HeaderIconButtonComponent/HeaderIcon.esm.js.map +0 -1
- package/dist/components/HeaderIconButtonComponent/HeaderIconButton.esm.js +0 -25
- package/dist/components/HeaderIconButtonComponent/HeaderIconButton.esm.js.map +0 -1
- package/dist/components/HeaderLinkComponent/HeaderItemContent.esm.js +0 -19
- package/dist/components/HeaderLinkComponent/HeaderItemContent.esm.js.map +0 -1
- package/dist/components/HeaderLinkComponent/HeaderLink.esm.js.map +0 -1
- package/dist/types.esm.js +0 -17
- package/dist/types.esm.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React$1 from 'react';
|
|
1
3
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
2
|
-
import React from 'react';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @public
|
|
@@ -21,58 +22,126 @@ interface NotificationBannerProps {
|
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* @public
|
|
24
|
-
* Create button properties
|
|
25
25
|
*/
|
|
26
|
-
interface
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
interface NotificationButtonProps {
|
|
27
|
+
title?: string;
|
|
28
|
+
tooltip?: string;
|
|
29
|
+
color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
30
|
+
size?: 'small' | 'medium' | 'large';
|
|
31
|
+
badgeColor?: 'primary' | 'secondary' | 'default' | 'error' | 'info' | 'success' | 'warning';
|
|
32
|
+
to?: string;
|
|
33
|
+
layout?: React$1.CSSProperties;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
interface SupportButtonProps {
|
|
40
|
+
title?: string;
|
|
41
|
+
tooltip?: string;
|
|
42
|
+
color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
43
|
+
size?: 'small' | 'medium' | 'large';
|
|
44
|
+
to?: string;
|
|
45
|
+
layout?: React$1.CSSProperties;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
interface DividerProps {
|
|
52
|
+
layout?: React$1.CSSProperties;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
interface SpacerProps {
|
|
59
|
+
growFactor?: number;
|
|
60
|
+
minWidth?: number | string;
|
|
61
|
+
layout?: React$1.CSSProperties;
|
|
30
62
|
}
|
|
31
63
|
|
|
32
64
|
/**
|
|
33
|
-
* Header Icon Button properties
|
|
34
65
|
* @public
|
|
35
66
|
*/
|
|
36
67
|
interface HeaderIconButtonProps {
|
|
68
|
+
title: string;
|
|
37
69
|
icon: string;
|
|
38
|
-
to?: string;
|
|
39
70
|
tooltip?: string;
|
|
71
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'default';
|
|
72
|
+
size?: 'small' | 'medium' | 'large';
|
|
73
|
+
ariaLabel?: string;
|
|
74
|
+
to: string;
|
|
75
|
+
layout?: React$1.CSSProperties;
|
|
40
76
|
}
|
|
41
77
|
|
|
42
78
|
/**
|
|
43
79
|
* @public
|
|
44
|
-
* ProfileDropdown component properties
|
|
45
80
|
*/
|
|
46
|
-
interface
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
81
|
+
interface HeaderIconProps {
|
|
82
|
+
icon: string;
|
|
83
|
+
size?: 'small' | 'medium' | 'large';
|
|
84
|
+
layout?: React$1.CSSProperties;
|
|
50
85
|
}
|
|
51
86
|
|
|
52
87
|
/**
|
|
53
|
-
* Header Icon Button properties
|
|
54
88
|
* @public
|
|
55
89
|
*/
|
|
56
|
-
interface
|
|
57
|
-
|
|
58
|
-
title?: string;
|
|
59
|
-
subTitle?: string;
|
|
60
|
-
icon?: string;
|
|
90
|
+
interface HeaderButtonProps {
|
|
91
|
+
title: string;
|
|
61
92
|
tooltip?: string;
|
|
93
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'default';
|
|
94
|
+
size?: 'small' | 'medium' | 'large';
|
|
95
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
96
|
+
ariaLabel?: string;
|
|
97
|
+
startIcon?: string;
|
|
98
|
+
endIcon?: string;
|
|
99
|
+
externalLinkIcon?: boolean;
|
|
100
|
+
to: string;
|
|
101
|
+
layout?: React$1.CSSProperties;
|
|
62
102
|
}
|
|
63
103
|
|
|
64
104
|
/**
|
|
65
|
-
*
|
|
105
|
+
* Global Header Config
|
|
66
106
|
*
|
|
67
107
|
* @public
|
|
68
108
|
*/
|
|
69
|
-
interface
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
109
|
+
interface GlobalHeaderComponentMountPointConfig {
|
|
110
|
+
priority?: number;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Global Header Component Mount Point
|
|
114
|
+
*
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
interface GlobalHeaderComponentMountPoint {
|
|
118
|
+
Component: React.ComponentType<{
|
|
119
|
+
layout?: React.CSSProperties;
|
|
120
|
+
}>;
|
|
121
|
+
config?: GlobalHeaderComponentMountPointConfig & {
|
|
122
|
+
props?: Record<string, any>;
|
|
123
|
+
layout?: React.CSSProperties;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Global Header Component properties
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
interface GlobalHeaderComponentProps {
|
|
132
|
+
globalHeaderMountPoints: GlobalHeaderComponentMountPoint[];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Header Icon Button properties
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
interface MenuItemLinkProps {
|
|
140
|
+
to: string;
|
|
141
|
+
title?: string;
|
|
142
|
+
subTitle?: string;
|
|
73
143
|
icon?: string;
|
|
74
|
-
|
|
75
|
-
link?: string;
|
|
144
|
+
tooltip?: string;
|
|
76
145
|
}
|
|
77
146
|
|
|
78
147
|
/**
|
|
@@ -81,7 +150,6 @@ interface MenuItemConfig {
|
|
|
81
150
|
* @public
|
|
82
151
|
*/
|
|
83
152
|
type SoftwareTemplatesSectionProps = {
|
|
84
|
-
items: MenuItemConfig[];
|
|
85
153
|
handleClose: () => void;
|
|
86
154
|
hideDivider?: boolean;
|
|
87
155
|
};
|
|
@@ -96,6 +164,42 @@ type RegisterAComponentSectionProps = {
|
|
|
96
164
|
handleClose: () => void;
|
|
97
165
|
};
|
|
98
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
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Menu item configuration
|
|
185
|
+
*
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
interface MenuItemConfig {
|
|
189
|
+
Component: React$1.ComponentType<MenuItemLinkProps | {}>;
|
|
190
|
+
label: string;
|
|
191
|
+
icon?: string;
|
|
192
|
+
subLabel?: string;
|
|
193
|
+
link?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* default Global Header Components mount points
|
|
198
|
+
*
|
|
199
|
+
* @public
|
|
200
|
+
*/
|
|
201
|
+
declare const defaultGlobalHeaderComponentsMountPoints: GlobalHeaderComponentMountPoint[];
|
|
202
|
+
|
|
99
203
|
/**
|
|
100
204
|
* Global Header Plugin
|
|
101
205
|
*
|
|
@@ -107,60 +211,92 @@ declare const globalHeaderPlugin: _backstage_core_plugin_api.BackstagePlugin<{},
|
|
|
107
211
|
*
|
|
108
212
|
* @public
|
|
109
213
|
*/
|
|
110
|
-
declare const GlobalHeader: () => React.JSX.Element;
|
|
214
|
+
declare const GlobalHeader: () => React$1.JSX.Element;
|
|
111
215
|
/**
|
|
112
|
-
*
|
|
216
|
+
* Global Header Component
|
|
113
217
|
*
|
|
114
218
|
* @public
|
|
115
219
|
*/
|
|
116
|
-
declare const
|
|
220
|
+
declare const GlobalHeaderComponent: React$1.ComponentType<GlobalHeaderComponentProps>;
|
|
117
221
|
/**
|
|
118
|
-
*
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
224
|
+
declare const HeaderButton: ({ title, tooltip, color, size, variant, ariaLabel, startIcon, endIcon, externalLinkIcon, to, layout, }: HeaderButtonProps) => React$1.JSX.Element;
|
|
225
|
+
/**
|
|
226
|
+
* @public
|
|
227
|
+
*/
|
|
228
|
+
declare const HeaderIcon: ({ icon, size, layout, }: HeaderIconProps) => React$1.JSX.Element | null;
|
|
229
|
+
/**
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
declare const HeaderIconButton: ({ title, icon, tooltip, color, size, ariaLabel, to, layout, }: HeaderIconButtonProps) => React$1.JSX.Element;
|
|
233
|
+
/**
|
|
234
|
+
* Search Component
|
|
119
235
|
*
|
|
120
236
|
* @public
|
|
121
237
|
*/
|
|
122
|
-
declare const
|
|
238
|
+
declare const SearchComponent: React$1.ComponentType;
|
|
123
239
|
/**
|
|
124
|
-
*
|
|
240
|
+
* Create Dropdown
|
|
125
241
|
*
|
|
126
242
|
* @public
|
|
127
243
|
*/
|
|
128
|
-
declare const
|
|
244
|
+
declare const CreateDropdown: React$1.ComponentType<CreateDropdownProps>;
|
|
129
245
|
/**
|
|
130
246
|
* Profile Dropdown
|
|
131
247
|
*
|
|
132
248
|
* @public
|
|
133
249
|
*/
|
|
134
|
-
declare const ProfileDropdown: React.ComponentType<ProfileDropdownProps>;
|
|
250
|
+
declare const ProfileDropdown: React$1.ComponentType<ProfileDropdownProps>;
|
|
135
251
|
/**
|
|
136
252
|
* Software Templates List
|
|
137
253
|
*
|
|
138
254
|
* @public
|
|
139
255
|
*/
|
|
140
|
-
declare const SoftwareTemplatesSection: React.ComponentType<SoftwareTemplatesSectionProps>;
|
|
256
|
+
declare const SoftwareTemplatesSection: React$1.ComponentType<SoftwareTemplatesSectionProps>;
|
|
141
257
|
/**
|
|
142
258
|
* Register A Component Link
|
|
143
259
|
*
|
|
144
260
|
* @public
|
|
145
261
|
*/
|
|
146
|
-
declare const RegisterAComponentSection: React.ComponentType<RegisterAComponentSectionProps>;
|
|
262
|
+
declare const RegisterAComponentSection: React$1.ComponentType<RegisterAComponentSectionProps>;
|
|
147
263
|
/**
|
|
148
264
|
* Header Link
|
|
149
265
|
*
|
|
150
266
|
* @public
|
|
151
267
|
*/
|
|
152
|
-
declare const
|
|
268
|
+
declare const MenuItemLink: React$1.ComponentType<MenuItemLinkProps>;
|
|
153
269
|
/**
|
|
154
270
|
* Header Logout Button
|
|
155
271
|
*
|
|
156
272
|
* @public
|
|
157
273
|
*/
|
|
158
|
-
declare const LogoutButton: React.ComponentType;
|
|
274
|
+
declare const LogoutButton: React$1.ComponentType;
|
|
275
|
+
/**
|
|
276
|
+
* Spacer component that allow users to add a flexibel spacing between components.
|
|
277
|
+
*
|
|
278
|
+
* Supports two props: `growFactor` with default 1 and `minWidth` width default 8 pixels.
|
|
279
|
+
*
|
|
280
|
+
* @public
|
|
281
|
+
*/
|
|
282
|
+
declare const Spacer: ({ growFactor, minWidth, layout, }: SpacerProps) => React$1.JSX.Element;
|
|
283
|
+
/**
|
|
284
|
+
* @public
|
|
285
|
+
*/
|
|
286
|
+
declare const Divider: ({ layout }: DividerProps) => React$1.JSX.Element;
|
|
287
|
+
/**
|
|
288
|
+
* @public
|
|
289
|
+
*/
|
|
290
|
+
declare const SupportButton: ({ title, tooltip, color, size, to, layout, }: SupportButtonProps) => React$1.JSX.Element | null;
|
|
291
|
+
/**
|
|
292
|
+
* @public
|
|
293
|
+
*/
|
|
294
|
+
declare const NotificationButton: ({ title, tooltip, color, size, badgeColor, to, layout, }: NotificationButtonProps) => React$1.JSX.Element | null;
|
|
159
295
|
/**
|
|
160
296
|
* NotificationBanner
|
|
161
297
|
*
|
|
162
298
|
* @public
|
|
163
299
|
*/
|
|
164
|
-
declare const NotificationBanner: (props: NotificationBannerProps) => React.JSX.Element | null;
|
|
300
|
+
declare const NotificationBanner: (props: NotificationBannerProps) => React$1.JSX.Element | null;
|
|
165
301
|
|
|
166
|
-
export { type
|
|
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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { unstable_ClassNameGenerator } from '@mui/material/className';
|
|
2
|
-
export { CreateDropdown, GlobalHeader,
|
|
2
|
+
export { CreateDropdown, Divider, GlobalHeader, GlobalHeaderComponent, HeaderButton, HeaderIcon, HeaderIconButton, LogoutButton, MenuItemLink, NotificationBanner, NotificationButton, ProfileDropdown, RegisterAComponentSection, SearchComponent, SoftwareTemplatesSection, Spacer, SupportButton, globalHeaderPlugin } from './plugin.esm.js';
|
|
3
|
+
export { defaultGlobalHeaderComponentsMountPoints } from './defaultMountPoints/defaultMountPoints.esm.js';
|
|
3
4
|
|
|
4
5
|
unstable_ClassNameGenerator.configure((componentName) => {
|
|
5
6
|
return componentName.startsWith("v5-") ? componentName : `v5-${componentName}`;
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\n\nClassNameGenerator.configure(componentName => {\n return componentName.startsWith('v5-')\n ? componentName\n : `v5-${componentName}`;\n});\n\nexport * from './plugin';\n"],"names":["ClassNameGenerator"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\n\nClassNameGenerator.configure(componentName => {\n return componentName.startsWith('v5-')\n ? componentName\n : `v5-${componentName}`;\n});\n\nexport * from './plugin';\n"],"names":["ClassNameGenerator"],"mappings":";;;;AAiBAA,2BAAA,CAAmB,UAAU,CAAiB,aAAA,KAAA;AAC5C,EAAA,OAAO,cAAc,UAAW,CAAA,KAAK,CACjC,GAAA,aAAA,GACA,MAAM,aAAa,CAAA,CAAA;AACzB,CAAC,CAAA"}
|
package/dist/plugin.esm.js
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import { createPlugin, createComponentExtension } from '@backstage/core-plugin-api';
|
|
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';
|
|
2
31
|
|
|
3
32
|
const globalHeaderPlugin = createPlugin({
|
|
4
33
|
id: "global-header"
|
|
@@ -11,6 +40,44 @@ const GlobalHeader = globalHeaderPlugin.provide(
|
|
|
11
40
|
}
|
|
12
41
|
})
|
|
13
42
|
);
|
|
43
|
+
const GlobalHeaderComponent = globalHeaderPlugin.provide(
|
|
44
|
+
createComponentExtension({
|
|
45
|
+
name: "GlobalHeaderComponent",
|
|
46
|
+
component: {
|
|
47
|
+
lazy: () => import('./components/GlobalHeaderComponent.esm.js').then(
|
|
48
|
+
(m) => m.GlobalHeaderComponent
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
);
|
|
53
|
+
const HeaderButton = globalHeaderPlugin.provide(
|
|
54
|
+
createComponentExtension({
|
|
55
|
+
name: "HeaderButton",
|
|
56
|
+
component: {
|
|
57
|
+
lazy: () => import('./components/HeaderButton/HeaderButton.esm.js').then(
|
|
58
|
+
(m) => m.HeaderButton
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
const HeaderIcon = globalHeaderPlugin.provide(
|
|
64
|
+
createComponentExtension({
|
|
65
|
+
name: "HeaderIcon",
|
|
66
|
+
component: {
|
|
67
|
+
lazy: () => import('./components/HeaderIcon/HeaderIcon.esm.js').then((m) => m.HeaderIcon)
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
);
|
|
71
|
+
const HeaderIconButton = globalHeaderPlugin.provide(
|
|
72
|
+
createComponentExtension({
|
|
73
|
+
name: "HeaderIconButton",
|
|
74
|
+
component: {
|
|
75
|
+
lazy: () => import('./components/HeaderIconButton/HeaderIconButton.esm.js').then(
|
|
76
|
+
(m) => m.HeaderIconButton
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
);
|
|
14
81
|
const SearchComponent = globalHeaderPlugin.provide(
|
|
15
82
|
createComponentExtension({
|
|
16
83
|
name: "SearchComponent",
|
|
@@ -31,14 +98,6 @@ const CreateDropdown = globalHeaderPlugin.provide(
|
|
|
31
98
|
}
|
|
32
99
|
})
|
|
33
100
|
);
|
|
34
|
-
const HeaderIconButton = globalHeaderPlugin.provide(
|
|
35
|
-
createComponentExtension({
|
|
36
|
-
name: "HeaderIconButton",
|
|
37
|
-
component: {
|
|
38
|
-
lazy: () => import('./components/HeaderIconButtonComponent/HeaderIconButton.esm.js').then((m) => m.HeaderIconButton)
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
);
|
|
42
101
|
const ProfileDropdown = globalHeaderPlugin.provide(
|
|
43
102
|
createComponentExtension({
|
|
44
103
|
name: "ProfileDropdown",
|
|
@@ -65,12 +124,12 @@ const RegisterAComponentSection = globalHeaderPlugin.provide(
|
|
|
65
124
|
}
|
|
66
125
|
})
|
|
67
126
|
);
|
|
68
|
-
const
|
|
127
|
+
const MenuItemLink = globalHeaderPlugin.provide(
|
|
69
128
|
createComponentExtension({
|
|
70
|
-
name: "
|
|
129
|
+
name: "MenuItemLink",
|
|
71
130
|
component: {
|
|
72
|
-
lazy: () => import('./components/
|
|
73
|
-
(m) => m.
|
|
131
|
+
lazy: () => import('./components/MenuItemLink/MenuItemLink.esm.js').then(
|
|
132
|
+
(m) => m.MenuItemLink
|
|
74
133
|
)
|
|
75
134
|
}
|
|
76
135
|
})
|
|
@@ -79,12 +138,48 @@ const LogoutButton = globalHeaderPlugin.provide(
|
|
|
79
138
|
createComponentExtension({
|
|
80
139
|
name: "LogoutButton",
|
|
81
140
|
component: {
|
|
82
|
-
lazy: () => import('./components/
|
|
141
|
+
lazy: () => import('./components/LogoutButton/LogoutButton.esm.js').then(
|
|
83
142
|
(m) => m.LogoutButton
|
|
84
143
|
)
|
|
85
144
|
}
|
|
86
145
|
})
|
|
87
146
|
);
|
|
147
|
+
const Spacer = globalHeaderPlugin.provide(
|
|
148
|
+
createComponentExtension({
|
|
149
|
+
name: "Spacer",
|
|
150
|
+
component: {
|
|
151
|
+
lazy: () => import('./components/Spacer/Spacer.esm.js').then((m) => m.Spacer)
|
|
152
|
+
}
|
|
153
|
+
})
|
|
154
|
+
);
|
|
155
|
+
const Divider = globalHeaderPlugin.provide(
|
|
156
|
+
createComponentExtension({
|
|
157
|
+
name: "Divider",
|
|
158
|
+
component: {
|
|
159
|
+
lazy: () => import('./components/Divider/Divider.esm.js').then((m) => m.Divider)
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
);
|
|
163
|
+
const SupportButton = globalHeaderPlugin.provide(
|
|
164
|
+
createComponentExtension({
|
|
165
|
+
name: "SupportButton",
|
|
166
|
+
component: {
|
|
167
|
+
lazy: () => import('./components/SupportButton/SupportButton.esm.js').then(
|
|
168
|
+
(m) => m.SupportButton
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
);
|
|
173
|
+
const NotificationButton = globalHeaderPlugin.provide(
|
|
174
|
+
createComponentExtension({
|
|
175
|
+
name: "NotificationButton",
|
|
176
|
+
component: {
|
|
177
|
+
lazy: () => import('./components/NotificationButton/NotificationButton.esm.js').then(
|
|
178
|
+
(m) => m.NotificationButton
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
);
|
|
88
183
|
const NotificationBanner = globalHeaderPlugin.provide(
|
|
89
184
|
createComponentExtension({
|
|
90
185
|
name: "NotificationBanner",
|
|
@@ -96,5 +191,5 @@ const NotificationBanner = globalHeaderPlugin.provide(
|
|
|
96
191
|
})
|
|
97
192
|
);
|
|
98
193
|
|
|
99
|
-
export { CreateDropdown, GlobalHeader,
|
|
194
|
+
export { CreateDropdown, Divider, GlobalHeader, GlobalHeaderComponent, HeaderButton, HeaderIcon, HeaderIconButton, LogoutButton, MenuItemLink, NotificationBanner, NotificationButton, ProfileDropdown, RegisterAComponentSection, SearchComponent, SoftwareTemplatesSection, Spacer, SupportButton, globalHeaderPlugin };
|
|
100
195
|
//# sourceMappingURL=plugin.esm.js.map
|
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';\nimport {\n createPlugin,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\nimport { CreateButtonProps } from './components/HeaderDropdownComponent/CreateDropdown';\nimport { HeaderIconButtonProps } from './components/HeaderIconButtonComponent/HeaderIconButton';\nimport { ProfileDropdownProps } from './components/HeaderDropdownComponent/ProfileDropdown';\nimport { HeaderLinkProps } from './components/HeaderLinkComponent/HeaderLink';\nimport { SoftwareTemplatesSectionProps } from './components/HeaderDropdownComponent/SoftwareTemplatesSection';\nimport { RegisterAComponentSectionProps } from './components/HeaderDropdownComponent/RegisterAComponentSection';\n\nexport type { CreateButtonProps } from './components/HeaderDropdownComponent/CreateDropdown';\nexport type { HeaderLinkProps } from './components/HeaderLinkComponent/HeaderLink';\nexport type { MenuItemConfig } from './components/HeaderDropdownComponent/MenuSection';\nexport type { SoftwareTemplatesSectionProps } from './components/HeaderDropdownComponent/SoftwareTemplatesSection';\nexport type { RegisterAComponentSectionProps } from './components/HeaderDropdownComponent/RegisterAComponentSection';\nexport type { HeaderIconButtonProps } from './components/HeaderIconButtonComponent/HeaderIconButton';\nexport type { ProfileDropdownProps } from './components/HeaderDropdownComponent/ProfileDropdown';\n\nexport type {\n NotificationBannerProps,\n NotificationBannerDismiss,\n} from './components/NotificationBanner';\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 * 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<CreateButtonProps> =\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 * Header Icon Button\n *\n * @public\n */\nexport const HeaderIconButton: React.ComponentType<HeaderIconButtonProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderIconButton',\n component: {\n lazy: () =>\n import(\n './components/HeaderIconButtonComponent/HeaderIconButton'\n ).then(m => m.HeaderIconButton),\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 HeaderLink: React.ComponentType<HeaderLinkProps> =\n globalHeaderPlugin.provide(\n createComponentExtension({\n name: 'HeaderLink',\n component: {\n lazy: () =>\n import('./components/HeaderLinkComponent/HeaderLink').then(\n m => m.HeaderLink,\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/HeaderButtonComponent/LogoutButton').then(\n m => m.LogoutButton,\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":";;AA8CO,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,EAA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K,CAAA,CAAA,CAAA,KAAK,EAAE,wBAAwB;AAAA;AAC1C,GACD;AACH;AAOK,MAAM,4BACX,kBAAmB,CAAA,OAAA;AAAA,EACjB,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,2BAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MACJ,OACE,uEACF,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,yBAAyB;AAAA;AAC3C,GACD;AACH;AAOK,MAAM,aACX,kBAAmB,CAAA,OAAA;AAAA,EACjB,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,YAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,oDAA6C,CAAE,CAAA,IAAA;AAAA,QACpD,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOK,MAAM,eAAoC,kBAAmB,CAAA,OAAA;AAAA,EAClE,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,cAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,wDAAiD,CAAE,CAAA,IAAA;AAAA,QACxD,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,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
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-global-header",
|
|
3
|
-
"version": "0.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",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"@backstage/core-components": "^0.16.3",
|
|
38
38
|
"@backstage/core-plugin-api": "^1.10.3",
|
|
39
39
|
"@backstage/plugin-catalog-react": "^1.15.1",
|
|
40
|
+
"@backstage/plugin-notifications": "^0.5.1",
|
|
41
|
+
"@backstage/plugin-notifications-common": "^0.0.8",
|
|
40
42
|
"@backstage/plugin-search": "^1.4.22",
|
|
41
43
|
"@backstage/plugin-search-backend": "^1.8.1",
|
|
42
44
|
"@backstage/plugin-search-backend-module-catalog": "^0.3.0",
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
"@backstage/plugin-search-backend-module-techdocs": "^0.3.5",
|
|
45
47
|
"@backstage/plugin-search-common": "^1.2.17",
|
|
46
48
|
"@backstage/plugin-search-react": "^1.8.5",
|
|
49
|
+
"@backstage/plugin-signals-react": "^0.0.9",
|
|
47
50
|
"@backstage/theme": "^0.6.3",
|
|
48
51
|
"@mui/icons-material": "5.16.13",
|
|
49
52
|
"@mui/material": "5.16.13",
|
|
@@ -61,9 +64,11 @@
|
|
|
61
64
|
"@backstage/cli": "^0.29.5",
|
|
62
65
|
"@backstage/core-app-api": "^1.15.4",
|
|
63
66
|
"@backstage/dev-utils": "^1.1.6",
|
|
67
|
+
"@backstage/frontend-test-utils": "^0.2.5",
|
|
64
68
|
"@backstage/plugin-search-common": "^1.2.17",
|
|
65
69
|
"@backstage/test-utils": "^1.7.4",
|
|
66
70
|
"@openshift/dynamic-plugin-sdk": "^5.0.1",
|
|
71
|
+
"@redhat-developer/red-hat-developer-hub-theme": "^0.5.0",
|
|
67
72
|
"@testing-library/jest-dom": "^6.0.0",
|
|
68
73
|
"@testing-library/react": "^14.0.0",
|
|
69
74
|
"@testing-library/user-event": "^14.0.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Box from '@mui/material/Box';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import HeaderItemContent from '../HeaderLinkComponent/HeaderItemContent.esm.js';
|
|
4
|
-
|
|
5
|
-
const HeaderButton = ({ title, icon, onClick }) => {
|
|
6
|
-
return /* @__PURE__ */ React.createElement(
|
|
7
|
-
Box,
|
|
8
|
-
{
|
|
9
|
-
onClick,
|
|
10
|
-
sx: { cursor: "pointer", width: "100%", color: "inherit" }
|
|
11
|
-
},
|
|
12
|
-
/* @__PURE__ */ React.createElement(HeaderItemContent, { icon, label: title })
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { HeaderButton };
|
|
17
|
-
//# sourceMappingURL=HeaderButton.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderButton.esm.js","sources":["../../../src/components/HeaderButtonComponent/HeaderButton.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 Box from '@mui/material/Box';\nimport React from 'react';\nimport HeaderItemContent from '../HeaderLinkComponent/HeaderItemContent';\n\nexport type HeaderButtonProps = {\n title: string;\n icon: string;\n onClick?: () => void;\n};\n\nexport const HeaderButton = ({ title, icon, onClick }: HeaderButtonProps) => {\n return (\n <Box\n onClick={onClick}\n sx={{ cursor: 'pointer', width: '100%', color: 'inherit' }}\n >\n <HeaderItemContent icon={icon} label={title} />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;AA0BO,MAAM,eAAe,CAAC,EAAE,KAAO,EAAA,IAAA,EAAM,SAAiC,KAAA;AAC3E,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,IAAI,EAAE,MAAA,EAAQ,WAAW,KAAO,EAAA,MAAA,EAAQ,OAAO,SAAU;AAAA,KAAA;AAAA,oBAExD,KAAA,CAAA,aAAA,CAAA,iBAAA,EAAA,EAAkB,IAAY,EAAA,KAAA,EAAO,KAAO,EAAA;AAAA,GAC/C;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogoutButton.esm.js","sources":["../../../src/components/HeaderButtonComponent/LogoutButton.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n errorApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { HeaderButton } from './HeaderButton';\n\nexport const LogoutButton = () => {\n const errorApi = useApi(errorApiRef);\n const identityApi = useApi(identityApiRef);\n\n const handleLogout = () => {\n identityApi.signOut().catch(error => errorApi.post(error));\n };\n\n return <HeaderButton title=\"Logout\" icon=\"logout\" onClick={handleLogout} />;\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,eAAe,MAAM;AAChC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AAEzC,EAAA,MAAM,eAAe,MAAM;AACzB,IAAA,WAAA,CAAY,SAAU,CAAA,KAAA,CAAM,WAAS,QAAS,CAAA,IAAA,CAAK,KAAK,CAAC,CAAA;AAAA,GAC3D;AAEA,EAAA,2CAAQ,YAAa,EAAA,EAAA,KAAA,EAAM,UAAS,IAAK,EAAA,QAAA,EAAS,SAAS,YAAc,EAAA,CAAA;AAC3E;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderIcon.esm.js","sources":["../../../src/components/HeaderIconButtonComponent/HeaderIcon.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\nimport MuiIcon from '@mui/material/Icon';\nimport Box from '@mui/material/Box';\n\ninterface HeaderIconProps {\n icon: string;\n styles?: React.CSSProperties;\n}\n\nexport const HeaderIcon = ({ icon, styles }: HeaderIconProps) => {\n const app = useApp();\n if (!icon) {\n return null;\n }\n\n const SystemIcon = app.getSystemIcon(icon);\n\n if (SystemIcon) {\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', ...styles }}>\n <SystemIcon fontSize=\"small\" />\n </Box>\n );\n }\n\n if (icon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(icon)}`;\n return (\n <MuiIcon style={{ fontSize: 20, ...styles }}>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n icon.startsWith('https://') ||\n icon.startsWith('http://') ||\n icon.startsWith('/')\n ) {\n return (\n <MuiIcon\n style={{ fontSize: 20, ...styles }}\n baseClassName=\"material-icons-outlined\"\n >\n <img src={icon} alt=\"\" />\n </MuiIcon>\n );\n }\n\n return (\n <MuiIcon style={{ fontSize: 20 }} baseClassName=\"material-icons-outlined\">\n {icon}\n </MuiIcon>\n );\n};\n"],"names":[],"mappings":";;;;;AAyBO,MAAM,UAAa,GAAA,CAAC,EAAE,IAAA,EAAM,QAA8B,KAAA;AAC/D,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA;AAAA;AAGT,EAAM,MAAA,UAAA,GAAa,GAAI,CAAA,aAAA,CAAc,IAAI,CAAA;AAEzC,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,EAAE,SAAS,MAAQ,EAAA,UAAA,EAAY,QAAU,EAAA,GAAG,QACnD,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,QAAA,EAAS,SAAQ,CAC/B,CAAA;AAAA;AAIJ,EAAI,IAAA,IAAA,CAAK,UAAW,CAAA,MAAM,CAAG,EAAA;AAC3B,IAAA,MAAM,UAAa,GAAA,CAAA,0BAAA,EAA6B,IAAK,CAAA,IAAI,CAAC,CAAA,CAAA;AAC1D,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAQ,KAAO,EAAA,EAAE,UAAU,EAAI,EAAA,GAAG,MAAO,EAAA,EAAA,sCACvC,KAAI,EAAA,EAAA,GAAA,EAAK,UAAY,EAAA,GAAA,EAAI,IAAG,CAC/B,CAAA;AAAA;AAIJ,EACE,IAAA,IAAA,CAAK,UAAW,CAAA,UAAU,CAC1B,IAAA,IAAA,CAAK,UAAW,CAAA,SAAS,CACzB,IAAA,IAAA,CAAK,UAAW,CAAA,GAAG,CACnB,EAAA;AACA,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,KAAO,EAAA,EAAE,QAAU,EAAA,EAAA,EAAI,GAAG,MAAO,EAAA;AAAA,QACjC,aAAc,EAAA;AAAA,OAAA;AAAA,sBAEb,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,GAAK,EAAA,IAAA,EAAM,KAAI,EAAG,EAAA;AAAA,KACzB;AAAA;AAIJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,WAAQ,KAAO,EAAA,EAAE,UAAU,EAAG,EAAA,EAAG,aAAc,EAAA,yBAAA,EAAA,EAC7C,IACH,CAAA;AAEJ;;;;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import IconButton from '@mui/material/IconButton';
|
|
3
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
4
|
-
import { HeaderIcon } from './HeaderIcon.esm.js';
|
|
5
|
-
import { Link } from 'react-router-dom';
|
|
6
|
-
|
|
7
|
-
const HeaderIconButton = ({
|
|
8
|
-
icon,
|
|
9
|
-
tooltip,
|
|
10
|
-
to
|
|
11
|
-
}) => {
|
|
12
|
-
return /* @__PURE__ */ React.createElement(Tooltip, { title: tooltip ?? icon }, /* @__PURE__ */ React.createElement(
|
|
13
|
-
IconButton,
|
|
14
|
-
{
|
|
15
|
-
color: "inherit",
|
|
16
|
-
"aria-label": "help",
|
|
17
|
-
sx: { mr: 1.5 },
|
|
18
|
-
...to ? { component: Link, to } : {}
|
|
19
|
-
},
|
|
20
|
-
tooltip !== "Support" && /* @__PURE__ */ React.createElement(HeaderIcon, { icon })
|
|
21
|
-
));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { HeaderIconButton };
|
|
25
|
-
//# sourceMappingURL=HeaderIconButton.esm.js.map
|