web: re-cleanup imports not being absolute
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { PFSize } from "@goauthentik/web/elements/Spinner";
|
||||
|
||||
import { CSSResult, LitElement, TemplateResult, html } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
@ -6,8 +8,6 @@ import PFEmptyState from "@patternfly/patternfly/components/EmptyState/empty-sta
|
||||
import PFTitle from "@patternfly/patternfly/components/Title/title.css";
|
||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { PFSize } from "./Spinner";
|
||||
|
||||
@customElement("ak-empty-state")
|
||||
export class EmptyState extends LitElement {
|
||||
@property({ type: String })
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { CURRENT_CLASS, EVENT_REFRESH, ROUTE_SEPARATOR } from "@goauthentik/web/constants";
|
||||
import { getURLParams, updateURLParams } from "@goauthentik/web/elements/router/RouteMatch";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
|
||||
@ -10,8 +11,6 @@ import AKGlobal from "@goauthentik/web/authentik.css";
|
||||
import PFTabs from "@patternfly/patternfly/components/Tabs/tabs.css";
|
||||
import PFGlobal from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { getURLParams, updateURLParams } from "./router/RouteMatch";
|
||||
|
||||
@customElement("ak-tabs")
|
||||
export class Tabs extends LitElement {
|
||||
@property()
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { EVENT_REFRESH } from "@goauthentik/web/constants";
|
||||
import { setURLParams } from "@goauthentik/web/elements/router/RouteMatch";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
|
||||
@ -9,8 +10,6 @@ import AKGlobal from "@goauthentik/web/authentik.css";
|
||||
import PFTreeView from "@patternfly/patternfly/components/TreeView/tree-view.css";
|
||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { setURLParams } from "./router/RouteMatch";
|
||||
|
||||
export interface TreeViewItem {
|
||||
id?: string;
|
||||
label: string;
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
import { SpinnerButton } from "@goauthentik/web/elements/buttons/SpinnerButton";
|
||||
import { MessageLevel } from "@goauthentik/web/elements/messages/Message";
|
||||
import { showMessage } from "@goauthentik/web/elements/messages/MessageContainer";
|
||||
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { SpinnerButton } from "./SpinnerButton";
|
||||
|
||||
@customElement("ak-action-button")
|
||||
export class ActionButton extends SpinnerButton {
|
||||
@property({ attribute: false })
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { DEFAULT_CONFIG } from "@goauthentik/web/api/Config";
|
||||
import { ERROR_CLASS, SECONDARY_CLASS, SUCCESS_CLASS } from "@goauthentik/web/constants";
|
||||
import { PFSize } from "@goauthentik/web/elements/Spinner";
|
||||
import { ActionButton } from "@goauthentik/web/elements/buttons/ActionButton";
|
||||
import { MessageLevel } from "@goauthentik/web/elements/messages/Message";
|
||||
import { showMessage } from "@goauthentik/web/elements/messages/MessageContainer";
|
||||
|
||||
@ -9,8 +10,6 @@ import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { CoreApi, ResponseError } from "@goauthentik/api";
|
||||
|
||||
import { ActionButton } from "./ActionButton";
|
||||
|
||||
@customElement("ak-token-copy-button")
|
||||
export class TokenCopyButton extends ActionButton {
|
||||
@property()
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import { PFSize } from "@goauthentik/web/elements/Spinner";
|
||||
import "@goauthentik/web/elements/Spinner";
|
||||
import { AggregateCard } from "@goauthentik/web/elements/cards/AggregateCard";
|
||||
|
||||
import { TemplateResult, html } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
import { until } from "lit/directives/until.js";
|
||||
|
||||
import { AggregateCard } from "./AggregateCard";
|
||||
|
||||
@customElement("ak-aggregate-card-promise")
|
||||
export class AggregatePromiseCard extends AggregateCard {
|
||||
@property({ attribute: false })
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { DEFAULT_CONFIG } from "@goauthentik/web/api/Config";
|
||||
import { AKChart } from "@goauthentik/web/elements/charts/Chart";
|
||||
import { ChartData } from "chart.js";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
@ -7,8 +8,6 @@ import { customElement } from "lit/decorators.js";
|
||||
|
||||
import { AdminApi, LoginMetrics } from "@goauthentik/api";
|
||||
|
||||
import { AKChart } from "./Chart";
|
||||
|
||||
@customElement("ak-charts-admin-login")
|
||||
export class AdminLoginsChart extends AKChart<LoginMetrics> {
|
||||
apiRequest(): Promise<LoginMetrics> {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { DEFAULT_CONFIG } from "@goauthentik/web/api/Config";
|
||||
import { AKChart } from "@goauthentik/web/elements/charts/Chart";
|
||||
import { ChartData, Tick } from "chart.js";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
@ -7,8 +8,6 @@ import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { Coordinate, EventActions, EventsApi } from "@goauthentik/api";
|
||||
|
||||
import { AKChart } from "./Chart";
|
||||
|
||||
@customElement("ak-charts-admin-model-per-day")
|
||||
export class AdminModelPerDay extends AKChart<Coordinate[]> {
|
||||
@property()
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { DEFAULT_CONFIG } from "@goauthentik/web/api/Config";
|
||||
import { AKChart } from "@goauthentik/web/elements/charts/Chart";
|
||||
import { ChartData } from "chart.js";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
@ -7,8 +8,6 @@ import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { Coordinate, CoreApi } from "@goauthentik/api";
|
||||
|
||||
import { AKChart } from "./Chart";
|
||||
|
||||
@customElement("ak-charts-application-authorize")
|
||||
export class ApplicationAuthorizeChart extends AKChart<Coordinate[]> {
|
||||
@property()
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { DEFAULT_CONFIG } from "@goauthentik/web/api/Config";
|
||||
import { AKChart } from "@goauthentik/web/elements/charts/Chart";
|
||||
import { ChartData } from "chart.js";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
@ -7,8 +8,6 @@ import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { CoreApi, UserMetrics } from "@goauthentik/api";
|
||||
|
||||
import { AKChart } from "./Chart";
|
||||
|
||||
@customElement("ak-charts-user")
|
||||
export class UserChart extends AKChart<UserMetrics> {
|
||||
@property({ type: Number })
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import { Chip } from "@goauthentik/web/elements/chips/Chip";
|
||||
|
||||
import { CSSResult, LitElement, TemplateResult, css, html } from "lit";
|
||||
import { customElement } from "lit/decorators.js";
|
||||
|
||||
@ -7,8 +9,6 @@ import PFChip from "@patternfly/patternfly/components/Chip/chip.css";
|
||||
import PFChipGroup from "@patternfly/patternfly/components/ChipGroup/chip-group.css";
|
||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { Chip } from "./Chip";
|
||||
|
||||
@customElement("ak-chip-group")
|
||||
export class ChipGroup extends LitElement {
|
||||
static get styles(): CSSResult[] {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { SearchSelect } from "@goauthentik/web/SearchSelect";
|
||||
import { EVENT_REFRESH } from "@goauthentik/web/constants";
|
||||
import { HorizontalFormElement } from "@goauthentik/web/elements/forms/HorizontalFormElement";
|
||||
import { MessageLevel } from "@goauthentik/web/elements/messages/Message";
|
||||
import { showMessage } from "@goauthentik/web/elements/messages/MessageContainer";
|
||||
import { camelToSnake, convertToSlug } from "@goauthentik/web/utils";
|
||||
@ -21,8 +22,6 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { ResponseError, ValidationError } from "@goauthentik/api";
|
||||
|
||||
import { HorizontalFormElement } from "./HorizontalFormElement";
|
||||
|
||||
export class APIError extends Error {
|
||||
constructor(public response: ValidationError) {
|
||||
super();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { FormGroup } from "@goauthentik/web/elements/forms/FormGroup";
|
||||
import { convertToSlug } from "@goauthentik/web/utils";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
@ -11,8 +12,6 @@ import PFForm from "@patternfly/patternfly/components/Form/form.css";
|
||||
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
|
||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { FormGroup } from "./FormGroup";
|
||||
|
||||
@customElement("ak-form-element-horizontal")
|
||||
export class HorizontalFormElement extends LitElement {
|
||||
static get styles(): CSSResult[] {
|
||||
|
||||
@ -2,14 +2,13 @@ import { EVENT_REFRESH } from "@goauthentik/web/constants";
|
||||
import "@goauthentik/web/elements/LoadingOverlay";
|
||||
import { ModalButton } from "@goauthentik/web/elements/buttons/ModalButton";
|
||||
import "@goauthentik/web/elements/buttons/SpinnerButton";
|
||||
import { Form } from "@goauthentik/web/elements/forms/Form";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
|
||||
import { TemplateResult, html } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { Form } from "./Form";
|
||||
|
||||
@customElement("ak-forms-modal")
|
||||
export class ModalForm extends ModalButton {
|
||||
@property({ type: Boolean })
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
import { EVENT_REFRESH } from "@goauthentik/web/constants";
|
||||
import { Form } from "@goauthentik/web/elements/forms/Form";
|
||||
|
||||
import { TemplateResult } from "lit";
|
||||
import { property } from "lit/decorators.js";
|
||||
|
||||
import { Form } from "./Form";
|
||||
|
||||
export abstract class ModelForm<T, PKT extends string | number> extends Form<T> {
|
||||
abstract loadInstance(pk: PKT): Promise<T>;
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Form } from "@goauthentik/web/elements/forms/Form";
|
||||
|
||||
import { TemplateResult, html } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { Form } from "./Form";
|
||||
|
||||
@customElement("ak-proxy-form")
|
||||
export class ProxyForm extends Form<unknown> {
|
||||
@property()
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import { ROUTE_SEPARATOR } from "@goauthentik/web/constants";
|
||||
import { Route } from "@goauthentik/web/elements/router/Route";
|
||||
import { RouteMatch } from "@goauthentik/web/elements/router/RouteMatch";
|
||||
import "@goauthentik/web/elements/router/Router404";
|
||||
|
||||
import { CSSResult, LitElement, TemplateResult, css, html } from "lit";
|
||||
@ -6,9 +8,6 @@ import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import AKGlobal from "@goauthentik/web/authentik.css";
|
||||
|
||||
import { Route } from "./Route";
|
||||
import { RouteMatch } from "./RouteMatch";
|
||||
|
||||
// Poliyfill for hashchange.newURL,
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onhashchange
|
||||
window.addEventListener("load", () => {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { PFSize } from "@goauthentik/web/elements/Spinner";
|
||||
import { MODAL_BUTTON_STYLES } from "@goauthentik/web/elements/buttons/ModalButton";
|
||||
import { Table } from "@goauthentik/web/elements/table/Table";
|
||||
|
||||
import { CSSResult, LitElement } from "lit";
|
||||
import { TemplateResult, html } from "lit";
|
||||
@ -13,8 +14,6 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
||||
import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css";
|
||||
import PFStack from "@patternfly/patternfly/layouts/Stack/stack.css";
|
||||
|
||||
import { Table } from "./Table";
|
||||
|
||||
export abstract class TableModal<T> extends Table<T> {
|
||||
@property()
|
||||
size: PFSize = PFSize.Large;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import "@goauthentik/web/elements/../elements/PageHeader";
|
||||
import { updateURLParams } from "@goauthentik/web/elements/router/RouteMatch";
|
||||
import { Table } from "@goauthentik/web/elements/table/Table";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
|
||||
@ -11,8 +12,6 @@ import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
||||
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
||||
import PFSidebar from "@patternfly/patternfly/components/Sidebar/sidebar.css";
|
||||
|
||||
import { Table } from "./Table";
|
||||
|
||||
export abstract class TablePage<T> extends Table<T> {
|
||||
abstract pageTitle(): string;
|
||||
abstract pageDescription(): string | undefined;
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
import { EVENT_REFRESH } from "@goauthentik/web/constants";
|
||||
import { WizardAction } from "@goauthentik/web/elements/wizard/Wizard";
|
||||
import { WizardPage } from "@goauthentik/web/elements/wizard/WizardPage";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
|
||||
import { CSSResult, TemplateResult, html } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import AKGlobal from "../../authentik.css";
|
||||
import AKGlobal from "@goauthentik/web/authentik.css";
|
||||
import PFEmptyState from "@patternfly/patternfly/components/EmptyState/empty-state.css";
|
||||
import PFProgressStepper from "@patternfly/patternfly/components/ProgressStepper/progress-stepper.css";
|
||||
import PFTitle from "@patternfly/patternfly/components/Title/title.css";
|
||||
@ -12,10 +16,6 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { ResponseError } from "@goauthentik/api";
|
||||
|
||||
import { EVENT_REFRESH } from "../../constants";
|
||||
import { WizardAction } from "./Wizard";
|
||||
import { WizardPage } from "./WizardPage";
|
||||
|
||||
export enum ActionState {
|
||||
pending = "pending",
|
||||
running = "running",
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
import { Form } from "@goauthentik/web/elements/forms/Form";
|
||||
import { WizardPage } from "@goauthentik/web/elements/wizard/WizardPage";
|
||||
|
||||
import { t } from "@lingui/macro";
|
||||
|
||||
import { customElement } from "lit/decorators.js";
|
||||
|
||||
import { WizardPage } from "./WizardPage";
|
||||
|
||||
/**
|
||||
* This Wizard page is used for proxy forms with the older-style
|
||||
* wizards
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
import { Form, KeyUnknown } from "@goauthentik/web/elements/forms/Form";
|
||||
import { WizardPage } from "@goauthentik/web/elements/wizard/WizardPage";
|
||||
|
||||
import { CSSResult, TemplateResult, html } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import AKGlobal from "../../authentik.css";
|
||||
import AKGlobal from "@goauthentik/web/authentik.css";
|
||||
import PFAlert from "@patternfly/patternfly/components/Alert/alert.css";
|
||||
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||
@ -10,9 +13,6 @@ import PFFormControl from "@patternfly/patternfly/components/FormControl/form-co
|
||||
import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css";
|
||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { Form, KeyUnknown } from "../forms/Form";
|
||||
import { WizardPage } from "./WizardPage";
|
||||
|
||||
@customElement("ak-wizard-form")
|
||||
export class WizardForm extends Form<KeyUnknown> {
|
||||
viewportCheck = false;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { Wizard } from "@goauthentik/web/elements/wizard/Wizard";
|
||||
|
||||
import { CSSResult, LitElement, PropertyDeclaration, TemplateResult, html } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import AKGlobal from "../../authentik.css";
|
||||
import AKGlobal from "@goauthentik/web/authentik.css";
|
||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||
|
||||
import { Wizard } from "./Wizard";
|
||||
|
||||
@customElement("ak-wizard-page")
|
||||
export class WizardPage extends LitElement {
|
||||
static get styles(): CSSResult[] {
|
||||
|
||||
Reference in New Issue
Block a user