Rename getKcContext dir to kcContext
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
import React, { lazy, Suspense } from "react";
|
import React, { lazy, Suspense } from "react";
|
||||||
import { __unsafe_useI18n as useI18n } from "./i18n";
|
import { __unsafe_useI18n as useI18n } from "./i18n";
|
||||||
import DefaultTemplate from "./Template";
|
import DefaultTemplate from "./Template";
|
||||||
import type { KcContextBase } from "./getKcContext/KcContextBase";
|
import type { KcContextBase } from "./kcContext/KcContextBase";
|
||||||
import type { PageProps } from "./KcProps";
|
import type { PageProps } from "./KcProps";
|
||||||
import type { I18nBase } from "./i18n";
|
import type { I18nBase } from "./i18n";
|
||||||
import type { SetOptional } from "./tools/SetOptional";
|
import type { SetOptional } from "./tools/SetOptional";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { allPropertiesValuesToUndefined } from "./tools/allPropertiesValuesToUndefined";
|
import { allPropertiesValuesToUndefined } from "./tools/allPropertiesValuesToUndefined";
|
||||||
import { assert } from "tsafe/assert";
|
import { assert } from "tsafe/assert";
|
||||||
import type { KcContextBase } from "./getKcContext";
|
import type { KcContextBase } from "./kcContext";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { I18nBase } from "./i18n";
|
import { I18nBase } from "./i18n";
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { headInsert } from "./tools/headInsert";
|
|||||||
import { pathJoin } from "./bin/tools/pathJoin";
|
import { pathJoin } from "./bin/tools/pathJoin";
|
||||||
import { clsx } from "./tools/clsx";
|
import { clsx } from "./tools/clsx";
|
||||||
import type { TemplateProps } from "./KcProps";
|
import type { TemplateProps } from "./KcProps";
|
||||||
import type { KcContextBase } from "./getKcContext/KcContextBase";
|
import type { KcContextBase } from "./kcContext/KcContextBase";
|
||||||
import type { I18nBase } from "./i18n";
|
import type { I18nBase } from "./i18n";
|
||||||
|
|
||||||
export default function Template(props: TemplateProps<KcContextBase.Common, I18nBase>) {
|
export default function Template(props: TemplateProps<KcContextBase.Common, I18nBase>) {
|
||||||
|
@ -3,7 +3,7 @@ import "minimal-polyfills/Object.fromEntries";
|
|||||||
import React, { useEffect, useState, useRef } from "react";
|
import React, { useEffect, useState, useRef } from "react";
|
||||||
import type baseMessages from "./generated_messages/18.0.1/login/en";
|
import type baseMessages from "./generated_messages/18.0.1/login/en";
|
||||||
import { assert } from "tsafe/assert";
|
import { assert } from "tsafe/assert";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext/KcContextBase";
|
||||||
import { Markdown } from "../tools/Markdown";
|
import { Markdown } from "../tools/Markdown";
|
||||||
|
|
||||||
export const fallbackLanguageTag = "en";
|
export const fallbackLanguageTag = "en";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export * from "./getKcContext";
|
export * from "./kcContext";
|
||||||
|
|
||||||
export * from "./i18n";
|
export * from "./i18n";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Error(props: PageProps<Extract<KcContextBase, { pageId: "error.ftl" }>, I18nBase>) {
|
export default function Error(props: PageProps<Extract<KcContextBase, { pageId: "error.ftl" }>, I18nBase>) {
|
||||||
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function IdpReviewUserProfile(props: PageProps<Extract<KcContextBase, { pageId: "idp-review-user-profile.ftl" }>, I18nBase>) {
|
export default function IdpReviewUserProfile(props: PageProps<Extract<KcContextBase, { pageId: "idp-review-user-profile.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { assert } from "../tools/assert";
|
import { assert } from "../tools/assert";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Info(props: PageProps<Extract<KcContextBase, { pageId: "info.ftl" }>, I18nBase>) {
|
export default function Info(props: PageProps<Extract<KcContextBase, { pageId: "info.ftl" }>, I18nBase>) {
|
||||||
|
@ -2,7 +2,7 @@ import React, { useState, type FormEventHandler } from "react";
|
|||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import { useConstCallback } from "../tools/useConstCallback";
|
import { useConstCallback } from "../tools/useConstCallback";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Login(props: PageProps<Extract<KcContextBase, { pageId: "login.ftl" }>, I18nBase>) {
|
export default function Login(props: PageProps<Extract<KcContextBase, { pageId: "login.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginConfigTotp(props: PageProps<Extract<KcContextBase, { pageId: "login-config-totp.ftl" }>, I18nBase>) {
|
export default function LoginConfigTotp(props: PageProps<Extract<KcContextBase, { pageId: "login-config-totp.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginIdpLinkConfirm(props: PageProps<Extract<KcContextBase, { pageId: "login-idp-link-confirm.ftl" }>, I18nBase>) {
|
export default function LoginIdpLinkConfirm(props: PageProps<Extract<KcContextBase, { pageId: "login-idp-link-confirm.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { headInsert } from "../tools/headInsert";
|
|||||||
import { pathJoin } from "../bin/tools/pathJoin";
|
import { pathJoin } from "../bin/tools/pathJoin";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginOtp(props: PageProps<Extract<KcContextBase, { pageId: "login-otp.ftl" }>, I18nBase>) {
|
export default function LoginOtp(props: PageProps<Extract<KcContextBase, { pageId: "login-otp.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginPageExpired(props: PageProps<Extract<KcContextBase, { pageId: "login-page-expired.ftl" }>, I18nBase>) {
|
export default function LoginPageExpired(props: PageProps<Extract<KcContextBase, { pageId: "login-page-expired.ftl" }>, I18nBase>) {
|
||||||
|
@ -3,7 +3,7 @@ import { clsx } from "../tools/clsx";
|
|||||||
import { useConstCallback } from "../tools/useConstCallback";
|
import { useConstCallback } from "../tools/useConstCallback";
|
||||||
import type { FormEventHandler } from "react";
|
import type { FormEventHandler } from "react";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginPassword(props: PageProps<Extract<KcContextBase, { "pageId": "login-password.ftl" }>, I18nBase>) {
|
export default function LoginPassword(props: PageProps<Extract<KcContextBase, { "pageId": "login-password.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginResetPassword(props: PageProps<Extract<KcContextBase, { pageId: "login-reset-password.ftl" }>, I18nBase>) {
|
export default function LoginResetPassword(props: PageProps<Extract<KcContextBase, { pageId: "login-reset-password.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginUpdatePassword(props: PageProps<Extract<KcContextBase, { pageId: "login-update-password.ftl" }>, I18nBase>) {
|
export default function LoginUpdatePassword(props: PageProps<Extract<KcContextBase, { pageId: "login-update-password.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginUpdateProfile(props: PageProps<Extract<KcContextBase, { pageId: "login-update-profile.ftl" }>, I18nBase>) {
|
export default function LoginUpdateProfile(props: PageProps<Extract<KcContextBase, { pageId: "login-update-profile.ftl" }>, I18nBase>) {
|
||||||
|
@ -3,7 +3,7 @@ import { clsx } from "../tools/clsx";
|
|||||||
import { useConstCallback } from "../tools/useConstCallback";
|
import { useConstCallback } from "../tools/useConstCallback";
|
||||||
import type { FormEventHandler } from "react";
|
import type { FormEventHandler } from "react";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginUsername(props: PageProps<Extract<KcContextBase, { pageId: "login-username.ftl" }>, I18nBase>) {
|
export default function LoginUsername(props: PageProps<Extract<KcContextBase, { pageId: "login-username.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginVerifyEmail(props: PageProps<Extract<KcContextBase, { pageId: "login-verify-email.ftl" }>, I18nBase>) {
|
export default function LoginVerifyEmail(props: PageProps<Extract<KcContextBase, { pageId: "login-verify-email.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LogoutConfirm(props: PageProps<Extract<KcContextBase, { pageId: "logout-confirm.ftl" }>, I18nBase>) {
|
export default function LogoutConfirm(props: PageProps<Extract<KcContextBase, { pageId: "logout-confirm.ftl" }>, I18nBase>) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Register(props: PageProps<Extract<KcContextBase, { pageId: "register.ftl" }>, I18nBase>) {
|
export default function Register(props: PageProps<Extract<KcContextBase, { pageId: "register.ftl" }>, I18nBase>) {
|
||||||
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function RegisterUserProfile(props: PageProps<Extract<KcContextBase, { pageId: "register-user-profile.ftl" }>, I18nBase>) {
|
export default function RegisterUserProfile(props: PageProps<Extract<KcContextBase, { pageId: "register-user-profile.ftl" }>, I18nBase>) {
|
||||||
|
@ -10,7 +10,7 @@ import { useConstCallback } from "../tools/useConstCallback";
|
|||||||
import { Markdown } from "../tools/Markdown";
|
import { Markdown } from "../tools/Markdown";
|
||||||
import type { Extends } from "tsafe";
|
import type { Extends } from "tsafe";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Terms(props: PageProps<Extract<KcContextBase, { pageId: "terms.ftl" }>, I18nBase>) {
|
export default function Terms(props: PageProps<Extract<KcContextBase, { pageId: "terms.ftl" }>, I18nBase>) {
|
||||||
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function UpdateUserProfile(props: PageProps<Extract<KcContextBase, { pageId: "update-user-profile.ftl" }>, I18nBase>) {
|
export default function UpdateUserProfile(props: PageProps<Extract<KcContextBase, { pageId: "update-user-profile.ftl" }>, I18nBase>) {
|
||||||
|
@ -4,7 +4,7 @@ import type { MessageKeyBase } from "../i18n";
|
|||||||
import { base64url } from "rfc4648";
|
import { base64url } from "rfc4648";
|
||||||
import { useConstCallback } from "../tools/useConstCallback";
|
import { useConstCallback } from "../tools/useConstCallback";
|
||||||
import type { PageProps } from "../KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { KcContextBase } from "../getKcContext";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function WebauthnAuthenticate(props: PageProps<Extract<KcContextBase, { pageId: "webauthn-authenticate.ftl" }>, I18nBase>) {
|
export default function WebauthnAuthenticate(props: PageProps<Extract<KcContextBase, { pageId: "webauthn-authenticate.ftl" }>, I18nBase>) {
|
||||||
|
@ -2,7 +2,7 @@ import React, { useEffect, Fragment } from "react";
|
|||||||
import type { KcProps } from "../../KcProps";
|
import type { KcProps } from "../../KcProps";
|
||||||
import { clsx } from "../../tools/clsx";
|
import { clsx } from "../../tools/clsx";
|
||||||
import type { I18nBase } from "../../i18n";
|
import type { I18nBase } from "../../i18n";
|
||||||
import type { Attribute } from "../../getKcContext";
|
import type { Attribute } from "../../kcContext";
|
||||||
|
|
||||||
// If you are copy pasting this code in your theme project
|
// If you are copy pasting this code in your theme project
|
||||||
// you can delete all the following import and replace them by
|
// you can delete all the following import and replace them by
|
||||||
@ -11,7 +11,7 @@ import type { Attribute } from "../../getKcContext";
|
|||||||
// to be modified.
|
// to be modified.
|
||||||
import "../../tools/Array.prototype.every";
|
import "../../tools/Array.prototype.every";
|
||||||
import { useMemo, useReducer } from "react";
|
import { useMemo, useReducer } from "react";
|
||||||
import type { KcContextBase, Validators } from "../../getKcContext";
|
import type { KcContextBase, Validators } from "../../kcContext";
|
||||||
import { useConstCallback } from "../../tools/useConstCallback";
|
import { useConstCallback } from "../../tools/useConstCallback";
|
||||||
import { emailRegexp } from "../../tools/emailRegExp";
|
import { emailRegexp } from "../../tools/emailRegExp";
|
||||||
import type { MessageKeyBase } from "../../i18n";
|
import type { MessageKeyBase } from "../../i18n";
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { getKcContext } from "../../getKcContext";
|
import { getKcContext } from "../../kcContext";
|
||||||
import type { KcContextBase } from "../../getKcContext";
|
import type { KcContextBase } from "../../kcContext";
|
||||||
import type { ExtendsKcContextBase } from "../../getKcContext";
|
import type { ExtendsKcContextBase } from "../../kcContext";
|
||||||
import { same } from "evt/tools/inDepth";
|
import { same } from "evt/tools/inDepth";
|
||||||
import { assert } from "tsafe/assert";
|
import { assert } from "tsafe/assert";
|
||||||
import type { Equals } from "tsafe";
|
import type { Equals } from "tsafe";
|
||||||
import { kcContextMocks, kcContextCommonMock } from "../../getKcContext/kcContextMocks";
|
import { kcContextMocks, kcContextCommonMock } from "../../kcContext/kcContextMocks";
|
||||||
import { deepClone } from "../../tools/deepClone";
|
import { deepClone } from "../../tools/deepClone";
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -1 +1 @@
|
|||||||
import "./getKcContext";
|
import "./kcContext";
|
||||||
|
Reference in New Issue
Block a user