Avoir introducing breaking changes for CSS only setup
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
import React, { lazy, Suspense } from "react";
|
||||
import { __unsafe_useI18n as useI18n } from "./i18n";
|
||||
import DefaultTemplate from "./pages/Template";
|
||||
import type { KcContextBase } from "./kcContext/KcContextBase";
|
||||
import type { KcContextBase } from "./getKcContext/KcContextBase";
|
||||
import type { PageProps } from "./KcProps";
|
||||
import type { I18nBase } from "./i18n";
|
||||
import type { SetOptional } from "./tools/SetOptional";
|
||||
|
||||
const Login = lazy(() => import("./pages/Login"));
|
||||
const Register = lazy(() => import("./pages/Register"));
|
||||
@ -27,7 +28,7 @@ const LogoutConfirm = lazy(() => import("./pages/LogoutConfirm"));
|
||||
const UpdateUserProfile = lazy(() => import("./pages/UpdateUserProfile"));
|
||||
const IdpReviewUserProfile = lazy(() => import("./pages/IdpReviewUserProfile"));
|
||||
|
||||
export default function KcApp(props_: PageProps<KcContextBase, I18nBase>) {
|
||||
export default function KcApp(props_: SetOptional<PageProps<KcContextBase, I18nBase>, "Template">) {
|
||||
const { kcContext, i18n: userProvidedI18n, Template = DefaultTemplate, ...kcProps } = props_;
|
||||
|
||||
const i18n = (function useClosure() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { allPropertiesValuesToUndefined } from "./tools/allPropertiesValuesToUndefined";
|
||||
import { assert } from "tsafe/assert";
|
||||
import type { KcContextBase } from "./kcContext";
|
||||
import type { KcContextBase } from "./getKcContext";
|
||||
import type { ReactNode } from "react";
|
||||
import { I18nBase } from "./i18n";
|
||||
|
||||
|
@ -6,7 +6,7 @@ import { headInsert } from "./tools/headInsert";
|
||||
import { pathJoin } from "../bin/tools/pathJoin";
|
||||
import { clsx } from "./tools/clsx";
|
||||
import type { TemplateProps } from "./KcProps";
|
||||
import type { KcContextBase } from "./kcContext/KcContextBase";
|
||||
import type { KcContextBase } from "./getKcContext/KcContextBase";
|
||||
import type { I18nBase } from "./i18n";
|
||||
|
||||
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 type baseMessages from "./generated_messages/18.0.1/login/en";
|
||||
import { assert } from "tsafe/assert";
|
||||
import type { KcContextBase } from "../kcContext/KcContextBase";
|
||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||
import { Markdown } from "../tools/Markdown";
|
||||
|
||||
export const fallbackLanguageTag = "en";
|
||||
|
@ -1,4 +1,4 @@
|
||||
export * from "./kcContext";
|
||||
export * from "./getKcContext";
|
||||
|
||||
export * from "./i18n";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { assert } from "../tools/assert";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import { useConstCallback } from "../tools/useConstCallback";
|
||||
import type { FormEventHandler } from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -2,7 +2,7 @@ import React, { useEffect } from "react";
|
||||
import { headInsert } from "../tools/headInsert";
|
||||
import { pathJoin } from "../../bin/tools/pathJoin";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import { useConstCallback } from "../tools/useConstCallback";
|
||||
import type { FormEventHandler } from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import { useConstCallback } from "../tools/useConstCallback";
|
||||
import type { FormEventHandler } from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useReducer, useEffect } from "react";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import { assert } from "../tools/assert";
|
||||
import { useCallbackFactory } from "../tools/useCallbackFactory";
|
||||
import { headInsert } from "../tools/headInsert";
|
||||
|
@ -9,7 +9,7 @@ import { useConst } from "../tools/useConst";
|
||||
import { useConstCallback } from "../tools/useConstCallback";
|
||||
import { Markdown } from "../tools/Markdown";
|
||||
import type { Extends } from "tsafe";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { clsx } from "../tools/clsx";
|
||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { clsx } from "../tools/clsx";
|
||||
import type { MessageKeyBase } from "../i18n";
|
||||
import { base64url } from "rfc4648";
|
||||
import { useConstCallback } from "../tools/useConstCallback";
|
||||
import type { KcContextBase } from "../kcContext";
|
||||
import type { KcContextBase } from "../getKcContext";
|
||||
import type { PageProps } from "../KcProps";
|
||||
import type { I18nBase } from "../i18n";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { useEffect, Fragment } from "react";
|
||||
import type { KcProps } from "../../KcProps";
|
||||
import type { Attribute } from "../../kcContext/KcContextBase";
|
||||
import type { Attribute } from "../../getKcContext/KcContextBase";
|
||||
import { clsx } from "../../tools/clsx";
|
||||
import type { ReactComponent } from "../../tools/ReactComponent";
|
||||
import { useCallbackFactory } from "../../tools/useCallbackFactory";
|
||||
|
1
src/lib/tools/SetOptional.ts
Normal file
1
src/lib/tools/SetOptional.ts
Normal file
@ -0,0 +1 @@
|
||||
export type SetOptional<T extends Record<string, unknown>, K extends keyof T> = Omit<T, K> & Partial<Record<K, T[K]>>;
|
@ -1,6 +1,6 @@
|
||||
import "./tools/Array.prototype.every";
|
||||
import React, { useMemo, useReducer, Fragment } from "react";
|
||||
import type { KcContextBase, Validators, Attribute } from "./kcContext/KcContextBase";
|
||||
import type { KcContextBase, Validators, Attribute } from "./getKcContext/KcContextBase";
|
||||
import type { I18nBase, MessageKeyBase } from "./i18n";
|
||||
import { useConstCallback } from "./tools/useConstCallback";
|
||||
import { id } from "tsafe/id";
|
||||
|
Reference in New Issue
Block a user