chore: export some more things out of the alpha exports

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-10-05 15:07:10 +02:00
parent 1047baa926
commit 8020d8e8e9
2 changed files with 51 additions and 1 deletions
+44
View File
@@ -15,7 +15,9 @@ import { Extension } from '@backstage/core-plugin-api';
import { ExternalRouteRef } from '@backstage/core-plugin-api';
import { FetchApi } from '@backstage/core-plugin-api';
import { FieldProps } from '@rjsf/core';
import { FieldProps as FieldProps_2 } from '@rjsf/utils';
import { FieldValidation } from '@rjsf/core';
import { FieldValidation as FieldValidation_2 } from '@rjsf/utils';
import type { FormProps } from '@rjsf/core';
import { IdentityApi } from '@backstage/core-plugin-api';
import { JsonObject } from '@backstage/types';
@@ -29,6 +31,16 @@ import { ScmIntegrationRegistry } from '@backstage/integration';
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
import { TaskStep } from '@backstage/plugin-scaffolder-common';
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
import { UIOptionsType } from '@rjsf/utils';
import { UiSchema } from '@rjsf/utils';
// @alpha
export function createNextScaffolderFieldExtension<
TReturnValue = unknown,
TInputProps extends UIOptionsType = {},
>(
options: FieldExtensionOptions<TReturnValue, TInputProps>,
): Extension<NextFieldExtensionComponentProps<TReturnValue, TInputProps>>;
// @public
export function createScaffolderFieldExtension<
@@ -155,6 +167,38 @@ export type LogEvent = {
taskId: string;
};
// @alpha
export type NextCustomFieldValidator<TFieldReturnValue> = (
data: TFieldReturnValue,
field: FieldValidation_2,
context: {
apiHolder: ApiHolder;
},
) => void | Promise<void>;
// @alpha
export interface NextFieldExtensionComponentProps<
TFieldReturnValue,
TUiOptions = {},
> extends PropsWithChildren<FieldProps_2<TFieldReturnValue>> {
// (undocumented)
uiSchema?: UiSchema<TFieldReturnValue> & {
'ui:options'?: TUiOptions & UIOptionsType;
};
}
// @alpha
export type NextFieldExtensionOptions<
TFieldReturnValue = unknown,
TInputProps = unknown,
> = {
name: string;
component: (
props: NextFieldExtensionComponentProps<TFieldReturnValue, TInputProps>,
) => JSX.Element | null;
validation?: NextCustomFieldValidator<TFieldReturnValue>;
};
// @alpha
export type NextRouterProps = {
components?: {
+7 -1
View File
@@ -59,11 +59,17 @@ export {
RepoUrlPickerFieldExtension,
ScaffolderPage,
scaffolderPlugin,
NextScaffolderPage,
} from './plugin';
export * from './components';
export type { TaskPageProps } from './components/TaskPage';
/** next exports */
export { NextScaffolderPage } from './plugin';
export type { NextRouterProps } from './next';
export type { TemplateGroupFilter } from './next';
export {
createNextScaffolderFieldExtension,
type NextCustomFieldValidator,
type NextFieldExtensionOptions,
type NextFieldExtensionComponentProps,
} from './extensions';