Merge pull request #13252 from backstage/freben/api-well-ok-then
When the 🧹 s go marching in
This commit is contained in:
+40
-31
@@ -11,8 +11,11 @@ import { default as React_2 } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "ClockConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type CardExtensionProps<T> = ComponentRenderer & {
|
||||
title?: string;
|
||||
} & T;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ClockConfig = {
|
||||
label: string;
|
||||
@@ -29,6 +32,14 @@ export const ComponentAccordion: (props: {
|
||||
ContextProvider?: ((props: any) => JSX.Element) | undefined;
|
||||
}) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ComponentParts = {
|
||||
Content: (props?: any) => JSX.Element;
|
||||
Actions?: () => JSX.Element;
|
||||
Settings?: () => JSX.Element;
|
||||
ContextProvider?: (props: any) => JSX.Element;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ComponentRenderer = {
|
||||
Renderer?: (props: RendererProps) => JSX.Element;
|
||||
@@ -50,8 +61,6 @@ export const ComponentTabs: (props: {
|
||||
}[];
|
||||
}) => JSX.Element;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "CardExtensionProps" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @public
|
||||
export function createCardExtension<T>(options: {
|
||||
title: string;
|
||||
@@ -79,27 +88,19 @@ export const HomepageCompositionRoot: (props: {
|
||||
|
||||
// @public (undocumented)
|
||||
export const HomePageRandomJoke: (
|
||||
props: ComponentRenderer & {
|
||||
title?: string | undefined;
|
||||
} & {
|
||||
props: CardExtensionProps<{
|
||||
defaultCategory?: 'any' | 'programming' | undefined;
|
||||
},
|
||||
}>,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export const HomePageStarredEntities: (
|
||||
props: ComponentRenderer & {
|
||||
title?: string | undefined;
|
||||
},
|
||||
props: CardExtensionProps<unknown>,
|
||||
) => JSX.Element;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "ToolkitContentProps" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @public
|
||||
export const HomePageToolkit: (
|
||||
props: ComponentRenderer & {
|
||||
title?: string | undefined;
|
||||
} & ToolkitContentProps,
|
||||
props: CardExtensionProps<ToolkitContentProps>,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
@@ -111,8 +112,11 @@ export const homePlugin: BackstagePlugin<
|
||||
{}
|
||||
>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "SettingsModal" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type RendererProps = {
|
||||
title: string;
|
||||
} & ComponentParts;
|
||||
|
||||
// @public (undocumented)
|
||||
export const SettingsModal: (props: {
|
||||
open: boolean;
|
||||
@@ -121,24 +125,29 @@ export const SettingsModal: (props: {
|
||||
children: JSX.Element;
|
||||
}) => JSX.Element;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "TemplateBackstageLogoProps" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "TemplateBackstageLogo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const TemplateBackstageLogo: (
|
||||
props: TemplateBackstageLogoProps,
|
||||
) => JSX.Element;
|
||||
export const TemplateBackstageLogo: (props: {
|
||||
classes: {
|
||||
svg: string;
|
||||
path: string;
|
||||
};
|
||||
}) => JSX.Element;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "TemplateBackstageLogoIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const TemplateBackstageLogoIcon: () => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type Tool = {
|
||||
label: string;
|
||||
url: string;
|
||||
icon: React_2.ReactNode;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type ToolkitContentProps = {
|
||||
tools: Tool[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export const WelcomeTitle: () => JSX.Element;
|
||||
|
||||
// Warnings were encountered during analysis:
|
||||
//
|
||||
// src/extensions.d.ts:6:5 - (ae-forgotten-export) The symbol "RendererProps" needs to be exported by the entry point index.d.ts
|
||||
// src/extensions.d.ts:27:5 - (ae-forgotten-export) The symbol "ComponentParts" needs to be exported by the entry point index.d.ts
|
||||
```
|
||||
|
||||
@@ -16,16 +16,13 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
type Classes = {
|
||||
svg: string;
|
||||
path: string;
|
||||
};
|
||||
|
||||
type TemplateBackstageLogoProps = {
|
||||
classes: Classes;
|
||||
};
|
||||
|
||||
export const TemplateBackstageLogo = (props: TemplateBackstageLogoProps) => {
|
||||
/** @public */
|
||||
export const TemplateBackstageLogo = (props: {
|
||||
classes: {
|
||||
svg: string;
|
||||
path: string;
|
||||
};
|
||||
}) => {
|
||||
return (
|
||||
<svg
|
||||
className={props.classes.svg}
|
||||
|
||||
@@ -27,6 +27,7 @@ const useStyles = makeStyles({
|
||||
},
|
||||
});
|
||||
|
||||
/** @public */
|
||||
export const TemplateBackstageLogoIcon = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
DialogTitle,
|
||||
} from '@material-ui/core';
|
||||
|
||||
/** @public */
|
||||
export const SettingsModal = (props: {
|
||||
open: boolean;
|
||||
close: Function;
|
||||
|
||||
@@ -28,16 +28,25 @@ export type ComponentRenderer = {
|
||||
Renderer?: (props: RendererProps) => JSX.Element;
|
||||
};
|
||||
|
||||
type ComponentParts = {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ComponentParts = {
|
||||
Content: (props?: any) => JSX.Element;
|
||||
Actions?: () => JSX.Element;
|
||||
Settings?: () => JSX.Element;
|
||||
ContextProvider?: (props: any) => JSX.Element;
|
||||
};
|
||||
|
||||
type RendererProps = { title: string } & ComponentParts;
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type RendererProps = { title: string } & ComponentParts;
|
||||
|
||||
type CardExtensionProps<T> = ComponentRenderer & { title?: string } & T;
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type CardExtensionProps<T> = ComponentRenderer & { title?: string } & T;
|
||||
|
||||
/**
|
||||
* An extension creator to create card based components for the homepage
|
||||
|
||||
@@ -27,6 +27,7 @@ type TimeObj = {
|
||||
label: string;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export type ClockConfig = {
|
||||
label: string;
|
||||
timeZone: string;
|
||||
|
||||
@@ -52,15 +52,6 @@ const useStyles = makeStyles(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
/**
|
||||
* Props for Toolkit content component {@link Content}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type ToolkitContentProps = {
|
||||
tools: Tool[];
|
||||
};
|
||||
|
||||
/**
|
||||
* A component to display a list of tools for the user.
|
||||
*
|
||||
@@ -85,3 +76,12 @@ export const Content = (props: ToolkitContentProps) => {
|
||||
</List>
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Props for Toolkit Content component.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type ToolkitContentProps = {
|
||||
tools: Tool[];
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
import React, { createContext } from 'react';
|
||||
|
||||
/** @public */
|
||||
export type Tool = {
|
||||
label: string;
|
||||
url: string;
|
||||
|
||||
@@ -17,3 +17,4 @@
|
||||
export { Content } from './Content';
|
||||
export type { ToolkitContentProps } from './Content';
|
||||
export { ContextProvider } from './Context';
|
||||
export type { Tool } from './Context';
|
||||
|
||||
@@ -14,6 +14,5 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './CompanyLogo';
|
||||
export * from './Toolkit';
|
||||
export type { ToolkitContentProps, Tool } from './Toolkit';
|
||||
export type { ClockConfig } from './HeaderWorldClock';
|
||||
|
||||
@@ -35,6 +35,11 @@ export {
|
||||
} from './plugin';
|
||||
export { SettingsModal } from './components';
|
||||
export * from './assets';
|
||||
export type { ClockConfig } from './homePageComponents';
|
||||
export * from './homePageComponents';
|
||||
export { createCardExtension } from './extensions';
|
||||
export type { ComponentRenderer } from './extensions';
|
||||
export type {
|
||||
CardExtensionProps,
|
||||
ComponentParts,
|
||||
ComponentRenderer,
|
||||
RendererProps,
|
||||
} from './extensions';
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
createComponentExtension,
|
||||
createPlugin,
|
||||
@@ -20,7 +21,6 @@ import {
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { createCardExtension } from './extensions';
|
||||
import { ToolkitContentProps } from './homePageComponents';
|
||||
|
||||
import { rootRouteRef } from './routes';
|
||||
|
||||
/** @public */
|
||||
|
||||
Reference in New Issue
Block a user