update api-reports and tests
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -20,7 +20,6 @@ import { lightTheme } from '@backstage/theme';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { BrowserRouter, Routes } from 'react-router-dom';
|
||||
import { createRoutableExtension } from '../extensions';
|
||||
import { defaultAppIcons } from './icons';
|
||||
import {
|
||||
configApiRef,
|
||||
@@ -31,6 +30,7 @@ import {
|
||||
createExternalRouteRef,
|
||||
createRouteRef,
|
||||
createSubRouteRef,
|
||||
createRoutableExtension,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { generateBoundRoutes, PrivateAppImpl } from './App';
|
||||
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
*/
|
||||
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { createPlugin, createRouteRef } from '@backstage/core-plugin-api';
|
||||
import {
|
||||
createPlugin,
|
||||
createRouteRef,
|
||||
createRoutableExtension,
|
||||
createComponentExtension,
|
||||
} from '../extensions';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { MemoryRouter, Routes, Route } from 'react-router-dom';
|
||||
import {
|
||||
traverseElementTree,
|
||||
|
||||
@@ -25,7 +25,6 @@ import { render } from '@testing-library/react';
|
||||
import { renderHook } from '@testing-library/react-hooks';
|
||||
import { VersionedValue } from '../lib/versionedValues';
|
||||
import { getGlobalSingleton } from '../lib/globalObject';
|
||||
import { createRoutableExtension } from '../extensions';
|
||||
import {
|
||||
childDiscoverer,
|
||||
routeElementDiscoverer,
|
||||
@@ -34,6 +33,7 @@ import {
|
||||
import {
|
||||
createPlugin,
|
||||
useRouteRef,
|
||||
createRoutableExtension,
|
||||
createRouteRef,
|
||||
createExternalRouteRef,
|
||||
RouteRef,
|
||||
|
||||
@@ -27,11 +27,12 @@ import {
|
||||
routeElementDiscoverer,
|
||||
} from '../extensions/traversal';
|
||||
import {
|
||||
createRoutableExtension,
|
||||
createRouteRef,
|
||||
createPlugin,
|
||||
RouteRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { attachComponentData, createRoutableExtension } from '../extensions';
|
||||
import { attachComponentData } from '../extensions';
|
||||
import { MemoryRouter, Routes, Route } from 'react-router-dom';
|
||||
|
||||
const MockComponent = ({ children }: PropsWithChildren<{ path?: string }>) => (
|
||||
|
||||
@@ -172,7 +172,7 @@ export function createApiFactory<Api, Impl extends Api>(api: ApiRef<Api>, instan
|
||||
export function createApiRef<T>(config: ApiRefConfig): ApiRef<T>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createComponentExtension<T extends (props: any) => JSX.Element>(options: {
|
||||
export function createComponentExtension<T extends (props: any) => JSX.Element | null>(options: {
|
||||
component: ComponentLoader<T>;
|
||||
}): Extension<T>;
|
||||
|
||||
@@ -189,13 +189,13 @@ export function createExternalRouteRef<Params extends {
|
||||
export function createPlugin<Routes extends AnyRoutes = {}, ExternalRoutes extends AnyExternalRoutes = {}>(config: PluginConfig<Routes, ExternalRoutes>): BackstagePlugin<Routes, ExternalRoutes>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createReactExtension<T extends (props: any) => JSX.Element>(options: {
|
||||
export function createReactExtension<T extends (props: any) => JSX.Element | null>(options: {
|
||||
component: ComponentLoader<T>;
|
||||
data?: Record<string, unknown>;
|
||||
}): Extension<T>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createRoutableExtension<T extends (props: any) => JSX.Element>(options: {
|
||||
export function createRoutableExtension<T extends (props: any) => JSX.Element | null>(options: {
|
||||
component: () => Promise<T>;
|
||||
mountPoint: RouteRef;
|
||||
}): Extension<T>;
|
||||
|
||||
Reference in New Issue
Block a user