From 421a4421c2023f9dc59b13e3a8f362387c733fc2 Mon Sep 17 00:00:00 2001 From: rohitratannagar Date: Tue, 16 Jun 2026 13:48:35 +0530 Subject: [PATCH 1/4] feat(global-header): Promote global-header NFS plugin from /alpha to stable Signed-off-by: rohitratannagar --- .../promote-global-header-nfs-stable.md | 5 ++ .../packages/app-legacy/src/App.tsx | 2 +- .../app-legacy/src/components/Root/Root.tsx | 2 +- .../global-header/packages/app/src/App.tsx | 2 +- .../plugins/global-header/package.json | 13 ++- .../plugins/global-header/src/alpha/index.ts | 79 +----------------- .../plugins/global-header/src/alpha/plugin.ts | 2 +- .../plugins/global-header/src/index.ts | 82 ++++++++++++++++++- .../plugins/global-header/src/legacy.ts | 34 ++++++++ 9 files changed, 138 insertions(+), 83 deletions(-) create mode 100644 workspaces/global-header/.changeset/promote-global-header-nfs-stable.md create mode 100644 workspaces/global-header/plugins/global-header/src/legacy.ts diff --git a/workspaces/global-header/.changeset/promote-global-header-nfs-stable.md b/workspaces/global-header/.changeset/promote-global-header-nfs-stable.md new file mode 100644 index 00000000000..09459c5d493 --- /dev/null +++ b/workspaces/global-header/.changeset/promote-global-header-nfs-stable.md @@ -0,0 +1,5 @@ +--- +'@red-hat-developer-hub/backstage-plugin-global-header': minor +--- + +Promote global-header NFS plugin from `/alpha` to stable. The NFS-related extensions, components, and APIs are now exported from the main package entry point. Alpha exports are preserved as re-exports for backwards compatibility. diff --git a/workspaces/global-header/packages/app-legacy/src/App.tsx b/workspaces/global-header/packages/app-legacy/src/App.tsx index 20af4f401a3..c009a3e7d2a 100644 --- a/workspaces/global-header/packages/app-legacy/src/App.tsx +++ b/workspaces/global-header/packages/app-legacy/src/App.tsx @@ -58,7 +58,7 @@ import { NotificationsPage } from '@backstage/plugin-notifications'; import { githubAuthApiRef } from '@backstage/core-plugin-api'; import { getAllThemes } from '@red-hat-developer-hub/backstage-plugin-theme'; -import { globalHeaderTranslations } from '@red-hat-developer-hub/backstage-plugin-global-header'; +import { globalHeaderTranslations } from '@red-hat-developer-hub/backstage-plugin-global-header/legacy'; import ManageAccounts from '@mui/icons-material/ManageAccountsOutlined'; import AccountCircleOutlinedIcon from '@mui/icons-material/AccountCircleOutlined'; import Logout from '@mui/icons-material/LogoutOutlined'; diff --git a/workspaces/global-header/packages/app-legacy/src/components/Root/Root.tsx b/workspaces/global-header/packages/app-legacy/src/components/Root/Root.tsx index 1979c0a71ed..a34ff64c535 100644 --- a/workspaces/global-header/packages/app-legacy/src/components/Root/Root.tsx +++ b/workspaces/global-header/packages/app-legacy/src/components/Root/Root.tsx @@ -35,7 +35,7 @@ import { MyGroupsSidebarItem } from '@backstage/plugin-org'; import { GlobalHeaderComponent, defaultGlobalHeaderComponentsMountPoints, -} from '@red-hat-developer-hub/backstage-plugin-global-header'; +} from '@red-hat-developer-hub/backstage-plugin-global-header/legacy'; import { NotificationsSidebarItem } from '@backstage/plugin-notifications'; /** This component is copy pasted from RHDH and should be kept in sync. */ diff --git a/workspaces/global-header/packages/app/src/App.tsx b/workspaces/global-header/packages/app/src/App.tsx index 3083ac37109..3be9e4b28d9 100644 --- a/workspaces/global-header/packages/app/src/App.tsx +++ b/workspaces/global-header/packages/app/src/App.tsx @@ -28,7 +28,7 @@ import { globalHeaderTranslationsModule, GlobalHeaderMenuItemBlueprint, GlobalHeaderMenuItem, -} from '@red-hat-developer-hub/backstage-plugin-global-header/alpha'; +} from '@red-hat-developer-hub/backstage-plugin-global-header'; import { navModule } from './modules/nav'; const signInModule = createFrontendModule({ diff --git a/workspaces/global-header/plugins/global-header/package.json b/workspaces/global-header/plugins/global-header/package.json index ea7c9a00a10..03e851a0f0e 100644 --- a/workspaces/global-header/plugins/global-header/package.json +++ b/workspaces/global-header/plugins/global-header/package.json @@ -6,6 +6,7 @@ "exports": { ".": "./src/index.ts", "./alpha": "./src/alpha/index.ts", + "./legacy": "./src/legacy.ts", "./package.json": "./package.json" }, "typesVersions": { @@ -13,6 +14,9 @@ "alpha": [ "src/alpha/index.ts" ], + "legacy": [ + "src/legacy.ts" + ], "package.json": [ "package.json" ] @@ -102,5 +106,12 @@ "dist", "config.d.ts" ], - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "scalprum": { + "name": "red-hat-developer-hub.backstage-plugin-global-header", + "exposedModules": { + "PluginRoot": "./src/legacy.ts", + "Alpha": "./src/index.ts" + } + } } diff --git a/workspaces/global-header/plugins/global-header/src/alpha/index.ts b/workspaces/global-header/plugins/global-header/src/alpha/index.ts index 38e727ddd88..ed3bc5e25a6 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/index.ts +++ b/workspaces/global-header/plugins/global-header/src/alpha/index.ts @@ -15,82 +15,9 @@ */ /** - * New Frontend System API surface for the global header plugin. - * - * @alpha + * @deprecated Use the root import instead: `import from '@red-hat-developer-hub/backstage-plugin-global-header'` * @packageDocumentation */ -import { createFrontendModule } from '@backstage/frontend-plugin-api'; -import { TranslationBlueprint } from '@backstage/plugin-app-react'; -import { globalHeaderTranslations } from '../translations'; - -// ── Core: plugin + module ────────────────────────────────────────────── - -export { default } from './plugin'; -export { globalHeaderModule } from './extensions/globalHeaderModule'; - -// ── Blueprints: for other plugins to contribute header items ─────────── - -export { - GlobalHeaderComponentBlueprint, - GlobalHeaderMenuItemBlueprint, -} from './extensions/blueprints'; -export type { - ToolbarComponentParams, - MenuItemParams, -} from './extensions/blueprints'; - -// ── Data refs ────────────────────────────────────────────────────────── - -export { - globalHeaderComponentDataRef, - globalHeaderMenuItemDataRef, -} from './extensions/dataRefs'; - -// ── Context hooks for custom dropdown components ─────────────────────── - -export { - useGlobalHeaderComponents, - useGlobalHeaderMenuItems, -} from './extensions/GlobalHeaderContext'; - -// ── Types ────────────────────────────────────────────────────────────── - -export type { - GlobalHeaderComponentData, - GlobalHeaderMenuItemData, -} from './types'; - -// ── Building block components for plugin authors ─────────────────────── - -export { HeaderIconButton as GlobalHeaderIconButton } from '../components/HeaderIconButton/HeaderIconButton'; -export type { HeaderIconButtonProps } from '../components/HeaderIconButton/HeaderIconButton'; -export { GlobalHeaderMenuItem } from './components/GlobalHeaderMenuItem'; -export type { GlobalHeaderMenuItemProps } from './components/GlobalHeaderMenuItem'; -export { GlobalHeaderDropdown } from './components/GlobalHeaderDropdown'; -export type { GlobalHeaderDropdownProps } from './components/GlobalHeaderDropdown'; - -// ── Default extensions (collections + individual for cherry-picking) ─── - -export * from './defaults'; - -// ── Translations ─────────────────────────────────────────────────────── - -export { globalHeaderTranslationRef } from '../translations/ref'; -export { globalHeaderTranslations } from '../translations'; - -const globalHeaderTranslation = TranslationBlueprint.make({ - params: { - resource: globalHeaderTranslations, - }, -}); - -/** - * App module that registers global header translations. - * @alpha - */ -export const globalHeaderTranslationsModule = createFrontendModule({ - pluginId: 'app', - extensions: [globalHeaderTranslation], -}); +export * from '..'; +export { default } from '..'; diff --git a/workspaces/global-header/plugins/global-header/src/alpha/plugin.ts b/workspaces/global-header/plugins/global-header/src/alpha/plugin.ts index 1b84c11f942..a17d7398dc7 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/plugin.ts +++ b/workspaces/global-header/plugins/global-header/src/alpha/plugin.ts @@ -39,7 +39,7 @@ import { * Plugin providing the default global header toolbar items and * dropdown menu items. * - * @alpha + * @public */ const globalHeaderPlugin = createFrontendPlugin({ pluginId: 'global-header', diff --git a/workspaces/global-header/plugins/global-header/src/index.ts b/workspaces/global-header/plugins/global-header/src/index.ts index 33fb9e71d0a..3543e0fc7e9 100644 --- a/workspaces/global-header/plugins/global-header/src/index.ts +++ b/workspaces/global-header/plugins/global-header/src/index.ts @@ -13,6 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * New Frontend System API surface for the global header plugin. + * + * @public + * @packageDocumentation + */ + import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className'; ClassNameGenerator.configure(componentName => { @@ -21,6 +29,76 @@ ClassNameGenerator.configure(componentName => { : `v5-${componentName}`; }); -export * from './plugin'; +import { createFrontendModule } from '@backstage/frontend-plugin-api'; +import { TranslationBlueprint } from '@backstage/plugin-app-react'; +import { globalHeaderTranslations } from './translations'; + +// ── Core: plugin + module ────────────────────────────────────────────── + +export { default } from './alpha/plugin'; +export { globalHeaderModule } from './alpha/extensions/globalHeaderModule'; + +// ── Blueprints: for other plugins to contribute header items ─────────── + +export { + GlobalHeaderComponentBlueprint, + GlobalHeaderMenuItemBlueprint, +} from './alpha/extensions/blueprints'; +export type { + ToolbarComponentParams, + MenuItemParams, +} from './alpha/extensions/blueprints'; + +// ── Data refs ────────────────────────────────────────────────────────── + +export { + globalHeaderComponentDataRef, + globalHeaderMenuItemDataRef, +} from './alpha/extensions/dataRefs'; + +// ── Context hooks for custom dropdown components ─────────────────────── + +export { + useGlobalHeaderComponents, + useGlobalHeaderMenuItems, +} from './alpha/extensions/GlobalHeaderContext'; -export * from './translations'; +// ── Types ────────────────────────────────────────────────────────────── + +export type { + GlobalHeaderComponentData, + GlobalHeaderMenuItemData, +} from './alpha/types'; + +// ── Building block components for plugin authors ─────────────────────── + +export { HeaderIconButton as GlobalHeaderIconButton } from './components/HeaderIconButton/HeaderIconButton'; +export type { HeaderIconButtonProps } from './components/HeaderIconButton/HeaderIconButton'; +export { GlobalHeaderMenuItem } from './alpha/components/GlobalHeaderMenuItem'; +export type { GlobalHeaderMenuItemProps } from './alpha/components/GlobalHeaderMenuItem'; +export { GlobalHeaderDropdown } from './alpha/components/GlobalHeaderDropdown'; +export type { GlobalHeaderDropdownProps } from './alpha/components/GlobalHeaderDropdown'; + +// ── Default extensions (collections + individual for cherry-picking) ─── + +export * from './alpha/defaults'; + +// ── Translations ─────────────────────────────────────────────────────── + +export { globalHeaderTranslationRef } from './translations/ref'; +export { globalHeaderTranslations } from './translations'; + +const globalHeaderTranslation = TranslationBlueprint.make({ + params: { + resource: globalHeaderTranslations, + }, +}); + +/** + * App module that registers global header translations. + * @public + */ +export const globalHeaderTranslationsModule = createFrontendModule({ + pluginId: 'app', + extensions: [globalHeaderTranslation], +}); diff --git a/workspaces/global-header/plugins/global-header/src/legacy.ts b/workspaces/global-header/plugins/global-header/src/legacy.ts new file mode 100644 index 00000000000..d846f0111da --- /dev/null +++ b/workspaces/global-header/plugins/global-header/src/legacy.ts @@ -0,0 +1,34 @@ +/* + * Copyright Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Legacy frontend system API surface for the global header plugin. + * + * @deprecated Use the root import instead: `import from '@red-hat-developer-hub/backstage-plugin-global-header'` + * @packageDocumentation + */ + +import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className'; + +ClassNameGenerator.configure(componentName => { + return componentName.startsWith('v5-') + ? componentName + : `v5-${componentName}`; +}); + +export * from './plugin'; + +export * from './translations'; From d60b316b0f85bc05c966d68b497b73e387f0c5ca Mon Sep 17 00:00:00 2001 From: rohitratannagar Date: Tue, 16 Jun 2026 13:59:22 +0530 Subject: [PATCH 2/4] updated the report Signed-off-by: rohitratannagar --- .../global-header/app-config.dynamic.yaml | 33 + .../plugins/global-header/package.json | 15 +- .../plugins/global-header/report-alpha.api.md | 1357 --------------- .../report-global-header-module.api.md | 13 + ...t-global-header-translations-module.api.md | 13 + .../global-header/report-legacy.api.md | 391 +++++ .../plugins/global-header/report.api.md | 1478 ++++++++++++++--- .../src/alpha/components/GlobalHeader.tsx | 2 +- .../alpha/components/GlobalHeaderDropdown.tsx | 4 +- .../alpha/components/GlobalHeaderMenuItem.tsx | 4 +- .../global-header/src/alpha/defaults/index.ts | 4 +- .../src/alpha/defaults/menuItemExtensions.tsx | 12 +- .../src/alpha/defaults/toolbarExtensions.tsx | 20 +- .../alpha/extensions/GlobalHeaderContext.tsx | 24 +- .../src/alpha/extensions/blueprints.tsx | 8 +- .../src/alpha/extensions/dataRefs.ts | 4 +- .../alpha/extensions/globalHeaderModule.tsx | 2 +- .../plugins/global-header/src/alpha/index.ts | 3 +- .../plugins/global-header/src/alpha/types.ts | 4 +- .../src/globalHeaderModuleExport.ts | 16 + .../globalHeaderTranslationsModuleExport.ts | 16 + 21 files changed, 1793 insertions(+), 1630 deletions(-) create mode 100644 workspaces/global-header/plugins/global-header/report-global-header-module.api.md create mode 100644 workspaces/global-header/plugins/global-header/report-global-header-translations-module.api.md create mode 100644 workspaces/global-header/plugins/global-header/report-legacy.api.md create mode 100644 workspaces/global-header/plugins/global-header/src/globalHeaderModuleExport.ts create mode 100644 workspaces/global-header/plugins/global-header/src/globalHeaderTranslationsModuleExport.ts diff --git a/workspaces/global-header/plugins/global-header/app-config.dynamic.yaml b/workspaces/global-header/plugins/global-header/app-config.dynamic.yaml index 0ca5331d261..477d29d007a 100644 --- a/workspaces/global-header/plugins/global-header/app-config.dynamic.yaml +++ b/workspaces/global-header/plugins/global-header/app-config.dynamic.yaml @@ -2,32 +2,53 @@ dynamicPlugins: frontend: red-hat-developer-hub.backstage-plugin-global-header: + # NFS (New Frontend System) deployment requires these extensions in app-config.yaml: + # app: + # extensions: + # - app-root-wrapper:app/global-header + # - translation:app/global-header-translations + # - api:app/app-language: + # config: + # availableLanguages: ['en', 'de', 'es', 'fr', 'it', 'ja'] + # defaultLanguage: 'en' + # ------------------------------------------------------------ + + # OFS (Old Frontend System) deployment configuration: + + # Note: Legacy/OFS exports are only available from `module: Legacy`. + # The default module (PluginRoot) is NFS-only. translationResources: - importName: globalHeaderTranslations + module: Legacy ref: globalHeaderTranslationRef mountPoints: - mountPoint: application/header importName: GlobalHeader + module: Legacy config: position: above-sidebar # above-main-content | above-sidebar - mountPoint: global.header/component importName: CompanyLogo + module: Legacy config: priority: 200 props: to: '/' - mountPoint: global.header/component importName: SearchComponent + module: Legacy config: priority: 100 - mountPoint: global.header/component importName: Spacer + module: Legacy config: priority: 99 props: growFactor: 0 - mountPoint: global.header/component importName: HeaderIconButton + module: Legacy config: priority: 90 props: @@ -37,16 +58,19 @@ dynamicPlugins: to: create - mountPoint: global.header/component importName: StarredDropdown + module: Legacy config: priority: 85 - mountPoint: global.header/component importName: ApplicationLauncherDropdown + module: Legacy config: priority: 82 - mountPoint: global.header/application-launcher importName: MenuItemLink + module: Legacy config: section: Documentation priority: 150 @@ -58,6 +82,7 @@ dynamicPlugins: - mountPoint: global.header/application-launcher importName: MenuItemLink + module: Legacy config: section: Developer Tools priority: 100 @@ -69,28 +94,34 @@ dynamicPlugins: - mountPoint: global.header/component importName: HelpDropdown + module: Legacy config: priority: 80 - mountPoint: global.header/help importName: SupportButton + module: Legacy config: priority: 10 - mountPoint: global.header/component importName: NotificationButton + module: Legacy config: priority: 70 - mountPoint: global.header/component importName: Divider + module: Legacy config: priority: 50 - mountPoint: global.header/component importName: ProfileDropdown + module: Legacy config: priority: 10 - mountPoint: global.header/profile importName: MenuItemLink + module: Legacy config: priority: 100 props: @@ -100,6 +131,7 @@ dynamicPlugins: icon: manageAccounts - mountPoint: global.header/profile importName: MenuItemLink + module: Legacy config: priority: 90 props: @@ -109,5 +141,6 @@ dynamicPlugins: icon: account - mountPoint: global.header/profile importName: LogoutButton + module: Legacy config: priority: 10 diff --git a/workspaces/global-header/plugins/global-header/package.json b/workspaces/global-header/plugins/global-header/package.json index 03e851a0f0e..c02d27a397b 100644 --- a/workspaces/global-header/plugins/global-header/package.json +++ b/workspaces/global-header/plugins/global-header/package.json @@ -7,6 +7,8 @@ ".": "./src/index.ts", "./alpha": "./src/alpha/index.ts", "./legacy": "./src/legacy.ts", + "./global-header-module": "./src/globalHeaderModuleExport.ts", + "./global-header-translations-module": "./src/globalHeaderTranslationsModuleExport.ts", "./package.json": "./package.json" }, "typesVersions": { @@ -17,6 +19,12 @@ "legacy": [ "src/legacy.ts" ], + "global-header-module": [ + "src/globalHeaderModuleExport.ts" + ], + "global-header-translations-module": [ + "src/globalHeaderTranslationsModuleExport.ts" + ], "package.json": [ "package.json" ] @@ -110,8 +118,11 @@ "scalprum": { "name": "red-hat-developer-hub.backstage-plugin-global-header", "exposedModules": { - "PluginRoot": "./src/legacy.ts", - "Alpha": "./src/index.ts" + "PluginRoot": "./src/index.ts", + "Alpha": "./src/alpha/index.ts", + "Legacy": "./src/legacy.ts", + "GlobalHeaderModule": "./src/globalHeaderModuleExport.ts", + "GlobalHeaderTranslationsModule": "./src/globalHeaderTranslationsModuleExport.ts" } } } diff --git a/workspaces/global-header/plugins/global-header/report-alpha.api.md b/workspaces/global-header/plugins/global-header/report-alpha.api.md index e9032f907a0..6b0b631af19 100644 --- a/workspaces/global-header/plugins/global-header/report-alpha.api.md +++ b/workspaces/global-header/plugins/global-header/report-alpha.api.md @@ -3,1020 +3,9 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import type Button from '@mui/material/Button'; -import type { ComponentProps } from 'react'; -import type { ComponentType } from 'react'; -import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api'; -import { ExtensionBlueprint } from '@backstage/frontend-plugin-api'; -import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; -import { FrontendModule } from '@backstage/frontend-plugin-api'; -import { JSX as JSX_2 } from 'react/jsx-runtime'; -import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api'; -import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api'; -import type { ReactNode } from 'react'; import { TranslationRef } from '@backstage/frontend-plugin-api'; import { TranslationResource } from '@backstage/frontend-plugin-api'; -// @alpha (undocumented) -export const appLauncherDevHubMenuItemExtension: OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'app-launcher-devhub'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; -}>; - -// @alpha (undocumented) -export const appLauncherRhdhLocalMenuItemExtension: OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'app-launcher-rhdh-local'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; -}>; - -// @alpha (undocumented) -export const applicationLauncherDropdownExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'app-launcher-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const companyLogoExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'company-logo'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha -export const defaultMenuItemExtensions: ( - | OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'settings'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'my-profile'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'logout'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'support-button'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'app-launcher-devhub'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'app-launcher-rhdh-local'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }> -)[]; - -// @alpha -export const defaultToolbarExtensions: ( - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'company-logo'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'search'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'spacer'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'self-service-button'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'starred-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'app-launcher-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'help-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'notification-button'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'divider'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> - | OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'profile-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }> -)[]; - -// @alpha (undocumented) -export const dividerExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'divider'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha -export const GlobalHeaderComponentBlueprint: ExtensionBlueprint<{ - kind: 'gh-component'; - params: ToolbarComponentParams; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - dataRefs: { - componentData: ConfigurableExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - }; -}>; - -// @alpha -export interface GlobalHeaderComponentData { - // (undocumented) - component: ComponentType; - layout?: Record; - // (undocumented) - priority?: number; -} - -// @alpha -export const globalHeaderComponentDataRef: ConfigurableExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} ->; - -// @alpha -export const GlobalHeaderDropdown: ( - input: GlobalHeaderDropdownProps, -) => JSX_2.Element | null; - -// @alpha -export interface GlobalHeaderDropdownProps { - buttonContent: ReactNode; - buttonProps?: ComponentProps; - emptyState?: ReactNode; - isIconButton?: boolean; - target: string; - tooltip?: string; - trackValidity?: boolean; -} - -// @public (undocumented) -export const GlobalHeaderIconButton: ( - input: HeaderIconButtonProps, -) => JSX_2.Element; - -// @alpha -export const GlobalHeaderMenuItem: ( - input: GlobalHeaderMenuItemProps, -) => JSX_2.Element; - -// @alpha -export const GlobalHeaderMenuItemBlueprint: ExtensionBlueprint<{ - kind: 'gh-menu-item'; - params: MenuItemParams; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - dataRefs: { - menuItemData: ConfigurableExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - }; -}>; - -// @alpha -export interface GlobalHeaderMenuItemData { - component?: ComponentType; - icon?: string; - link?: string; - onClick?: () => void; - // (undocumented) - priority?: number; - sectionLabel?: string; - sectionLink?: string; - sectionLinkLabel?: string; - subTitle?: string; - subTitleKey?: string; - // (undocumented) - target: string; - title?: string; - titleKey?: string; - type?: 'component' | 'data'; -} - -// @alpha -export const globalHeaderMenuItemDataRef: ConfigurableExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} ->; - -// @alpha -export interface GlobalHeaderMenuItemProps { - icon?: string; - onClick?: () => void; - subTitle?: string; - subTitleKey?: string; - title?: string; - titleKey?: string; - to?: string; - tooltip?: string; -} - -// @alpha -export const globalHeaderModule: FrontendModule; - -// @alpha -const globalHeaderPlugin: OverridableFrontendPlugin< - {}, - {}, - { - 'gh-component:global-header/app-launcher-dropdown': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'app-launcher-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/company-logo': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'company-logo'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/divider': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'divider'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/help-dropdown': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'help-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/notification-button': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'notification-button'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/profile-dropdown': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'profile-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/search': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'search'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/self-service-button': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'self-service-button'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/spacer': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'spacer'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-component:global-header/starred-dropdown': OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'starred-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; - }>; - 'gh-menu-item:global-header/app-launcher-devhub': OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'app-launcher-devhub'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }>; - 'gh-menu-item:global-header/app-launcher-rhdh-local': OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'app-launcher-rhdh-local'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }>; - 'gh-menu-item:global-header/logout': OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'logout'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }>; - 'gh-menu-item:global-header/my-profile': OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'my-profile'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }>; - 'gh-menu-item:global-header/settings': OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'settings'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }>; - 'gh-menu-item:global-header/support-button': OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'support-button'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; - }>; - } ->; -export default globalHeaderPlugin; - // @public export const globalHeaderTranslationRef: TranslationRef< 'plugin.global-header', @@ -1060,350 +49,4 @@ export const globalHeaderTranslationRef: TranslationRef< // @public export const globalHeaderTranslations: TranslationResource<'plugin.global-header'>; - -// @alpha -export const globalHeaderTranslationsModule: FrontendModule; - -// @public (undocumented) -export interface HeaderIconButtonProps { - // (undocumented) - ariaLabel?: string; - // (undocumented) - color?: 'inherit' | 'primary' | 'secondary' | 'default'; - // (undocumented) - icon: string; - // (undocumented) - size?: 'small' | 'medium' | 'large'; - // (undocumented) - title: string; - // (undocumented) - titleKey?: string; - // (undocumented) - to: string; - // (undocumented) - tooltip?: string; -} - -// @alpha (undocumented) -export const helpDropdownExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'help-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const logoutMenuItemExtension: OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'logout'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; -}>; - -// @alpha -export interface MenuItemParams { - // (undocumented) - component?: ComponentType; - // (undocumented) - icon?: string; - // (undocumented) - link?: string; - // (undocumented) - onClick?: () => void; - // (undocumented) - priority?: number; - sectionLabel?: string; - sectionLink?: string; - sectionLinkLabel?: string; - // (undocumented) - subTitle?: string; - // (undocumented) - subTitleKey?: string; - // (undocumented) - target: string; - // (undocumented) - title?: string; - // (undocumented) - titleKey?: string; -} - -// @alpha (undocumented) -export const myProfileMenuItemExtension: OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'my-profile'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; -}>; - -// @alpha (undocumented) -export const notificationButtonExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'notification-button'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const profileDropdownExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'profile-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const searchExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'search'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const selfServiceButtonExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'self-service-button'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const settingsMenuItemExtension: OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'settings'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; -}>; - -// @alpha (undocumented) -export const spacerExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'spacer'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const starredDropdownExtension: OverridableExtensionDefinition<{ - kind: 'gh-component'; - name: 'starred-dropdown'; - config: { - priority: number | undefined; - }; - configInput: { - priority?: number | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderComponentData, - 'global-header.component', - {} - >; - inputs: {}; - params: ToolbarComponentParams; -}>; - -// @alpha (undocumented) -export const supportButtonMenuItemExtension: OverridableExtensionDefinition<{ - kind: 'gh-menu-item'; - name: 'support-button'; - config: { - priority: number | undefined; - title: string | undefined; - titleKey: string | undefined; - icon: string | undefined; - link: string | undefined; - sectionLabel: string | undefined; - sectionLink: string | undefined; - sectionLinkLabel: string | undefined; - }; - configInput: { - link?: string | undefined; - title?: string | undefined; - icon?: string | undefined; - titleKey?: string | undefined; - priority?: number | undefined; - sectionLabel?: string | undefined; - sectionLink?: string | undefined; - sectionLinkLabel?: string | undefined; - }; - output: ExtensionDataRef< - GlobalHeaderMenuItemData, - 'global-header.menu-item', - {} - >; - inputs: {}; - params: MenuItemParams; -}>; - -// @alpha -export interface ToolbarComponentParams { - // (undocumented) - component?: ComponentType; - // (undocumented) - icon?: string; - layout?: Record; - // (undocumented) - link?: string; - // (undocumented) - onClick?: () => void; - // (undocumented) - priority?: number; - // (undocumented) - title?: string; - // (undocumented) - titleKey?: string; - // (undocumented) - tooltip?: string; -} - -// @alpha -export function useGlobalHeaderComponents(): GlobalHeaderComponentData[]; - -// @alpha -export function useGlobalHeaderMenuItems( - target: string, -): GlobalHeaderMenuItemData[]; - -// (No @packageDocumentation comment for this package) ``` diff --git a/workspaces/global-header/plugins/global-header/report-global-header-module.api.md b/workspaces/global-header/plugins/global-header/report-global-header-module.api.md new file mode 100644 index 00000000000..f007721f095 --- /dev/null +++ b/workspaces/global-header/plugins/global-header/report-global-header-module.api.md @@ -0,0 +1,13 @@ +## API Report File for "@red-hat-developer-hub/backstage-plugin-global-header" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { FrontendModule } from '@backstage/frontend-plugin-api'; + +// @public +const globalHeaderModule: FrontendModule; +export default globalHeaderModule; + +// (No @packageDocumentation comment for this package) +``` diff --git a/workspaces/global-header/plugins/global-header/report-global-header-translations-module.api.md b/workspaces/global-header/plugins/global-header/report-global-header-translations-module.api.md new file mode 100644 index 00000000000..a19e5c1f3fe --- /dev/null +++ b/workspaces/global-header/plugins/global-header/report-global-header-translations-module.api.md @@ -0,0 +1,13 @@ +## API Report File for "@red-hat-developer-hub/backstage-plugin-global-header" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { FrontendModule } from '@backstage/frontend-plugin-api'; + +// @public +const globalHeaderTranslationsModule: FrontendModule; +export default globalHeaderTranslationsModule; + +// (No @packageDocumentation comment for this package) +``` diff --git a/workspaces/global-header/plugins/global-header/report-legacy.api.md b/workspaces/global-header/plugins/global-header/report-legacy.api.md new file mode 100644 index 00000000000..33f80a84ce5 --- /dev/null +++ b/workspaces/global-header/plugins/global-header/report-legacy.api.md @@ -0,0 +1,391 @@ +## API Report File for "@red-hat-developer-hub/backstage-plugin-global-header" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { BackstagePlugin } from '@backstage/core-plugin-api'; +import type { ComponentType } from 'react'; +import { CSSProperties } from 'react'; +import { JSX as JSX_2 } from 'react/jsx-runtime'; +import { MenuItemProps } from '@mui/material/MenuItem'; +import { TranslationRef } from '@backstage/frontend-plugin-api'; +import { TranslationResource } from '@backstage/frontend-plugin-api'; + +// @public +export const ApplicationLauncherDropdown: () => JSX_2.Element; + +// @public +export const CompanyLogo: (input: CompanyLogoProps) => JSX_2.Element; + +// @public (undocumented) +export interface CompanyLogoProps { + height?: string | number; + layout?: CSSProperties; + logo?: LogoURLs; + to?: string; + width?: string | number; +} + +// @public +export const CreateDropdown: ComponentType; + +// @public +export interface CreateDropdownProps { + // (undocumented) + layout?: CSSProperties; +} + +// @public +export const defaultGlobalHeaderComponentsMountPoints: GlobalHeaderComponentMountPoint[]; + +// @public (undocumented) +export const Divider: (input: DividerProps) => JSX_2.Element; + +// @public (undocumented) +export interface DividerProps { + // (undocumented) + layout?: CSSProperties; +} + +// @public +export const GlobalHeader: () => JSX_2.Element; + +// @public +export const GlobalHeaderComponent: ComponentType; + +// @public +export interface GlobalHeaderComponentMountPoint { + // (undocumented) + Component: ComponentType<{ + layout?: CSSProperties; + }>; + // (undocumented) + config?: GlobalHeaderComponentMountPointConfig & { + props?: Record; + layout?: CSSProperties; + }; +} + +// @public +export interface GlobalHeaderComponentMountPointConfig { + // (undocumented) + priority?: number; +} + +// @public +export interface GlobalHeaderComponentProps { + // (undocumented) + globalHeaderMountPoints: GlobalHeaderComponentMountPoint[]; +} + +// @public +export const globalHeaderPlugin: BackstagePlugin<{}, {}, {}>; + +// @public +export const globalHeaderTranslationRef: TranslationRef< + 'plugin.global-header', + { + readonly 'search.placeholder': string; + readonly 'search.noResults': string; + readonly 'search.errorFetching': string; + readonly 'search.allResults': string; + readonly 'search.clear': string; + readonly 'help.tooltip': string; + readonly 'help.noSupportLinks': string; + readonly 'help.noSupportLinksSubtitle': string; + readonly 'help.quickStart': string; + readonly 'help.supportTitle': string; + readonly 'profile.picture': string; + readonly 'profile.settings': string; + readonly 'profile.myProfile': string; + readonly 'profile.signOut': string; + readonly 'applicationLauncher.tooltip': string; + readonly 'applicationLauncher.noLinksTitle': string; + readonly 'applicationLauncher.noLinksSubtitle': string; + readonly 'applicationLauncher.developerHub': string; + readonly 'applicationLauncher.rhdhLocal': string; + readonly 'applicationLauncher.sections.documentation': string; + readonly 'applicationLauncher.sections.developerTools': string; + readonly 'starred.title': string; + readonly 'starred.removeTooltip': string; + readonly 'starred.noItemsTitle': string; + readonly 'starred.noItemsSubtitle': string; + readonly 'notifications.title': string; + readonly 'notifications.unsupportedDismissOption': string; + readonly 'create.title': string; + readonly 'create.registerComponent.title': string; + readonly 'create.registerComponent.subtitle': string; + readonly 'create.templates.errorFetching': string; + readonly 'create.templates.sectionTitle': string; + readonly 'create.templates.allTemplates': string; + readonly 'create.templates.noTemplatesAvailable': string; + } +>; + +// @public +export const globalHeaderTranslations: TranslationResource<'plugin.global-header'>; + +// @public (undocumented) +export const HeaderButton: (input: HeaderButtonProps) => JSX_2.Element; + +// @public (undocumented) +export interface HeaderButtonProps { + // (undocumented) + ariaLabel?: string; + // (undocumented) + color?: 'inherit' | 'primary' | 'secondary' | 'default'; + // (undocumented) + endIcon?: string; + // (undocumented) + externalLinkIcon?: boolean; + // (undocumented) + layout?: CSSProperties; + // (undocumented) + size?: 'small' | 'medium' | 'large'; + // (undocumented) + startIcon?: string; + // (undocumented) + title: string; + // (undocumented) + to: string; + // (undocumented) + tooltip?: string; + // (undocumented) + variant?: 'text' | 'outlined' | 'contained'; +} + +// @public (undocumented) +export const HeaderIcon: (input: HeaderIconProps) => JSX_2.Element | null; + +// @public (undocumented) +export const HeaderIconButton: (input: HeaderIconButtonProps) => JSX_2.Element; + +// @public (undocumented) +export interface HeaderIconButtonProps { + // (undocumented) + ariaLabel?: string; + // (undocumented) + color?: 'inherit' | 'primary' | 'secondary' | 'default'; + // (undocumented) + icon: string; + // (undocumented) + size?: 'small' | 'medium' | 'large'; + // (undocumented) + title: string; + // (undocumented) + titleKey?: string; + // (undocumented) + to: string; + // (undocumented) + tooltip?: string; +} + +// @public (undocumented) +export interface HeaderIconProps { + // (undocumented) + icon: string; + // (undocumented) + layout?: CSSProperties; + // (undocumented) + size?: 'small' | 'medium' | 'large'; +} + +// @public +export const HelpDropdown: ComponentType; + +// @public (undocumented) +export interface HelpDropdownProps { + // (undocumented) + layout?: CSSProperties; +} + +// @public +export type LogoURLs = + | { + light: string; + dark: string; + } + | string + | undefined; + +// @public +export const LogoutButton: ComponentType; + +// @public +export interface MenuItemConfig { + // (undocumented) + Component: ComponentType; + // (undocumented) + icon?: string; + // (undocumented) + label: string; + // (undocumented) + labelKey?: string; + // (undocumented) + link?: string; + // (undocumented) + onClick?: () => void; + // (undocumented) + subLabel?: string; + // (undocumented) + subLabelKey?: string; +} + +// @public +export const MenuItemLink: ComponentType; + +// @public +export interface MenuItemLinkProps { + // (undocumented) + icon?: string; + // (undocumented) + subTitle?: string; + // (undocumented) + subTitleKey?: string; + // (undocumented) + title?: string; + // (undocumented) + titleKey?: string; + // (undocumented) + to: string; + // (undocumented) + tooltip?: string; +} + +// @public +export const NotificationBanner: ( + props: NotificationBannerProps, +) => JSX_2.Element | null; + +// @public (undocumented) +export type NotificationBannerDismiss = 'none' | 'session' | 'localstorage'; + +// @public (undocumented) +export interface NotificationBannerProps { + // (undocumented) + backgroundColor?: string; + // (undocumented) + borderColor?: string; + // (undocumented) + dismiss?: NotificationBannerDismiss; + // (undocumented) + icon?: string; + // (undocumented) + id?: string; + // (undocumented) + layout?: CSSProperties; + // (undocumented) + markdown?: boolean; + // (undocumented) + textColor?: string; + // (undocumented) + title: string; +} + +// @public (undocumented) +export const NotificationButton: ( + input: NotificationButtonProps, +) => JSX_2.Element | null; + +// @public (undocumented) +export interface NotificationButtonProps { + // (undocumented) + badgeColor?: + | 'primary' + | 'secondary' + | 'default' + | 'error' + | 'info' + | 'success' + | 'warning'; + // (undocumented) + color?: + | 'inherit' + | 'default' + | 'primary' + | 'secondary' + | 'error' + | 'info' + | 'success' + | 'warning'; + // (undocumented) + layout?: CSSProperties; + // (undocumented) + size?: 'small' | 'medium' | 'large'; + // (undocumented) + title?: string; + // (undocumented) + to?: string; + // (undocumented) + tooltip?: string; +} + +// @public +export const ProfileDropdown: ComponentType; + +// @public +export interface ProfileDropdownProps { + // (undocumented) + layout?: CSSProperties; +} + +// @public +export const RegisterAComponentSection: ComponentType; + +// @public +export type RegisterAComponentSectionProps = { + hideDivider: boolean; + handleClose: () => void; +}; + +// @public +export const SearchComponent: ComponentType; + +// @public +export const SoftwareTemplatesSection: ComponentType; + +// @public +export type SoftwareTemplatesSectionProps = { + handleClose: () => void; + hideDivider?: boolean; +}; + +// @public +export const Spacer: (input: SpacerProps) => JSX_2.Element; + +// @public (undocumented) +export interface SpacerProps { + // (undocumented) + growFactor?: number; + // (undocumented) + layout?: CSSProperties; + // (undocumented) + minWidth?: number | string; +} + +// @public +export const StarredDropdown: () => JSX_2.Element; + +// @public (undocumented) +export const SupportButton: ComponentType; + +// @public (undocumented) +export interface SupportButtonProps { + // (undocumented) + icon?: string; + // (undocumented) + onClick?: () => void; + // (undocumented) + style?: CSSProperties; + // (undocumented) + title?: string; + // (undocumented) + titleKey?: string; + // (undocumented) + to?: string; + // (undocumented) + tooltip?: string; +} + +// (No @packageDocumentation comment for this package) +``` diff --git a/workspaces/global-header/plugins/global-header/report.api.md b/workspaces/global-header/plugins/global-header/report.api.md index 33f80a84ce5..34d78f709bc 100644 --- a/workspaces/global-header/plugins/global-header/report.api.md +++ b/workspaces/global-header/plugins/global-header/report.api.md @@ -3,83 +3,1019 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackstagePlugin } from '@backstage/core-plugin-api'; +import type Button from '@mui/material/Button'; +import type { ComponentProps } from 'react'; import type { ComponentType } from 'react'; -import { CSSProperties } from 'react'; +import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api'; +import { ExtensionBlueprint } from '@backstage/frontend-plugin-api'; +import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; +import { FrontendModule } from '@backstage/frontend-plugin-api'; import { JSX as JSX_2 } from 'react/jsx-runtime'; -import { MenuItemProps } from '@mui/material/MenuItem'; +import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api'; +import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api'; +import type { ReactNode } from 'react'; import { TranslationRef } from '@backstage/frontend-plugin-api'; import { TranslationResource } from '@backstage/frontend-plugin-api'; +// @public (undocumented) +export const appLauncherDevHubMenuItemExtension: OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'app-launcher-devhub'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; +}>; + +// @public (undocumented) +export const appLauncherRhdhLocalMenuItemExtension: OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'app-launcher-rhdh-local'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; +}>; + +// @public (undocumented) +export const applicationLauncherDropdownExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'app-launcher-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; + +// @public (undocumented) +export const companyLogoExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'company-logo'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; + // @public -export const ApplicationLauncherDropdown: () => JSX_2.Element; +export const defaultMenuItemExtensions: ( + | OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'settings'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'my-profile'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'logout'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'support-button'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'app-launcher-devhub'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'app-launcher-rhdh-local'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }> +)[]; // @public -export const CompanyLogo: (input: CompanyLogoProps) => JSX_2.Element; +export const defaultToolbarExtensions: ( + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'company-logo'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'search'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'spacer'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'self-service-button'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'starred-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'app-launcher-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'help-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'notification-button'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'divider'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> + | OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'profile-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }> +)[]; // @public (undocumented) -export interface CompanyLogoProps { - height?: string | number; - layout?: CSSProperties; - logo?: LogoURLs; - to?: string; - width?: string | number; -} +export const dividerExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'divider'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; // @public -export const CreateDropdown: ComponentType; +export const GlobalHeaderComponentBlueprint: ExtensionBlueprint<{ + kind: 'gh-component'; + params: ToolbarComponentParams; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + dataRefs: { + componentData: ConfigurableExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + }; +}>; // @public -export interface CreateDropdownProps { +export interface GlobalHeaderComponentData { // (undocumented) - layout?: CSSProperties; + component: ComponentType; + layout?: Record; + // (undocumented) + priority?: number; } // @public -export const defaultGlobalHeaderComponentsMountPoints: GlobalHeaderComponentMountPoint[]; +export const globalHeaderComponentDataRef: ConfigurableExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} +>; + +// @public +export const GlobalHeaderDropdown: ( + input: GlobalHeaderDropdownProps, +) => JSX_2.Element | null; -// @public (undocumented) -export const Divider: (input: DividerProps) => JSX_2.Element; +// @public +export interface GlobalHeaderDropdownProps { + buttonContent: ReactNode; + buttonProps?: ComponentProps; + emptyState?: ReactNode; + isIconButton?: boolean; + target: string; + tooltip?: string; + trackValidity?: boolean; +} // @public (undocumented) -export interface DividerProps { - // (undocumented) - layout?: CSSProperties; -} +export const GlobalHeaderIconButton: ( + input: HeaderIconButtonProps, +) => JSX_2.Element; // @public -export const GlobalHeader: () => JSX_2.Element; +export const GlobalHeaderMenuItem: ( + input: GlobalHeaderMenuItemProps, +) => JSX_2.Element; // @public -export const GlobalHeaderComponent: ComponentType; +export const GlobalHeaderMenuItemBlueprint: ExtensionBlueprint<{ + kind: 'gh-menu-item'; + params: MenuItemParams; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + dataRefs: { + menuItemData: ConfigurableExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + }; +}>; // @public -export interface GlobalHeaderComponentMountPoint { +export interface GlobalHeaderMenuItemData { + component?: ComponentType; + icon?: string; + link?: string; + onClick?: () => void; // (undocumented) - Component: ComponentType<{ - layout?: CSSProperties; - }>; + priority?: number; + sectionLabel?: string; + sectionLink?: string; + sectionLinkLabel?: string; + subTitle?: string; + subTitleKey?: string; // (undocumented) - config?: GlobalHeaderComponentMountPointConfig & { - props?: Record; - layout?: CSSProperties; - }; + target: string; + title?: string; + titleKey?: string; + type?: 'component' | 'data'; } // @public -export interface GlobalHeaderComponentMountPointConfig { - // (undocumented) - priority?: number; -} +export const globalHeaderMenuItemDataRef: ConfigurableExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} +>; // @public -export interface GlobalHeaderComponentProps { - // (undocumented) - globalHeaderMountPoints: GlobalHeaderComponentMountPoint[]; +export interface GlobalHeaderMenuItemProps { + icon?: string; + onClick?: () => void; + subTitle?: string; + subTitleKey?: string; + title?: string; + titleKey?: string; + to?: string; + tooltip?: string; } // @public -export const globalHeaderPlugin: BackstagePlugin<{}, {}, {}>; +export const globalHeaderModule: FrontendModule; + +// @public +const globalHeaderPlugin: OverridableFrontendPlugin< + {}, + {}, + { + 'gh-component:global-header/app-launcher-dropdown': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'app-launcher-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/company-logo': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'company-logo'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/divider': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'divider'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/help-dropdown': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'help-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/notification-button': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'notification-button'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/profile-dropdown': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'profile-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/search': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'search'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/self-service-button': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'self-service-button'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/spacer': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'spacer'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-component:global-header/starred-dropdown': OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'starred-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; + }>; + 'gh-menu-item:global-header/app-launcher-devhub': OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'app-launcher-devhub'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }>; + 'gh-menu-item:global-header/app-launcher-rhdh-local': OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'app-launcher-rhdh-local'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }>; + 'gh-menu-item:global-header/logout': OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'logout'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }>; + 'gh-menu-item:global-header/my-profile': OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'my-profile'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }>; + 'gh-menu-item:global-header/settings': OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'settings'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }>; + 'gh-menu-item:global-header/support-button': OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'support-button'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; + }>; + } +>; +export default globalHeaderPlugin; // @public export const globalHeaderTranslationRef: TranslationRef< @@ -125,40 +1061,8 @@ export const globalHeaderTranslationRef: TranslationRef< // @public export const globalHeaderTranslations: TranslationResource<'plugin.global-header'>; -// @public (undocumented) -export const HeaderButton: (input: HeaderButtonProps) => JSX_2.Element; - -// @public (undocumented) -export interface HeaderButtonProps { - // (undocumented) - ariaLabel?: string; - // (undocumented) - color?: 'inherit' | 'primary' | 'secondary' | 'default'; - // (undocumented) - endIcon?: string; - // (undocumented) - externalLinkIcon?: boolean; - // (undocumented) - layout?: CSSProperties; - // (undocumented) - size?: 'small' | 'medium' | 'large'; - // (undocumented) - startIcon?: string; - // (undocumented) - title: string; - // (undocumented) - to: string; - // (undocumented) - tooltip?: string; - // (undocumented) - variant?: 'text' | 'outlined' | 'contained'; -} - -// @public (undocumented) -export const HeaderIcon: (input: HeaderIconProps) => JSX_2.Element | null; - -// @public (undocumented) -export const HeaderIconButton: (input: HeaderIconButtonProps) => JSX_2.Element; +// @public +export const globalHeaderTranslationsModule: FrontendModule; // @public (undocumented) export interface HeaderIconButtonProps { @@ -181,211 +1085,325 @@ export interface HeaderIconButtonProps { } // @public (undocumented) -export interface HeaderIconProps { - // (undocumented) - icon: string; - // (undocumented) - layout?: CSSProperties; - // (undocumented) - size?: 'small' | 'medium' | 'large'; -} - -// @public -export const HelpDropdown: ComponentType; +export const helpDropdownExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'help-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; // @public (undocumented) -export interface HelpDropdownProps { - // (undocumented) - layout?: CSSProperties; -} - -// @public -export type LogoURLs = - | { - light: string; - dark: string; - } - | string - | undefined; - -// @public -export const LogoutButton: ComponentType; +export const logoutMenuItemExtension: OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'logout'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; +}>; // @public -export interface MenuItemConfig { +export interface MenuItemParams { // (undocumented) - Component: ComponentType; + component?: ComponentType; // (undocumented) icon?: string; // (undocumented) - label: string; - // (undocumented) - labelKey?: string; - // (undocumented) link?: string; // (undocumented) onClick?: () => void; // (undocumented) - subLabel?: string; - // (undocumented) - subLabelKey?: string; -} - -// @public -export const MenuItemLink: ComponentType; - -// @public -export interface MenuItemLinkProps { - // (undocumented) - icon?: string; + priority?: number; + sectionLabel?: string; + sectionLink?: string; + sectionLinkLabel?: string; // (undocumented) subTitle?: string; // (undocumented) subTitleKey?: string; // (undocumented) + target: string; + // (undocumented) title?: string; // (undocumented) titleKey?: string; - // (undocumented) - to: string; - // (undocumented) - tooltip?: string; } -// @public -export const NotificationBanner: ( - props: NotificationBannerProps, -) => JSX_2.Element | null; - // @public (undocumented) -export type NotificationBannerDismiss = 'none' | 'session' | 'localstorage'; +export const myProfileMenuItemExtension: OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'my-profile'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; +}>; // @public (undocumented) -export interface NotificationBannerProps { - // (undocumented) - backgroundColor?: string; - // (undocumented) - borderColor?: string; - // (undocumented) - dismiss?: NotificationBannerDismiss; - // (undocumented) - icon?: string; - // (undocumented) - id?: string; - // (undocumented) - layout?: CSSProperties; - // (undocumented) - markdown?: boolean; - // (undocumented) - textColor?: string; - // (undocumented) - title: string; -} +export const notificationButtonExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'notification-button'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; // @public (undocumented) -export const NotificationButton: ( - input: NotificationButtonProps, -) => JSX_2.Element | null; +export const profileDropdownExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'profile-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; // @public (undocumented) -export interface NotificationButtonProps { - // (undocumented) - badgeColor?: - | 'primary' - | 'secondary' - | 'default' - | 'error' - | 'info' - | 'success' - | 'warning'; - // (undocumented) - color?: - | 'inherit' - | 'default' - | 'primary' - | 'secondary' - | 'error' - | 'info' - | 'success' - | 'warning'; - // (undocumented) - layout?: CSSProperties; - // (undocumented) - size?: 'small' | 'medium' | 'large'; - // (undocumented) - title?: string; - // (undocumented) - to?: string; - // (undocumented) - tooltip?: string; -} - -// @public -export const ProfileDropdown: ComponentType; - -// @public -export interface ProfileDropdownProps { - // (undocumented) - layout?: CSSProperties; -} - -// @public -export const RegisterAComponentSection: ComponentType; - -// @public -export type RegisterAComponentSectionProps = { - hideDivider: boolean; - handleClose: () => void; -}; - -// @public -export const SearchComponent: ComponentType; - -// @public -export const SoftwareTemplatesSection: ComponentType; - -// @public -export type SoftwareTemplatesSectionProps = { - handleClose: () => void; - hideDivider?: boolean; -}; +export const searchExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'search'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; -// @public -export const Spacer: (input: SpacerProps) => JSX_2.Element; +// @public (undocumented) +export const selfServiceButtonExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'self-service-button'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; // @public (undocumented) -export interface SpacerProps { - // (undocumented) - growFactor?: number; - // (undocumented) - layout?: CSSProperties; - // (undocumented) - minWidth?: number | string; -} +export const settingsMenuItemExtension: OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'settings'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; +}>; -// @public -export const StarredDropdown: () => JSX_2.Element; +// @public (undocumented) +export const spacerExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'spacer'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; // @public (undocumented) -export const SupportButton: ComponentType; +export const starredDropdownExtension: OverridableExtensionDefinition<{ + kind: 'gh-component'; + name: 'starred-dropdown'; + config: { + priority: number | undefined; + }; + configInput: { + priority?: number | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderComponentData, + 'global-header.component', + {} + >; + inputs: {}; + params: ToolbarComponentParams; +}>; // @public (undocumented) -export interface SupportButtonProps { +export const supportButtonMenuItemExtension: OverridableExtensionDefinition<{ + kind: 'gh-menu-item'; + name: 'support-button'; + config: { + priority: number | undefined; + title: string | undefined; + titleKey: string | undefined; + icon: string | undefined; + link: string | undefined; + sectionLabel: string | undefined; + sectionLink: string | undefined; + sectionLinkLabel: string | undefined; + }; + configInput: { + link?: string | undefined; + title?: string | undefined; + icon?: string | undefined; + titleKey?: string | undefined; + priority?: number | undefined; + sectionLabel?: string | undefined; + sectionLink?: string | undefined; + sectionLinkLabel?: string | undefined; + }; + output: ExtensionDataRef< + GlobalHeaderMenuItemData, + 'global-header.menu-item', + {} + >; + inputs: {}; + params: MenuItemParams; +}>; + +// @public +export interface ToolbarComponentParams { + // (undocumented) + component?: ComponentType; // (undocumented) icon?: string; + layout?: Record; + // (undocumented) + link?: string; // (undocumented) onClick?: () => void; // (undocumented) - style?: CSSProperties; + priority?: number; // (undocumented) title?: string; // (undocumented) titleKey?: string; // (undocumented) - to?: string; - // (undocumented) tooltip?: string; } +// @public +export function useGlobalHeaderComponents(): GlobalHeaderComponentData[]; + +// @public +export function useGlobalHeaderMenuItems( + target: string, +): GlobalHeaderMenuItemData[]; + // (No @packageDocumentation comment for this package) ``` diff --git a/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeader.tsx b/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeader.tsx index bb7e5068055..069b226ae9e 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeader.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeader.tsx @@ -31,7 +31,7 @@ const generateClassName = createGenerateClassName({ * Global header bar. Reads toolbar items from GlobalHeaderContext * and renders them in a sticky AppBar. * - * @alpha + * @public */ export const GlobalHeader = () => { const components = useGlobalHeaderComponents(); diff --git a/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderDropdown.tsx b/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderDropdown.tsx index c407c09ff11..ae9e7e9ac75 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderDropdown.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderDropdown.tsx @@ -27,7 +27,7 @@ import { GlobalHeaderDropdownContent } from './GlobalHeaderDropdownContent'; /** * Props for {@link GlobalHeaderDropdown}. * - * @alpha + * @public */ export interface GlobalHeaderDropdownProps { /** Extension target name that items are collected from (e.g. `'help'`, `'create'`). */ @@ -57,7 +57,7 @@ export interface GlobalHeaderDropdownProps { * by section, sorts by priority, and renders them inside a * `HeaderDropdownComponent`. * - * @alpha + * @public */ export const GlobalHeaderDropdown = ({ target, diff --git a/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderMenuItem.tsx b/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderMenuItem.tsx index f01e77dd9a2..94dbd3b7d3a 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderMenuItem.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/components/GlobalHeaderMenuItem.tsx @@ -23,7 +23,7 @@ import { MenuItemLink } from '../../components/MenuItemLink/MenuItemLink'; /** * Props for {@link GlobalHeaderMenuItem}. * - * @alpha + * @public */ export interface GlobalHeaderMenuItemProps { /** Navigation URL. When absent the item renders as a plain action button. */ @@ -64,7 +64,7 @@ export interface GlobalHeaderMenuItemProps { * ); * ``` * - * @alpha + * @public */ export const GlobalHeaderMenuItem = ({ to, diff --git a/workspaces/global-header/plugins/global-header/src/alpha/defaults/index.ts b/workspaces/global-header/plugins/global-header/src/alpha/defaults/index.ts index e84e35fe8f7..0f8a91efc15 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/defaults/index.ts +++ b/workspaces/global-header/plugins/global-header/src/alpha/defaults/index.ts @@ -41,7 +41,7 @@ import { /** * All default toolbar component extensions. - * @alpha + * @public */ export const defaultToolbarExtensions = [ companyLogoExtension, @@ -58,7 +58,7 @@ export const defaultToolbarExtensions = [ /** * All default menu item extensions. - * @alpha + * @public */ export const defaultMenuItemExtensions = [ settingsMenuItemExtension, diff --git a/workspaces/global-header/plugins/global-header/src/alpha/defaults/menuItemExtensions.tsx b/workspaces/global-header/plugins/global-header/src/alpha/defaults/menuItemExtensions.tsx index 11e74d7ab35..e9fb8245b0a 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/defaults/menuItemExtensions.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/defaults/menuItemExtensions.tsx @@ -35,7 +35,7 @@ import { MyProfileMenuItem } from '../components/MyProfileMenuItem'; // Profile dropdown items // --------------------------------------------------------------------------- -/** @alpha */ +/** @public */ export const settingsMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ name: 'settings', params: { @@ -48,7 +48,7 @@ export const settingsMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ }, }); -/** @alpha */ +/** @public */ export const myProfileMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ name: 'my-profile', params: { @@ -58,7 +58,7 @@ export const myProfileMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ }, }); -/** @alpha */ +/** @public */ export const logoutMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ name: 'logout', params: { @@ -72,7 +72,7 @@ export const logoutMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ // Help dropdown items // --------------------------------------------------------------------------- -/** @alpha */ +/** @public */ export const supportButtonMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ name: 'support-button', @@ -87,7 +87,7 @@ export const supportButtonMenuItemExtension = // App launcher dropdown items // --------------------------------------------------------------------------- -/** @alpha */ +/** @public */ export const appLauncherDevHubMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ name: 'app-launcher-devhub', @@ -102,7 +102,7 @@ export const appLauncherDevHubMenuItemExtension = }, }); -/** @alpha */ +/** @public */ export const appLauncherRhdhLocalMenuItemExtension = GlobalHeaderMenuItemBlueprint.make({ name: 'app-launcher-rhdh-local', diff --git a/workspaces/global-header/plugins/global-header/src/alpha/defaults/toolbarExtensions.tsx b/workspaces/global-header/plugins/global-header/src/alpha/defaults/toolbarExtensions.tsx index e63925115ac..d98d6cdd855 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/defaults/toolbarExtensions.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/defaults/toolbarExtensions.tsx @@ -45,13 +45,13 @@ const SelfServiceButton = () => ( /> ); -/** @alpha */ +/** @public */ export const companyLogoExtension = GlobalHeaderComponentBlueprint.make({ name: 'company-logo', params: { component: CompanyLogoWrapper, priority: 200 }, }); -/** @alpha */ +/** @public */ export const searchExtension = GlobalHeaderComponentBlueprint.make({ name: 'search', params: { @@ -61,13 +61,13 @@ export const searchExtension = GlobalHeaderComponentBlueprint.make({ }, }); -/** @alpha */ +/** @public */ export const spacerExtension = GlobalHeaderComponentBlueprint.make({ name: 'spacer', params: { component: Spacer, priority: 99, layout: { flexGrow: 0 } }, }); -/** @alpha */ +/** @public */ export const selfServiceButtonExtension = GlobalHeaderComponentBlueprint.make({ name: 'self-service-button', params: { @@ -76,38 +76,38 @@ export const selfServiceButtonExtension = GlobalHeaderComponentBlueprint.make({ }, }); -/** @alpha */ +/** @public */ export const starredDropdownExtension = GlobalHeaderComponentBlueprint.make({ name: 'starred-dropdown', params: { component: StarredDropdown, priority: 85 }, }); -/** @alpha */ +/** @public */ export const applicationLauncherDropdownExtension = GlobalHeaderComponentBlueprint.make({ name: 'app-launcher-dropdown', params: { component: ApplicationLauncherDropdown, priority: 82 }, }); -/** @alpha */ +/** @public */ export const helpDropdownExtension = GlobalHeaderComponentBlueprint.make({ name: 'help-dropdown', params: { component: HelpDropdown, priority: 80 }, }); -/** @alpha */ +/** @public */ export const notificationButtonExtension = GlobalHeaderComponentBlueprint.make({ name: 'notification-button', params: { component: NotificationButton, priority: 70 }, }); -/** @alpha */ +/** @public */ export const dividerExtension = GlobalHeaderComponentBlueprint.make({ name: 'divider', params: { component: Divider, priority: 50 }, }); -/** @alpha */ +/** @public */ export const profileDropdownExtension = GlobalHeaderComponentBlueprint.make({ name: 'profile-dropdown', params: { component: ProfileDropdown, priority: 10 }, diff --git a/workspaces/global-header/plugins/global-header/src/alpha/extensions/GlobalHeaderContext.tsx b/workspaces/global-header/plugins/global-header/src/alpha/extensions/GlobalHeaderContext.tsx index 7fa15236c4f..bddce4673a2 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/extensions/GlobalHeaderContext.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/extensions/GlobalHeaderContext.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { createContext, useContext, useMemo } from 'react'; +import React, { createContext, useContext, useMemo } from 'react'; import type { GlobalHeaderComponentData, @@ -26,10 +26,20 @@ interface GlobalHeaderContextValue { menuItems: GlobalHeaderMenuItemData[]; } -const GlobalHeaderContext = createContext({ - components: [], - menuItems: [], -}); +const CONTEXT_KEY = '__global_header_context__' as keyof typeof globalThis; + +function getOrCreateContext(): React.Context { + const existing = (globalThis as any)[CONTEXT_KEY]; + if (existing) return existing as React.Context; + const ctx = createContext({ + components: [], + menuItems: [], + }); + (globalThis as any)[CONTEXT_KEY] = ctx; + return ctx; +} + +const GlobalHeaderContext = getOrCreateContext(); /** * Provider that distributes collected header extension data to child components. @@ -56,7 +66,7 @@ export const GlobalHeaderProvider = ({ /** * Returns all toolbar-level header components, sorted by priority (highest first). * - * @alpha + * @public */ export function useGlobalHeaderComponents(): GlobalHeaderComponentData[] { return useContext(GlobalHeaderContext).components; @@ -65,7 +75,7 @@ export function useGlobalHeaderComponents(): GlobalHeaderComponentData[] { /** * Returns menu items for a specific dropdown target, sorted by priority (highest first). * - * @alpha + * @public */ export function useGlobalHeaderMenuItems( target: string, diff --git a/workspaces/global-header/plugins/global-header/src/alpha/extensions/blueprints.tsx b/workspaces/global-header/plugins/global-header/src/alpha/extensions/blueprints.tsx index a3b172c5f49..1f357dc84a2 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/extensions/blueprints.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/extensions/blueprints.tsx @@ -37,7 +37,7 @@ import { * (`icon`, `title`, `link`/`onClick`) and let the framework render a * consistent `HeaderIconButton` automatically (tier 1). * - * @alpha + * @public */ export interface ToolbarComponentParams { icon?: string; @@ -67,7 +67,7 @@ export interface ToolbarComponentParams { * Items with data fields (with or without a custom component) are grouped * by `sectionLabel` and rendered inside `MenuSection`. * - * @alpha + * @public */ export interface MenuItemParams { target: string; @@ -156,7 +156,7 @@ function createDataDrivenToolbarComponent( * priority: 200 * ``` * - * @alpha + * @public */ export const GlobalHeaderComponentBlueprint = createExtensionBlueprint({ kind: 'gh-component', @@ -206,7 +206,7 @@ export const GlobalHeaderComponentBlueprint = createExtensionBlueprint({ * sectionLabel: mySection * ``` * - * @alpha + * @public */ export const GlobalHeaderMenuItemBlueprint = createExtensionBlueprint({ kind: 'gh-menu-item', diff --git a/workspaces/global-header/plugins/global-header/src/alpha/extensions/dataRefs.ts b/workspaces/global-header/plugins/global-header/src/alpha/extensions/dataRefs.ts index 173f2fa8916..4a6494387d7 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/extensions/dataRefs.ts +++ b/workspaces/global-header/plugins/global-header/src/alpha/extensions/dataRefs.ts @@ -25,7 +25,7 @@ import type { * Extension data ref carrying toolbar component data from a plugin to the * global header wrapper. * - * @alpha + * @public */ export const globalHeaderComponentDataRef = createExtensionDataRef().with({ @@ -36,7 +36,7 @@ export const globalHeaderComponentDataRef = * Extension data ref carrying menu item data from a plugin to the * global header wrapper. * - * @alpha + * @public */ export const globalHeaderMenuItemDataRef = createExtensionDataRef().with({ diff --git a/workspaces/global-header/plugins/global-header/src/alpha/extensions/globalHeaderModule.tsx b/workspaces/global-header/plugins/global-header/src/alpha/extensions/globalHeaderModule.tsx index e47c1fd9301..a4938a83799 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/extensions/globalHeaderModule.tsx +++ b/workspaces/global-header/plugins/global-header/src/alpha/extensions/globalHeaderModule.tsx @@ -119,7 +119,7 @@ const globalHeaderExtension = AppRootWrapperBlueprint.makeWithOverrides({ * marked `internal: true`, restricting attachments to extensions from the * `app` plugin. * - * @alpha + * @public */ export const globalHeaderModule = createFrontendModule({ pluginId: 'app', diff --git a/workspaces/global-header/plugins/global-header/src/alpha/index.ts b/workspaces/global-header/plugins/global-header/src/alpha/index.ts index ed3bc5e25a6..0b0fd1ec516 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/index.ts +++ b/workspaces/global-header/plugins/global-header/src/alpha/index.ts @@ -19,5 +19,4 @@ * @packageDocumentation */ -export * from '..'; -export { default } from '..'; +export * from '../translations'; diff --git a/workspaces/global-header/plugins/global-header/src/alpha/types.ts b/workspaces/global-header/plugins/global-header/src/alpha/types.ts index 488f8358670..a7f21827e34 100644 --- a/workspaces/global-header/plugins/global-header/src/alpha/types.ts +++ b/workspaces/global-header/plugins/global-header/src/alpha/types.ts @@ -20,7 +20,7 @@ import type { ComponentType } from 'react'; * Data produced by a `GlobalHeaderComponentBlueprint` extension. * Represents a single toolbar-level item in the global header. * - * @alpha + * @public */ export interface GlobalHeaderComponentData { component: ComponentType; @@ -42,7 +42,7 @@ export interface GlobalHeaderComponentData { * which provides `` wrapping, `` navigation, section headers * and dividers. * - * @alpha + * @public */ export interface GlobalHeaderMenuItemData { target: string; diff --git a/workspaces/global-header/plugins/global-header/src/globalHeaderModuleExport.ts b/workspaces/global-header/plugins/global-header/src/globalHeaderModuleExport.ts new file mode 100644 index 00000000000..e1d26cc42cb --- /dev/null +++ b/workspaces/global-header/plugins/global-header/src/globalHeaderModuleExport.ts @@ -0,0 +1,16 @@ +/* + * Copyright Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { globalHeaderModule as default } from './alpha/extensions/globalHeaderModule'; diff --git a/workspaces/global-header/plugins/global-header/src/globalHeaderTranslationsModuleExport.ts b/workspaces/global-header/plugins/global-header/src/globalHeaderTranslationsModuleExport.ts new file mode 100644 index 00000000000..13a0aa375ff --- /dev/null +++ b/workspaces/global-header/plugins/global-header/src/globalHeaderTranslationsModuleExport.ts @@ -0,0 +1,16 @@ +/* + * Copyright Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { globalHeaderTranslationsModule as default } from './index'; From 7e15cbe0c3b64c595cf4058e630b6f4be7c309ec Mon Sep 17 00:00:00 2001 From: rohitratannagar Date: Wed, 8 Jul 2026 05:21:03 +0530 Subject: [PATCH 3/4] fix(global-header): add missing name to stable translation extension Signed-off-by: rohitratannagar --- workspaces/global-header/plugins/global-header/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/workspaces/global-header/plugins/global-header/src/index.ts b/workspaces/global-header/plugins/global-header/src/index.ts index 3543e0fc7e9..d2ff4704dd9 100644 --- a/workspaces/global-header/plugins/global-header/src/index.ts +++ b/workspaces/global-header/plugins/global-header/src/index.ts @@ -89,6 +89,7 @@ export { globalHeaderTranslationRef } from './translations/ref'; export { globalHeaderTranslations } from './translations'; const globalHeaderTranslation = TranslationBlueprint.make({ + name: 'global-header-translations', params: { resource: globalHeaderTranslations, }, From be6f3d1f9d72111cf277eb741a9da4a14dc8faed Mon Sep 17 00:00:00 2001 From: rohitratannagar Date: Tue, 21 Jul 2026 14:51:15 +0530 Subject: [PATCH 4/4] updated the changeset Signed-off-by: rohitratannagar --- .../.changeset/promote-global-header-nfs-stable.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/global-header/.changeset/promote-global-header-nfs-stable.md b/workspaces/global-header/.changeset/promote-global-header-nfs-stable.md index 09459c5d493..aa910aaeeb7 100644 --- a/workspaces/global-header/.changeset/promote-global-header-nfs-stable.md +++ b/workspaces/global-header/.changeset/promote-global-header-nfs-stable.md @@ -2,4 +2,4 @@ '@red-hat-developer-hub/backstage-plugin-global-header': minor --- -Promote global-header NFS plugin from `/alpha` to stable. The NFS-related extensions, components, and APIs are now exported from the main package entry point. Alpha exports are preserved as re-exports for backwards compatibility. +Promote global-header NFS plugin from `/alpha` to stable. NFS APIs are now exported from the main package entry point. OFS APIs move to `/legacy` (deprecated). Translations remain at `/alpha`.