Update keycloakify
This commit is contained in:
parent
3564cbac6c
commit
13b0d685b8
@ -17,7 +17,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"keycloakify": "^11.3.9",
|
"keycloakify": "^11.3.11",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* prettier-ignore-start */
|
// This file is auto-generated by the `update-kc-gen` command. Do not edit it manually.
|
||||||
|
// Hash: 52e835881710cf6fd39c1589bb9282feccdcf06c9547d41c919576489f251d2f
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
@ -6,8 +7,6 @@
|
|||||||
|
|
||||||
// noinspection JSUnusedGlobalSymbols
|
// noinspection JSUnusedGlobalSymbols
|
||||||
|
|
||||||
// This file is auto-generated by Keycloakify
|
|
||||||
|
|
||||||
import { lazy, Suspense, type ReactNode } from "react";
|
import { lazy, Suspense, type ReactNode } from "react";
|
||||||
|
|
||||||
export type ThemeName = "keycloakify-starter";
|
export type ThemeName = "keycloakify-starter";
|
||||||
@ -20,9 +19,7 @@ export const kcEnvNames: KcEnvName[] = [];
|
|||||||
|
|
||||||
export const kcEnvDefaults: Record<KcEnvName, string> = {};
|
export const kcEnvDefaults: Record<KcEnvName, string> = {};
|
||||||
|
|
||||||
export type KcContext =
|
export type KcContext = import("./login/KcContext").KcContext;
|
||||||
| import("./login/KcContext").KcContext
|
|
||||||
;
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
@ -32,22 +29,16 @@ declare global {
|
|||||||
|
|
||||||
export const KcLoginPage = lazy(() => import("./login/KcPage"));
|
export const KcLoginPage = lazy(() => import("./login/KcPage"));
|
||||||
|
|
||||||
export function KcPage(
|
export function KcPage(props: { kcContext: KcContext; fallback?: ReactNode }) {
|
||||||
props: {
|
|
||||||
kcContext: KcContext;
|
|
||||||
fallback?: ReactNode;
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
const { kcContext, fallback } = props;
|
const { kcContext, fallback } = props;
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={fallback}>
|
<Suspense fallback={fallback}>
|
||||||
{(() => {
|
{(() => {
|
||||||
switch (kcContext.themeType) {
|
switch (kcContext.themeType) {
|
||||||
case "login": return <KcLoginPage kcContext={kcContext} />;
|
case "login":
|
||||||
|
return <KcLoginPage kcContext={kcContext} />;
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prettier-ignore-end */
|
|
||||||
|
@ -2,9 +2,7 @@ import { i18nBuilder } from "keycloakify/login";
|
|||||||
import type { ThemeName } from "../kc.gen";
|
import type { ThemeName } from "../kc.gen";
|
||||||
|
|
||||||
/** @see: https://docs.keycloakify.dev/i18n */
|
/** @see: https://docs.keycloakify.dev/i18n */
|
||||||
const { useI18n, ofTypeI18n } = i18nBuilder
|
const { useI18n, ofTypeI18n } = i18nBuilder.withThemeName<ThemeName>().build();
|
||||||
.withThemeName<ThemeName>()
|
|
||||||
.build();
|
|
||||||
|
|
||||||
type I18n = typeof ofTypeI18n;
|
type I18n = typeof ofTypeI18n;
|
||||||
|
|
||||||
|
@ -4015,10 +4015,10 @@ jsonfile@^6.0.1:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
graceful-fs "^4.1.6"
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
keycloakify@^11.3.9:
|
keycloakify@^11.3.11:
|
||||||
version "11.3.9"
|
version "11.3.11"
|
||||||
resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-11.3.9.tgz#31149fdc764fa99ab7300d6dd4797c87c867454e"
|
resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-11.3.11.tgz#2eb704d0cc883070d8b1bb9a7e4ec0640fdeed52"
|
||||||
integrity sha512-YYOwzuEuNfMm5pdSN9wyNttv5bdpKdA9b0bpd7yb7G6kjUbGywzcRJ7zKN8Tsgxx8/q/S+WX3NpP7Uj1SxAqjg==
|
integrity sha512-ZFSocde1hekW0zW1JZEcbPwPwLEmqLGX8qZTNl1o7DoelEZwf2Xy1ktjRuR04EJhmfwvcIdYhKFQKd39oJekfw==
|
||||||
dependencies:
|
dependencies:
|
||||||
tsafe "^1.7.5"
|
tsafe "^1.7.5"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user