Compare commits

...

6 Commits

Author SHA1 Message Date
437a9ce2d3 Update changelog v5.2.0 2022-04-27 19:27:37 +00:00
1b967b250a Bump version (changelog ignore) 2022-04-27 21:23:10 +02:00
e221f39e07 Export KcApp 2022-04-27 21:22:55 +02:00
21a8838a24 Update changelog v5.1.0 2022-04-27 19:20:36 +00:00
fad91ccae0 Merge branch 'main' of https://github.com/InseeFrLab/keycloakify 2022-04-27 21:17:40 +02:00
825914aa4b Export kcLanguageTags 2022-04-27 21:17:26 +02:00
4 changed files with 36 additions and 1 deletions

View File

@ -1,3 +1,11 @@
## **5.2.0** (2022-04-27)
- Export KcApp
## **5.1.0** (2022-04-27)
- Export kcLanguageTags
# **5.0.0** (2022-04-27)
- i18n rebuild from the ground up

View File

@ -1,6 +1,6 @@
{
"name": "keycloakify",
"version": "5.0.0",
"version": "5.2.0",
"description": "Keycloak theme generator for Reacts app",
"repository": {
"type": "git",

View File

@ -4,6 +4,7 @@ import ReactMarkdown from "react-markdown";
import memoize from "memoizee";
import { kcMessages as kcMessagesBase } from "./generated_kcMessages/15.0.2/login";
import { assert } from "tsafe/assert";
import type { Equals } from "tsafe";
export const kcMessages = {
...kcMessagesBase,
@ -30,6 +31,31 @@ export const kcMessages = {
export type KcLanguageTag = keyof typeof kcMessages;
export const kcLanguageTags = [
"en",
"fr",
"ca",
"cs",
"da",
"de",
"es",
"hu",
"it",
"ja",
"lt",
"nl",
"no",
"pl",
"pt-BR",
"ru",
"sk",
"sv",
"tr",
"zh-CN",
] as const;
assert<Equals<KcLanguageTag, typeof kcLanguageTags[number]>>();
type KcContextLike = { locale?: { currentLanguageTag: KcLanguageTag } };
export function getCurrentKcLanguageTag(kcContext: KcContextLike) {

View File

@ -4,6 +4,7 @@ export * from "./i18n";
export { useDownloadTerms } from "./components/Terms";
export * from "./components/KcApp";
export * from "./components/KcProps";
export * from "./keycloakJsAdapter";
export * from "./useFormValidationSlice";