Add changesets and the new api report
Signed-off-by: Min Kim <minkimcello@gmail.com> Co-authored-by: Taras Mankovski <taras@frontside.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': minor
|
||||
---
|
||||
|
||||
Allow `TemplateListPage` and `TemplateWizardPage` to be passed in as props
|
||||
-1
@@ -37,7 +37,6 @@ const checkedIcon = <CheckBoxIcon fontSize="small" />;
|
||||
/**
|
||||
* The Category Picker that is rendered on the left side for picking
|
||||
* categories and filtering the template list.
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export const TemplateCategoryPicker = () => {
|
||||
|
||||
@@ -5,8 +5,12 @@
|
||||
```ts
|
||||
/// <reference types="react" />
|
||||
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { FormProps as FormProps_2 } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import type { FormProps as FormProps_3 } from '@rjsf/core-v5';
|
||||
import { LayoutOptions } from '@backstage/plugin-scaffolder-react';
|
||||
import { LinkProps } from 'react-router-dom';
|
||||
import { NextFieldExtensionOptions } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ScaffolderTaskOutput } from '@backstage/plugin-scaffolder-react';
|
||||
@@ -28,6 +32,8 @@ export type NextRouterProps = {
|
||||
TemplateOutputsComponent?: React_2.ComponentType<{
|
||||
output?: ScaffolderTaskOutput;
|
||||
}>;
|
||||
TemplateListPageComponent?: React_2.ComponentType<TemplateListPageProps>;
|
||||
TemplateWizardPageComponent?: React_2.ComponentType<TemplateWizardPageProps>;
|
||||
};
|
||||
groups?: TemplateGroupFilter[];
|
||||
templateFilter?: (entity: TemplateEntityV1beta3) => boolean;
|
||||
@@ -44,11 +50,60 @@ export const NextScaffolderPage: (
|
||||
props: PropsWithChildren<NextRouterProps>,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const registerComponentRouteRef: ExternalRouteRef<undefined, true>;
|
||||
|
||||
// @alpha
|
||||
export const RegisterExistingButton: (
|
||||
props: RegisterExistingButtonProps,
|
||||
) => JSX.Element | null;
|
||||
|
||||
// @alpha
|
||||
export type RegisterExistingButtonProps = {
|
||||
title: string;
|
||||
} & Partial<Pick<LinkProps, 'to'>>;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type TemplateGroupFilter = {
|
||||
title?: React_2.ReactNode;
|
||||
filter: (entity: TemplateEntityV1beta3) => boolean;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export const TemplateGroups: (props: TemplateGroupsProps) => JSX.Element | null;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export interface TemplateGroupsProps {
|
||||
// (undocumented)
|
||||
groups: TemplateGroupFilter[];
|
||||
// (undocumented)
|
||||
TemplateCardComponent?: React_2.ComponentType<{
|
||||
template: TemplateEntityV1beta3;
|
||||
}>;
|
||||
// (undocumented)
|
||||
templateFilter?: (entity: TemplateEntityV1beta3) => boolean;
|
||||
}
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type TemplateListPageProps = {
|
||||
TemplateCardComponent?: React_2.ComponentType<{
|
||||
template: TemplateEntityV1beta3;
|
||||
}>;
|
||||
groups?: TemplateGroupFilter[];
|
||||
templateFilter?: (entity: TemplateEntityV1beta3) => boolean;
|
||||
contextMenu?: {
|
||||
editor?: boolean;
|
||||
actions?: boolean;
|
||||
tasks?: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type TemplateWizardPageProps = {
|
||||
customFieldExtensions: NextFieldExtensionOptions<any, any>[];
|
||||
layouts?: LayoutOptions[];
|
||||
FormProps?: FormProps_2;
|
||||
};
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -138,8 +138,8 @@ export const EntityTagsPickerFieldExtension: FieldExtensionComponent_2<
|
||||
string[],
|
||||
{
|
||||
showCounts?: boolean | undefined;
|
||||
kinds?: string[] | undefined;
|
||||
helperText?: string | undefined;
|
||||
kinds?: string[] | undefined;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -148,8 +148,8 @@ export const EntityTagsPickerFieldSchema: FieldSchema<
|
||||
string[],
|
||||
{
|
||||
showCounts?: boolean | undefined;
|
||||
kinds?: string[] | undefined;
|
||||
helperText?: string | undefined;
|
||||
kinds?: string[] | undefined;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -315,8 +315,8 @@ export const RepoUrlPickerFieldExtension: FieldExtensionComponent_2<
|
||||
| {
|
||||
azure?: string[] | undefined;
|
||||
github?: string[] | undefined;
|
||||
gitlab?: string[] | undefined;
|
||||
bitbucket?: string[] | undefined;
|
||||
gitlab?: string[] | undefined;
|
||||
gerrit?: string[] | undefined;
|
||||
}
|
||||
| undefined;
|
||||
@@ -341,8 +341,8 @@ export const RepoUrlPickerFieldSchema: FieldSchema<
|
||||
| {
|
||||
azure?: string[] | undefined;
|
||||
github?: string[] | undefined;
|
||||
gitlab?: string[] | undefined;
|
||||
bitbucket?: string[] | undefined;
|
||||
gitlab?: string[] | undefined;
|
||||
gerrit?: string[] | undefined;
|
||||
}
|
||||
| undefined;
|
||||
|
||||
@@ -21,9 +21,9 @@ export {
|
||||
type TemplateGroupsProps,
|
||||
type NextRouterProps,
|
||||
type FormProps,
|
||||
CategoryPicker,
|
||||
RegisterExistingButton,
|
||||
type RegisterExistingButtonProps,
|
||||
ContextMenu,
|
||||
type TemplateListPageProps,
|
||||
type TemplateWizardPageProps,
|
||||
} from './next';
|
||||
export { registerComponentRouteRef } from './routes';
|
||||
|
||||
@@ -39,6 +39,9 @@ export type TemplateGroupFilter = {
|
||||
filter: (entity: TemplateEntityV1beta3) => boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export interface TemplateGroupsProps {
|
||||
groups: TemplateGroupFilter[];
|
||||
templateFilter?: (entity: TemplateEntityV1beta3) => boolean;
|
||||
@@ -47,6 +50,9 @@ export interface TemplateGroupsProps {
|
||||
}>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export const TemplateGroups = (props: TemplateGroupsProps) => {
|
||||
const { loading, error, entities } = useEntityList();
|
||||
const { groups, templateFilter, TemplateCardComponent } = props;
|
||||
|
||||
@@ -48,6 +48,9 @@ import {
|
||||
scaffolderListTaskRouteRef,
|
||||
} from '../../routes';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export type TemplateListPageProps = {
|
||||
TemplateCardComponent?: React.ComponentType<{
|
||||
template: TemplateEntityV1beta3;
|
||||
@@ -76,6 +79,9 @@ const createGroupsWithOther = (
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export const TemplateListPage = (props: TemplateListPageProps) => {
|
||||
const registerComponentLink = useRouteRef(registerComponentRouteRef);
|
||||
const {
|
||||
|
||||
@@ -22,9 +22,5 @@ export type {
|
||||
TemplateGroupsProps,
|
||||
} from './TemplateGroups';
|
||||
|
||||
export { CategoryPicker } from './CategoryPicker';
|
||||
|
||||
export { RegisterExistingButton } from './RegisterExistingButton';
|
||||
export type { RegisterExistingButtonProps } from './RegisterExistingButton';
|
||||
|
||||
export { ContextMenu } from './ContextMenu';
|
||||
|
||||
@@ -41,6 +41,9 @@ import {
|
||||
selectedTemplateRouteRef,
|
||||
} from '../../routes';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export type TemplateWizardPageProps = {
|
||||
customFieldExtensions: NextFieldExtensionOptions<any, any>[];
|
||||
layouts?: LayoutOptions[];
|
||||
|
||||
@@ -19,6 +19,9 @@ import {
|
||||
createSubRouteRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const registerComponentRouteRef = createExternalRouteRef({
|
||||
id: 'register-component',
|
||||
optional: true,
|
||||
|
||||
Reference in New Issue
Block a user