From 421a4421c2023f9dc59b13e3a8f362387c733fc2 Mon Sep 17 00:00:00 2001 From: rohitratannagar Date: Tue, 16 Jun 2026 13:48:35 +0530 Subject: [PATCH 1/2] 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 0000000000..09459c5d49 --- /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 20af4f401a..c009a3e7d2 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 1979c0a71e..a34ff64c53 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 3083ac3710..3be9e4b28d 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 ea7c9a00a1..03e851a0f0 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 38e727ddd8..ed3bc5e25a 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 1b84c11f94..a17d7398dc 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 33fb9e71d0..3543e0fc7e 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 0000000000..d846f0111d --- /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 94f0809133cb591ed7573fcdc745c2dfe000b6b9 Mon Sep 17 00:00:00 2001 From: rohitratannagar Date: Tue, 16 Jun 2026 13:59:22 +0530 Subject: [PATCH 2/2] updated the report Signed-off-by: rohitratannagar --- .../plugins/global-header/report-alpha.api.md | 72 +- .../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 | 4 +- .../src/alpha/extensions/blueprints.tsx | 8 +- .../src/alpha/extensions/dataRefs.ts | 4 +- .../alpha/extensions/globalHeaderModule.tsx | 2 +- .../plugins/global-header/src/alpha/types.ts | 4 +- 14 files changed, 1708 insertions(+), 301 deletions(-) create mode 100644 workspaces/global-header/plugins/global-header/report-legacy.api.md 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 e9032f907a..684c67c00b 100644 --- a/workspaces/global-header/plugins/global-header/report-alpha.api.md +++ b/workspaces/global-header/plugins/global-header/report-alpha.api.md @@ -17,7 +17,7 @@ import type { ReactNode } from 'react'; import { TranslationRef } from '@backstage/frontend-plugin-api'; import { TranslationResource } from '@backstage/frontend-plugin-api'; -// @alpha (undocumented) +// @public (undocumented) export const appLauncherDevHubMenuItemExtension: OverridableExtensionDefinition<{ kind: 'gh-menu-item'; name: 'app-launcher-devhub'; @@ -50,7 +50,7 @@ export const appLauncherDevHubMenuItemExtension: OverridableExtensionDefinition< params: MenuItemParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const appLauncherRhdhLocalMenuItemExtension: OverridableExtensionDefinition<{ kind: 'gh-menu-item'; name: 'app-launcher-rhdh-local'; @@ -83,7 +83,7 @@ export const appLauncherRhdhLocalMenuItemExtension: OverridableExtensionDefiniti params: MenuItemParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const applicationLauncherDropdownExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'app-launcher-dropdown'; @@ -102,7 +102,7 @@ export const applicationLauncherDropdownExtension: OverridableExtensionDefinitio params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const companyLogoExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'company-logo'; @@ -121,7 +121,7 @@ export const companyLogoExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha +// @public export const defaultMenuItemExtensions: ( | OverridableExtensionDefinition<{ kind: 'gh-menu-item'; @@ -311,7 +311,7 @@ export const defaultMenuItemExtensions: ( }> )[]; -// @alpha +// @public export const defaultToolbarExtensions: ( | OverridableExtensionDefinition<{ kind: 'gh-component'; @@ -485,7 +485,7 @@ export const defaultToolbarExtensions: ( }> )[]; -// @alpha (undocumented) +// @public (undocumented) export const dividerExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'divider'; @@ -504,7 +504,7 @@ export const dividerExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha +// @public export const GlobalHeaderComponentBlueprint: ExtensionBlueprint<{ kind: 'gh-component'; params: ToolbarComponentParams; @@ -529,7 +529,7 @@ export const GlobalHeaderComponentBlueprint: ExtensionBlueprint<{ }; }>; -// @alpha +// @public export interface GlobalHeaderComponentData { // (undocumented) component: ComponentType; @@ -538,19 +538,19 @@ export interface GlobalHeaderComponentData { priority?: number; } -// @alpha +// @public export const globalHeaderComponentDataRef: ConfigurableExtensionDataRef< GlobalHeaderComponentData, 'global-header.component', {} >; -// @alpha +// @public export const GlobalHeaderDropdown: ( input: GlobalHeaderDropdownProps, ) => JSX_2.Element | null; -// @alpha +// @public export interface GlobalHeaderDropdownProps { buttonContent: ReactNode; buttonProps?: ComponentProps; @@ -566,12 +566,12 @@ export const GlobalHeaderIconButton: ( input: HeaderIconButtonProps, ) => JSX_2.Element; -// @alpha +// @public export const GlobalHeaderMenuItem: ( input: GlobalHeaderMenuItemProps, ) => JSX_2.Element; -// @alpha +// @public export const GlobalHeaderMenuItemBlueprint: ExtensionBlueprint<{ kind: 'gh-menu-item'; params: MenuItemParams; @@ -610,7 +610,7 @@ export const GlobalHeaderMenuItemBlueprint: ExtensionBlueprint<{ }; }>; -// @alpha +// @public export interface GlobalHeaderMenuItemData { component?: ComponentType; icon?: string; @@ -630,14 +630,14 @@ export interface GlobalHeaderMenuItemData { type?: 'component' | 'data'; } -// @alpha +// @public export const globalHeaderMenuItemDataRef: ConfigurableExtensionDataRef< GlobalHeaderMenuItemData, 'global-header.menu-item', {} >; -// @alpha +// @public export interface GlobalHeaderMenuItemProps { icon?: string; onClick?: () => void; @@ -649,10 +649,10 @@ export interface GlobalHeaderMenuItemProps { tooltip?: string; } -// @alpha +// @public export const globalHeaderModule: FrontendModule; -// @alpha +// @public const globalHeaderPlugin: OverridableFrontendPlugin< {}, {}, @@ -1061,7 +1061,7 @@ export const globalHeaderTranslationRef: TranslationRef< // @public export const globalHeaderTranslations: TranslationResource<'plugin.global-header'>; -// @alpha +// @public export const globalHeaderTranslationsModule: FrontendModule; // @public (undocumented) @@ -1084,7 +1084,7 @@ export interface HeaderIconButtonProps { tooltip?: string; } -// @alpha (undocumented) +// @public (undocumented) export const helpDropdownExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'help-dropdown'; @@ -1103,7 +1103,7 @@ export const helpDropdownExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const logoutMenuItemExtension: OverridableExtensionDefinition<{ kind: 'gh-menu-item'; name: 'logout'; @@ -1136,7 +1136,7 @@ export const logoutMenuItemExtension: OverridableExtensionDefinition<{ params: MenuItemParams; }>; -// @alpha +// @public export interface MenuItemParams { // (undocumented) component?: ComponentType; @@ -1163,7 +1163,7 @@ export interface MenuItemParams { titleKey?: string; } -// @alpha (undocumented) +// @public (undocumented) export const myProfileMenuItemExtension: OverridableExtensionDefinition<{ kind: 'gh-menu-item'; name: 'my-profile'; @@ -1196,7 +1196,7 @@ export const myProfileMenuItemExtension: OverridableExtensionDefinition<{ params: MenuItemParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const notificationButtonExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'notification-button'; @@ -1215,7 +1215,7 @@ export const notificationButtonExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const profileDropdownExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'profile-dropdown'; @@ -1234,7 +1234,7 @@ export const profileDropdownExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const searchExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'search'; @@ -1253,7 +1253,7 @@ export const searchExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const selfServiceButtonExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'self-service-button'; @@ -1272,7 +1272,7 @@ export const selfServiceButtonExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const settingsMenuItemExtension: OverridableExtensionDefinition<{ kind: 'gh-menu-item'; name: 'settings'; @@ -1305,7 +1305,7 @@ export const settingsMenuItemExtension: OverridableExtensionDefinition<{ params: MenuItemParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const spacerExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'spacer'; @@ -1324,7 +1324,7 @@ export const spacerExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const starredDropdownExtension: OverridableExtensionDefinition<{ kind: 'gh-component'; name: 'starred-dropdown'; @@ -1343,7 +1343,7 @@ export const starredDropdownExtension: OverridableExtensionDefinition<{ params: ToolbarComponentParams; }>; -// @alpha (undocumented) +// @public (undocumented) export const supportButtonMenuItemExtension: OverridableExtensionDefinition<{ kind: 'gh-menu-item'; name: 'support-button'; @@ -1376,7 +1376,7 @@ export const supportButtonMenuItemExtension: OverridableExtensionDefinition<{ params: MenuItemParams; }>; -// @alpha +// @public export interface ToolbarComponentParams { // (undocumented) component?: ComponentType; @@ -1397,13 +1397,11 @@ export interface ToolbarComponentParams { tooltip?: string; } -// @alpha +// @public export function useGlobalHeaderComponents(): GlobalHeaderComponentData[]; -// @alpha +// @public export function useGlobalHeaderMenuItems( target: string, ): GlobalHeaderMenuItemData[]; - -// (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 0000000000..33f80a84ce --- /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 33f80a84ce..34d78f709b 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 bb7e506805..069b226ae9 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 c407c09ff1..ae9e7e9ac7 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 f01e77dd9a..94dbd3b7d3 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 e84e35fe8f..0f8a91efc1 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 11e74d7ab3..e9fb8245b0 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 e63925115a..d98d6cdd85 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 7fa15236c4..d0644a0cf7 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 @@ -56,7 +56,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 +65,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 a3b172c5f4..1f357dc84a 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 173f2fa891..4a6494387d 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 e47c1fd930..a4938a8379 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/types.ts b/workspaces/global-header/plugins/global-header/src/alpha/types.ts index 488f835867..a7f21827e3 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;