diff --git a/webapp/packages/core-authentication/src/AuthProvidersResource.ts b/webapp/packages/core-authentication/src/AuthProvidersResource.ts index e7cd6b60c7..0b43c5fe49 100644 --- a/webapp/packages/core-authentication/src/AuthProvidersResource.ts +++ b/webapp/packages/core-authentication/src/AuthProvidersResource.ts @@ -20,7 +20,6 @@ import { ServerConfigResource } from '@cloudbeaver/core-root'; import { AuthProviderConfigurationInfoFragment, AuthProviderInfoFragment, GraphQLService } from '@cloudbeaver/core-sdk'; import { AuthConfigurationsResource } from './AuthConfigurationsResource'; -import { AuthSettingsService } from './AuthSettingsService'; export type AuthProvider = NonNullable; export type AuthProviderConfiguration = NonNullable; @@ -32,7 +31,6 @@ export class AuthProvidersResource extends CachedMapResource = IFormPr readonly onConfigure: IExecutorHandlersCollection>; readonly onFillDefaultConfig: IExecutorHandlersCollection>; - readonly onPrepareConfig: IExecutorHandlersCollection; + readonly onPrepareConfig: IExecutorHandlersCollection>; readonly onFormat: IExecutorHandlersCollection>; readonly onValidate: IExecutorHandlersCollection>; readonly onSubmit: IExecutorHandlersCollection>; readonly onState: IExecutorHandlersCollection; - constructor(private readonly localizationService: LocalizationService, private readonly notificationService: NotificationService, name: string) { + constructor( + private readonly localizationService: LocalizationService, + private readonly notificationService: NotificationService, + name: string, + ) { this.parts = new TabsContainer(name); this.actionsContainer = new PlaceholderContainer(); this.onConfigure = new ExecutorHandlersCollection(); diff --git a/webapp/packages/core-ui/src/Form/FormPart.ts b/webapp/packages/core-ui/src/Form/FormPart.ts index 2dcf2063d7..964b9fa2c8 100644 --- a/webapp/packages/core-ui/src/Form/FormPart.ts +++ b/webapp/packages/core-ui/src/Form/FormPart.ts @@ -37,6 +37,7 @@ export abstract class FormPart implements IFormPar this.loading = false; this.formState.submitTask.addHandler(executorHandlerFilter(() => this.isLoaded(), this.save.bind(this))); + this.formState.fillDefaultConfigTask.addHandler(executorHandlerFilter(() => this.isLoaded(), this.fillConfig.bind(this))); this.formState.configureTask.addHandler(executorHandlerFilter(() => this.isLoaded(), this.configure.bind(this))); this.formState.formatTask.addHandler(executorHandlerFilter(() => this.isLoaded(), this.format.bind(this))); this.formState.validationTask.addHandler(executorHandlerFilter(() => this.isLoaded(), this.validate.bind(this))); @@ -150,6 +151,7 @@ export abstract class FormPart implements IFormPar protected configure(data: IFormState, contexts: IExecutionContextProvider>): void | Promise {} protected format(data: IFormState, contexts: IExecutionContextProvider>): void | Promise {} protected validate(data: IFormState, contexts: IExecutionContextProvider>): void | Promise {} + protected fillConfig(data: IFormState, contexts: IExecutionContextProvider>): void | Promise {} protected abstract loader(): Promise; protected abstract saveChanges(data: IFormState, contexts: IExecutionContextProvider>): Promise;