|
|
|
@@ -7,25 +7,30 @@
|
|
|
|
|
|
|
|
|
|
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { ApiRef } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { FieldExtensionOptions } from '@backstage/plugin-scaffolder-react';
|
|
|
|
|
import { FormField } from '@internal/scaffolder';
|
|
|
|
|
import { FormFieldExtensionData } from '@backstage/plugin-scaffolder-react/alpha';
|
|
|
|
|
import type { FormProps as FormProps_2 } from '@rjsf/core';
|
|
|
|
|
import { FormProps as FormProps_3 } from '@backstage/plugin-scaffolder-react';
|
|
|
|
|
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { IconComponent } from '@backstage/core-plugin-api';
|
|
|
|
|
import { JsonValue } from '@backstage/types';
|
|
|
|
|
import { JSX as JSX_2 } from 'react';
|
|
|
|
|
import { LayoutOptions } from '@backstage/plugin-scaffolder-react';
|
|
|
|
|
import { PathParams } from '@backstage/core-plugin-api';
|
|
|
|
|
import { default as React_2 } from 'react';
|
|
|
|
|
import { ReviewStepProps } from '@backstage/plugin-scaffolder-react';
|
|
|
|
|
import { RouteRef } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { ScaffolderFormDecorator } from '@backstage/plugin-scaffolder-react/alpha';
|
|
|
|
|
import { SubRouteRef } from '@backstage/frontend-plugin-api';
|
|
|
|
|
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
|
|
|
import { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react';
|
|
|
|
|
import { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';
|
|
|
|
|
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
|
|
|
|
|
|
|
|
// @alpha (undocumented)
|
|
|
|
@@ -49,21 +54,6 @@ const _default: FrontendPlugin<
|
|
|
|
|
}>;
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
'api:scaffolder': ExtensionDefinition<{
|
|
|
|
|
kind: 'api';
|
|
|
|
|
name: undefined;
|
|
|
|
|
config: {};
|
|
|
|
|
configInput: {};
|
|
|
|
|
output: ConfigurableExtensionDataRef<
|
|
|
|
|
AnyApiFactory,
|
|
|
|
|
'core.api.factory',
|
|
|
|
|
{}
|
|
|
|
|
>;
|
|
|
|
|
inputs: {};
|
|
|
|
|
params: {
|
|
|
|
|
factory: AnyApiFactory;
|
|
|
|
|
};
|
|
|
|
|
}>;
|
|
|
|
|
'page:scaffolder': ExtensionDefinition<{
|
|
|
|
|
kind: 'page';
|
|
|
|
|
name: undefined;
|
|
|
|
@@ -126,6 +116,21 @@ const _default: FrontendPlugin<
|
|
|
|
|
field: () => Promise<FormField>;
|
|
|
|
|
};
|
|
|
|
|
}>;
|
|
|
|
|
'api:scaffolder': ExtensionDefinition<{
|
|
|
|
|
kind: 'api';
|
|
|
|
|
name: undefined;
|
|
|
|
|
config: {};
|
|
|
|
|
configInput: {};
|
|
|
|
|
output: ConfigurableExtensionDataRef<
|
|
|
|
|
AnyApiFactory,
|
|
|
|
|
'core.api.factory',
|
|
|
|
|
{}
|
|
|
|
|
>;
|
|
|
|
|
inputs: {};
|
|
|
|
|
params: {
|
|
|
|
|
factory: AnyApiFactory;
|
|
|
|
|
};
|
|
|
|
|
}>;
|
|
|
|
|
'api:scaffolder/form-fields': ExtensionDefinition<{
|
|
|
|
|
config: {};
|
|
|
|
|
configInput: {};
|
|
|
|
@@ -157,6 +162,24 @@ const _default: FrontendPlugin<
|
|
|
|
|
>;
|
|
|
|
|
export default _default;
|
|
|
|
|
|
|
|
|
|
// @alpha (undocumented)
|
|
|
|
|
export class DefaultScaffolderFormDecoratorsApi
|
|
|
|
|
implements ScaffolderFormDecoratorsApi
|
|
|
|
|
{
|
|
|
|
|
// (undocumented)
|
|
|
|
|
static create(options?: {
|
|
|
|
|
decorators: ScaffolderFormDecorator[];
|
|
|
|
|
}): DefaultScaffolderFormDecoratorsApi;
|
|
|
|
|
// (undocumented)
|
|
|
|
|
getFormDecorators(): Promise<ScaffolderFormDecorator[]>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @alpha (undocumented)
|
|
|
|
|
export const formDecoratorsApiRef: ApiRef<ScaffolderFormDecoratorsApi>;
|
|
|
|
|
|
|
|
|
|
// @alpha (undocumented)
|
|
|
|
|
export const formFieldsApiRef: ApiRef<ScaffolderFormFieldsApi>;
|
|
|
|
|
|
|
|
|
|
// @alpha @deprecated
|
|
|
|
|
export type FormProps = Pick<
|
|
|
|
|
FormProps_2,
|
|
|
|
@@ -170,6 +193,18 @@ export type ScaffolderCustomFieldExplorerClassKey =
|
|
|
|
|
| 'fieldForm'
|
|
|
|
|
| 'preview';
|
|
|
|
|
|
|
|
|
|
// @alpha (undocumented)
|
|
|
|
|
export interface ScaffolderFormDecoratorsApi {
|
|
|
|
|
// (undocumented)
|
|
|
|
|
getFormDecorators(): Promise<ScaffolderFormDecorator[]>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @alpha (undocumented)
|
|
|
|
|
export interface ScaffolderFormFieldsApi {
|
|
|
|
|
// (undocumented)
|
|
|
|
|
getFormFields(): Promise<FormFieldExtensionData[]>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @public (undocumented)
|
|
|
|
|
export type ScaffolderTemplateEditorClassKey =
|
|
|
|
|
| 'root'
|
|
|
|
@@ -379,5 +414,20 @@ export type TemplateWizardPageProps = {
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// @alpha (undocumented)
|
|
|
|
|
export const useFormDecorators: ({
|
|
|
|
|
manifest,
|
|
|
|
|
}: {
|
|
|
|
|
manifest?: TemplateParameterSchema | undefined;
|
|
|
|
|
}) => {
|
|
|
|
|
run: (opts: {
|
|
|
|
|
formState: Record<string, JsonValue>;
|
|
|
|
|
secrets: Record<string, string>;
|
|
|
|
|
}) => Promise<{
|
|
|
|
|
formState: Record<string, JsonValue>;
|
|
|
|
|
secrets: Record<string, string>;
|
|
|
|
|
}>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
|
```
|
|
|
|
|