Refactor
This commit is contained in:
parent
b300966fa8
commit
837501c948
@ -15,12 +15,11 @@
|
|||||||
"copy-files": "copyfiles -u 1 src/**/*.ftl",
|
"copy-files": "copyfiles -u 1 src/**/*.ftl",
|
||||||
"pretest": "yarn build:test",
|
"pretest": "yarn build:test",
|
||||||
"test": "node dist_test/test/bin && node dist_test/test/lib",
|
"test": "node dist_test/test/bin && node dist_test/test/lib",
|
||||||
"generate-messages": "node dist/bin/generate-i18n-messages.js",
|
|
||||||
"link_in_test_app": "node dist/bin/link_in_test_app.js",
|
|
||||||
"_format": "prettier '**/*.{ts,tsx,json,md}'",
|
"_format": "prettier '**/*.{ts,tsx,json,md}'",
|
||||||
"format": "yarn _format --write",
|
"format": "yarn _format --write",
|
||||||
"format:check": "yarn _format --list-different",
|
"format:check": "yarn _format --list-different",
|
||||||
"link-in-app": "ts-node --skipProject src/scripts/link-in-app.ts",
|
"link-in-app": "ts-node --skipProject src/scripts/link-in-app.ts",
|
||||||
|
"generate-messages": "ts-node --skipProject src/scripts/generate-i18n-messages.ts",
|
||||||
"link-in-starter": "yarn link-in-app keycloakify-advanced-starter",
|
"link-in-starter": "yarn link-in-app keycloakify-advanced-starter",
|
||||||
"tsc-watch": "tsc -p src/bin -w & tsc -p src/lib -w "
|
"tsc-watch": "tsc -p src/bin -w & tsc -p src/lib -w "
|
||||||
},
|
},
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
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 "./pages/Template";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "./kcContext/KcContextBase";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "./KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "./i18n";
|
||||||
|
|
||||||
const Login = lazy(() => import("./Login"));
|
const Login = lazy(() => import("./pages/Login"));
|
||||||
const Register = lazy(() => import("./Register"));
|
const Register = lazy(() => import("./pages/Register"));
|
||||||
const RegisterUserProfile = lazy(() => import("./RegisterUserProfile"));
|
const RegisterUserProfile = lazy(() => import("./pages/RegisterUserProfile"));
|
||||||
const Info = lazy(() => import("./Info"));
|
const Info = lazy(() => import("./pages/Info"));
|
||||||
const Error = lazy(() => import("./Error"));
|
const Error = lazy(() => import("./pages/Error"));
|
||||||
const LoginResetPassword = lazy(() => import("./LoginResetPassword"));
|
const LoginResetPassword = lazy(() => import("./pages/LoginResetPassword"));
|
||||||
const LoginVerifyEmail = lazy(() => import("./LoginVerifyEmail"));
|
const LoginVerifyEmail = lazy(() => import("./pages/LoginVerifyEmail"));
|
||||||
const Terms = lazy(() => import("./Terms"));
|
const Terms = lazy(() => import("./pages/Terms"));
|
||||||
const LoginOtp = lazy(() => import("./LoginOtp"));
|
const LoginOtp = lazy(() => import("./pages/LoginOtp"));
|
||||||
const LoginPassword = lazy(() => import("./LoginPassword"));
|
const LoginPassword = lazy(() => import("./pages/LoginPassword"));
|
||||||
const LoginUsername = lazy(() => import("./LoginUsername"));
|
const LoginUsername = lazy(() => import("./pages/LoginUsername"));
|
||||||
const WebauthnAuthenticate = lazy(() => import("./WebauthnAuthenticate"));
|
const WebauthnAuthenticate = lazy(() => import("./pages/WebauthnAuthenticate"));
|
||||||
const LoginUpdatePassword = lazy(() => import("./LoginUpdatePassword"));
|
const LoginUpdatePassword = lazy(() => import("./pages/LoginUpdatePassword"));
|
||||||
const LoginUpdateProfile = lazy(() => import("./LoginUpdateProfile"));
|
const LoginUpdateProfile = lazy(() => import("./pages/LoginUpdateProfile"));
|
||||||
const LoginIdpLinkConfirm = lazy(() => import("./LoginIdpLinkConfirm"));
|
const LoginIdpLinkConfirm = lazy(() => import("./pages/LoginIdpLinkConfirm"));
|
||||||
const LoginPageExpired = lazy(() => import("./LoginPageExpired"));
|
const LoginPageExpired = lazy(() => import("./pages/LoginPageExpired"));
|
||||||
const LoginIdpLinkEmail = lazy(() => import("./LoginIdpLinkEmail"));
|
const LoginIdpLinkEmail = lazy(() => import("./pages/LoginIdpLinkEmail"));
|
||||||
const LoginConfigTotp = lazy(() => import("./LoginConfigTotp"));
|
const LoginConfigTotp = lazy(() => import("./pages/LoginConfigTotp"));
|
||||||
const LogoutConfirm = lazy(() => import("./LogoutConfirm"));
|
const LogoutConfirm = lazy(() => import("./pages/LogoutConfirm"));
|
||||||
const UpdateUserProfile = lazy(() => import("./UpdateUserProfile"));
|
const UpdateUserProfile = lazy(() => import("./pages/UpdateUserProfile"));
|
||||||
const IdpReviewUserProfile = lazy(() => import("./IdpReviewUserProfile"));
|
const IdpReviewUserProfile = lazy(() => import("./pages/IdpReviewUserProfile"));
|
||||||
|
|
||||||
export default function KcApp(props_: PageProps<KcContextBase, I18nBase>) {
|
export default function KcApp(props_: PageProps<KcContextBase, I18nBase>) {
|
||||||
const { kcContext, i18n: userProvidedI18n, Template = DefaultTemplate, ...kcProps } = props_;
|
const { kcContext, i18n: userProvidedI18n, Template = DefaultTemplate, ...kcProps } = props_;
|
@ -1,8 +1,8 @@
|
|||||||
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";
|
||||||
|
|
||||||
/** Class names can be provided as an array or separated by whitespace */
|
/** Class names can be provided as an array or separated by whitespace */
|
||||||
export type KcPropsGeneric<CssClasses extends string> = {
|
export type KcPropsGeneric<CssClasses extends string> = {
|
@ -1,13 +1,13 @@
|
|||||||
import React, { useReducer, useEffect } from "react";
|
import React, { useReducer, useEffect } from "react";
|
||||||
import { useCallbackFactory } from "../../tools/useCallbackFactory";
|
import { useCallbackFactory } from "./tools/useCallbackFactory";
|
||||||
import { useConstCallback } from "../../tools/useConstCallback";
|
import { useConstCallback } from "./tools/useConstCallback";
|
||||||
import { assert } from "../../tools/assert";
|
import { assert } from "./tools/assert";
|
||||||
import { headInsert } from "../../tools/headInsert";
|
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>) {
|
||||||
const {
|
const {
|
@ -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,13 +1,13 @@
|
|||||||
export * from "./getKcContext";
|
export * from "./kcContext";
|
||||||
|
|
||||||
export * from "./i18n";
|
export * from "./i18n";
|
||||||
|
|
||||||
export { useDownloadTerms } from "./components/Terms";
|
export { useDownloadTerms } from "./pages/Terms";
|
||||||
|
|
||||||
export * from "./components/shared/KcProps";
|
export * from "./KcProps";
|
||||||
export * from "./keycloakJsAdapter";
|
export * from "./keycloakJsAdapter";
|
||||||
export * from "./useFormValidationSlice";
|
export * from "./useFormValidationSlice";
|
||||||
|
|
||||||
import KcApp from "./components/KcApp";
|
import KcApp from "./KcApp";
|
||||||
|
|
||||||
export default KcApp;
|
export default KcApp;
|
||||||
|
@ -2,7 +2,7 @@ import type { PageId } from "../../bin/keycloakify/generateFtl";
|
|||||||
import { assert } from "tsafe/assert";
|
import { assert } from "tsafe/assert";
|
||||||
import type { Equals } from "tsafe";
|
import type { Equals } from "tsafe";
|
||||||
import type { MessageKeyBase } from "../i18n";
|
import type { MessageKeyBase } from "../i18n";
|
||||||
import type { KcTemplateClassKey } from "../components/shared/KcProps";
|
import type { KcTemplateClassKey } from "../KcProps";
|
||||||
|
|
||||||
type ExtractAfterStartingWith<Prefix extends string, StrEnum> = StrEnum extends `${Prefix}${infer U}` ? U : never;
|
type ExtractAfterStartingWith<Prefix extends string, StrEnum> = StrEnum extends `${Prefix}${infer U}` ? U : never;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Error(props: PageProps<KcContextBase.Error, I18nBase>) {
|
export default function Error(props: PageProps<KcContextBase.Error, I18nBase>) {
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useState } from "react";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function IdpReviewUserProfile(props: PageProps<KcContextBase.IdpReviewUserProfile, I18nBase>) {
|
export default function IdpReviewUserProfile(props: PageProps<KcContextBase.IdpReviewUserProfile, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Info(props: PageProps<KcContextBase.Info, I18nBase>) {
|
export default function Info(props: PageProps<KcContextBase.Info, I18nBase>) {
|
@ -2,8 +2,8 @@ import React, { useState } from "react";
|
|||||||
import { clsx } from "../tools/clsx";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Login(props: PageProps<KcContextBase.Login, I18nBase>) {
|
export default function Login(props: PageProps<KcContextBase.Login, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginConfigTotp(props: PageProps<KcContextBase.LoginConfigTotp, I18nBase>) {
|
export default function LoginConfigTotp(props: PageProps<KcContextBase.LoginConfigTotp, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginIdpLinkConfirm(props: PageProps<KcContextBase.LoginIdpLinkConfirm, I18nBase>) {
|
export default function LoginIdpLinkConfirm(props: PageProps<KcContextBase.LoginIdpLinkConfirm, I18nBase>) {
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginIdpLinkEmail(props: PageProps<KcContextBase.LoginIdpLinkEmail, I18nBase>) {
|
export default function LoginIdpLinkEmail(props: PageProps<KcContextBase.LoginIdpLinkEmail, I18nBase>) {
|
@ -2,8 +2,8 @@ import React, { useEffect } from "react";
|
|||||||
import { headInsert } from "../tools/headInsert";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginOtp(props: PageProps<KcContextBase.LoginOtp, I18nBase>) {
|
export default function LoginOtp(props: PageProps<KcContextBase.LoginOtp, I18nBase>) {
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginPageExpired(props: PageProps<KcContextBase.LoginPageExpired, I18nBase>) {
|
export default function LoginPageExpired(props: PageProps<KcContextBase.LoginPageExpired, I18nBase>) {
|
@ -2,8 +2,8 @@ import React, { useState } from "react";
|
|||||||
import { clsx } from "../tools/clsx";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginPassword(props: PageProps<KcContextBase.LoginPassword, I18nBase>) {
|
export default function LoginPassword(props: PageProps<KcContextBase.LoginPassword, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginResetPassword(props: PageProps<KcContextBase.LoginResetPassword, I18nBase>) {
|
export default function LoginResetPassword(props: PageProps<KcContextBase.LoginResetPassword, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginUpdatePassword(props: PageProps<KcContextBase.LoginUpdatePassword, I18nBase>) {
|
export default function LoginUpdatePassword(props: PageProps<KcContextBase.LoginUpdatePassword, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginUpdateProfile(props: PageProps<KcContextBase.LoginUpdateProfile, I18nBase>) {
|
export default function LoginUpdateProfile(props: PageProps<KcContextBase.LoginUpdateProfile, I18nBase>) {
|
@ -2,8 +2,8 @@ import React, { useState } from "react";
|
|||||||
import { clsx } from "../tools/clsx";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginUsername(props: PageProps<KcContextBase.LoginUsername, I18nBase>) {
|
export default function LoginUsername(props: PageProps<KcContextBase.LoginUsername, I18nBase>) {
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LoginVerifyEmail(props: PageProps<KcContextBase.LoginVerifyEmail, I18nBase>) {
|
export default function LoginVerifyEmail(props: PageProps<KcContextBase.LoginVerifyEmail, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function LogoutConfirm(props: PageProps<KcContextBase.LogoutConfirm, I18nBase>) {
|
export default function LogoutConfirm(props: PageProps<KcContextBase.LogoutConfirm, 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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Register(props: PageProps<KcContextBase.Register, I18nBase>) {
|
export default function Register(props: PageProps<KcContextBase.Register, I18nBase>) {
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useState } from "react";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function RegisterUserProfile(props: PageProps<KcContextBase.RegisterUserProfile, I18nBase>) {
|
export default function RegisterUserProfile(props: PageProps<KcContextBase.RegisterUserProfile, I18nBase>) {
|
@ -1,11 +1,11 @@
|
|||||||
import React, { useReducer, useEffect } from "react";
|
import React, { useReducer, useEffect } from "react";
|
||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import { assert } from "../tools/assert";
|
import { assert } from "../tools/assert";
|
||||||
import { useCallbackFactory } from "../tools/useCallbackFactory";
|
import { useCallbackFactory } from "../tools/useCallbackFactory";
|
||||||
import { headInsert } from "../tools/headInsert";
|
import { headInsert } from "../tools/headInsert";
|
||||||
import { pathJoin } from "../../bin/tools/pathJoin";
|
import { pathJoin } from "../../bin/tools/pathJoin";
|
||||||
import { useConstCallback } from "../tools/useConstCallback";
|
import { useConstCallback } from "../tools/useConstCallback";
|
||||||
import type { TemplateProps } from "./shared/KcProps";
|
import type { TemplateProps } from "../KcProps";
|
||||||
import { clsx } from "../tools/clsx";
|
import { clsx } from "../tools/clsx";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
@ -9,8 +9,8 @@ import { useConst } from "../tools/useConst";
|
|||||||
import { useConstCallback } from "../tools/useConstCallback";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function Terms(props: PageProps<KcContextBase.Terms, I18nBase>) {
|
export default function Terms(props: PageProps<KcContextBase.Terms, I18nBase>) {
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useState } from "react";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function UpdateUserProfile(props: PageProps<KcContextBase.UpdateUserProfile, I18nBase>) {
|
export default function UpdateUserProfile(props: PageProps<KcContextBase.UpdateUserProfile, I18nBase>) {
|
@ -3,8 +3,8 @@ import { clsx } from "../tools/clsx";
|
|||||||
import type { MessageKeyBase } from "../i18n";
|
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 { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../kcContext";
|
||||||
import type { PageProps } from "./shared/KcProps";
|
import type { PageProps } from "../KcProps";
|
||||||
import type { I18nBase } from "../i18n";
|
import type { I18nBase } from "../i18n";
|
||||||
|
|
||||||
export default function WebauthnAuthenticate(props: PageProps<KcContextBase.WebauthnAuthenticate, I18nBase>) {
|
export default function WebauthnAuthenticate(props: PageProps<KcContextBase.WebauthnAuthenticate, I18nBase>) {
|
@ -1,6 +1,6 @@
|
|||||||
import React, { useEffect, Fragment } from "react";
|
import React, { useEffect, Fragment } from "react";
|
||||||
import type { KcProps } from "./KcProps";
|
import type { KcProps } from "../../KcProps";
|
||||||
import type { Attribute } from "../../getKcContext/KcContextBase";
|
import type { Attribute } from "../../kcContext/KcContextBase";
|
||||||
import { clsx } from "../../tools/clsx";
|
import { clsx } from "../../tools/clsx";
|
||||||
import type { ReactComponent } from "../../tools/ReactComponent";
|
import type { ReactComponent } from "../../tools/ReactComponent";
|
||||||
import { useCallbackFactory } from "../../tools/useCallbackFactory";
|
import { useCallbackFactory } from "../../tools/useCallbackFactory";
|
@ -1,6 +1,6 @@
|
|||||||
import "./tools/Array.prototype.every";
|
import "./tools/Array.prototype.every";
|
||||||
import React, { useMemo, useReducer, Fragment } from "react";
|
import React, { useMemo, useReducer, Fragment } from "react";
|
||||||
import type { KcContextBase, Validators, Attribute } from "./getKcContext/KcContextBase";
|
import type { KcContextBase, Validators, Attribute } from "./kcContext/KcContextBase";
|
||||||
import type { I18nBase, MessageKeyBase } from "./i18n";
|
import type { I18nBase, MessageKeyBase } from "./i18n";
|
||||||
import { useConstCallback } from "./tools/useConstCallback";
|
import { useConstCallback } from "./tools/useConstCallback";
|
||||||
import { id } from "tsafe/id";
|
import { id } from "tsafe/id";
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import "minimal-polyfills/Object.fromEntries";
|
import "minimal-polyfills/Object.fromEntries";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { join as pathJoin, relative as pathRelative, dirname as pathDirname } from "path";
|
import { join as pathJoin, relative as pathRelative, dirname as pathDirname } from "path";
|
||||||
import { crawl } from "./tools/crawl";
|
import { crawl } from "../bin/tools/crawl";
|
||||||
import { downloadBuiltinKeycloakTheme } from "./download-builtin-keycloak-theme";
|
import { downloadBuiltinKeycloakTheme } from "../bin/download-builtin-keycloak-theme";
|
||||||
import { getProjectRoot } from "./tools/getProjectRoot";
|
import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||||
import { getCliOptions } from "./tools/cliOptions";
|
import { getCliOptions } from "../bin/tools/cliOptions";
|
||||||
import { getLogger } from "./tools/logger";
|
import { getLogger } from "../bin/tools/logger";
|
||||||
|
|
||||||
//NOTE: To run without argument when we want to generate src/i18n/generated_kcMessages files,
|
//NOTE: To run without argument when we want to generate src/i18n/generated_kcMessages files,
|
||||||
// update the version array for generating for newer version.
|
// update the version array for generating for newer version.
|
Loading…
x
Reference in New Issue
Block a user