Compare commits
5 Commits
v10.0.0-rc
...
v10.0.0-rc
Author | SHA1 | Date | |
---|---|---|---|
3e6d679838 | |||
4dad859c4d | |||
ef9c933ca8 | |||
0461190a67 | |||
06b3211b08 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "keycloakify",
|
||||
"version": "10.0.0-rc.25",
|
||||
"version": "10.0.0-rc.27",
|
||||
"description": "Create Keycloak themes using React",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -4,6 +4,7 @@ import fallbackMessages from "./baseMessages/en";
|
||||
import { getMessages } from "./baseMessages";
|
||||
import { assert } from "tsafe/assert";
|
||||
import type { KcContext } from "../kcContext/KcContext";
|
||||
import { Reflect } from "tsafe/Reflect";
|
||||
|
||||
export const fallbackLanguageTag = "en";
|
||||
|
||||
@ -137,7 +138,10 @@ export function createUseI18n<ExtraMessageKey extends string = never>(extraMessa
|
||||
return i18n ?? null;
|
||||
}
|
||||
|
||||
return { useI18n };
|
||||
return {
|
||||
useI18n,
|
||||
ofTypeI18n: Reflect<GenericI18n<MessageKey | ExtraMessageKey>>()
|
||||
};
|
||||
}
|
||||
|
||||
function createI18nTranslationFunctions<MessageKey extends string>(params: {
|
||||
|
@ -1,7 +1,3 @@
|
||||
import Fallback from "keycloakify/account/Fallback";
|
||||
|
||||
export default Fallback;
|
||||
|
||||
export type { AccountThemePageId as PageId } from "keycloakify/bin/shared/constants";
|
||||
export { createUseI18n } from "keycloakify/account/i18n/i18n";
|
||||
export type { ExtendKcContext } from "keycloakify/account/kcContext";
|
||||
|
@ -4,6 +4,7 @@ import fallbackMessages from "./baseMessages/en";
|
||||
import { getMessages } from "./baseMessages";
|
||||
import { assert } from "tsafe/assert";
|
||||
import type { KcContext } from "../kcContext/KcContext";
|
||||
import { Reflect } from "tsafe/Reflect";
|
||||
|
||||
export const fallbackLanguageTag = "en";
|
||||
|
||||
@ -139,7 +140,10 @@ export function createUseI18n<ExtraMessageKey extends string = never>(extraMessa
|
||||
return i18n ?? null;
|
||||
}
|
||||
|
||||
return { useI18n };
|
||||
return {
|
||||
useI18n,
|
||||
ofTypeI18n: Reflect<GenericI18n<MessageKey | ExtraMessageKey>>()
|
||||
};
|
||||
}
|
||||
|
||||
function createI18nTranslationFunctions<MessageKey extends string>(params: {
|
||||
|
@ -1,7 +1,3 @@
|
||||
import Fallback from "keycloakify/login/Fallback";
|
||||
|
||||
export default Fallback;
|
||||
|
||||
export { useDownloadTerms } from "keycloakify/login/lib/useDownloadTerms";
|
||||
export { createUseI18n } from "keycloakify/login/i18n/i18n";
|
||||
export type {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import Fallback from "../../dist/account";
|
||||
import Fallback from "../../dist/account/Fallback";
|
||||
import type { KcContext } from "./kcContext";
|
||||
import { useI18n } from "./i18n";
|
||||
import Template from "../../dist/account/Template";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createUseI18n } from "../../dist/account";
|
||||
|
||||
export const { useI18n } = createUseI18n({});
|
||||
export const { useI18n, ofTypeI18n } = createUseI18n({});
|
||||
|
||||
export type I18n = NonNullable<ReturnType<typeof useI18n>>;
|
||||
export type I18n = typeof ofTypeI18n;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import Fallback from "../../dist/login";
|
||||
import Fallback from "../../dist/login/Fallback";
|
||||
import type { KcContext } from "./kcContext";
|
||||
import { useI18n } from "./i18n";
|
||||
import { useDownloadTerms } from "../../dist/login/lib/useDownloadTerms";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createUseI18n } from "../../dist/login";
|
||||
|
||||
export const { useI18n } = createUseI18n({});
|
||||
export const { useI18n, ofTypeI18n } = createUseI18n({});
|
||||
|
||||
export type I18n = NonNullable<ReturnType<typeof useI18n>>;
|
||||
export type I18n = typeof ofTypeI18n;
|
||||
|
Reference in New Issue
Block a user