web/admin: fix circular dependency (#6740)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-09-03 03:12:20 +02:00 committed by GitHub
parent 3970c38752
commit 2b9dc4ccd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions

View File

@ -1,4 +1,5 @@
import { FlowSearch } from "@goauthentik/admin/common/ak-flow-search/FlowSearch";
import { PreventFormSubmit } from "@goauthentik/app/elements/forms/helpers";
import { EVENT_REFRESH } from "@goauthentik/common/constants";
import { MessageLevel } from "@goauthentik/common/messages";
import { camelToSnake, convertToSlug } from "@goauthentik/common/utils";
@ -21,14 +22,6 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
import { ResponseError, ValidationError, ValidationErrorFromJSON } from "@goauthentik/api";
export class PreventFormSubmit {
// Stub class which can be returned by form elements to prevent the form from submitting
constructor(
public message: string,
public element?: HorizontalFormElement,
) {}
}
export class APIError extends Error {
constructor(public response: ValidationError) {
super();

View File

@ -1,8 +1,8 @@
import { PreventFormSubmit } from "@goauthentik/app/elements/forms/helpers";
import { EVENT_REFRESH } from "@goauthentik/common/constants";
import { ascii_letters, digits, groupBy, randomString } from "@goauthentik/common/utils";
import { adaptCSS } from "@goauthentik/common/utils";
import { AKElement } from "@goauthentik/elements/Base";
import { PreventFormSubmit } from "@goauthentik/elements/forms/Form";
import { CustomEmitterElement } from "@goauthentik/elements/utils/eventEmitter";
import { msg } from "@lit/localize";

View File

@ -0,0 +1,9 @@
import { HorizontalFormElement } from "@goauthentik/app/elements/forms/HorizontalFormElement";
export class PreventFormSubmit {
// Stub class which can be returned by form elements to prevent the form from submitting
constructor(
public message: string,
public element?: HorizontalFormElement,
) {}
}