web: use absolute imports with path rewrite instead of relative imports (#3149)

This commit is contained in:
Jens L
2022-06-25 17:44:17 +02:00
committed by GitHub
parent 340faf5341
commit a8c04f96d2
242 changed files with 1614 additions and 1567 deletions

View File

@ -1,8 +1,8 @@
import "@goauthentik/web/elements/EmptyState";
import { TemplateResult, html } from "lit";
import { until } from "lit/directives/until.js";
import "../EmptyState";
export const SLUG_REGEX = "[-a-zA-Z0-9_]+";
export const ID_REGEX = "\\d+";
export const UUID_REGEX = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";

View File

@ -1,7 +1,7 @@
import { TemplateResult } from "lit";
import { ROUTE_SEPARATOR } from "@goauthentik/web/constants";
import { Route } from "@goauthentik/web/elements/router/Route";
import { ROUTE_SEPARATOR } from "../../constants";
import { Route } from "./Route";
import { TemplateResult } from "lit";
export class RouteMatch {
route: Route;

View File

@ -1,12 +1,13 @@
import { ROUTE_SEPARATOR } from "@goauthentik/web/constants";
import "@goauthentik/web/elements/router/Router404";
import { CSSResult, LitElement, TemplateResult, css, html } from "lit";
import { customElement, property } from "lit/decorators.js";
import AKGlobal from "../../authentik.css";
import AKGlobal from "@goauthentik/web/authentik.css";
import { ROUTE_SEPARATOR } from "../../constants";
import { Route } from "./Route";
import { RouteMatch } from "./RouteMatch";
import "./Router404";
// Poliyfill for hashchange.newURL,
// https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onhashchange