Compare commits

..

1 Commits

Author SHA1 Message Date
40af9ea8b8 Enabling shorter import paths [automatic] 2021-03-04 13:45:21 +00:00
448 changed files with 32883 additions and 52352 deletions

View File

@ -1,243 +0,0 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "lordvlad",
"name": "Waldemar Reusch",
"avatar_url": "https://avatars.githubusercontent.com/u/1217769?v=4",
"profile": "https://github.com/lordvlad",
"contributions": [
"code"
]
},
{
"login": "willwill96",
"name": "William Will",
"avatar_url": "https://avatars.githubusercontent.com/u/10997562?v=4",
"profile": "https://willwill96.github.io/the-ui-dawg-static-site/en/introduction/",
"contributions": [
"code"
]
},
{
"login": "Ann2827",
"name": "Bystrova Ann",
"avatar_url": "https://avatars.githubusercontent.com/u/32645809?v=4",
"profile": "https://github.com/Ann2827",
"contributions": [
"code"
]
},
{
"login": "mkreuzmayr",
"name": "Michael Kreuzmayr",
"avatar_url": "https://avatars.githubusercontent.com/u/20108212?v=4",
"profile": "https://github.com/mkreuzmayr",
"contributions": [
"code"
]
},
{
"login": "Mstrodl",
"name": "Mary ",
"avatar_url": "https://avatars.githubusercontent.com/u/6877780?v=4",
"profile": "https://coolmathgames.tech",
"contributions": [
"code"
]
},
{
"login": "Tasyp",
"name": "German Öö",
"avatar_url": "https://avatars.githubusercontent.com/u/6623212?v=4",
"profile": "https://tasyp.xyz/",
"contributions": [
"code"
]
},
{
"login": "revolunet",
"name": "Julien Bouquillon",
"avatar_url": "https://avatars.githubusercontent.com/u/124937?v=4",
"profile": "https://revolunet.com",
"contributions": [
"code"
]
},
{
"login": "aidangilmore",
"name": "Aidan Gilmore",
"avatar_url": "https://avatars.githubusercontent.com/u/32880357?v=4",
"profile": "https://github.com/aidangilmore",
"contributions": [
"code"
]
},
{
"login": "0x-Void",
"name": "Void",
"avatar_url": "https://avatars.githubusercontent.com/u/32745739?v=4",
"profile": "https://github.com/0x-Void",
"contributions": [
"code"
]
},
{
"login": "juffe",
"name": "juffe",
"avatar_url": "https://avatars.githubusercontent.com/u/5393231?v=4",
"profile": "https://github.com/juffe",
"contributions": [
"code"
]
},
{
"login": "lazToum",
"name": "Lazaros Toumanidis",
"avatar_url": "https://avatars.githubusercontent.com/u/4764837?v=4",
"profile": "https://github.com/lazToum",
"contributions": [
"code"
]
},
{
"login": "marcmrf",
"name": "Marc",
"avatar_url": "https://avatars.githubusercontent.com/u/9928519?v=4",
"profile": "https://github.com/marcmrf",
"contributions": [
"code"
]
},
{
"login": "kasir-barati",
"name": "Kasir Barati",
"avatar_url": "https://avatars.githubusercontent.com/u/73785723?v=4",
"profile": "http://kasir-barati.github.io",
"contributions": [
"doc"
]
},
{
"login": "asashay",
"name": "Alex Oliynyk",
"avatar_url": "https://avatars.githubusercontent.com/u/10714670?v=4",
"profile": "https://github.com/asashay",
"contributions": [
"code"
]
},
{
"login": "thosil",
"name": "Thomas Silvestre",
"avatar_url": "https://avatars.githubusercontent.com/u/1140574?v=4",
"profile": "https://www.gravitysoftware.be",
"contributions": [
"code"
]
},
{
"login": "satanshiro",
"name": "satanshiro",
"avatar_url": "https://avatars.githubusercontent.com/u/38865738?v=4",
"profile": "https://github.com/satanshiro",
"contributions": [
"code"
]
},
{
"login": "kpoelhekke",
"name": "Koen Poelhekke",
"avatar_url": "https://avatars.githubusercontent.com/u/1632377?v=4",
"profile": "https://poelhekke.dev",
"contributions": [
"code"
]
},
{
"login": "zavoloklom",
"name": "Sergey Kupletsky",
"avatar_url": "https://avatars.githubusercontent.com/u/4151869?v=4",
"profile": "https://github.com/zavoloklom",
"contributions": [
"test",
"code"
]
},
{
"login": "rome-user",
"name": "rome-user",
"avatar_url": "https://avatars.githubusercontent.com/u/114131048?v=4",
"profile": "https://github.com/rome-user",
"contributions": [
"code"
]
},
{
"login": "celinepelletier",
"name": "Céline Pelletier",
"avatar_url": "https://avatars.githubusercontent.com/u/82821620?v=4",
"profile": "https://github.com/celinepelletier",
"contributions": [
"code"
]
},
{
"login": "xgp",
"name": "Garth",
"avatar_url": "https://avatars.githubusercontent.com/u/244253?v=4",
"profile": "https://github.com/xgp",
"contributions": [
"code"
]
},
{
"login": "BlackVoid",
"name": "Felix Gustavsson",
"avatar_url": "https://avatars.githubusercontent.com/u/673720?v=4",
"profile": "https://github.com/BlackVoid",
"contributions": [
"code"
]
},
{
"login": "msiemens",
"name": "Markus Siemens",
"avatar_url": "https://avatars.githubusercontent.com/u/1873922?v=4",
"profile": "https://m-siemens.de/",
"contributions": [
"code"
]
},
{
"login": "law108000",
"name": "Rlok",
"avatar_url": "https://avatars.githubusercontent.com/u/8112024?v=4",
"profile": "https://github.com/law108000",
"contributions": [
"code"
]
},
{
"login": "Moulyy",
"name": "Moulyy",
"avatar_url": "https://avatars.githubusercontent.com/u/115405804?v=4",
"profile": "https://github.com/Moulyy",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"skipCi": true,
"repoType": "github",
"repoHost": "https://github.com",
"projectName": "keycloakify",
"projectOwner": "keycloakify",
"commitType": "docs"
}

6
.gitattributes vendored
View File

@ -1,3 +1,3 @@
src/lib/i18n/generated_kcMessages/* linguist-documentation
src/bin/keycloakify/index.ts -linguist-detectable
src/bin/install-builtin-keycloak-themes.ts -linguist-detectable
src/lib/i18n/generated_messages/* linguist-documentation
src/bin/build-keycloak-theme/index.ts -linguist-detectable
src/bin/download-sample-keycloak-themes.ts -linguist-detectable

View File

@ -1,4 +0,0 @@
# These are supported funding model platforms
github: [garronej]
custom: ['https://www.ringerhq.com/experts/garronej']

View File

@ -1,139 +0,0 @@
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test_lint:
runs-on: ubuntu-latest
if: ${{ !github.event.created && github.repository != 'garronej/ts-ci' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: bahmutov/npm-install@v1
- name: If this step fails run 'npm run format' then commit again.
run: npm run _format --list-different
test:
runs-on: ${{ matrix.os }}
needs: test_lint
strategy:
matrix:
node: [ '18' ]
os: [ ubuntu-latest ]
name: Test with Node v${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: bahmutov/npm-install@v1
- run: npm run build
- run: npm run test
storybook:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: bahmutov/npm-install@v1
- run: npm run build-storybook
- run: git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${{github.repository}}.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npx -y -p gh-pages@3.1.0 gh-pages -d ./storybook-static -u "github-actions-bot <actions@github.com>"
check_if_version_upgraded:
name: Check if version upgrade
# When someone forks the repo and opens a PR we want to enables the tests to be run (the previous jobs)
# but obviously only us should be allowed to release.
# In the following check we make sure that we own the branch this CI workflow is running on before continuing.
# Without this check, trying to release would fail anyway because only us have the correct secret.NPM_TOKEN but
# it's cleaner to stop the execution instead of letting the CI crash.
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
runs-on: ubuntu-latest
needs: test
outputs:
from_version: ${{ steps.step1.outputs.from_version }}
to_version: ${{ steps.step1.outputs.to_version }}
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
is_pre_release: ${{steps.step1.outputs.is_pre_release }}
steps:
- uses: garronej/ts-ci@v2.1.2
id: step1
with:
action_name: is_package_json_version_upgraded
create_github_release:
runs-on: ubuntu-latest
# We create release only if the version in the package.json have been upgraded and this CI is running against the main branch.
# We allow branches with a PR open on main to publish pre-release (x.y.z-rc.u) but not actual releases.
if: |
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' &&
(
github.event_name == 'push' ||
needs.check_if_version_upgraded.outputs.is_pre_release == 'true'
)
needs:
- check_if_version_upgraded
steps:
- uses: softprops/action-gh-release@v2
with:
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true
draft: false
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_pre_release == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_on_npm:
runs-on: ubuntu-latest
needs:
- create_github_release
- check_if_version_upgraded
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
- uses: bahmutov/npm-install@v1
- run: npm run build
- run: npx -y -p denoify@1.6.12 enable_short_npm_import_path
env:
DRY_RUN: "0"
- uses: garronej/ts-ci@v2.1.2
with:
action_name: remove_dark_mode_specific_images_from_readme
- name: Publishing on NPM
run: |
if [ "$(npm show . version)" = "$VERSION" ]; then
echo "This version is already published"
exit 0
fi
if [ "$NODE_AUTH_TOKEN" = "" ]; then
echo "Can't publish on NPM, You must first create a secret called NPM_TOKEN that contains your NPM auth token. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets"
false
fi
EXTRA_ARGS=""
if [ "$IS_PRE_RELEASE" = "true" ]; then
EXTRA_ARGS="--tag next"
fi
npm publish $EXTRA_ARGS
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
IS_PRE_RELEASE: ${{ needs.check_if_version_upgraded.outputs.is_pre_release }}

18
.gitignore vendored
View File

@ -41,21 +41,5 @@ jspm_packages
.DS_Store
/dist
/keycloakify_starter_test/
/sample_custom_react_project/
/sample_react_project/
/.yarn_home/
.idea
/src/login/i18n/messages_defaultSet/
/src/account/i18n/messages_defaultSet/
# VS Code devcontainers
.devcontainer
/.yarn
/.yarnrc.yml
/stories/assets/fonts/
/build_storybook/
/storybook-static/

View File

@ -1,15 +0,0 @@
node_modules/
/dist/
/CHANGELOG.md
/.yarn_home/
/src/test/apps/
/src/tools/types/
/build_keycloak/
/.vscode/
/src/login/i18n/messages_defaultSet/
/src/account/i18n/messages_defaultSet/
/dist_test
/sample_react_project/
/sample_custom_react_project/
/keycloakify_starter_test/
/.storybook/static/keycloak-resources/

View File

@ -1,24 +0,0 @@
{
"printWidth": 90,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"overrides": [
{
"files": "*.tsx",
"options": {
"printWidth": 150
}
},
{
"files": "useUserProfileForm.tsx",
"options": {
"printWidth": 150
}
}
]
}

View File

@ -1,33 +0,0 @@
const brandImage = "logo.png";
const brandTitle = "Keycloakify";
const brandUrl = "https://github.com/keycloakify/keycloakify";
const fontBase = '"Work Sans", sans-serif';
const fontCode = "monospace";
export const darkTheme = {
base: "dark",
appBg: "#1E1E1E",
appContentBg: "#161616",
barBg: "#161616",
colorSecondary: "#8585F6",
textColor: "#FFFFFF",
brandImage,
brandTitle,
brandUrl,
fontBase,
fontCode
};
export const lightTheme: typeof darkTheme = {
base: "light",
appBg: "#F6F6F6",
appContentBg: "#FFFFFF",
barBg: "#FFFFFF",
colorSecondary: "#000091",
textColor: "#212121",
brandImage,
brandTitle,
brandUrl,
fontBase,
fontCode
};

View File

@ -1,13 +0,0 @@
module.exports = {
stories: [
"../stories/**/*.stories.tsx"
],
addons: [
"storybook-dark-mode",
"@storybook/addon-a11y"
],
core: {
builder: "webpack5"
},
staticDirs: ["./static"]
};

View File

@ -1,32 +0,0 @@
<!-- start favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="/favicon_package/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon_package/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon_package/favicon-16x16.png">
<link rel="manifest" href="/favicon_package/site.webmanifest">
<link rel="mask-icon" href="/favicon_package/safari-pinned-tab.svg" color="#5bbad5">
<!-- end favicon -->
<!-- Meta tags generated by metatags.io -->
<!-- Primary Meta Tags -->
<title>Keycloakify Storybook</title>
<meta name="title" content="Keycloakify Storybook">
<meta name="description" content="Storybook of default components to use as a reference when building a custom Keycloak theme">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://www.keycloakify.dev">
<meta property="og:type" content="website">
<meta property="og:title" content="Keycloakify Storybook">
<meta property="og:description" content="Storybook of default components to use as a reference when building a custom Keycloak theme">
<meta property="og:image" content="https://storybook.keycloakify.dev/preview.png">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Keycloakify Storybook">
<meta name="twitter:description" content="Storybook of default components to use as a reference when building a custom Keycloak theme">
<meta name="twitter:image" content="https://storybook.keycloakify.dev/preview.png">
<link rel="preload" href="/fonts/WorkSans/worksans-bold-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-medium-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-regular-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-semibold-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="/fonts/WorkSans/font.css">

View File

@ -1,6 +0,0 @@
import { addons } from '@storybook/addons';
addons.setConfig({
selectedPanel: 'storybook/a11y/panel',
showPanel: false
});

View File

@ -1,23 +0,0 @@
<link rel="preload" href="/fonts/WorkSans/worksans-bold-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-medium-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-regular-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-semibold-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="/fonts/WorkSans/font.css">
<style>
body.sb-show-main.sb-main-padded {
padding: 0;
}
body:not(.kcBodyClass) {
background-color: #393939;
}
body.sb-show-preparing-docs > .sb-wrapper {
visibility: hidden;
}
body .sb-preparing-story {
visibility: hidden;
}
</style>

View File

@ -1,161 +0,0 @@
import { darkTheme, lightTheme } from "./customTheme";
import { create as createTheme } from "@storybook/theming";
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
backgrounds: { disable: true },
darkMode: {
light: createTheme(lightTheme),
dark: createTheme(darkTheme),
},
controls: {
disable: true,
},
actions: {
disable: true
},
viewport: {
viewports: {
"1440p": {
name: "1440p",
styles: {
width: "2560px",
height: "1440px",
},
},
fullHD: {
name: "Full HD",
styles: {
width: "1920px",
height: "1080px",
},
},
macBookProBig: {
name: "MacBook Pro Big",
styles: {
width: "1024px",
height: "640px",
},
},
macBookProMedium: {
name: "MacBook Pro Medium",
styles: {
width: "1440px",
height: "900px",
},
},
macBookProSmall: {
name: "MacBook Pro Small",
styles: {
width: "1680px",
height: "1050px",
},
},
pcAgent: {
name: "PC Agent",
styles: {
width: "960px",
height: "540px",
},
},
iphone12Pro: {
name: "Iphone 12 pro",
styles: {
width: "390px",
height: "844px",
},
},
iphone5se: {
name: "Iphone 5/SE",
styles: {
width: "320px",
height: "568px",
},
},
ipadPro: {
name: "Ipad pro",
styles: {
width: "1240px",
height: "1366px",
},
},
"Galaxy s9+": {
name: "Galaxy S9+",
styles: {
width: "320px",
height: "658px",
},
}
},
},
options: {
storySort: (a, b) =>
getHardCodedWeight(b[1].kind) - getHardCodedWeight(a[1].kind),
},
};
const { getHardCodedWeight } = (() => {
const orderedPagesPrefix = [
"Introduction",
"login/login.ftl",
"login/register.ftl",
"login/terms.ftl",
"login/error.ftl",
"login/code.ftl",
"login/delete-account-confirm.ftl",
"login/delete-credential.ftl",
"login/frontchannel-logout.ftl",
"login/idp-review-user-profile.ftl",
"login/info.ftl",
"login/login-config-totp.ftl",
"login/login-idp-link-confirm.ftl",
"login/login-idp-link-email.ftl",
"login/login-oauth-grant.ftl",
"login/login-otp.ftl",
"login/login-page-expired.ftl",
"login/login-password.ftl",
"login/login-reset-otp.ftl",
"login/login-reset-password.ftl",
"login/login-update-password.ftl",
"login/login-update-profile.ftl",
"login/login-username.ftl",
"login/login-verify-email.ftl",
"login/login-x509-info.ftl",
"login/logout-confirm.ftl",
"login/saml-post-form.ftl",
"login/select-authenticator.ftl",
"login/update-email.ftl",
"login/webauthn-authenticate.ftl",
"login/webauthn-error.ftl",
"login/webauthn-register.ftl",
"login/login-oauth2-device-verify-user-code.ftl",
"login/login-recovery-authn-code-config.ftl",
"login/login-recovery-authn-code-input.ftl",
"account/account.ftl",
"account/password.ftl",
"account/federatedIdentity.ftl",
"account/log.ftl",
"account/sessions.ftl",
"account/totp.ftl",
];
function getHardCodedWeight(kind) {
for (let i = 0; i < orderedPagesPrefix.length; i++) {
if (kind.toLowerCase().startsWith(orderedPagesPrefix[i].toLowerCase())) {
return orderedPagesPrefix.length - i;
}
}
return 0;
}
return { getHardCodedWeight };
})();

View File

@ -1 +0,0 @@
storybook.keycloakify.dev

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,193 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="447.000000pt" height="447.000000pt" viewBox="0 0 447.000000 447.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,447.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M2177 4413 c-3 -2 -17 -6 -33 -9 -85 -15 -204 -109 -286 -225 -95
-133 -229 -437 -263 -597 -4 -18 -10 -30 -13 -28 -4 2 -7 -11 -8 -30 0 -19 -3
-36 -6 -39 -3 -4 -23 1 -44 10 -51 22 -213 73 -289 92 -301 73 -516 74 -670 3
-124 -57 -186 -153 -188 -295 -1 -67 5 -128 18 -180 3 -13 15 -45 26 -70 43
-99 57 -135 53 -135 -3 0 4 -10 16 -22 11 -12 20 -26 20 -31 0 -5 9 -22 21
-38 11 -16 18 -29 14 -29 -3 0 4 -10 15 -22 11 -12 18 -28 15 -36 -2 -7 -1
-11 3 -8 4 2 19 -12 32 -32 13 -20 33 -47 44 -59 11 -13 17 -23 13 -23 -3 0
12 -19 33 -42 22 -24 38 -49 35 -55 -2 -7 -1 -12 4 -10 4 1 32 -25 62 -58 30
-33 88 -94 131 -135 l76 -75 -71 -70 c-112 -110 -174 -181 -262 -300 -106
-144 -142 -202 -203 -325 -9 -19 -21 -38 -27 -42 -5 -4 -7 -8 -3 -8 4 0 -4
-27 -18 -60 -25 -63 -58 -199 -50 -208 3 -2 1 -12 -4 -22 -5 -10 -6 -20 -3
-24 4 -4 8 -23 10 -44 9 -107 77 -201 183 -251 33 -16 56 -32 52 -36 -4 -5 -2
-5 4 -2 6 4 44 1 85 -6 41 -7 102 -12 136 -12 41 1 60 -2 55 -9 -3 -6 2 -5 11
3 11 8 44 14 86 15 38 0 67 4 64 9 -4 6 10 8 79 11 14 0 24 3 22 5 -4 4 33 14
145 37 13 3 33 10 43 15 11 6 26 8 34 5 10 -4 12 -2 8 6 -5 8 -2 9 9 5 10 -3
17 -2 17 3 0 6 8 10 18 10 9 0 36 9 58 19 32 15 45 16 54 8 9 -9 11 -9 8 2 -2
7 2 15 8 18 10 3 23 -34 38 -108 2 -8 6 -21 9 -29 15 -36 70 -206 70 -217 0
-7 4 -13 8 -13 11 0 30 -61 22 -74 -3 -6 -3 -8 2 -4 8 7 86 -135 88 -159 0 -7
4 -13 8 -13 13 0 39 -56 31 -66 -4 -5 -3 -6 2 -2 5 4 22 -12 39 -35 17 -23 49
-59 71 -80 23 -21 40 -42 39 -47 -2 -6 0 -9 5 -8 15 3 63 -22 68 -37 3 -8 10
-12 15 -10 5 3 22 -1 39 -10 17 -9 35 -13 40 -10 6 3 10 2 10 -2 0 -5 12 -8
28 -8 15 1 33 -4 41 -9 11 -8 13 -8 8 0 -4 7 7 13 33 17 21 3 53 12 71 21 17
9 36 13 42 9 5 -3 7 -1 3 5 -3 6 3 13 14 17 11 3 20 11 20 16 0 5 5 9 11 9 5
0 7 -6 3 -13 -4 -7 -3 -9 2 -4 5 5 9 12 9 17 0 4 14 21 30 37 69 67 162 196
179 251 4 12 12 20 17 16 5 -3 8 -2 7 3 -1 4 6 29 17 56 14 33 24 45 35 41 11
-4 12 -2 4 6 -14 14 -6 52 9 43 5 -3 7 -2 4 4 -3 5 8 45 24 88 17 44 33 86 35
94 7 34 56 206 59 209 1 1 15 -3 31 -9 16 -7 34 -13 39 -15 61 -18 144 -51
139 -56 -3 -4 3 -4 14 -1 11 2 23 0 26 -6 4 -5 14 -7 23 -4 9 4 14 2 10 -3 -3
-5 7 -9 21 -8 34 1 63 -6 58 -15 -2 -3 19 -7 47 -9 28 -2 55 -6 61 -10 13 -8
18 -9 79 -10 27 -1 46 -5 44 -9 -3 -5 20 -6 50 -5 44 3 54 1 48 -10 -6 -10 -5
-11 6 0 16 15 33 16 23 0 -5 -7 -3 -8 7 -3 7 5 29 10 49 12 74 5 116 11 135
18 11 4 37 13 57 21 28 10 38 11 41 1 4 -8 6 -7 6 3 1 8 21 28 46 44 43 26 92
86 109 131 28 73 27 217 -3 313 -5 18 -10 33 -9 35 2 23 -118 257 -184 356
-44 67 -124 177 -138 191 -3 3 -34 39 -70 80 -36 41 -97 107 -137 146 l-72 71
25 22 c14 12 30 19 36 15 6 -4 8 -3 4 4 -3 6 24 42 61 80 38 38 86 91 108 117
22 27 46 54 53 61 6 7 12 17 12 23 0 6 3 11 8 11 4 0 22 22 41 50 19 27 37 47
41 45 4 -3 7 3 6 13 0 9 5 16 12 14 8 -1 11 2 7 7 -5 9 36 83 55 101 5 5 101
200 121 245 7 18 26 84 36 125 2 8 4 27 5 42 0 16 5 25 11 21 6 -4 7 -1 2 7
-11 18 -11 62 0 80 5 8 4 11 -2 7 -6 -4 -12 10 -16 36 -6 51 -10 70 -18 77 -3
3 -15 21 -27 41 -42 70 -184 145 -292 155 -205 20 -451 -18 -709 -108 -30 -10
-60 -17 -68 -14 -8 3 -12 2 -9 -3 5 -7 -42 -31 -60 -31 -1 0 -5 15 -9 33 -18
86 -108 342 -156 444 -17 35 -29 66 -29 69 1 4 -2 10 -7 13 -5 3 -24 32 -42
64 -108 190 -245 296 -403 311 -20 2 -39 2 -41 -1z m53 -124 c0 -5 5 -7 10 -4
14 9 52 -4 45 -16 -3 -5 0 -6 8 -4 17 7 69 -33 61 -47 -5 -7 -2 -8 5 -4 13 8
43 -23 35 -36 -3 -4 1 -6 8 -3 7 2 24 -11 38 -31 14 -19 30 -41 35 -47 50 -56
148 -233 139 -249 -4 -6 -3 -9 2 -5 12 7 97 -192 90 -210 -3 -8 -2 -12 3 -9
11 7 45 -120 35 -135 -4 -8 -3 -9 4 -5 7 4 12 3 12 -3 0 -5 3 -16 6 -25 4 -11
-23 -30 -113 -75 -138 -71 -276 -145 -350 -189 -29 -17 -53 -29 -53 -26 0 3
-7 -1 -15 -10 -14 -14 -19 -13 -53 6 -20 11 -62 34 -92 51 -30 16 -59 33 -65
37 -5 4 -86 47 -180 95 -93 48 -173 91 -177 94 -11 10 3 52 15 44 6 -3 7 -1 3
6 -9 14 12 113 22 107 4 -2 8 7 8 20 2 24 42 134 53 144 3 3 7 12 9 20 2 8 17
44 33 80 24 50 32 61 40 50 8 -11 9 -10 4 7 -5 17 10 47 60 123 36 55 71 98
76 94 5 -3 9 -2 8 3 -4 23 2 35 17 29 8 -3 12 -2 9 3 -7 12 60 78 100 99 25
13 70 27 98 31 4 1 7 -4 7 -10z m-1411 -783 c9 -6 12 -5 8 1 -4 6 10 10 34 11
29 1 38 -1 33 -11 -5 -9 -4 -9 7 1 7 6 19 12 27 12 8 0 10 -5 6 -12 -6 -10 -5
-10 7 -1 9 7 26 10 40 8 13 -3 47 -8 74 -11 63 -7 155 -23 175 -31 15 -6 35
-10 71 -12 12 -1 17 -5 13 -13 -4 -7 -3 -8 4 -4 6 4 31 1 54 -5 24 -7 49 -13
55 -15 25 -5 73 -29 73 -37 0 -5 4 -6 9 -3 12 8 41 -4 41 -16 0 -5 -4 -6 -10
-3 -6 3 -7 -1 -4 -9 3 -9 1 -45 -5 -81 -6 -36 -14 -91 -17 -122 -4 -32 -11
-61 -18 -65 -8 -6 -7 -8 2 -8 7 0 11 -4 8 -8 -3 -4 -8 -42 -11 -83 -4 -40 -9
-81 -12 -89 -3 -8 -6 -44 -8 -80 -1 -36 -3 -65 -4 -65 -1 0 -3 -27 -4 -61 -3
-66 0 -62 -92 -139 -33 -27 -62 -53 -63 -58 -2 -4 -8 -5 -13 -1 -5 3 -9 1 -9
-3 0 -5 -41 -44 -91 -88 -50 -43 -98 -85 -106 -93 -13 -14 -23 -6 -91 64 -86
90 -172 188 -186 213 -5 9 -12 18 -16 21 -12 9 -106 154 -139 215 -18 33 -37
66 -43 72 -6 7 -8 20 -4 28 3 9 2 14 -3 11 -19 -12 -102 225 -105 296 0 27 -4
48 -7 48 -16 0 9 108 32 142 22 31 125 81 151 74 10 -2 18 0 18 5 0 5 14 7 30
5 17 -2 30 0 30 4 0 9 42 7 59 -4z m2823 1 c6 -9 8 -9 8 1 0 7 4 10 10 7 5 -3
29 -8 52 -11 113 -13 201 -66 197 -118 0 -5 4 -12 10 -15 9 -6 11 -27 11 -124
0 -16 -4 -26 -9 -23 -5 3 -7 -2 -4 -13 11 -41 -89 -307 -110 -294 -6 3 -7 1
-3 -6 13 -20 -142 -281 -166 -281 -6 0 -8 -3 -5 -7 11 -10 -51 -84 -197 -238
l-86 -89 -47 44 c-26 25 -52 50 -58 55 -7 6 -39 33 -71 61 -33 29 -86 73 -119
100 -86 69 -87 71 -90 112 -5 69 -16 207 -21 242 -4 33 -10 92 -18 170 -4 37
-14 114 -21 165 -2 17 -9 52 -14 80 -5 27 -9 50 -8 51 50 22 109 44 129 48 15
2 36 10 48 16 12 6 28 9 35 6 8 -3 15 -1 17 5 2 5 19 11 39 13 20 2 40 6 45 9
5 3 29 8 54 12 25 4 48 9 52 11 5 3 8 -1 8 -8 0 -9 2 -10 8 -2 9 16 43 21 61
10 10 -7 12 -6 6 4 -6 10 -3 12 12 8 12 -3 25 -3 31 1 20 12 206 11 214 -2z
m-1950 -189 c23 -13 46 -27 49 -31 3 -5 9 -8 13 -7 15 3 64 -25 59 -34 -3 -5
-1 -6 5 -2 14 9 63 -14 55 -27 -3 -6 -2 -7 4 -4 5 3 56 -21 113 -53 57 -33
107 -60 111 -60 4 0 11 -5 15 -12 5 -8 2 -9 -9 -5 -9 3 -16 2 -14 -2 1 -5 -48
-42 -110 -83 -61 -40 -144 -95 -183 -123 -40 -27 -80 -54 -89 -60 -9 -5 -18
-12 -21 -15 -17 -17 -80 -60 -80 -54 0 3 -9 -4 -20 -17 l-20 -24 6 105 c3 58
7 121 9 140 2 19 5 52 6 72 1 20 5 36 8 34 3 -2 7 19 7 47 2 79 15 149 31 176
8 13 10 20 4 17 -6 -4 -11 -2 -11 3 0 6 4 11 10 11 5 0 7 7 4 15 -8 20 -4 19
48 -7z m1114 -66 c3 -26 8 -56 10 -67 10 -50 19 -145 19 -192 0 -28 3 -49 7
-47 4 3 6 -16 5 -41 -1 -25 0 -45 3 -45 3 0 6 -32 7 -70 2 -39 -1 -70 -5 -70
-5 0 -18 9 -30 20 -12 11 -26 20 -31 20 -5 0 -17 10 -25 22 -9 12 -16 19 -16
15 0 -6 -92 56 -135 90 -25 20 -253 169 -278 182 -15 8 -26 15 -25 16 9 7 158
95 184 108 17 9 34 13 38 10 3 -4 6 -1 6 5 0 11 175 102 197 102 7 0 13 4 13
9 0 5 8 11 18 13 20 4 29 -14 38 -80z m-531 -268 c30 -20 55 -41 55 -45 0 -5
6 -8 13 -6 6 1 11 -4 9 -11 -1 -8 2 -11 7 -7 14 8 82 -38 76 -52 -2 -7 2 -10
11 -6 8 3 25 -3 37 -14 12 -11 35 -27 50 -37 16 -9 25 -22 21 -28 -4 -7 -3 -8
4 -4 10 6 242 -148 250 -166 2 -5 9 -8 16 -8 7 0 21 -9 31 -20 17 -19 14 -24
-10 -21 -5 1 -3 -4 5 -11 12 -10 15 -40 16 -138 0 -77 -4 -128 -10 -132 -7 -5
-7 -8 -1 -8 12 0 14 -259 2 -277 -5 -7 -4 -13 1 -13 12 0 7 -79 -5 -90 -7 -7
-244 -174 -287 -203 -10 -6 -24 -16 -30 -22 -12 -10 -34 -26 -211 -146 -96
-65 -108 -71 -131 -60 -14 6 -22 16 -19 21 3 5 0 7 -7 5 -8 -3 -23 4 -35 15
-12 11 -24 20 -27 20 -5 0 -246 166 -271 187 -5 4 -30 22 -55 38 -25 17 -49
33 -55 38 -5 4 -44 31 -85 61 l-75 54 0 337 c1 317 2 338 19 351 11 7 23 11
29 7 6 -3 7 -1 3 5 -4 7 3 17 18 24 14 6 26 15 26 20 0 4 7 8 15 8 8 0 15 5
15 11 0 6 7 8 16 5 8 -3 13 -2 9 3 -3 5 12 20 32 32 21 13 41 27 44 32 4 5 12
6 19 2 8 -5 11 -4 7 2 -9 15 38 44 60 37 12 -4 14 -3 6 3 -9 6 1 19 37 46 27
20 54 37 59 37 5 0 11 3 13 8 5 12 131 95 144 95 7 0 12 4 11 8 -2 8 51 47 66
48 4 1 32 -15 62 -35z m-822 -752 c2 -270 4 -262 -48 -215 -12 10 -41 34 -65
53 -43 33 -83 67 -157 136 l-34 31 57 49 c177 153 219 185 228 176 4 -4 7 -2
6 3 -4 17 0 29 6 23 3 -4 6 -119 7 -256z m1539 245 c7 -7 26 -20 41 -30 15
-10 25 -23 21 -29 -4 -7 -3 -8 4 -4 7 4 12 2 12 -3 0 -6 6 -10 13 -8 6 1 11
-4 9 -11 -1 -8 2 -11 7 -8 5 4 14 -2 20 -11 5 -10 13 -18 18 -18 4 0 7 -3 6
-7 -2 -5 1 -7 5 -5 5 1 37 -22 71 -52 l62 -54 -53 -49 c-29 -27 -66 -59 -81
-71 -16 -12 -34 -27 -41 -33 -43 -40 -129 -105 -133 -101 -2 3 0 14 6 25 7 13
7 23 -2 32 -9 10 -9 14 1 17 6 3 9 9 6 14 -5 9 -8 289 -4 314 1 6 2 14 1 19
-4 22 -8 86 -5 86 1 0 9 -6 16 -13z m-1862 -353 c48 -45 72 -65 109 -93 17
-13 31 -30 31 -37 0 -8 3 -13 8 -13 21 4 32 -3 32 -18 0 -9 3 -14 6 -10 4 3
13 -1 21 -9 8 -8 30 -26 49 -40 18 -15 31 -31 27 -37 -3 -5 -2 -7 4 -4 23 14
43 -19 48 -78 10 -127 16 -186 40 -410 4 -33 10 -79 14 -102 5 -27 4 -46 -3
-54 -8 -9 -8 -10 0 -6 7 4 14 -2 17 -13 3 -11 0 -20 -5 -20 -6 0 -5 -6 2 -15
7 -8 10 -26 8 -40 -3 -13 -1 -22 3 -19 5 3 9 1 9 -5 0 -8 -35 -25 -50 -23 -3
0 -14 -5 -25 -11 -11 -6 -22 -12 -25 -12 -3 -1 -36 -11 -75 -23 -61 -18 -120
-33 -190 -48 -11 -2 -40 -7 -65 -10 -25 -3 -49 -8 -53 -11 -5 -3 -70 -6 -145
-8 -122 -3 -168 0 -263 18 -72 14 -145 78 -155 136 -3 20 -8 44 -11 54 -2 9
-1 17 4 17 4 0 8 17 7 37 -1 50 6 74 20 66 8 -4 8 -3 0 6 -12 14 33 164 47
155 5 -3 6 2 3 10 -3 9 6 36 20 62 14 26 26 53 26 60 0 8 5 14 10 14 6 0 10 5
10 11 0 22 93 168 103 162 6 -3 7 -2 4 4 -10 17 64 118 77 105 4 -3 5 0 2 8
-4 9 12 35 39 65 25 28 73 80 106 117 34 38 65 65 70 62 5 -3 8 -2 7 3 -5 13
26 42 37 35 6 -3 26 -21 45 -38z m2364 -103 c-1 -3 7 -12 18 -19 10 -7 15 -18
12 -24 -4 -6 -2 -8 3 -5 6 4 21 -8 34 -25 13 -17 29 -36 34 -42 30 -33 63 -84
58 -90 -4 -3 -1 -6 5 -6 17 0 85 -108 76 -121 -4 -7 -3 -9 3 -6 13 8 106 -169
97 -185 -4 -6 -3 -8 3 -5 12 7 36 -50 28 -63 -3 -4 1 -10 9 -13 7 -3 17 -23
21 -44 5 -21 10 -45 12 -53 2 -8 4 -24 6 -35 1 -11 6 -23 10 -26 5 -3 8 -36 8
-73 0 -178 -108 -238 -417 -231 -78 2 -150 5 -161 8 -10 3 -34 8 -53 11 -19 3
-48 8 -65 11 -114 22 -337 94 -329 106 3 5 -2 6 -12 2 -12 -5 -15 -2 -11 13 6
20 16 78 22 129 2 17 6 46 9 65 3 19 8 60 11 90 3 30 8 69 11 87 2 17 7 62 10
100 3 37 10 73 15 80 7 7 6 14 -1 18 -6 3 -7 12 -3 18 4 6 6 26 5 45 -2 25 1
32 10 26 10 -6 10 -5 2 7 -16 21 -6 71 18 88 11 8 30 25 41 38 11 12 24 23 29
23 4 0 25 16 45 36 63 60 110 94 118 86 5 -4 5 -2 2 4 -4 7 9 24 29 39 20 15
49 40 66 57 l30 29 71 -72 c40 -39 71 -74 71 -78z m-1901 -294 c-3 -5 -2 -7 4
-4 12 8 83 -39 83 -55 0 -6 3 -8 6 -5 7 7 136 -80 142 -95 2 -4 10 -8 18 -8 8
0 14 -3 14 -8 0 -4 20 -18 45 -32 25 -14 45 -28 45 -32 0 -5 5 -8 10 -8 12 0
124 -72 128 -82 2 -5 11 -8 20 -8 10 0 -36 -32 -101 -70 -65 -39 -124 -67
-130 -64 -7 4 -8 3 -4 -2 5 -5 -41 -33 -110 -66 -80 -38 -120 -52 -125 -45 -3
7 -9 32 -12 57 -3 25 -8 58 -11 74 -3 15 -8 49 -11 75 -3 25 -7 62 -9 81 -2
19 -7 62 -10 94 -3 33 -8 64 -11 68 -3 4 0 8 6 8 6 0 8 5 4 11 -3 6 -8 43 -11
82 -5 65 -4 70 11 58 9 -7 13 -18 9 -24z m1261 -64 c-4 -94 -9 -162 -18 -228
-2 -16 -7 -55 -10 -85 -4 -30 -8 -62 -10 -70 -1 -8 -7 -37 -11 -65 -5 -27 -10
-53 -11 -57 -1 -5 -2 -13 -3 -20 -1 -9 -4 -9 -13 0 -7 7 -20 12 -30 12 -10 0
-18 5 -18 12 0 6 -3 9 -6 5 -4 -3 -54 19 -113 50 -58 31 -123 64 -143 75 -21
10 -38 23 -38 29 0 6 -4 8 -9 5 -5 -3 -19 2 -32 12 -13 10 -37 24 -52 32 -25
12 -26 15 -10 24 10 6 22 11 26 11 4 0 11 5 15 12 4 6 13 13 21 15 8 2 24 12
36 23 13 12 36 27 52 35 15 8 35 21 43 28 8 7 18 12 23 12 4 0 16 8 26 18 42
37 52 43 64 36 6 -4 9 -3 4 1 -9 11 43 46 56 38 6 -3 7 -2 4 4 -3 5 27 33 68
62 41 28 77 56 80 61 12 20 13 8 9 -87z m-524 -403 c8 -5 30 -17 48 -26 17 -9
32 -21 32 -26 0 -5 4 -7 9 -3 5 3 36 -11 68 -30 32 -19 63 -35 69 -35 5 0 21
-10 34 -22 14 -13 25 -21 25 -18 1 8 154 -64 155 -73 0 -5 -4 -5 -10 -2 -6 4
-7 -1 -3 -10 3 -10 0 -21 -8 -26 -11 -6 -11 -9 -1 -9 9 0 10 -5 4 -17 -5 -10
-15 -40 -21 -68 -7 -27 -18 -63 -26 -80 -7 -16 -24 -58 -36 -92 -13 -34 -28
-59 -33 -56 -5 3 -6 1 -3 -4 9 -14 -22 -75 -34 -68 -5 4 -6 -1 -3 -10 4 -9 -5
-33 -20 -55 -14 -22 -26 -42 -26 -46 0 -3 -19 -33 -42 -67 -185 -267 -312
-305 -471 -142 -56 56 -164 205 -150 205 4 0 3 4 -3 8 -14 8 -97 164 -109 202
-4 14 -16 43 -26 65 -25 55 -76 216 -81 251 -2 23 1 29 14 28 10 -1 16 1 14 5
-3 4 19 18 47 31 29 13 55 29 59 35 4 5 8 7 8 3 0 -4 23 6 50 22 28 16 50 26
50 22 0 -4 4 -2 8 3 4 6 25 19 47 30 22 11 47 25 55 31 38 28 169 92 176 86 4
-4 4 -2 1 5 -19 32 42 11 133 -47z"/>
<path d="M2556 3192 c-3 -5 1 -9 9 -9 8 0 12 4 9 9 -3 4 -7 8 -9 8 -2 0 -6 -4
-9 -8z"/>
<path d="M2455 2831 c-3 -5 -2 -12 3 -15 5 -3 9 1 9 9 0 17 -3 19 -12 6z"/>
<path d="M2500 2790 c-9 -6 -10 -10 -3 -10 6 0 15 5 18 10 8 12 4 12 -15 0z"/>
<path d="M2144 2592 c-70 -35 -108 -103 -100 -179 3 -38 32 -93 62 -118 9 -7
1 -43 -31 -140 -65 -196 -66 -176 5 -173 33 2 60 -1 60 -5 0 -5 4 -6 8 -3 13
8 227 10 239 3 18 -11 23 7 13 39 -6 16 -28 83 -49 149 l-39 120 29 27 c16 16
29 30 29 33 0 22 1 26 8 22 4 -3 8 20 8 51 3 88 -33 145 -108 176 -44 19 -96
18 -134 -2z"/>
<path d="M1113 2105 c0 -8 4 -12 9 -9 5 3 6 10 3 15 -9 13 -12 11 -12 -6z"/>
<path d="M859 1903 c-13 -16 -12 -17 4 -4 9 7 17 15 17 17 0 8 -8 3 -21 -13z"/>
<path d="M1436 1803 c-6 -14 -5 -15 5 -6 7 7 10 15 7 18 -3 3 -9 -2 -12 -12z"/>
<path d="M3760 1596 c0 -2 8 -10 18 -17 15 -13 16 -12 3 4 -13 16 -21 21 -21
13z"/>
<path d="M1616 1691 c-3 -5 2 -15 12 -22 15 -12 16 -12 5 2 -7 9 -10 19 -6 22
3 4 4 7 0 7 -3 0 -8 -4 -11 -9z"/>
<path d="M2710 1590 c0 -5 5 -10 11 -10 5 0 7 5 4 10 -3 6 -8 10 -11 10 -2 0
-4 -4 -4 -10z"/>
<path d="M1090 831 c0 -6 4 -13 10 -16 6 -3 7 1 4 9 -7 18 -14 21 -14 7z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,19 +0,0 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View File

@ -1,37 +0,0 @@
/* latin */
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: normal;
/*400*/
font-display: swap;
src: url("./worksans-regular-webfont.woff2") format("woff2");
}
/* latin */
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("./worksans-medium-webfont.woff2") format("woff2");
}
/* latin */
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("./worksans-semibold-webfont.woff2") format("woff2");
}
/* latin */
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: bold;
/*700*/
font-display: swap;
src: url("./worksans-bold-webfont.woff2") format("woff2");
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

View File

@ -1,49 +0,0 @@
## Overview
This Terms of Service document outlines the rules and regulations for the use of **Example Company's** Services.
## Acceptance of Terms
By accessing and using our services, you acknowledge that you have read, understood, and agree to be bound by these terms. If you do not accept these terms, you are not authorized to use our services.
## Description of Service
**Example Service** (hereinafter referred to as "the Service") is a web-based solution offered by **Example Company** (hereinafter referred to as "the Company"). Our service provides users with access to [documentation](https://example.com/docs) and support for managing their projects effectively.
## Modifications to the Terms of Service
The Company reserves the right to modify these terms at any time. Such modifications will be effective immediately upon posting the updated terms on our website. Your continued use of the Service after any such changes shall constitute your consent to such changes.
## Account Registration
You may be required to register with the Service to access certain features. When registering, you agree to provide accurate, current, and complete information about yourself as requested.
## User Responsibilities
- **Data Security**: Users are responsible for safeguarding their login credentials and should not disclose their passwords to any third party.
- **Acceptable Use**: Users are expected to use the Service in a responsible manner that does not infringe upon the rights of others.
- **Content Ownership**: Users retain all rights to the content they upload to the Service but grant the Company a license to use and distribute this content as part of the Service.
## Intellectual Property
All intellectual property rights related to the Service and its original content, features, and functionality are owned by the Company.
## Termination
The Company may terminate or suspend access to our Service immediately, without prior notice or liability, for any reason whatsoever, including, without limitation, breach of these Terms.
## Governing Law
These Terms shall be governed and construed in accordance with the laws of [Your Country], without regard to its conflict of law provisions.
## Contact Information
For any questions about these Terms, please contact us at [support@example.com](mailto:support@example.com) or visit our [FAQ page](https://example.com/faq).
## Changes to Terms of Service
We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material, we will provide at least 30 days' notice prior to any new terms taking effect.
## Effective Date
These terms are effective as of **[Insert Date]**.

View File

@ -1,49 +0,0 @@
## Resumen
Este documento de Términos de Servicio detalla las reglas y regulaciones para el uso de los servicios de **Empresa Ejemplo**.
## Aceptación de Términos
Al acceder y utilizar nuestros servicios, usted reconoce que ha leído, entendido y acepta estar vinculado por estos términos. Si no acepta estos términos, no está autorizado para usar nuestros servicios.
## Descripción del Servicio
**Servicio Ejemplo** (en adelante denominado "el Servicio") es una solución basada en la web ofrecida por **Empresa Ejemplo** (en adelante denominada "la Empresa"). Nuestro servicio proporciona a los usuarios acceso a [documentación](https://ejemplo.com/docs) y soporte para gestionar sus proyectos de manera efectiva.
## Modificaciones a los Términos de Servicio
La Empresa se reserva el derecho de modificar estos términos en cualquier momento. Dichas modificaciones entrarán en vigor inmediatamente después de la publicación de los términos actualizados en nuestro sitio web. Su uso continuado del Servicio después de tales cambios constituirá su consentimiento a dichos cambios.
## Registro de Cuenta
Puede ser necesario que se registre en el Servicio para acceder a ciertas características. Al registrarse, usted acepta proporcionar información precisa, actual y completa sobre sí mismo como se solicita.
## Responsabilidades del Usuario
- **Seguridad de Datos**: Los usuarios son responsables de salvaguardar sus credenciales de inicio de sesión y no deben divulgar sus contraseñas a terceros.
- **Uso Aceptable**: Se espera que los usuarios utilicen el Servicio de manera responsable que no infrinja los derechos de otros.
- **Propiedad del Contenido**: Los usuarios retienen todos los derechos sobre el contenido que cargan en el Servicio, pero otorgan a la Empresa una licencia para usar y distribuir este contenido como parte del Servicio.
## Propiedad Intelectual
Todos los derechos de propiedad intelectual relacionados con el Servicio y su contenido original, características y funcionalidad son propiedad de la Empresa.
## Terminación
La Empresa puede terminar o suspender su acceso a nuestro Servicio de inmediato, sin previo aviso ni responsabilidad, por cualquier motivo, incluido, entre otros, una violación de estos Términos.
## Ley Aplicable
Estos Términos se regirán e interpretarán de acuerdo con las leyes de [Su País], sin tener en cuenta sus disposiciones de conflicto de leyes.
## Información de Contacto
Para cualquier pregunta sobre estos Términos, contáctenos en [support@ejemplo.com](mailto:support@ejemplo.com) o visite nuestra [página de FAQ](https://ejemplo.com/faq).
## Cambios a los Términos de Servicio
Nos reservamos el derecho, a nuestra única discreción, de modificar o reemplazar estos Términos en cualquier momento. Si una revisión es material, proporcionaremos al menos 30 días de aviso antes de que los nuevos términos entren en vigor.
## Fecha de Efectividad
Estos términos son efectivos a partir del **[Insertar Fecha]**.

View File

@ -1,49 +0,0 @@
## Vue d'ensemble
Ce document des Conditions Générales d'Utilisation détaille les règles et réglementations pour l'utilisation des services de **l'Entreprise Exemple**.
## Acceptation des Conditions
En accédant et en utilisant nos services, vous reconnaissez avoir lu, compris et accepté d'être lié par ces conditions. Si vous n'acceptez pas ces termes, vous n'êtes pas autorisé à utiliser nos services.
## Description du Service
**Service Exemple** (ci-après dénommé "le Service") est une solution basée sur le web offerte par **l'Entreprise Exemple** (ci-après dénommée "l'Entreprise"). Notre service offre aux utilisateurs un accès à la [documentation](https://exemple.com/docs) et un support pour gérer efficacement leurs projets.
## Modifications des Conditions de Service
L'Entreprise se réserve le droit de modifier ces conditions à tout moment. De telles modifications entreront en vigueur immédiatement après la publication des termes mis à jour sur notre site web. Votre utilisation continue du Service après de tels changements constitue votre consentement à ces modifications.
## Inscription au Compte
Vous devrez peut-être vous inscrire au Service pour accéder à certaines fonctionnalités. Lors de l'inscription, vous acceptez de fournir des informations précises, actuelles et complètes vous concernant, comme demandé.
## Responsabilités des Utilisateurs
- **Sécurité des Données** : Les utilisateurs sont responsables de la sauvegarde de leurs identifiants de connexion et ne doivent divulguer leurs mots de passe à aucun tiers.
- **Utilisation Acceptable** : Les utilisateurs sont censés utiliser le Service de manière responsable qui ne porte pas atteinte aux droits d'autrui.
- **Propriété du Contenu** : Les utilisateurs conservent tous les droits sur le contenu qu'ils téléchargent sur le Service mais accordent à l'Entreprise une licence pour utiliser et distribuer ce contenu dans le cadre du Service.
## Propriété Intellectuelle
Tous les droits de propriété intellectuelle relatifs au Service et à son contenu original, fonctionnalités et fonctionnement sont détenus par l'Entreprise.
## Résiliation
L'Entreprise peut résilier ou suspendre votre accès à notre Service immédiatement, sans préavis ni responsabilité, pour quelque raison que ce soit, y compris, sans limitation, en cas de violation de ces Conditions.
## Loi Applicable
Ces Conditions seront régies et interprétées conformément aux lois de [Votre Pays], sans égard à ses dispositions de conflit de lois.
## Informations de Contact
Pour toute question concernant ces Conditions, veuillez nous contacter à [support@exemple.com](mailto:support@exemple.com) ou visitez notre [page FAQ](https://exemple.com/faq).
## Modifications des Conditions de Service
Nous nous réservons le droit, à notre seule discrétion, de modifier ou de remplacer ces Conditions à tout moment. Si une révision est importante, nous vous fournirons un préavis d'au moins 30 jours avant que les nouveaux termes prennent effet.
## Date d'Effet
Ces conditions sont effectives à partir du **[Insérer la Date]**.

160
CHANGELOG.md Normal file
View File

@ -0,0 +1,160 @@
### **0.0.29** (2021-03-04)
- Fix build
- Fix i18n
- Login appear to be working now
- closer but not there yet
### **0.0.28** (2021-03-03)
- fix build
- There is no reason not to let use translations outside of keycloak
### **0.0.27** (2021-03-02)
- Implement entrypoint
### **0.0.26** (2021-03-02)
- Login page implemented
- Implement login
- remove unesseary log
### **0.0.25** (2021-03-02)
- Fix build and reduce size
- Implement the template
### **0.0.24** (2021-03-01)
- update
- update
- update
### **0.0.23** (2021-03-01)
- update
### **0.0.23** (2021-03-01)
- update
- update
### **0.0.23** (2021-03-01)
- update
- update
### **0.0.23** (2021-03-01)
- update
- Handle formatting in translation function
### **0.0.22** (2021-02-28)
- Split page messages
### **0.0.21** (2021-02-28)
- Restore yarn file
- Multiple fixes
- Update deps
- Update deps
- includes translations
- Update README.md
- improve docs
- update
- Update README.md
- update
- update
- update
- update
### **0.0.20** (2021-02-27)
- update
- update
### **0.0.19** (2021-02-27)
- update
- update
### **0.0.18** (2021-02-23)
- Bump version number
- Moving on with implementation of the lib
- Update readme
- Readme eddit
- Fixing video link
### **0.0.16** (2021-02-23)
- Bump version
- Give test container credentials
### **0.0.14** (2021-02-23)
- Bump version number
- enable the docker container to be run from the root of the react project
### **0.0.13** (2021-02-23)
- bump version
### **0.0.12** (2021-02-23)
- update readme
### **0.0.11** (2021-02-23)
- Add documentation
### **0.0.10** (2021-02-23)
- Remove extra closing bracket
### **0.0.9** (2021-02-22)
- fix container startup script
- minor update
### **0.0.8** (2021-02-21)
- Include theme properties
### **0.0.7** (2021-02-21)
- fix build
- Fix bundle
### **0.0.6** (2021-02-21)
- Include missing files in the release bundle
### **0.0.5** (2021-02-21)
- Bump version number
- Make the install faster
### **0.0.4** (2021-02-21)
- Fix script visibility
### **0.0.3** (2021-02-21)
- Do not run tests on window
- Add script for downloading base themes
- Generate debug files to be able to test the container
- Fix many little bugs
- refactor
- Almoste there
- Things are starting to take form
- Seems to be working
- First draft
- Remove eslint and prettyer
### **0.0.2** (2021-02-20)
- Update package.json

View File

@ -1,3 +0,0 @@
Looking to contribute? Thank you! PR are more than welcome.
Please refers to [this documentation page](https://docs.keycloakify.dev/contributing) that will help you get started.

174
README.md
View File

@ -2,140 +2,98 @@
<img src="https://user-images.githubusercontent.com/6702424/109387840-eba11f80-7903-11eb-9050-db1dad883f78.png">
</p>
<p align="center">
<i>🔏 Keycloak Theming for the Modern Web 🔏</i>
<i>🔏 Keycloak theme generator for Reacts app 🔏</i>
<br>
<br>
<a href="https://github.com/garronej/keycloakify/actions">
<img src="https://github.com/garronej/keycloakify/workflows/ci/badge.svg?branch=main">
</a>
<a href="https://www.npmjs.com/package/keycloakify">
<img src="https://img.shields.io/npm/dm/keycloakify">
</a>
<a href="https://github.com/garronej/keycloakify/blob/main/LICENSE">
<img src="https://img.shields.io/npm/l/keycloakify">
</a>
<a href="https://github.com/thomasdarimont/awesome-keycloak">
<img src="https://awesome.re/mentioned-badge.svg"/>
</a>
<p align="center">
Check out our discord server!<br/>
<a href="https://discord.gg/mJdYJSdcm4">
<img src="https://dcbadge.limes.pink/api/server/kYFZG7fQmn"/>
</a>
</p>
<p align="center">
<a href="https://www.keycloakify.dev">Home</a>
-
<a href="https://docs.keycloakify.dev">Documentation</a>
-
<a href="https://storybook.keycloakify.dev">Storybook</a>
-
<a href="https://github.com/codegouvfr/keycloakify-starter">Starter project</a>
</p>
<img src="https://github.com/garronej/keycloak-react-theming/workflows/ci/badge.svg?branch=develop">
<img src="https://img.shields.io/bundlephobia/minzip/keycloak-react-theming">
<img src="https://img.shields.io/npm/dw/keycloak-react-theming">
<img src="https://img.shields.io/npm/l/keycloak-react-theming">
</p>
<p align="center">
<i>This build tool generates a Keycloak theme <a href="https://www.keycloakify.dev">Learn more</a></i>
<br/>
<br/>
<img width="400" src="https://github.com/user-attachments/assets/6bf3bef9-00b0-4460-97b9-0d2da8500798">
</p>
Keycloakify is fully compatible with Keycloak 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, [~~22~~](https://github.com/keycloakify/keycloakify/issues/389#issuecomment-1822509763), 23, 24, 25...[and beyond](https://github.com/keycloakify/keycloakify/discussions/346#discussioncomment-5889791)
> NOTE: Keycloakify 10 is still in release-candidate state. [Follow progress](https://github.com/keycloakify/keycloakify/pull/538).
**!!! This module is under active developement. It is not usable yet!!!**
## Sponsors
# Motivations
Friends for the project, we trust and recommend their services.
The problem:
<br/>
![keycloak_before](https://user-images.githubusercontent.com/6702424/108838381-dbbbcf80-75d3-11eb-8ae8-db41563ef9db.gif)
<div align="center">
When we redirected to Keycloak the user suffers from a harsh context switch.
On je login/register pages the language is set back to default and the theme is different that the one on the app.
![Logo Dark](https://github.com/user-attachments/assets/088f6631-b7ef-42ad-812b-df4870dc16ae#gh-dark-mode-only)
Keycloak does offer a way to customize theses pages but it requires a lot of raw HTML/CSS hacking
to reproduce the look and feel of a specific app. Not mentioning the maintenance cost of such an endeavour.
</div>
Wouldn't it be great if we could just design the login and register pages as if they where part of our app while
still letting Keycloak handle the heavy lifting of actually authenticating the users?
<div align="center">
Here is `yarn add keycloak-react-theming` for you 🍸
![Logo Light](https://github.com/user-attachments/assets/53fb16f8-02ef-4523-9c36-b42d6e59837e#gh-light-mode-only)
TODO: Insert video after.
</div>
# How to use
<br/>
## Setting up the build tool
<p align="center">
<a href="https://www.zone2.tech/services/keycloak-consulting">
<i><strong>Keycloak Consulting Services</strong> - Your partner in Keycloak deployment, configuration, and extension development for optimized identity management solutions.</i>
</a>
</p>
Add `keycloak-react-theming` to the dev dependencies of your project `npm install --save-dev keycloak-react-theming` or `yarn add --dev keycloak-react-theming`
then configure your `package.json` build's script to build the keycloak's theme by adding `&& build-keycloak-theme`.
<div align="center">
Typically you will get:
![Logo Dark](https://user-images.githubusercontent.com/6702424/234135797-c84d0a90-0526-43e5-a186-70cbebdeb278.png#gh-dark-mode-only)
`package.json`:
```json
"devDependencies": {
"keycloak-react-theming": "^0.0.10"
},
"scripts": {
"build": "react-scripts build && build-keycloak-theme"
},
```
</div>
Then build your app with `yarn run build` or `npm run build`, you will be provided with instructions
about how to load the theme into Keycloak.
<div align="center">
[![kickstart_video](https://user-images.githubusercontent.com/6702424/108877866-f146ee80-75ff-11eb-8120-003b3c5f6dd8.png)](https://youtu.be/xTz0Rj7i2v8)
![Logo Light](https://user-images.githubusercontent.com/6702424/234135799-68684c33-4ec5-48d4-8763-0f3922c86643.png#gh-light-mode-only)
## Developing your login and register pages in your React app
</div>
TODO
<p align="center">
<a href="https://cloud-iam.com/?mtm_campaign=keycloakify-deal&mtm_source=keycloakify-github"><strong>Managed Keycloak Provider</strong> - With Cloud-IAM powering your Keycloak clusters, you can sleep easy knowing you've got the software and the experts you need for operational excellence. </a>
<br/>
Use code <code>keycloakify5</code> at checkout for a 5% discount.
</p>
# How to implement context persistance
## Contributors ✨
If you want dark mode preference, language and others users preferences your can do so
very easily by using [`powerhooks/useGlobalState`](https://github.com/garronej/powerhooks)
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
WARNING: `powerhooks` is still a work in progress.
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lordvlad"><img src="https://avatars.githubusercontent.com/u/1217769?v=4?s=100" width="100px;" alt="Waldemar Reusch"/><br /><sub><b>Waldemar Reusch</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=lordvlad" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://willwill96.github.io/the-ui-dawg-static-site/en/introduction/"><img src="https://avatars.githubusercontent.com/u/10997562?v=4?s=100" width="100px;" alt="William Will"/><br /><sub><b>William Will</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=willwill96" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Ann2827"><img src="https://avatars.githubusercontent.com/u/32645809?v=4?s=100" width="100px;" alt="Bystrova Ann"/><br /><sub><b>Bystrova Ann</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=Ann2827" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mkreuzmayr"><img src="https://avatars.githubusercontent.com/u/20108212?v=4?s=100" width="100px;" alt="Michael Kreuzmayr"/><br /><sub><b>Michael Kreuzmayr</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=mkreuzmayr" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://coolmathgames.tech"><img src="https://avatars.githubusercontent.com/u/6877780?v=4?s=100" width="100px;" alt="Mary "/><br /><sub><b>Mary </b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=Mstrodl" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tasyp.xyz/"><img src="https://avatars.githubusercontent.com/u/6623212?v=4?s=100" width="100px;" alt="German Öö"/><br /><sub><b>German Öö</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=Tasyp" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://revolunet.com"><img src="https://avatars.githubusercontent.com/u/124937?v=4?s=100" width="100px;" alt="Julien Bouquillon"/><br /><sub><b>Julien Bouquillon</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=revolunet" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aidangilmore"><img src="https://avatars.githubusercontent.com/u/32880357?v=4?s=100" width="100px;" alt="Aidan Gilmore"/><br /><sub><b>Aidan Gilmore</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=aidangilmore" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/0x-Void"><img src="https://avatars.githubusercontent.com/u/32745739?v=4?s=100" width="100px;" alt="Void"/><br /><sub><b>Void</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=0x-Void" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/juffe"><img src="https://avatars.githubusercontent.com/u/5393231?v=4?s=100" width="100px;" alt="juffe"/><br /><sub><b>juffe</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=juffe" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lazToum"><img src="https://avatars.githubusercontent.com/u/4764837?v=4?s=100" width="100px;" alt="Lazaros Toumanidis"/><br /><sub><b>Lazaros Toumanidis</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=lazToum" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marcmrf"><img src="https://avatars.githubusercontent.com/u/9928519?v=4?s=100" width="100px;" alt="Marc"/><br /><sub><b>Marc</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=marcmrf" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://kasir-barati.github.io"><img src="https://avatars.githubusercontent.com/u/73785723?v=4?s=100" width="100px;" alt="Kasir Barati"/><br /><sub><b>Kasir Barati</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=kasir-barati" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/asashay"><img src="https://avatars.githubusercontent.com/u/10714670?v=4?s=100" width="100px;" alt="Alex Oliynyk"/><br /><sub><b>Alex Oliynyk</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=asashay" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.gravitysoftware.be"><img src="https://avatars.githubusercontent.com/u/1140574?v=4?s=100" width="100px;" alt="Thomas Silvestre"/><br /><sub><b>Thomas Silvestre</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=thosil" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/satanshiro"><img src="https://avatars.githubusercontent.com/u/38865738?v=4?s=100" width="100px;" alt="satanshiro"/><br /><sub><b>satanshiro</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=satanshiro" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://poelhekke.dev"><img src="https://avatars.githubusercontent.com/u/1632377?v=4?s=100" width="100px;" alt="Koen Poelhekke"/><br /><sub><b>Koen Poelhekke</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=kpoelhekke" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zavoloklom"><img src="https://avatars.githubusercontent.com/u/4151869?v=4?s=100" width="100px;" alt="Sergey Kupletsky"/><br /><sub><b>Sergey Kupletsky</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=zavoloklom" title="Tests">⚠️</a> <a href="https://github.com/keycloakify/keycloakify/commits?author=zavoloklom" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rome-user"><img src="https://avatars.githubusercontent.com/u/114131048?v=4?s=100" width="100px;" alt="rome-user"/><br /><sub><b>rome-user</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=rome-user" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/celinepelletier"><img src="https://avatars.githubusercontent.com/u/82821620?v=4?s=100" width="100px;" alt="Céline Pelletier"/><br /><sub><b>Céline Pelletier</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=celinepelletier" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xgp"><img src="https://avatars.githubusercontent.com/u/244253?v=4?s=100" width="100px;" alt="Garth"/><br /><sub><b>Garth</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=xgp" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BlackVoid"><img src="https://avatars.githubusercontent.com/u/673720?v=4?s=100" width="100px;" alt="Felix Gustavsson"/><br /><sub><b>Felix Gustavsson</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=BlackVoid" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://m-siemens.de/"><img src="https://avatars.githubusercontent.com/u/1873922?v=4?s=100" width="100px;" alt="Markus Siemens"/><br /><sub><b>Markus Siemens</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=msiemens" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/law108000"><img src="https://avatars.githubusercontent.com/u/8112024?v=4?s=100" width="100px;" alt="Rlok"/><br /><sub><b>Rlok</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=law108000" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Moulyy"><img src="https://avatars.githubusercontent.com/u/115405804?v=4?s=100" width="100px;" alt="Moulyy"/><br /><sub><b>Moulyy</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=Moulyy" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/giorgoslytos"><img src="https://avatars.githubusercontent.com/u/50946162?v=4?s=100" width="100px;" alt="giorgoslytos"/><br /><sub><b>giorgoslytos</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=giorgoslytos" title="Code">💻</a></td>
</tr>
</tbody>
</table>
# REQUIREMENTS
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
This tools assumes you are bundling your app with Webpack (tested with 4.44.2) .
It assumes there is a `build/` directory at the root of your react project directory containing a `index.html` file
and a `static/` directory generated by webpack.
<!-- ALL-CONTRIBUTORS-LIST:END -->
**All this is defaults with [`create-react-app`](https://create-react-app.dev)** (tested with 4.0.3=)
- For building the theme: `mvn` (Maven) must be installed
- For development, (testing the theme in a local container ): `rm`, `mkdir`, `wget`, `unzip` are assumed to be available
and `docker` up and running.
NOTE: This build tool has only be tested on MacOS.
# API Reference
## The build tool
Part of the lib that runs with node, at build time.
- `npx build-keycloak-theme`: Builds the theme, the CWD is assumed to be the root of your react project.
- `npx download-sample-keycloak-themes`: Downloads the keycloak default themes (for development purposes)
## The fronted lib ( imported into your react app )
Part of the lib that you import in your react project and runs on the browser.
**TODO**

View File

@ -0,0 +1 @@
export declare const ftlValuesGlobalName = "kcContext";

View File

@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ftlValuesGlobalName = void 0;
exports.ftlValuesGlobalName = "kcContext";
//# sourceMappingURL=ftlValuesGlobalName.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ftlValuesGlobalName.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/ftlValuesGlobalName.ts"],"names":[],"mappings":";;;AACa,QAAA,mBAAmB,GAAG,WAAW,CAAC"}

View File

@ -0,0 +1,6 @@
export declare const containerLaunchScriptBasename = "start_keycloak_testing_container.sh";
/** Files for being able to run a hot reload keycloak container */
export declare function generateDebugFiles(params: {
packageJsonName: string;
keycloakThemeBuildingDirPath: string;
}): void;

View File

@ -0,0 +1,68 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateDebugFiles = exports.containerLaunchScriptBasename = void 0;
var fs = __importStar(require("fs"));
var path_1 = require("path");
exports.containerLaunchScriptBasename = "start_keycloak_testing_container.sh";
/** Files for being able to run a hot reload keycloak container */
function generateDebugFiles(params) {
var packageJsonName = params.packageJsonName, keycloakThemeBuildingDirPath = params.keycloakThemeBuildingDirPath;
fs.writeFileSync(path_1.join(keycloakThemeBuildingDirPath, "Dockerfile"), Buffer.from([
"FROM jboss/keycloak:11.0.3",
"",
"USER root",
"",
"WORKDIR /",
"",
"ADD configuration /opt/jboss/keycloak/standalone/configuration/",
"",
'ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ]',
].join("\n"), "utf8"));
var dockerImage = packageJsonName + "/keycloak-hot-reload";
var containerName = "keycloak-testing-container";
fs.writeFileSync(path_1.join(keycloakThemeBuildingDirPath, exports.containerLaunchScriptBasename), Buffer.from([
"#!/bin/bash",
"",
"cd " + keycloakThemeBuildingDirPath,
"",
"docker rm " + containerName + " || true",
"",
"docker build . -t " + dockerImage,
"",
"docker run \\",
" -p 8080:8080 \\",
"\t--name " + containerName + " \\",
" -e KEYCLOAK_USER=admin \\",
" -e KEYCLOAK_PASSWORD=admin \\",
"\t-v " + path_1.join(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", packageJsonName) + ":/opt/jboss/keycloak/themes/" + packageJsonName + ":rw \\",
"\t-it " + dockerImage + ":latest",
""
].join("\n"), "utf8"), { "mode": 493 });
var standaloneHaFilePath = path_1.join(keycloakThemeBuildingDirPath, "configuration", "standalone-ha.xml");
try {
fs.mkdirSync(path_1.dirname(standaloneHaFilePath));
}
catch (_a) { }
fs.writeFileSync(standaloneHaFilePath, fs.readFileSync(path_1.join(__dirname, path_1.basename(standaloneHaFilePath))));
}
exports.generateDebugFiles = generateDebugFiles;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bin/build-keycloak-theme/generateDebugFiles/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,qCAAyB;AACzB,6BAA0F;AAE7E,QAAA,6BAA6B,GAAG,qCAAqC,CAAC;AAEnF,kEAAkE;AAClE,SAAgB,kBAAkB,CAC9B,MAGC;IAGO,IAAA,eAAe,GAAmC,MAAM,gBAAzC,EAAE,4BAA4B,GAAK,MAAM,6BAAX,CAAY;IAEjE,EAAE,CAAC,aAAa,CACZ,WAAQ,CAAC,4BAA4B,EAAE,YAAY,CAAC,EACpD,MAAM,CAAC,IAAI,CACP;QACI,4BAA4B;QAC5B,EAAE;QACF,WAAW;QACX,EAAE;QACF,WAAW;QACX,EAAE;QACF,iEAAiE;QACjE,EAAE;QACF,wDAAwD;KAC3D,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,MAAM,CACT,CACJ,CAAC;IAEF,IAAM,WAAW,GAAM,eAAe,yBAAsB,CAAC;IAC7D,IAAM,aAAa,GAAG,4BAA4B,CAAC;IAEnD,EAAE,CAAC,aAAa,CACZ,WAAQ,CAAC,4BAA4B,EAAE,qCAA6B,CAAC,EACrE,MAAM,CAAC,IAAI,CACP;QACI,aAAa;QACb,EAAE;QACF,QAAM,4BAA8B;QACpC,EAAE;QACF,eAAa,aAAa,aAAU;QACpC,EAAE;QACF,uBAAqB,WAAa;QAClC,EAAE;QACF,eAAe;QACf,kBAAkB;QAClB,cAAW,aAAa,QAAK;QAC7B,4BAA4B;QAC5B,gCAAgC;QAChC,UAAO,WAAQ,CAAC,4BAA4B,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,CAAC,oCACpE,eAAe,WAAQ;QACtD,WAAQ,WAAW,YAAS;QAC5B,EAAE;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,MAAM,CACT,EACD,EAAE,MAAM,EAAE,GAAK,EAAE,CACpB,CAAC;IAEF,IAAM,oBAAoB,GAAG,WAAQ,CAAC,4BAA4B,EAAE,eAAe,EAAE,mBAAmB,CAAC,CAAC;IAE1G,IAAI;QAAE,EAAE,CAAC,SAAS,CAAC,cAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;KAAE;IAAC,WAAM,GAAG;IAElE,EAAE,CAAC,aAAa,CACZ,oBAAoB,EACpB,EAAE,CAAC,YAAY,CAAC,WAAQ,CAAC,SAAS,EAAE,eAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAC3E,CAAC;AAEN,CAAC;AAlED,gDAkEC"}

View File

@ -0,0 +1,666 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:13.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.clustering.jgroups"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.logging"/>
<extension module="org.jboss.as.mail"/>
<extension module="org.jboss.as.modcluster"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.remoting"/>
<extension module="org.jboss.as.security"/>
<extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.weld"/>
<extension module="org.keycloak.keycloak-server-subsystem"/>
<extension module="org.wildfly.extension.bean-validation"/>
<extension module="org.wildfly.extension.core-management"/>
<extension module="org.wildfly.extension.elytron"/>
<extension module="org.wildfly.extension.io"/>
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
<extension module="org.wildfly.extension.microprofile.health-smallrye"/>
<extension module="org.wildfly.extension.microprofile.metrics-smallrye"/>
<extension module="org.wildfly.extension.request-controller"/>
<extension module="org.wildfly.extension.security.manager"/>
<extension module="org.wildfly.extension.undertow"/>
</extensions>
<management>
<security-realms>
<security-realm name="ManagementRealm">
<authentication>
<local default-user="$local" skip-group-loading="true"/>
<properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
<authorization map-groups-to-roles="false">
<properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
</authorization>
</security-realm>
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
<keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
</ssl>
</server-identities>
<authentication>
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
<properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
<authorization>
<properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
</authorization>
</security-realm>
</security-realms>
<audit-log>
<formatters>
<json-formatter name="json-formatter"/>
</formatters>
<handlers>
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
</handlers>
<logger log-boot="true" log-read-only="false" enabled="false">
<handlers>
<handler name="file"/>
</handlers>
</logger>
</audit-log>
<management-interfaces>
<http-interface security-realm="ManagementRealm">
<http-upgrade enabled="true"/>
<socket-binding http="management-http"/>
</http-interface>
</management-interfaces>
<access-control provider="simple">
<role-mapping>
<role name="SuperUser">
<include>
<user name="$local"/>
</include>
</role>
</role-mapping>
</access-control>
</management>
<profile>
<subsystem xmlns="urn:jboss:domain:logging:8.0">
<console-handler name="CONSOLE">
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="io.jaegertracing.Configuration">
<level name="WARN"/>
</logger>
<logger category="org.jboss.as.config">
<level name="DEBUG"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<logger category="org.keycloak">
<level name="${env.KEYCLOAK_LOGLEVEL:INFO}"/>
</logger>
<root-logger>
<level name="${env.ROOT_LOGLEVEL:INFO}"/>
<handlers>
<handler name="CONSOLE"/>
</handlers>
</root-logger>
<formatter name="PATTERN">
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
</formatter>
<formatter name="COLOR-PATTERN">
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
</formatter>
</subsystem>
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
<subsystem xmlns="urn:jboss:domain:datasources:6.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
<connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE</connection-url>
<driver>h2</driver>
<pool>
<max-pool-size>100</max-pool-size>
</pool>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:ee:5.0">
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
<concurrent>
<context-services>
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>
</context-services>
<managed-thread-factories>
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
</managed-thread-factories>
<managed-executor-services>
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/>
</managed-executor-services>
<managed-scheduled-executor-services>
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" keepalive-time="3000"/>
</managed-scheduled-executor-services>
</concurrent>
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:ejb3:7.0">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
<stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/>
<singleton default-access-timeout="5000"/>
</session-bean>
<pools>
<bean-instance-pools>
<strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
<strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
<caches>
<cache name="simple"/>
<cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>
</caches>
<passivation-stores>
<passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>
</passivation-stores>
<async thread-pool-name="default"/>
<timer-service thread-pool-name="default" default-data-store="default-file-store">
<data-stores>
<file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
</data-stores>
</timer-service>
<remote connector-ref="http-remoting-connector" thread-pool-name="default">
<channel-creation-options>
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
</channel-creation-options>
</remote>
<thread-pools>
<thread-pool name="default">
<max-threads count="10"/>
<keepalive-time time="60" unit="seconds"/>
</thread-pool>
</thread-pools>
<default-security-domain value="other"/>
<default-missing-method-permissions-deny-access value="true"/>
<statistics enabled="${wildfly.ejb3.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
<log-system-exceptions value="true"/>
</subsystem>
<subsystem xmlns="urn:wildfly:elytron:10.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
<providers>
<aggregate-providers name="combined-providers">
<providers name="elytron"/>
<providers name="openssl"/>
</aggregate-providers>
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
<provider-loader name="openssl" module="org.wildfly.openssl"/>
</providers>
<audit-logging>
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
</audit-logging>
<security-domains>
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
<realm name="local"/>
</security-domain>
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
<realm name="local" role-mapper="super-user-mapper"/>
</security-domain>
</security-domains>
<security-realms>
<identity-realm name="local" identity="$local"/>
<properties-realm name="ApplicationRealm">
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
</properties-realm>
<properties-realm name="ManagementRealm">
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
</properties-realm>
</security-realms>
<mappers>
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
<permission-mapping>
<principal name="anonymous"/>
<permission-set name="default-permissions"/>
</permission-mapping>
<permission-mapping match-all="true">
<permission-set name="login-permission"/>
<permission-set name="default-permissions"/>
</permission-mapping>
</simple-permission-mapper>
<constant-realm-mapper name="local" realm-name="local"/>
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
<constant-role-mapper name="super-user-mapper">
<role name="SuperUser"/>
</constant-role-mapper>
</mappers>
<permission-sets>
<permission-set name="login-permission">
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
</permission-set>
<permission-set name="default-permissions">
<permission class-name="org.wildfly.extension.batch.jberet.deployment.BatchPermission" module="org.wildfly.extension.batch.jberet" target-name="*"/>
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
<permission class-name="org.jboss.ejb.client.RemoteEJBPermission" module="org.jboss.ejb-client"/>
</permission-set>
</permission-sets>
<http>
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
<mechanism-configuration>
<mechanism mechanism-name="DIGEST">
<mechanism-realm realm-name="ManagementRealm"/>
</mechanism>
</mechanism-configuration>
</http-authentication-factory>
<provider-http-server-mechanism-factory name="global"/>
</http>
<sasl>
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
<mechanism-configuration>
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
<mechanism mechanism-name="DIGEST-MD5">
<mechanism-realm realm-name="ApplicationRealm"/>
</mechanism>
</mechanism-configuration>
</sasl-authentication-factory>
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
<mechanism-configuration>
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
<mechanism mechanism-name="DIGEST-MD5">
<mechanism-realm realm-name="ManagementRealm"/>
</mechanism>
</mechanism-configuration>
</sasl-authentication-factory>
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
<properties>
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
</properties>
</configurable-sasl-server-factory>
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
<filters>
<filter provider-name="WildFlyElytron"/>
</filters>
</mechanism-provider-filtering-sasl-server-factory>
<provider-sasl-server-factory name="global"/>
</sasl>
</subsystem>
<subsystem xmlns="urn:jboss:domain:infinispan:10.0">
<cache-container name="keycloak" module="org.keycloak.keycloak-model-infinispan">
<transport lock-timeout="60000"/>
<local-cache name="realms">
<object-memory size="10000"/>
</local-cache>
<local-cache name="users">
<object-memory size="10000"/>
</local-cache>
<local-cache name="authorization">
<object-memory size="10000"/>
</local-cache>
<local-cache name="keys">
<object-memory size="1000"/>
<expiration max-idle="3600000"/>
</local-cache>
<replicated-cache name="work"/>
<distributed-cache name="sessions" owners="1"/>
<distributed-cache name="authenticationSessions" owners="1"/>
<distributed-cache name="offlineSessions" owners="1"/>
<distributed-cache name="clientSessions" owners="1"/>
<distributed-cache name="offlineClientSessions" owners="1"/>
<distributed-cache name="loginFailures" owners="1"/>
<distributed-cache name="actionTokens" owners="2">
<object-memory size="-1"/>
<expiration interval="300000" max-idle="-1"/>
</distributed-cache>
</cache-container>
<cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server">
<transport lock-timeout="60000"/>
<replicated-cache name="default">
<transaction mode="BATCH"/>
</replicated-cache>
</cache-container>
<cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">
<transport lock-timeout="60000"/>
<replicated-cache name="sso">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="BATCH"/>
</replicated-cache>
<distributed-cache name="dist">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="BATCH"/>
<file-store/>
</distributed-cache>
<distributed-cache name="routing"/>
</cache-container>
<cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan">
<transport lock-timeout="60000"/>
<distributed-cache name="dist">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="BATCH"/>
<file-store/>
</distributed-cache>
</cache-container>
<cache-container name="hibernate" module="org.infinispan.hibernate-cache">
<transport lock-timeout="60000"/>
<local-cache name="local-query">
<object-memory size="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<invalidation-cache name="entity">
<transaction mode="NON_XA"/>
<object-memory size="10000"/>
<expiration max-idle="100000"/>
</invalidation-cache>
<replicated-cache name="timestamps"/>
</cache-container>
</subsystem>
<subsystem xmlns="urn:jboss:domain:io:3.0">
<worker name="default"/>
<buffer-pool name="default"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jaxrs:2.0"/>
<subsystem xmlns="urn:jboss:domain:jca:5.0">
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
<bean-validation enabled="true"/>
<default-workmanager>
<short-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</long-running-threads>
</default-workmanager>
<cached-connection-manager/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jgroups:8.0">
<channels default="ee">
<channel name="ee" stack="udp" cluster="ejb"/>
</channels>
<stacks>
<stack name="udp">
<transport type="UDP" socket-binding="jgroups-udp"/>
<protocol type="PING"/>
<protocol type="MERGE3"/>
<socket-protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG3"/>
</stack>
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<socket-protocol type="MPING" socket-binding="jgroups-mping"/>
<protocol type="MERGE3"/>
<socket-protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="MFC"/>
<protocol type="FRAG3"/>
</stack>
</stacks>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
<expose-resolved-model/>
<expose-expression-model/>
<remoting-connector/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
<jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">
<web-context>auth</web-context>
<providers>
<provider>
classpath:${jboss.home.dir}/providers/*
</provider>
</providers>
<master-realm-name>master</master-realm-name>
<scheduled-task-interval>900</scheduled-task-interval>
<theme>
<staticMaxAge>-1</staticMaxAge>
<cacheThemes>false</cacheThemes>
<cacheTemplates>false</cacheTemplates>
<welcomeTheme>${env.KEYCLOAK_WELCOME_THEME:keycloak}</welcomeTheme>
<default>${env.KEYCLOAK_DEFAULT_THEME:keycloak}</default>
<dir>${jboss.home.dir}/themes</dir>
</theme>
<spi name="eventsStore">
<provider name="jpa" enabled="true">
<properties>
<property name="exclude-events" value="[&quot;REFRESH_TOKEN&quot;]"/>
</properties>
</provider>
</spi>
<spi name="userCache">
<provider name="default" enabled="true"/>
</spi>
<spi name="userSessionPersister">
<default-provider>jpa</default-provider>
</spi>
<spi name="timer">
<default-provider>basic</default-provider>
</spi>
<spi name="connectionsHttpClient">
<provider name="default" enabled="true"/>
</spi>
<spi name="connectionsJpa">
<provider name="default" enabled="true">
<properties>
<property name="dataSource" value="java:jboss/datasources/KeycloakDS"/>
<property name="initializeEmpty" value="true"/>
<property name="migrationStrategy" value="update"/>
<property name="migrationExport" value="${jboss.home.dir}/keycloak-database-update.sql"/>
</properties>
</provider>
</spi>
<spi name="realmCache">
<provider name="default" enabled="true"/>
</spi>
<spi name="connectionsInfinispan">
<default-provider>default</default-provider>
<provider name="default" enabled="true">
<properties>
<property name="cacheContainer" value="java:jboss/infinispan/container/keycloak"/>
</properties>
</provider>
</spi>
<spi name="jta-lookup">
<default-provider>${keycloak.jta.lookup.provider:jboss}</default-provider>
<provider name="jboss" enabled="true"/>
</spi>
<spi name="publicKeyStorage">
<provider name="infinispan" enabled="true">
<properties>
<property name="minTimeBetweenRequests" value="10"/>
</properties>
</provider>
</spi>
<spi name="x509cert-lookup">
<default-provider>${keycloak.x509cert.lookup.provider:default}</default-provider>
<provider name="default" enabled="true"/>
</spi>
<spi name="hostname">
<default-provider>${keycloak.hostname.provider:default}</default-provider>
<provider name="default" enabled="true">
<properties>
<property name="frontendUrl" value="${keycloak.frontendUrl:}"/>
<property name="forceBackendUrlToFrontendUrl" value="false"/>
</properties>
</provider>
<provider name="fixed" enabled="true">
<properties>
<property name="hostname" value="${keycloak.hostname.fixed.hostname:localhost}"/>
<property name="httpPort" value="${keycloak.hostname.fixed.httpPort:-1}"/>
<property name="httpsPort" value="${keycloak.hostname.fixed.httpsPort:-1}"/>
<property name="alwaysHttps" value="${keycloak.hostname.fixed.alwaysHttps:false}"/>
</properties>
</provider>
</spi>
</subsystem>
<subsystem xmlns="urn:jboss:domain:mail:4.0">
<mail-session name="default" jndi-name="java:jboss/mail/Default">
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
</mail-session>
</subsystem>
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:1.0"/>
<subsystem xmlns="urn:wildfly:microprofile-health-smallrye:2.0" security-enabled="false" empty-liveness-checks-status="${env.MP_HEALTH_EMPTY_LIVENESS_CHECKS_STATUS:UP}" empty-readiness-checks-status="${env.MP_HEALTH_EMPTY_READINESS_CHECKS_STATUS:UP}"/>
<subsystem xmlns="urn:wildfly:microprofile-metrics-smallrye:2.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>
<subsystem xmlns="urn:jboss:domain:modcluster:5.0">
<proxy name="default" advertise-socket="modcluster" listener="ajp">
<dynamic-load-provider>
<load-metric type="cpu"/>
</dynamic-load-provider>
</proxy>
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:2.0">
<remote-naming/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:remoting:4.0">
<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
<subsystem xmlns="urn:jboss:domain:security:2.0">
<security-domains>
<security-domain name="other" cache-type="default">
<authentication>
<login-module code="Remoting" flag="optional">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
<login-module code="RealmDirect" flag="required">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
</authentication>
</security-domain>
<security-domain name="jboss-web-policy" cache-type="default">
<authorization>
<policy-module code="Delegating" flag="required"/>
</authorization>
</security-domain>
<security-domain name="jaspitest" cache-type="default">
<authentication-jaspi>
<login-module-stack name="dummy">
<login-module code="Dummy" flag="optional"/>
</login-module-stack>
<auth-module code="Dummy"/>
</authentication-jaspi>
</security-domain>
<security-domain name="jboss-ejb-policy" cache-type="default">
<authorization>
<policy-module code="Delegating" flag="required"/>
</authorization>
</security-domain>
</security-domains>
</subsystem>
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
<deployment-permissions>
<maximum-set>
<permission class="java.security.AllPermission"/>
</maximum-set>
</deployment-permissions>
</subsystem>
<subsystem xmlns="urn:jboss:domain:transactions:5.0">
<core-environment node-identifier="${jboss.tx.node.id:1}">
<process-id>
<uuid/>
</process-id>
</core-environment>
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:undertow:11.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
<buffer-cache name="default"/>
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" read-timeout="30000" socket-binding="http" redirect-socket="https" proxy-address-forwarding="${env.PROXY_ADDRESS_FORWARDING:false}" enable-http2="true"/>
<https-listener name="https" read-timeout="30000" socket-binding="https" proxy-address-forwarding="${env.PROXY_ADDRESS_FORWARDING:false}" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
</subsystem>
<subsystem xmlns="urn:jboss:domain:weld:4.0"/>
</profile>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="private">
<inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<socket-binding name="jgroups-mping" interface="private" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
<socket-binding name="jgroups-tcp-fd" interface="private" port="57600"/>
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
<socket-binding name="modcluster" multicast-address="${jboss.modcluster.multicast.address:224.0.1.105}" multicast-port="23364"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>

View File

@ -0,0 +1,173 @@
<script>const _=
{
"url": {
"loginAction": "${url.loginAction}",
"resourcesPath": "${url.resourcesPath}",
"resourcesCommonPath": "${url.resourcesCommonPath}",
"loginRestartFlowUrl": "${url.loginRestartFlowUrl}",
"loginResetCredentialsUrl": "${url.loginResetCredentialsUrl}",
"registrationUrl": "${url.registrationUrl}"
},
"realm": {
"displayName": "${realm.displayName!''}" || undefined,
"displayNameHtml": "${realm.displayNameHtml!''}" || undefined,
"internationalizationEnabled": ${realm.internationalizationEnabled?c},
"password": ${realm.password?c},
"loginWithEmailAllowed": ${realm.loginWithEmailAllowed?c},
"registrationEmailAsUsername": ${realm.registrationEmailAsUsername?c},
"rememberMe": ${realm.rememberMe?c},
"resetPasswordAllowed": ${realm.resetPasswordAllowed?c}
},
"locale": (function (){
<#if realm.internationalizationEnabled>
return {
"supported": (function(){
<#if realm.internationalizationEnabled>
var out= [];
<#list locale.supported as lng>
out.push({
"url": "${lng.url}",
"label": "${lng.label}",
"languageTag": "${lng.languageTag}"
});
</#list>
return out;
</#if>
return undefined;
})(),
"current": "${locale.current}"
};
</#if>
return undefined;
})(),
"auth": (function (){
<#if auth?has_content>
var out= {
"showUsername": ${auth.showUsername()?c},
"showResetCredentials": ${auth.showResetCredentials()?c},
"showTryAnotherWayLink": ${auth.showTryAnotherWayLink()?c},
"selectedCredential": "${auth.selectedCredential!''}" || undefined
};
<#if auth.showUsername() && !auth.showResetCredentials()>
Object.assign(
out,
{
"attemptedUsername": "${auth.attemptedUsername}"
}
);
</#if>
return out;
</#if>
return undefined;
})(),
"scripts": (function(){
var out = [];
<#if scripts??>
<#list scripts as script>
out.push("${script}");
</#list>
</#if>
return out;
})(),
"message": (function (){
<#if message?has_content>
return { 
"type": "${message.type}",
"summary": "${kcSanitize(message.summary)?no_esc}"
};
</#if>
return undefined;
})(),
"isAppInitiatedAction": (function (){
<#if isAppInitiatedAction??>
return true;
</#if>
return false;
})(),
"social": {
"displayInfo": ${social.displayInfo?c},
"providers": (()=>{
<#if social.providers??>
var out= [];
<#list social.providers as p>
out.push({
"loginUrl": "${p.loginUrl}",
"alias": "${p.alias}",
"providerId": "${p.providerId}",
"displayName": "${p.displayName}"
});
</#list>
return out;
</#if>
return undefined;
})()
},
"usernameEditDisabled": (function () {
<#if usernameEditDisabled??>
return true;
</#if>
return false;
})(),
"login": {
"username": "${login.username!''}" || undefined,
"rememberMe": (function (){
<#if login.rememberMe??>
return true;
</#if>
return false;
})()
},
"registrationDisabled": (function (){
<#if registrationDisabled??>
return true;
</#if>
return false;
})
}
</script>

View File

@ -0,0 +1,11 @@
export declare function generateFtlFilesCodeFactory(params: {
ftlValuesGlobalName: string;
cssGlobalsToDefine: Record<string, string>;
indexHtmlCode: string;
}): {
generateFtlFilesCode: (params: {
pageBasename: "login.ftl" | "register.ftl";
}) => {
ftlCode: string;
};
};

View File

@ -0,0 +1,115 @@
"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateFtlFilesCodeFactory = void 0;
var cheerio_1 = __importDefault(require("cheerio"));
var replaceImportFromStatic_1 = require("../replaceImportFromStatic");
var fs_1 = __importDefault(require("fs"));
var path_1 = require("path");
var objectKeys_1 = require("evt/tools/typeSafety/objectKeys");
function generateFtlFilesCodeFactory(params) {
var ftlValuesGlobalName = params.ftlValuesGlobalName, cssGlobalsToDefine = params.cssGlobalsToDefine, indexHtmlCode = params.indexHtmlCode;
var $ = cheerio_1.default.load(indexHtmlCode);
$("script:not([src])").each(function () {
var _a = [];
for (var _i = 0; _i < arguments.length; _i++) {
_a[_i] = arguments[_i];
}
var _b = __read(_a, 2), element = _b[1];
var fixedJsCode = replaceImportFromStatic_1.replaceImportFromStaticInJsCode({
ftlValuesGlobalName: ftlValuesGlobalName,
"jsCode": $(element).html()
}).fixedJsCode;
$(element).text(fixedJsCode);
});
[
["link", "href"],
["script", "src"],
].forEach(function (_a) {
var _b = __read(_a, 2), selector = _b[0], attrName = _b[1];
return $(selector).each(function () {
var _a = [];
for (var _i = 0; _i < arguments.length; _i++) {
_a[_i] = arguments[_i];
}
var _b = __read(_a, 2), element = _b[1];
var href = $(element).attr(attrName);
if (!(href === null || href === void 0 ? void 0 : href.startsWith("/"))) {
return;
}
$(element).attr(attrName, "${url.resourcesPath}/build" + href);
});
});
//FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
var ftlPlaceholders = {
'{ "x": "xIdLqMeOed9sdLdIdOxdK0d" }': fs_1.default.readFileSync(path_1.join(__dirname, "ftl2js.ftl"))
.toString("utf8")
.match(/^<script>const _=((?:.|\n)+)<\/script>[\n]?$/)[1],
'<!-- xIdLqMeOedErIdLsPdNdI9dSlxI -->': [
'<#if scripts??>',
' <#list scripts as script>',
' <script src="${script}" type="text/javascript"></script>',
' </#list>',
'</#if>',
].join("\n")
};
$("head").prepend(__spreadArray(__spreadArray([], __read((Object.keys(cssGlobalsToDefine).length === 0 ? [] : [
'',
'<style>',
replaceImportFromStatic_1.generateCssCodeToDefineGlobals({ cssGlobalsToDefine: cssGlobalsToDefine }).cssCodeToPrependInHead,
'</style>',
''
]))), [
'<script>',
' Object.assign(',
" window." + ftlValuesGlobalName + ",",
" " + objectKeys_1.objectKeys(ftlPlaceholders)[0],
' );',
'</script>',
'',
objectKeys_1.objectKeys(ftlPlaceholders)[1],
''
]).join("\n"));
var partiallyFixedIndexHtmlCode = $.html();
function generateFtlFilesCode(params) {
var pageBasename = params.pageBasename;
var $ = cheerio_1.default.load(partiallyFixedIndexHtmlCode);
$("head").prepend([
'',
'<script>',
" window." + ftlValuesGlobalName + " = { \"pageBasename\": \"" + pageBasename + "\" };",
'</script>',
''
].join("\n"));
var ftlCode = $.html();
objectKeys_1.objectKeys(ftlPlaceholders)
.forEach(function (id) { return ftlCode = ftlCode.replace(id, ftlPlaceholders[id]); });
return { ftlCode: ftlCode };
}
return { generateFtlFilesCode: generateFtlFilesCode };
}
exports.generateFtlFilesCodeFactory = generateFtlFilesCodeFactory;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bin/build-keycloak-theme/generateFtl/index.ts"],"names":[],"mappings":"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"}

View File

@ -0,0 +1,11 @@
export declare type ParsedPackageJson = {
name: string;
version: string;
homepage?: string;
};
export declare function generateJavaStackFiles(params: {
parsedPackageJson: ParsedPackageJson;
keycloakThemeBuildingDirPath: string;
}): {
jarFilePath: string;
};

View File

@ -0,0 +1,73 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateJavaStackFiles = void 0;
var url = __importStar(require("url"));
var fs = __importStar(require("fs"));
var path_1 = require("path");
function generateJavaStackFiles(params) {
var _a = params.parsedPackageJson, name = _a.name, version = _a.version, homepage = _a.homepage, keycloakThemeBuildingDirPath = params.keycloakThemeBuildingDirPath;
{
var pomFileCode = (function generatePomFileCode() {
var groupId = (function () {
var _a, _b;
var fallbackGroupId = "there.was.no.homepage.field.in.the.package.json." + name;
return (!homepage ?
fallbackGroupId :
(_b = (_a = url.parse(homepage).host) === null || _a === void 0 ? void 0 : _a.split(".").reverse().join(".")) !== null && _b !== void 0 ? _b : fallbackGroupId) + ".keycloak";
})();
var artefactId = name + "-keycloak-theme";
var pomFileCode = [
"<?xml version=\"1.0\"?>",
"<project xmlns=\"http://maven.apache.org/POM/4.0.0\"",
"\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",
"\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">",
"\t<modelVersion>4.0.0</modelVersion>",
"\t<groupId>" + groupId + "</groupId>",
"\t<artifactId>" + artefactId + "</artifactId>",
"\t<version>" + version + "</version>",
"\t<name>" + artefactId + "</name>",
"\t<description />",
"</project>"
].join("\n");
return { pomFileCode: pomFileCode };
})().pomFileCode;
fs.writeFileSync(path_1.join(keycloakThemeBuildingDirPath, "pom.xml"), Buffer.from(pomFileCode, "utf8"));
}
{
var themeManifestFilePath = path_1.join(keycloakThemeBuildingDirPath, "src", "main", "resources", "META-INF", "keycloak-themes.json");
try {
fs.mkdirSync(path_1.dirname(themeManifestFilePath));
}
catch (_b) { }
fs.writeFileSync(themeManifestFilePath, Buffer.from(JSON.stringify({
"themes": [
{
"name": name,
"types": ["login"]
}
]
}, null, 2), "utf8"));
}
return { "jarFilePath": path_1.join(keycloakThemeBuildingDirPath, "target", name + "-" + version + ".jar") };
}
exports.generateJavaStackFiles = generateJavaStackFiles;
//# sourceMappingURL=generateJavaStackFiles.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"generateJavaStackFiles.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/generateJavaStackFiles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,uCAA2B;AAC3B,qCAAyB;AACzB,6BAAgE;AAQhE,SAAgB,sBAAsB,CAClC,MAGC;IAIG,IAAA,KAEA,MAAM,kBAFwC,EAAzB,IAAI,UAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAC5C,4BAA4B,GAC5B,MAAM,6BADsB,CACrB;IAEX;QAEY,IAAA,WAAW,GAAK,CAAC,SAAS,mBAAmB;YAGjD,IAAM,OAAO,GAAG,CAAC;;gBAEb,IAAM,eAAe,GAAG,qDAAmD,IAAM,CAAC;gBAElF,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;oBACf,eAAe,CAAC,CAAC;oBACjB,MAAA,MAAA,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,0CAAE,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,mCAAI,eAAe,CAC9E,GAAG,WAAW,CAAC;YAEpB,CAAC,CAAC,EAAE,CAAC;YAEL,IAAM,UAAU,GAAM,IAAI,oBAAiB,CAAC;YAE5C,IAAM,WAAW,GAAG;gBAChB,yBAAuB;gBACvB,sDAAoD;gBACpD,2DAAwD;gBACxD,sGAAmG;gBACnG,sCAAqC;gBACrC,gBAAa,OAAO,eAAY;gBAChC,mBAAgB,UAAU,kBAAe;gBACzC,gBAAa,OAAO,eAAY;gBAChC,aAAU,UAAU,YAAS;gBAC7B,mBAAkB;gBAClB,YAAY;aACf,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAEb,OAAO,EAAE,WAAW,aAAA,EAAE,CAAC;QAE3B,CAAC,CAAC,EAAE,YAhCe,CAgCd;QAEL,EAAE,CAAC,aAAa,CACZ,WAAQ,CAAC,4BAA4B,EAAE,SAAS,CAAC,EACjD,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CACnC,CAAC;KAEL;IAED;QAEI,IAAM,qBAAqB,GAAG,WAAQ,CAClC,4BAA4B,EAAE,KAAK,EAAE,MAAM,EAC3C,WAAW,EAAE,UAAU,EAAE,sBAAsB,CAClD,CAAC;QAEF,IAAI;YAEA,EAAE,CAAC,SAAS,CAAC,cAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC;SAEpD;QAAC,WAAM,GAAG;QAEX,EAAE,CAAC,aAAa,CACZ,qBAAqB,EACrB,MAAM,CAAC,IAAI,CACP,IAAI,CAAC,SAAS,CAAC;YACX,QAAQ,EAAE;gBACN;oBACI,MAAM,EAAE,IAAI;oBACZ,OAAO,EAAE,CAAC,OAAO,CAAC;iBACrB;aACJ;SACJ,EAAE,IAAI,EAAE,CAAC,CAAC,EACX,MAAM,CACT,CACJ,CAAC;KAEL;IAED,OAAO,EAAE,aAAa,EAAE,WAAQ,CAAC,4BAA4B,EAAE,QAAQ,EAAK,IAAI,SAAI,OAAO,SAAM,CAAC,EAAE,CAAC;AAEzG,CAAC;AAvFD,wDAuFC"}

View File

@ -0,0 +1,5 @@
export declare function generateKeycloakThemeResources(params: {
themeName: string;
reactAppBuildDirPath: string;
keycloakThemeBuildingDirPath: string;
}): void;

View File

@ -0,0 +1,98 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateKeycloakThemeResources = void 0;
var transformCodebase_1 = require("../tools/transformCodebase");
var fs = __importStar(require("fs"));
var path_1 = require("path");
var replaceImportFromStatic_1 = require("./replaceImportFromStatic");
var generateFtl_1 = require("./generateFtl");
var download_sample_keycloak_themes_1 = require("../download-sample-keycloak-themes");
var downloadAndUnzip_1 = require("../tools/downloadAndUnzip");
var child_process = __importStar(require("child_process"));
var ftlValuesGlobalName_1 = require("./ftlValuesGlobalName");
function generateKeycloakThemeResources(params) {
var themeName = params.themeName, reactAppBuildDirPath = params.reactAppBuildDirPath, keycloakThemeBuildingDirPath = params.keycloakThemeBuildingDirPath;
var themeDirPath = path_1.join(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", themeName, "login");
var allCssGlobalsToDefine = {};
transformCodebase_1.transformCodebase({
"destDirPath": path_1.join(themeDirPath, "resources", "build"),
"srcDirPath": reactAppBuildDirPath,
"transformSourceCode": function (_a) {
var filePath = _a.filePath, sourceCode = _a.sourceCode;
if (/\.css?$/i.test(filePath)) {
var _b = replaceImportFromStatic_1.replaceImportFromStaticInCssCode({ "cssCode": sourceCode.toString("utf8") }), cssGlobalsToDefine = _b.cssGlobalsToDefine, fixedCssCode = _b.fixedCssCode;
allCssGlobalsToDefine = __assign(__assign({}, allCssGlobalsToDefine), cssGlobalsToDefine);
return { "modifiedSourceCode": Buffer.from(fixedCssCode, "utf8") };
}
if (/\.js?$/i.test(filePath)) {
var fixedJsCode = replaceImportFromStatic_1.replaceImportFromStaticInJsCode({
"jsCode": sourceCode.toString("utf8"),
ftlValuesGlobalName: ftlValuesGlobalName_1.ftlValuesGlobalName
}).fixedJsCode;
return { "modifiedSourceCode": Buffer.from(fixedJsCode, "utf8") };
}
return { "modifiedSourceCode": sourceCode };
}
});
var generateFtlFilesCode = generateFtl_1.generateFtlFilesCodeFactory({
"cssGlobalsToDefine": allCssGlobalsToDefine,
ftlValuesGlobalName: ftlValuesGlobalName_1.ftlValuesGlobalName,
"indexHtmlCode": fs.readFileSync(path_1.join(reactAppBuildDirPath, "index.html")).toString("utf8")
}).generateFtlFilesCode;
["login.ftl", "register.ftl"].forEach(function (pageBasename) {
var ftlCode = generateFtlFilesCode({ pageBasename: pageBasename }).ftlCode;
fs.writeFileSync(path_1.join(themeDirPath, pageBasename), Buffer.from(ftlCode, "utf8"));
});
{
var tmpDirPath = path_1.join(themeDirPath, "..", "tmp_xxKdLpdIdLd");
downloadAndUnzip_1.downloadAndUnzip({
"url": download_sample_keycloak_themes_1.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl,
"destDirPath": tmpDirPath
});
transformCodebase_1.transformCodebase({
"srcDirPath": path_1.join(tmpDirPath, "keycloak", "common"),
"destDirPath": path_1.join(tmpDirPath, "..", "common")
});
transformCodebase_1.transformCodebase({
"srcDirPath": path_1.join(tmpDirPath, "keycloak", "login", "resources"),
"destDirPath": path_1.join(themeDirPath, "resources")
});
child_process.execSync("rm -r " + tmpDirPath);
}
fs.writeFileSync(path_1.join(themeDirPath, "theme.properties"), Buffer.from([
"[import=common/" + themeName,
"locales=ca,cs,de,en,es,fr,it,ja,lt,nl,no,pl,pt-BR,ru,sk,sv,tr,zh-CN"
].join("\n"), "utf8"));
}
exports.generateKeycloakThemeResources = generateKeycloakThemeResources;
//# sourceMappingURL=generateKeycloakThemeResources.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"generateKeycloakThemeResources.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/generateKeycloakThemeResources.ts"],"names":[],"mappings":"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"}

2
bin/build-keycloak-theme/index.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env node
export declare const keycloakThemeBuildingDirPath: string;

View File

@ -0,0 +1,86 @@
#!/usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.keycloakThemeBuildingDirPath = void 0;
var generateKeycloakThemeResources_1 = require("./generateKeycloakThemeResources");
var generateJavaStackFiles_1 = require("./generateJavaStackFiles");
var path_1 = require("path");
var child_process = __importStar(require("child_process"));
var generateDebugFiles_1 = require("./generateDebugFiles");
var reactProjectDirPath = process.cwd();
var parsedPackageJson = require(path_1.join(reactProjectDirPath, "package.json"));
exports.keycloakThemeBuildingDirPath = path_1.join(reactProjectDirPath, "build_keycloak");
if (require.main === module) {
console.log("🔏 Building the keycloak theme...⌚");
generateKeycloakThemeResources_1.generateKeycloakThemeResources({
keycloakThemeBuildingDirPath: exports.keycloakThemeBuildingDirPath,
"reactAppBuildDirPath": path_1.join(reactProjectDirPath, "build"),
"themeName": parsedPackageJson.name
});
var jarFilePath = generateJavaStackFiles_1.generateJavaStackFiles({
parsedPackageJson: parsedPackageJson,
keycloakThemeBuildingDirPath: exports.keycloakThemeBuildingDirPath
}).jarFilePath;
child_process.execSync("mvn package", { "cwd": exports.keycloakThemeBuildingDirPath });
generateDebugFiles_1.generateDebugFiles({
keycloakThemeBuildingDirPath: exports.keycloakThemeBuildingDirPath,
"packageJsonName": parsedPackageJson.name
});
console.log([
'',
"\u2705 Your keycloak theme has been generated and bundled into ./" + path_1.relative(reactProjectDirPath, jarFilePath) + " \uD83D\uDE80",
"It is to be placed in \"/opt/jboss/keycloak/standalone/deployments\" in the container running a jboss/keycloak Docker image. (Tested with 11.0.3)",
'',
'Using Helm (https://github.com/codecentric/helm-charts), edit to reflect:',
'',
'value.yaml: ',
' extraInitContainers: |',
' - name: realm-ext-provider',
' image: curlimages/curl',
' imagePullPolicy: IfNotPresent',
' command:',
' - sh',
' args:',
' - -c',
" - curl -L -f -S -o /extensions/" + path_1.basename(jarFilePath) + " https://AN.URL.FOR/" + path_1.basename(jarFilePath),
' volumeMounts:',
' - name: extensions',
' mountPath: /extensions',
' ',
' extraVolumeMounts: |',
' - name: extensions',
' mountPath: /opt/jboss/keycloak/standalone/deployments',
'',
'',
'To test your theme locally, with hot reloading, you can spin up a Keycloak container image with the theme loaded by running:',
'',
"\uD83D\uDC49 $ ./" + path_1.relative(reactProjectDirPath, path_1.join(exports.keycloakThemeBuildingDirPath, generateDebugFiles_1.containerLaunchScriptBasename)) + " \uD83D\uDC48",
'',
'To enable the theme within keycloak log into the admin console ( 👉 http://localhost:8080 username: admin, password: admin 👈), create a realm (called "myrealm" for example),',
"go to your realm settings, click on the theme tab then select " + parsedPackageJson.name + ".",
"More details: https://www.keycloak.org/getting-started/getting-started-docker",
'',
'Once your container is up and configured 👉 http://localhost:8080/auth/realms/myrealm/account 👈',
'',
].join("\n"));
}
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,mFAAkF;AAClF,mEAAkE;AAElE,6BAA4F;AAC5F,2DAA+C;AAC/C,2DAAyF;AAGzF,IAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAE1C,IAAM,iBAAiB,GAAsB,OAAO,CAAC,WAAQ,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC,CAAC;AAEvF,QAAA,4BAA4B,GAAG,WAAQ,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAG5F,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAEzB,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;IAElD,+DAA8B,CAAC;QAC3B,4BAA4B,sCAAA;QAC5B,sBAAsB,EAAE,WAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;QAC9D,WAAW,EAAE,iBAAiB,CAAC,IAAI;KACtC,CAAC,CAAC;IAEK,IAAA,WAAW,GAAK,+CAAsB,CAAC;QAC3C,iBAAiB,mBAAA;QACjB,4BAA4B,sCAAA;KAC/B,CAAC,YAHiB,CAGhB;IAEH,aAAa,CAAC,QAAQ,CAClB,aAAa,EACb,EAAE,KAAK,EAAE,oCAA4B,EAAE,CAC1C,CAAC;IAEF,uCAAkB,CAAC;QACf,4BAA4B,sCAAA;QAC5B,iBAAiB,EAAE,iBAAiB,CAAC,IAAI;KAC5C,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC;QACR,EAAE;QACF,sEAA+D,eAAY,CAAC,mBAAmB,EAAE,WAAW,CAAC,kBAAK;QAClH,mJAAiJ;QACjJ,EAAE;QACF,2EAA2E;QAC3E,EAAE;QACF,cAAc;QACd,4BAA4B;QAC5B,oCAAoC;QACpC,kCAAkC;QAClC,yCAAyC;QACzC,oBAAoB;QACpB,kBAAkB;QAClB,iBAAiB;QACjB,kBAAkB;QAClB,gDAA8C,eAAY,CAAC,WAAW,CAAC,4BAAuB,eAAY,CAAC,WAAW,CAAG;QACzH,yBAAyB;QACzB,gCAAgC;QAChC,sCAAsC;QACtC,UAAU;QACV,8BAA8B;QAC9B,gCAAgC;QAChC,qEAAqE;QACrE,EAAE;QACF,EAAE;QACF,8HAA8H;QAC9H,EAAE;QACF,sBAAU,eAAY,CAAC,mBAAmB,EAAE,WAAQ,CAAC,oCAA4B,EAAE,kDAA6B,CAAC,CAAC,kBAAK;QACvH,EAAE;QACF,gLAAgL;QAChL,mEAAiE,iBAAiB,CAAC,IAAI,MAAG;QAC1F,+EAA+E;QAC/E,EAAE;QACF,kGAAkG;QAClG,EAAE;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAEjB"}

View File

@ -0,0 +1,17 @@
export declare function replaceImportFromStaticInJsCode(params: {
ftlValuesGlobalName: string;
jsCode: string;
}): {
fixedJsCode: string;
};
export declare function replaceImportFromStaticInCssCode(params: {
cssCode: string;
}): {
fixedCssCode: string;
cssGlobalsToDefine: Record<string, string>;
};
export declare function generateCssCodeToDefineGlobals(params: {
cssGlobalsToDefine: Record<string, string>;
}): {
cssCodeToPrependInHead: string;
};

View File

@ -0,0 +1,94 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateCssCodeToDefineGlobals = exports.replaceImportFromStaticInCssCode = exports.replaceImportFromStaticInJsCode = void 0;
var crypto = __importStar(require("crypto"));
function replaceImportFromStaticInJsCode(params) {
var jsCode = params.jsCode, ftlValuesGlobalName = params.ftlValuesGlobalName;
var fixedJsCode = jsCode.replace(/"static\//g, "window." + ftlValuesGlobalName + ".url.resourcesPath.replace(/^\\//,\"\") + \"/build/static/");
return { fixedJsCode: fixedJsCode };
}
exports.replaceImportFromStaticInJsCode = replaceImportFromStaticInJsCode;
function replaceImportFromStaticInCssCode(params) {
var _a;
var cssCode = params.cssCode;
var cssGlobalsToDefine = {};
new Set((_a = cssCode.match(/(url\(\/[^)]+\))/g)) !== null && _a !== void 0 ? _a : [])
.forEach(function (match) {
return cssGlobalsToDefine["url" + crypto
.createHash("sha256")
.update(match)
.digest("hex")
.substring(0, 15)] = match;
});
var fixedCssCode = cssCode;
Object.keys(cssGlobalsToDefine).forEach(function (cssVariableName) {
//NOTE: split/join pattern ~ replace all
return fixedCssCode =
fixedCssCode.split(cssGlobalsToDefine[cssVariableName])
.join("var(--" + cssVariableName + ")");
});
return { fixedCssCode: fixedCssCode, cssGlobalsToDefine: cssGlobalsToDefine };
}
exports.replaceImportFromStaticInCssCode = replaceImportFromStaticInCssCode;
function generateCssCodeToDefineGlobals(params) {
var cssGlobalsToDefine = params.cssGlobalsToDefine;
return {
"cssCodeToPrependInHead": __spreadArray(__spreadArray([
":root {"
], __read(Object.keys(cssGlobalsToDefine)
.map(function (cssVariableName) { return [
"--" + cssVariableName + ":",
[
"url(",
"${url.resourcesPath}/build" +
cssGlobalsToDefine[cssVariableName].match(/^url\(([^)]+)\)$/)[1],
")"
].join("")
].join(" "); })
.map(function (line) { return " " + line + ";"; }))), [
"}"
]).join("\n")
};
}
exports.generateCssCodeToDefineGlobals = generateCssCodeToDefineGlobals;
//# sourceMappingURL=replaceImportFromStatic.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"replaceImportFromStatic.js","sourceRoot":"","sources":["../../src/bin/build-keycloak-theme/replaceImportFromStatic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAiC;AAEjC,SAAgB,+BAA+B,CAC3C,MAGC;IAGO,IAAA,MAAM,GAA0B,MAAM,OAAhC,EAAE,mBAAmB,GAAK,MAAM,oBAAX,CAAY;IAE/C,IAAM,WAAW,GAAG,MAAO,CAAC,OAAO,CAC/B,YAAY,EACZ,YAAU,mBAAmB,+DAAyD,CACzF,CAAC;IAEF,OAAO,EAAE,WAAW,aAAA,EAAE,CAAC;AAE3B,CAAC;AAhBD,0EAgBC;AAED,SAAgB,gCAAgC,CAC5C,MAEC;;IAMO,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IAE3B,IAAM,kBAAkB,GAA2B,EAAE,CAAC;IAEtD,IAAI,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,mCAAI,EAAE,CAAC;SAC5C,OAAO,CAAC,UAAA,KAAK;QACV,OAAA,kBAAkB,CAClB,KAAK,GAAG,MAAM;aACT,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,KAAK,CAAC;aACb,MAAM,CAAC,KAAK,CAAC;aACb,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,GAAG,KAAK;IANT,CAMS,CACZ,CAAC;IAEN,IAAI,YAAY,GAAG,OAAO,CAAC;IAE3B,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,OAAO,CACnC,UAAA,eAAe;QACX,wCAAwC;QACxC,OAAA,YAAY;YACZ,YAAY,CAAC,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;iBAClD,IAAI,CAAC,WAAS,eAAe,MAAG,CAAC;IAFtC,CAEsC,CAC7C,CAAC;IAEF,OAAO,EAAE,YAAY,cAAA,EAAE,kBAAkB,oBAAA,EAAE,CAAC;AAEhD,CAAC;AApCD,4EAoCC;AAED,SAAgB,8BAA8B,CAC1C,MAEC;IAKO,IAAA,kBAAkB,GAAK,MAAM,mBAAX,CAAY;IAEtC,OAAO;QACH,wBAAwB,EAAE;YACtB,SAAS;kBACN,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC;aAC7B,GAAG,CAAC,UAAA,eAAe,IAAI,OAAA;YACpB,OAAK,eAAe,MAAG;YACvB;gBACI,MAAM;gBACN,4BAA4B;oBAC5B,kBAAkB,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAE,CAAC,CAAC,CAAC;gBACjE,GAAG;aACN,CAAC,IAAI,CAAC,EAAE,CAAC;SACb,CAAC,IAAI,CAAC,GAAG,CAAC,EARa,CAQb,CAAC;aACX,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,SAAO,IAAI,MAAG,EAAd,CAAc,CAAC;YAChC,GAAG;WACL,IAAI,CAAC,IAAI,CAAC;KACf,CAAC;AAEN,CAAC;AA5BD,wEA4BC"}

View File

@ -0,0 +1,2 @@
#!/usr/bin/env node
export declare const keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";

View File

@ -0,0 +1,15 @@
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl = void 0;
var build_keycloak_theme_1 = require("./build-keycloak-theme");
var downloadAndUnzip_1 = require("./tools/downloadAndUnzip");
var path_1 = require("path");
exports.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";
if (require.main === module) {
downloadAndUnzip_1.downloadAndUnzip({
"url": exports.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl,
"destDirPath": path_1.join(build_keycloak_theme_1.keycloakThemeBuildingDirPath, "src", "main", "resources", "theme")
});
}
//# sourceMappingURL=download-sample-keycloak-themes.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"download-sample-keycloak-themes.js","sourceRoot":"","sources":["../src/bin/download-sample-keycloak-themes.ts"],"names":[],"mappings":";;;;AAEA,+DAAsE;AACtE,6DAA4D;AAC5D,6BAAwC;AAE3B,QAAA,kDAAkD,GAC3D,sGAAsG,CAAC;AAE3G,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAEzB,mCAAgB,CAAC;QACb,KAAK,EAAE,0DAAkD;QACzD,aAAa,EAAE,WAAQ,CAAC,mDAA4B,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC;KAC7F,CAAC,CAAC;CAEN"}

1
bin/generate-i18n-messages.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,81 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
var fs = __importStar(require("fs"));
var path_1 = require("path");
var crawl_1 = require("./tools/crawl");
var downloadAndUnzip_1 = require("./tools/downloadAndUnzip");
var download_sample_keycloak_themes_1 = require("./download-sample-keycloak-themes");
var getProjectRoot_1 = require("./tools/getProjectRoot");
var child_process = __importStar(require("child_process"));
//@ts-ignore
var propertiesParser = require("properties-parser");
var tmpDirPath = path_1.join(getProjectRoot_1.getProjectRoot(), "tmp_xImOef9dOd44");
child_process.execSync("rm -rf " + tmpDirPath);
downloadAndUnzip_1.downloadAndUnzip({
"destDirPath": tmpDirPath,
"url": download_sample_keycloak_themes_1.keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl
});
var record = {};
process.chdir(path_1.join(tmpDirPath, "base"));
crawl_1.crawl(".").forEach(function (filePath) {
var _a;
var match = filePath.match(/^([^/]+)\/messages\/messages_([^.]+)\.properties$/);
if (match === null) {
return;
}
var _b = __read(match, 3), typeOfPage = _b[1], language = _b[2];
((_a = record[typeOfPage]) !== null && _a !== void 0 ? _a : (record[typeOfPage] = {}))[language.replace(/_/g, "-")] =
propertiesParser.parse(fs.readFileSync(filePath)
.toString("utf8"));
});
child_process.execSync("rm -r " + tmpDirPath);
var targetDirPath = path_1.join(getProjectRoot_1.getProjectRoot(), "src", "lib", "i18n", "generated_messages");
fs.mkdirSync(targetDirPath, { "recursive": true });
Object.keys(record).forEach(function (pageType) {
var filePath = path_1.join(targetDirPath, pageType + ".ts");
fs.writeFileSync(filePath, Buffer.from([
"//This code was automatically generated by running " + path_1.relative(getProjectRoot_1.getProjectRoot(), __filename),
'//PLEASE DO NOT EDIT MANUALLY',
'',
'/* spell-checker: disable */',
"export const messages= " + JSON.stringify(record[pageType], null, 2) + " as const;",
'/* spell-checker: enable */'
].join("\n"), "utf8"));
console.log(filePath + " wrote");
});
//# sourceMappingURL=generate-i18n-messages.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"generate-i18n-messages.js","sourceRoot":"","sources":["../src/bin/generate-i18n-messages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,6BAAkE;AAClE,uCAAsC;AACtC,6DAA4D;AAC5D,qFAAuG;AACvG,yDAAwD;AACxD,2DAA+C;AAE/C,YAAY;AACZ,IAAM,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEtD,IAAM,UAAU,GAAG,WAAQ,CAAC,+BAAc,EAAE,EAAE,kBAAkB,CAAC,CAAC;AAElE,aAAa,CAAC,QAAQ,CAAC,YAAU,UAAY,CAAC,CAAC;AAE/C,mCAAgB,CAAC;IACb,aAAa,EAAE,UAAU;IACzB,KAAK,EAAE,oFAAkD;CAC5D,CAAC,CAAC;AAIH,IAAM,MAAM,GAAiE,EAAE,CAAC;AAEhF,OAAO,CAAC,KAAK,CAAC,WAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5C,aAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;;IAEvB,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;IAElF,IAAI,KAAK,KAAK,IAAI,EAAE;QAChB,OAAO;KACV;IAEK,IAAA,KAAA,OAA2B,KAAK,IAAA,EAA7B,UAAU,QAAA,EAAE,QAAQ,QAAS,CAAC;IAEvC,OAAC,MAAM,CAAC,UAAU,qCAAjB,MAAM,CAAC,UAAU,IAAM,EAAE,EAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAC,GAAG,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAClB,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;aACpB,QAAQ,CAAC,MAAM,CAAC,CACxB,CAAC;AAEV,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,QAAQ,CAAC,WAAS,UAAY,CAAC,CAAC;AAE9C,IAAM,aAAa,GAAG,WAAQ,CAAC,+BAAc,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAE7F,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AAEnD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;IAEhC,IAAM,QAAQ,GAAG,WAAQ,CAAC,aAAa,EAAK,QAAQ,QAAK,CAAC,CAAC;IAE3D,EAAE,CAAC,aAAa,CACZ,QAAQ,EACR,MAAM,CAAC,IAAI,CACP;QACI,wDAAsD,eAAY,CAAC,+BAAc,EAAE,EAAE,UAAU,CAAG;QAClG,+BAA+B;QAC/B,EAAE;QACF,8BAA8B;QAC9B,4BAA0B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,eAAY;QAC/E,6BAA6B;KAChC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAC5B,CAAC;IAEF,OAAO,CAAC,GAAG,CAAI,QAAQ,WAAQ,CAAC,CAAC;AAGrC,CAAC,CAAC,CAAC"}

2
bin/tools/crawl.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
/** List all files in a given directory return paths relative to the dir_path */
export declare const crawl: (dir_path: string) => string[];

65
bin/tools/crawl.js Normal file
View File

@ -0,0 +1,65 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.crawl = void 0;
var fs = __importStar(require("fs"));
var path = __importStar(require("path"));
/** List all files in a given directory return paths relative to the dir_path */
exports.crawl = (function () {
var crawlRec = function (dir_path, paths) {
var e_1, _a;
try {
for (var _b = __values(fs.readdirSync(dir_path)), _c = _b.next(); !_c.done; _c = _b.next()) {
var file_name = _c.value;
var file_path = path.join(dir_path, file_name);
if (fs.lstatSync(file_path).isDirectory()) {
crawlRec(file_path, paths);
continue;
}
paths.push(file_path);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
};
return function crawl(dir_path) {
var paths = [];
crawlRec(dir_path, paths);
return paths.map(function (file_path) { return path.relative(dir_path, file_path); });
};
})();
//# sourceMappingURL=crawl.js.map

1
bin/tools/crawl.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"crawl.js","sourceRoot":"","sources":["../../src/bin/tools/crawl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,yCAA6B;AAE7B,gFAAgF;AACnE,QAAA,KAAK,GAAG,CAAC;IAElB,IAAM,QAAQ,GAAG,UAAC,QAAgB,EAAE,KAAe;;;YAE/C,KAAwB,IAAA,KAAA,SAAA,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA,gBAAA,4BAAE;gBAA7C,IAAM,SAAS,WAAA;gBAEhB,IAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;gBAEjD,IAAI,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,EAAE;oBAEvC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;oBAE3B,SAAS;iBAEZ;gBAED,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAEzB;;;;;;;;;IAEL,CAAC,CAAC;IAEF,OAAO,SAAS,KAAK,CAAC,QAAgB;QAElC,IAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAE1B,OAAO,KAAK,CAAC,GAAG,CAAC,UAAA,SAAS,IAAI,OAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAEtE,CAAC,CAAA;AAEL,CAAC,CAAC,EAAE,CAAC"}

5
bin/tools/downloadAndUnzip.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/** assert url ends with .zip */
export declare function downloadAndUnzip(params: {
url: string;
destDirPath: string;
}): void;

View File

@ -0,0 +1,27 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.downloadAndUnzip = void 0;
var path_1 = require("path");
var child_process_1 = require("child_process");
var fs_1 = __importDefault(require("fs"));
var transformCodebase_1 = require("../tools/transformCodebase");
/** assert url ends with .zip */
function downloadAndUnzip(params) {
var url = params.url, destDirPath = params.destDirPath;
var tmpDirPath = path_1.join(destDirPath, "..", "tmp_xxKdOxnEdx");
child_process_1.execSync("rm -rf " + tmpDirPath);
fs_1.default.mkdirSync(tmpDirPath, { "recursive": true });
child_process_1.execSync("wget " + url, { "cwd": tmpDirPath });
child_process_1.execSync("unzip " + path_1.basename(url), { "cwd": tmpDirPath });
child_process_1.execSync("rm " + path_1.basename(url), { "cwd": tmpDirPath });
transformCodebase_1.transformCodebase({
"srcDirPath": tmpDirPath,
"destDirPath": destDirPath,
});
child_process_1.execSync("rm -r " + tmpDirPath);
}
exports.downloadAndUnzip = downloadAndUnzip;
//# sourceMappingURL=downloadAndUnzip.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"downloadAndUnzip.js","sourceRoot":"","sources":["../../src/bin/tools/downloadAndUnzip.ts"],"names":[],"mappings":";;;;;;AACA,6BAAkE;AAClE,+CAAyC;AACzC,0CAAoB;AACpB,gEAA+D;AAE/D,gCAAgC;AAChC,SAAgB,gBAAgB,CAC5B,MAGC;IAGO,IAAA,GAAG,GAAkB,MAAM,IAAxB,EAAE,WAAW,GAAK,MAAM,YAAX,CAAY;IAEpC,IAAM,UAAU,GAAG,WAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAEjE,wBAAQ,CAAC,YAAU,UAAY,CAAC,CAAC;IAEjC,YAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAEhD,wBAAQ,CAAC,UAAQ,GAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAA;IAC9C,wBAAQ,CAAC,WAAS,eAAY,CAAC,GAAG,CAAG,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IAC9D,wBAAQ,CAAC,QAAM,eAAY,CAAC,GAAG,CAAG,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IAE3D,qCAAiB,CAAC;QACd,YAAY,EAAE,UAAU;QACxB,aAAa,EAAE,WAAW;KAC7B,CAAC,CAAC;IAEH,wBAAQ,CAAC,WAAS,UAAY,CAAC,CAAC;AAEpC,CAAC;AA1BD,4CA0BC"}

1
bin/tools/getProjectRoot.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export declare function getProjectRoot(): string;

View File

@ -0,0 +1,39 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProjectRoot = void 0;
var fs = __importStar(require("fs"));
var path = __importStar(require("path"));
function getProjectRootRec(dirPath) {
if (fs.existsSync(path.join(dirPath, "package.json"))) {
return dirPath;
}
return getProjectRootRec(path.join(dirPath, ".."));
}
var result = undefined;
function getProjectRoot() {
if (result !== undefined) {
return result;
}
return (result = getProjectRootRec(__dirname));
}
exports.getProjectRoot = getProjectRoot;
//# sourceMappingURL=getProjectRoot.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"getProjectRoot.js","sourceRoot":"","sources":["../../src/bin/tools/getProjectRoot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,yCAA6B;AAE7B,SAAS,iBAAiB,CAAC,OAAe;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,EAAE;QACnD,OAAO,OAAO,CAAC;KAClB;IACD,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,IAAI,MAAM,GAAuB,SAAS,CAAC;AAE3C,SAAgB,cAAc;IAC1B,IAAI,MAAM,KAAK,SAAS,EAAE;QACtB,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,CAAC,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;AACnD,CAAC;AAND,wCAMC"}

1
bin/tools/grant-exec-perms.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,30 @@
"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var getProjectRoot_1 = require("./getProjectRoot");
var path_1 = require("path");
var child_process_1 = __importDefault(require("child_process"));
Object.entries(require(path_1.join(getProjectRoot_1.getProjectRoot(), "package.json"))["bin"])
.forEach(function (_a) {
var _b = __read(_a, 2), scriptPath = _b[1];
return child_process_1.default.execSync("chmod +x " + scriptPath, { "cwd": getProjectRoot_1.getProjectRoot() });
});
//# sourceMappingURL=grant-exec-perms.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"grant-exec-perms.js","sourceRoot":"","sources":["../../src/bin/tools/grant-exec-perms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAClD,6BAAwC;AACxC,gEAA0C;AAE1C,MAAM,CAAC,OAAO,CAAS,OAAO,CAAC,WAAQ,CAAC,+BAAc,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;KAC7E,OAAO,CAAC,UAAC,EAAc;QAAd,KAAA,aAAc,EAAX,UAAU,QAAA;IAAM,OAAA,uBAAa,CAAC,QAAQ,CAAC,cAAY,UAAY,EAAE,EAAE,KAAK,EAAE,+BAAc,EAAE,EAAE,CAAC;AAA7E,CAA6E,CAAC,CAAC"}

15
bin/tools/transformCodebase.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
/// <reference types="node" />
declare type TransformSourceCode = (params: {
sourceCode: Buffer;
filePath: string;
}) => {
modifiedSourceCode: Buffer;
newFileName?: string;
} | undefined;
/** Apply a transformation function to every file of directory */
export declare function transformCodebase(params: {
srcDirPath: string;
destDirPath: string;
transformSourceCode?: TransformSourceCode;
}): void;
export {};

View File

@ -0,0 +1,70 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformCodebase = void 0;
var fs = __importStar(require("fs"));
var path = __importStar(require("path"));
var crawl_1 = require("./crawl");
var id_1 = require("evt/tools/typeSafety/id");
/** Apply a transformation function to every file of directory */
function transformCodebase(params) {
var e_1, _a;
var srcDirPath = params.srcDirPath, destDirPath = params.destDirPath, _b = params.transformSourceCode, transformSourceCode = _b === void 0 ? id_1.id(function (_a) {
var sourceCode = _a.sourceCode;
return ({ "modifiedSourceCode": sourceCode });
}) : _b;
try {
for (var _c = __values(crawl_1.crawl(srcDirPath)), _d = _c.next(); !_d.done; _d = _c.next()) {
var file_relative_path = _d.value;
var filePath = path.join(srcDirPath, file_relative_path);
var transformSourceCodeResult = transformSourceCode({
"sourceCode": fs.readFileSync(filePath),
"filePath": path.join(srcDirPath, file_relative_path)
});
if (transformSourceCodeResult === undefined) {
continue;
}
fs.mkdirSync(path.dirname(path.join(destDirPath, file_relative_path)), { "recursive": true });
var newFileName = transformSourceCodeResult.newFileName, modifiedSourceCode = transformSourceCodeResult.modifiedSourceCode;
fs.writeFileSync(path.join(path.dirname(path.join(destDirPath, file_relative_path)), newFileName !== null && newFileName !== void 0 ? newFileName : path.basename(file_relative_path)), modifiedSourceCode);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
}
exports.transformCodebase = transformCodebase;
//# sourceMappingURL=transformCodebase.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"transformCodebase.js","sourceRoot":"","sources":["../../src/bin/tools/transformCodebase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qCAAyB;AACzB,yCAA6B;AAC7B,iCAAgC;AAChC,8CAA6C;AAW7C,iEAAiE;AACjE,SAAgB,iBAAiB,CAC7B,MAIC;;IAIG,IAAA,UAAU,GAGV,MAAM,WAHI,EACV,WAAW,GAEX,MAAM,YAFK,EACX,KACA,MAAM,oBADmG,EAAzG,mBAAmB,mBAAG,OAAE,CAAsB,UAAC,EAAc;YAAZ,UAAU,gBAAA;QAAO,OAAA,CAAC,EAAE,oBAAoB,EAAE,UAAU,EAAE,CAAC;IAAtC,CAAsC,CAAC,KAAA,CAClG;;QAEX,KAAiC,IAAA,KAAA,SAAA,aAAK,CAAC,UAAU,CAAC,CAAA,gBAAA,4BAAE;YAA/C,IAAM,kBAAkB,WAAA;YAEzB,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;YAE3D,IAAM,yBAAyB,GAAG,mBAAmB,CAAC;gBAClD,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;gBACvC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC;aACxD,CAAC,CAAC;YAEH,IAAI,yBAAyB,KAAK,SAAS,EAAE;gBACzC,SAAS;aACZ;YAED,EAAE,CAAC,SAAS,CACR,IAAI,CAAC,OAAO,CACR,IAAI,CAAC,IAAI,CACL,WAAW,EACX,kBAAkB,CACrB,CACJ,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACxB,CAAC;YAEM,IAAA,WAAW,GAAyB,yBAAyB,YAAlD,EAAE,kBAAkB,GAAK,yBAAyB,mBAA9B,CAA+B;YAEtE,EAAE,CAAC,aAAa,CACZ,IAAI,CAAC,IAAI,CACL,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,EACxD,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CACnD,EACD,kBAAkB,CACrB,CAAC;SAEL;;;;;;;;;AAGL,CAAC;AAlDD,8CAkDC"}

6
lib/components/KcApp.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference types="react" />
import type { KcPagesProperties } from "./KcProperties";
export declare type KcAppProps = {
kcProperties?: KcPagesProperties;
};
export declare const KcApp: import("react").MemoExoticComponent<(props: KcAppProps) => JSX.Element | null>;

19
lib/components/KcApp.js Normal file
View File

@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KcApp = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var kcContext_1 = require("../kcContext");
var assert_1 = require("evt/tools/typeSafety/assert");
var Login_1 = require("./Login");
exports.KcApp = react_1.memo(function (props) {
var kcProperties = props.kcProperties;
assert_1.assert(kcContext_1.kcContext !== undefined, "App is not currently served by a Keycloak server");
switch (kcContext_1.kcContext.pageBasename) {
case "login.ftl": return jsx_runtime_1.jsx(Login_1.Login, { kcProperties: kcProperties }, void 0);
case "register.ftl":
alert("TODO: Implement " + kcContext_1.kcContext.pageBasename);
return null;
}
});
//# sourceMappingURL=KcApp.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"KcApp.js","sourceRoot":"","sources":["../../src/lib/components/KcApp.tsx"],"names":[],"mappings":";;;;AACA,+BAA6B;AAC7B,0CAAyC;AACzC,sDAAqD;AAErD,iCAAgC;AAMnB,QAAA,KAAK,GAAG,YAAI,CAAC,UAAC,KAAiB;IAEhC,IAAA,YAAY,GAAK,KAAK,aAAV,CAAW;IAE/B,eAAM,CAAC,qBAAS,KAAK,SAAS,EAAE,kDAAkD,CAAC,CAAC;IAEpF,QAAQ,qBAAS,CAAC,YAAY,EAAE;QAC5B,KAAK,WAAW,CAAC,CAAC,OAAO,kBAAC,aAAK,IAAC,YAAY,EAAE,YAAY,WAAI,CAAA;QAC9D,KAAK,cAAc;YACf,KAAK,CAAC,qBAAmB,qBAAS,CAAC,YAAc,CAAC,CAAC;YACnD,OAAO,IAAI,CAAC;KACnB;AAEL,CAAC,CAAC,CAAC"}

17
lib/components/KcProperties.d.ts vendored Normal file
View File

@ -0,0 +1,17 @@
/** Class names can be provided as an array or separated by whitespace */
export declare type KcClasses<CssClasses extends string> = {
[key in CssClasses]?: string[] | string;
};
export declare type KcTemplateCssClasses = "kcHtmlClass" | "kcLoginClass" | "kcHeaderClass" | "kcHeaderWrapperClass" | "kcFormCardClass" | "kcFormCardAccountClass" | "kcFormHeaderClass" | "kcLocaleWrapperClass" | "kcContentWrapperClass" | "kcLabelWrapperClass" | "kcContentWrapperClass" | "kcLabelWrapperClass" | "kcFormGroupClass" | "kcResetFlowIcon" | "kcResetFlowIcon" | "kcFeedbackSuccessIcon" | "kcFeedbackWarningIcon" | "kcFeedbackErrorIcon" | "kcFeedbackInfoIcon" | "kcContentWrapperClass" | "kcFormSocialAccountContentClass" | "kcFormSocialAccountClass" | "kcSignUpClass" | "kcInfoAreaWrapperClass";
export declare type KcTemplateProperties = {
stylesCommon?: string[];
styles?: string[];
scripts?: string[];
} & KcClasses<KcTemplateCssClasses>;
export declare const defaultKcTemplateProperties: KcTemplateProperties;
/** Tu use if you don't want any default */
export declare const allClearKcTemplateProperties: Record<KcTemplateCssClasses | "stylesCommon" | "styles" | "scripts", undefined>;
export declare type KcPagesProperties = KcClasses<KcTemplateCssClasses | "kcLogoLink" | "kcLogoClass" | "kcContainerClass" | "kcContentClass" | "kcFeedbackAreaClass" | "kcLocaleClass" | "kcAlertIconClasserror" | "kcFormAreaClass" | "kcFormSocialAccountListClass" | "kcFormSocialAccountDoubleListClass" | "kcFormSocialAccountListLinkClass" | "kcWebAuthnKeyIcon" | "kcFormClass" | "kcFormGroupErrorClass" | "kcLabelClass" | "kcInputClass" | "kcInputWrapperClass" | "kcFormOptionsClass" | "kcFormButtonsClass" | "kcFormSettingClass" | "kcTextareaClass" | "kcInfoAreaClass" | "kcButtonClass" | "kcButtonPrimaryClass" | "kcButtonDefaultClass" | "kcButtonLargeClass" | "kcButtonBlockClass" | "kcInputLargeClass" | "kcSrOnlyClass" | "kcSelectAuthListClass" | "kcSelectAuthListItemClass" | "kcSelectAuthListItemInfoClass" | "kcSelectAuthListItemLeftClass" | "kcSelectAuthListItemBodyClass" | "kcSelectAuthListItemDescriptionClass" | "kcSelectAuthListItemHeadingClass" | "kcSelectAuthListItemHelpTextClass" | "kcAuthenticatorDefaultClass" | "kcAuthenticatorPasswordClass" | "kcAuthenticatorOTPClass" | "kcAuthenticatorWebAuthnClass" | "kcAuthenticatorWebAuthnPasswordlessClass" | "kcSelectOTPListClass" | "kcSelectOTPListItemClass" | "kcAuthenticatorOtpCircleClass" | "kcSelectOTPItemHeadingClass" | "kcFormOptionsWrapperClass">;
export declare const defaultKcPagesProperties: KcPagesProperties;
/** Tu use if you don't want any default */
export declare const allClearKcLoginPageProperties: Record<KcTemplateCssClasses | "kcLogoLink" | "kcLogoClass" | "kcContainerClass" | "kcContentClass" | "kcFeedbackAreaClass" | "kcLocaleClass" | "kcAlertIconClasserror" | "kcFormAreaClass" | "kcFormSocialAccountListClass" | "kcFormSocialAccountDoubleListClass" | "kcFormSocialAccountListLinkClass" | "kcWebAuthnKeyIcon" | "kcFormClass" | "kcFormGroupErrorClass" | "kcLabelClass" | "kcInputClass" | "kcInputWrapperClass" | "kcFormOptionsClass" | "kcFormButtonsClass" | "kcFormSettingClass" | "kcTextareaClass" | "kcInfoAreaClass" | "kcButtonClass" | "kcButtonPrimaryClass" | "kcButtonDefaultClass" | "kcButtonLargeClass" | "kcButtonBlockClass" | "kcInputLargeClass" | "kcSrOnlyClass" | "kcSelectAuthListClass" | "kcSelectAuthListItemClass" | "kcSelectAuthListItemInfoClass" | "kcSelectAuthListItemLeftClass" | "kcSelectAuthListItemBodyClass" | "kcSelectAuthListItemDescriptionClass" | "kcSelectAuthListItemHeadingClass" | "kcSelectAuthListItemHelpTextClass" | "kcAuthenticatorDefaultClass" | "kcAuthenticatorPasswordClass" | "kcAuthenticatorOTPClass" | "kcAuthenticatorWebAuthnClass" | "kcAuthenticatorWebAuthnPasswordlessClass" | "kcSelectOTPListClass" | "kcSelectOTPListItemClass" | "kcAuthenticatorOtpCircleClass" | "kcSelectOTPItemHeadingClass" | "kcFormOptionsWrapperClass", undefined>;

View File

@ -0,0 +1,82 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.allClearKcLoginPageProperties = exports.defaultKcPagesProperties = exports.allClearKcTemplateProperties = exports.defaultKcTemplateProperties = void 0;
var allPropertiesValuesToUndefined_1 = require("../tools/allPropertiesValuesToUndefined");
exports.defaultKcTemplateProperties = {
"styles": ["css/login.css"],
"stylesCommon": __spreadArray(__spreadArray([], __read([".min.css", "-additions.min.css"]
.map(function (end) { return "node_modules/patternfly/dist/css/patternfly" + end; }))), [
"lib/zocial/zocial.css"
]),
"kcHtmlClass": "login-pf",
"kcLoginClass": "login-pf-page",
"kcContentWrapperClass": "row",
"kcHeaderClass": "login-pf-page-header",
"kcFormCardClass": "card-pf",
"kcFormCardAccountClass": "login-pf-accounts",
"kcFormSocialAccountClass": "login-pf-social-section",
"kcFormSocialAccountContentClass": "col-xs-12 col-sm-6",
"kcFormHeaderClass": "login-pf-header",
"kcFeedbackErrorIcon": "pficon pficon-error-circle-o",
"kcFeedbackWarningIcon": "pficon pficon-warning-triangle-o",
"kcFeedbackSuccessIcon": "pficon pficon-ok",
"kcFeedbackInfoIcon": "pficon pficon-info",
"kcResetFlowIcon": "pficon pficon-arrow fa-2x",
"kcFormGroupClass": "form-group",
"kcLabelWrapperClass": "col-xs-12 col-sm-12 col-md-12 col-lg-12",
"kcSignUpClass": "login-pf-sighup"
};
/** Tu use if you don't want any default */
exports.allClearKcTemplateProperties = allPropertiesValuesToUndefined_1.allPropertiesValuesToUndefined(exports.defaultKcTemplateProperties);
exports.defaultKcPagesProperties = __assign(__assign({}, exports.defaultKcTemplateProperties), { "kcLogoLink": "http://www.keycloak.org", "kcLogoClass": "login-pf-brand", "kcContainerClass": "container-fluid", "kcContentClass": "col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3", "kcFeedbackAreaClass": "col-md-12", "kcLocaleClass": "col-xs-12 col-sm-1", "kcAlertIconClasserror": "pficon pficon-error-circle-o", "kcFormAreaClass": "col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2", "kcFormSocialAccountListClass": "login-pf-social list-unstyled login-pf-social-all", "kcFormSocialAccountDoubleListClass": "login-pf-social-double-col", "kcFormSocialAccountListLinkClass": "login-pf-social-link", "kcWebAuthnKeyIcon": "pficon pficon-key", "kcFormClass": "form-horizontal", "kcFormGroupErrorClass": "has-error", "kcLabelClass": "control-label", "kcInputClass": "form-control", "kcInputWrapperClass": "col-xs-12 col-sm-12 col-md-12 col-lg-12", "kcFormOptionsClass": "col-xs-12 col-sm-12 col-md-12 col-lg-12", "kcFormButtonsClass": "col-xs-12 col-sm-12 col-md-12 col-lg-12", "kcFormSettingClass": "login-pf-settings", "kcTextareaClass": "form-control", "kcInfoAreaClass": "col-xs-12 col-sm-4 col-md-4 col-lg-5 details",
// css classes for form buttons main class used for all buttons
"kcButtonClass": "btn",
// classes defining priority of the button - primary or default (there is typically only one priority button for the form)
"kcButtonPrimaryClass": "btn-primary", "kcButtonDefaultClass": "btn-default",
// classes defining size of the button
"kcButtonLargeClass": "btn-lg", "kcButtonBlockClass": "btn-block",
// css classes for input
"kcInputLargeClass": "input-lg",
// css classes for form accessability
"kcSrOnlyClass": "sr-only",
// css classes for select-authenticator form
"kcSelectAuthListClass": "list-group list-view-pf", "kcSelectAuthListItemClass": "list-group-item list-view-pf-stacked", "kcSelectAuthListItemInfoClass": "list-view-pf-main-info", "kcSelectAuthListItemLeftClass": "list-view-pf-left", "kcSelectAuthListItemBodyClass": "list-view-pf-body", "kcSelectAuthListItemDescriptionClass": "list-view-pf-description", "kcSelectAuthListItemHeadingClass": "list-group-item-heading", "kcSelectAuthListItemHelpTextClass": "list-group-item-text",
// css classes for the authenticators
"kcAuthenticatorDefaultClass": "fa list-view-pf-icon-lg", "kcAuthenticatorPasswordClass": "fa fa-unlock list-view-pf-icon-lg", "kcAuthenticatorOTPClass": "fa fa-mobile list-view-pf-icon-lg", "kcAuthenticatorWebAuthnClass": "fa fa-key list-view-pf-icon-lg", "kcAuthenticatorWebAuthnPasswordlessClass": "fa fa-key list-view-pf-icon-lg",
//css classes for the OTP Login Form
"kcSelectOTPListClass": "card-pf card-pf-view card-pf-view-select card-pf-view-single-select", "kcSelectOTPListItemClass": "card-pf-body card-pf-top-element", "kcAuthenticatorOtpCircleClass": "fa fa-mobile card-pf-icon-circle", "kcSelectOTPItemHeadingClass": "card-pf-title text-center" });
/** Tu use if you don't want any default */
exports.allClearKcLoginPageProperties = allPropertiesValuesToUndefined_1.allPropertiesValuesToUndefined(exports.defaultKcPagesProperties);
//# sourceMappingURL=KcProperties.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"KcProperties.js","sourceRoot":"","sources":["../../src/lib/components/KcProperties.ts"],"names":[],"mappings":"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"}

6
lib/components/Login.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference types="react" />
import type { KcPagesProperties } from "./KcProperties";
export declare type LoginProps = {
kcProperties?: KcPagesProperties;
};
export declare const Login: import("react").MemoExoticComponent<(props: LoginProps) => JSX.Element>;

76
lib/components/Login.js Normal file
View File

@ -0,0 +1,76 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Login = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var Template_1 = require("./Template");
var KcProperties_1 = require("./KcProperties");
var assert_1 = require("evt/tools/typeSafety/assert");
var kcContext_1 = require("../kcContext");
var useKcTranslation_1 = require("../i18n/useKcTranslation");
var tss_react_1 = require("tss-react");
var powerhooks_1 = require("powerhooks");
exports.Login = react_1.memo(function (props) {
var _a;
var _b = props.kcProperties, kcProperties = _b === void 0 ? {} : _b;
var _c = useKcTranslation_1.useKcTranslation(), t = _c.t, tStr = _c.tStr;
Object.assign(kcProperties, KcProperties_1.defaultKcPagesProperties);
var _d = __read(react_1.useState(function () { return (assert_1.assert(kcContext_1.kcContext !== undefined, "App is currently being served by keycloak"),
kcContext_1.kcContext); }), 1), _e = _d[0], social = _e.social, realm = _e.realm, url = _e.url, usernameEditDisabled = _e.usernameEditDisabled, login = _e.login, auth = _e.auth, registrationDisabled = _e.registrationDisabled;
var _f = __read(react_1.useState(false), 2), isLoginButtonDisabled = _f[0], setIsLoginButtonDisabled = _f[1];
var onSubmit = powerhooks_1.useConstCallback(function () {
return (setIsLoginButtonDisabled(true), true);
});
return (jsx_runtime_1.jsx(Template_1.Template, { displayInfo: social.displayInfo, displayWide: realm.password && social.providers !== undefined, kcProperties: kcProperties, headerNode: t("doLogIn"), showUsernameNode: null, formNode: jsx_runtime_1.jsxs("div", __assign({ id: "kc-form", className: tss_react_1.cx(realm.password && social.providers !== undefined && kcProperties.kcContentWrapperClass) }, { children: [jsx_runtime_1.jsx("div", __assign({ id: "kc-form-wrapper", className: tss_react_1.cx(realm.password && social.providers && [kcProperties.kcFormSocialAccountContentClass, kcProperties.kcFormSocialAccountClass]) }, { children: realm.password &&
(jsx_runtime_1.jsxs("form", __assign({ id: "kc-form-login", onSubmit: onSubmit, action: url.loginAction, method: "post" }, { children: [jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormGroupClass) }, { children: [jsx_runtime_1.jsx("label", __assign({ htmlFor: "username", className: tss_react_1.cx(kcProperties.kcLabelClass) }, { children: !realm.loginWithEmailAllowed ?
t("username")
:
(!realm.registrationEmailAsUsername ?
t("usernameOrEmail") :
t("email")) }), void 0),
jsx_runtime_1.jsx("input", __assign({ tabIndex: 1, id: "username", className: tss_react_1.cx(kcProperties.kcInputClass), name: "username", value: (_a = login.username) !== null && _a !== void 0 ? _a : '', type: "text" }, (usernameEditDisabled ? { "disabled": true } : { "autofocus": true, "autocomplete": "off" })), void 0)] }), void 0),
jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormGroupClass) }, { children: [jsx_runtime_1.jsx("label", __assign({ htmlFor: "password", className: tss_react_1.cx(kcProperties.kcLabelClass) }, { children: t("password") }), void 0),
jsx_runtime_1.jsx("input", { tabIndex: 2, id: "password", className: tss_react_1.cx(kcProperties.kcInputClass), name: "password", type: "password", autoComplete: "off" }, void 0)] }), void 0),
jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormGroupClass, kcProperties.kcFormSettingClass) }, { children: [jsx_runtime_1.jsx("div", __assign({ id: "kc-form-options" }, { children: (realm.rememberMe &&
!usernameEditDisabled) &&
jsx_runtime_1.jsx("div", __assign({ className: "checkbox" }, { children: jsx_runtime_1.jsx("label", { children: jsx_runtime_1.jsxs("input", __assign({ tabIndex: 3, id: "rememberMe", name: "rememberMe", type: "checkbox" }, (login.rememberMe ? { "checked": true } : {}), { children: [" ", t("rememberMe")] }), void 0) }, void 0) }), void 0) }), void 0),
jsx_runtime_1.jsx("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormOptionsWrapperClass) }, { children: realm.resetPasswordAllowed &&
jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx("a", __assign({ tabIndex: 5, href: url.loginResetCredentialsUrl }, { children: t("doForgotPassword") }), void 0) }, void 0) }), void 0)] }), void 0),
jsx_runtime_1.jsxs("div", __assign({ id: "kc-form-buttons", className: tss_react_1.cx(kcProperties.kcFormGroupClass) }, { children: [jsx_runtime_1.jsx("input", __assign({ type: "hidden", id: "id-hidden-input", name: "credentialId" }, ((auth === null || auth === void 0 ? void 0 : auth.selectedCredential) !== undefined ? { "value": auth.selectedCredential } : {})), void 0),
jsx_runtime_1.jsx("input", { tabIndex: 4, className: tss_react_1.cx(kcProperties.kcButtonClass, kcProperties.kcButtonPrimaryClass, kcProperties.kcButtonBlockClass, kcProperties.kcButtonLargeClass), name: "login", id: "kc-login", type: "submit", value: tStr("doLogIn"), disabled: isLoginButtonDisabled }, void 0)] }), void 0)] }), void 0)) }), void 0),
(realm.password && social.providers !== undefined) &&
jsx_runtime_1.jsx("div", __assign({ id: "kc-social-providers", className: tss_react_1.cx(kcProperties.kcFormSocialAccountContentClass, kcProperties.kcFormSocialAccountClass) }, { children: jsx_runtime_1.jsx("ul", __assign({ className: tss_react_1.cx(kcProperties.kcFormSocialAccountListClass, social.providers.length > 4 && kcProperties.kcFormSocialAccountDoubleListClass) }, { children: social.providers.map(function (p) {
return jsx_runtime_1.jsx("li", __assign({ className: tss_react_1.cx(kcProperties.kcFormSocialAccountListLinkClass) }, { children: jsx_runtime_1.jsx("a", __assign({ href: p.loginUrl, id: "zocial-" + p.alias, className: tss_react_1.cx("zocial", p.providerId) }, { children: jsx_runtime_1.jsx("span", { children: p.displayName }, void 0) }), void 0) }), void 0);
}) }), void 0) }), void 0)] }), void 0), displayInfoNode: (realm.password &&
realm.resetPasswordAllowed &&
!registrationDisabled) &&
jsx_runtime_1.jsx("div", __assign({ id: "kc-registration" }, { children: jsx_runtime_1.jsxs("span", { children: [t("noAccount"), jsx_runtime_1.jsx("a", __assign({ tabIndex: 6, href: url.registrationUrl }, { children: t("doRegister") }), void 0)] }, void 0) }), void 0) }, void 0));
});
//# sourceMappingURL=Login.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"Login.js","sourceRoot":"","sources":["../../src/lib/components/Login.tsx"],"names":[],"mappings":"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"}

15
lib/components/Template.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
import type { ReactNode } from "react";
import type { KcTemplateProperties } from "./KcProperties";
export declare type TemplateProps = {
kcProperties: KcTemplateProperties;
displayInfo?: boolean;
displayMessage?: boolean;
displayRequiredFields?: boolean;
displayWide?: boolean;
showAnotherWayIfPresent?: boolean;
headerNode: ReactNode;
showUsernameNode: ReactNode;
formNode: ReactNode;
displayInfoNode: ReactNode;
};
export declare const Template: import("react").MemoExoticComponent<(props: TemplateProps) => JSX.Element | null>;

127
lib/components/Template.js Normal file
View File

@ -0,0 +1,127 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Template = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var useKcTranslation_1 = require("../i18n/useKcTranslation");
var kcContext_1 = require("../kcContext");
var assert_1 = require("evt/tools/typeSafety/assert");
var tss_react_1 = require("tss-react");
var useKcLanguageTag_1 = require("../i18n/useKcLanguageTag");
var KcLanguageTag_1 = require("../i18n/KcLanguageTag");
var powerhooks_1 = require("powerhooks");
var appendHead_1 = require("../tools/appendHead");
var path_1 = require("path");
var powerhooks_2 = require("powerhooks");
var KcProperties_1 = require("./KcProperties");
exports.Template = react_1.memo(function (props) {
var _a = props.displayInfo, displayInfo = _a === void 0 ? false : _a, _b = props.displayMessage, displayMessage = _b === void 0 ? true : _b, _c = props.displayRequiredFields, displayRequiredFields = _c === void 0 ? false : _c, _d = props.displayWide, displayWide = _d === void 0 ? false : _d, _e = props.showAnotherWayIfPresent, showAnotherWayIfPresent = _e === void 0 ? true : _e, _f = props.kcProperties, kcProperties = _f === void 0 ? {} : _f, headerNode = props.headerNode, showUsernameNode = props.showUsernameNode, formNode = props.formNode, displayInfoNode = props.displayInfoNode;
var t = useKcTranslation_1.useKcTranslation().t;
Object.assign(kcProperties, KcProperties_1.defaultKcTemplateProperties);
var _g = useKcLanguageTag_1.useKcLanguageTag(), kcLanguageTag = _g.kcLanguageTag, setKcLanguageTag = _g.setKcLanguageTag;
var onChangeLanguageClickFactory = powerhooks_1.useCallbackFactory(function (_a) {
var _b = __read(_a, 1), languageTag = _b[0];
return setKcLanguageTag(languageTag);
});
var onTryAnotherWayClick = powerhooks_2.useConstCallback(function () {
document.forms["kc-select-try-another-way-form"].submit();
return false;
});
var _h = __read(react_1.useState(function () { return (assert_1.assert(kcContext_1.kcContext !== undefined, "App is not currently being served by KeyCloak"),
kcContext_1.kcContext); }), 1), _j = _h[0], realm = _j.realm, locale = _j.locale, auth = _j.auth, url = _j.url, message = _j.message, isAppInitiatedAction = _j.isAppInitiatedAction;
var _k = __read(react_1.useReducer(function () { return true; }, false), 2), isExtraCssLoaded = _k[0], setExtraCssLoaded = _k[1];
react_1.useEffect(function () {
var _a, _b, _c;
var isUnmounted = false;
Promise.all(__spreadArray(__spreadArray([], __read(((_a = kcProperties.stylesCommon) !== null && _a !== void 0 ? _a : []).map(function (relativePath) { return path_1.join(url.resourcesCommonPath, relativePath); }))), __read(((_b = kcProperties.styles) !== null && _b !== void 0 ? _b : []).map(function (relativePath) { return path_1.join(url.resourcesPath, relativePath); }))).map(function (href) { return appendHead_1.appendHead({
"type": "css",
href: href
}); })).then(function () {
if (isUnmounted) {
return;
}
setExtraCssLoaded();
});
(_c = kcProperties.scripts) === null || _c === void 0 ? void 0 : _c.forEach(function (relativePath) { return appendHead_1.appendHead({
"type": "javascript",
"src": path_1.join(url.resourcesPath, relativePath)
}); });
document.getElementsByTagName("html")[0]
.classList
.add(tss_react_1.cx(kcProperties.kcHtmlClass));
return function () { isUnmounted = true; };
}, []);
if (!isExtraCssLoaded) {
return null;
}
return (jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcLoginClass) }, { children: [jsx_runtime_1.jsx("div", __assign({ id: "kc-header", className: tss_react_1.cx(kcProperties.kcHeaderClass) }, { children: jsx_runtime_1.jsx("div", __assign({ id: "kc-header-wrapper", className: tss_react_1.cx(kcProperties.kcHeaderWrapperClass) }, { children: t("loginTitleHtml", realm.displayNameHtml) }), void 0) }), void 0),
jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormCardClass, displayWide && kcProperties.kcFormCardAccountClass) }, { children: [jsx_runtime_1.jsxs("header", __assign({ className: tss_react_1.cx(kcProperties.kcFormHeaderClass) }, { children: [(realm.internationalizationEnabled &&
(assert_1.assert(locale !== undefined), true) &&
locale.supported.length > 1) &&
jsx_runtime_1.jsx("div", __assign({ id: "kc-locale" }, { children: jsx_runtime_1.jsx("div", __assign({ id: "kc-locale-wrapper", className: tss_react_1.cx(kcProperties.kcLocaleWrapperClass) }, { children: jsx_runtime_1.jsxs("div", __assign({ className: "kc-dropdown", id: "kc-locale-dropdown" }, { children: [jsx_runtime_1.jsx("a", __assign({ href: "#", id: "kc-current-locale-link" }, { children: KcLanguageTag_1.getKcLanguageTagLabel(kcLanguageTag) }), void 0),
jsx_runtime_1.jsx("ul", { children: locale.supported.map(function (_a) {
var languageTag = _a.languageTag;
return jsx_runtime_1.jsx("li", __assign({ className: "kc-dropdown-item" }, { children: jsx_runtime_1.jsx("a", __assign({ href: "#", onClick: onChangeLanguageClickFactory(languageTag) }, { children: KcLanguageTag_1.getKcLanguageTagLabel(languageTag) }), void 0) }), void 0);
}) }, void 0)] }), void 0) }), void 0) }), void 0),
!(auth !== undefined &&
auth.showUsername &&
!auth.showResetCredentials) ?
(displayRequiredFields ?
(jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcContentWrapperClass) }, { children: [jsx_runtime_1.jsx("div", __assign({ className: tss_react_1.cx(kcProperties.kcLabelWrapperClass, "subtitle") }, { children: jsx_runtime_1.jsxs("span", __assign({ className: "subtitle" }, { children: [jsx_runtime_1.jsx("span", __assign({ className: "required" }, { children: "*" }), void 0), t("requiredFields")] }), void 0) }), void 0),
jsx_runtime_1.jsx("div", __assign({ className: "col-md-10" }, { children: jsx_runtime_1.jsx("h1", __assign({ id: "kc-page-title" }, { children: headerNode }), void 0) }), void 0)] }), void 0))
:
(jsx_runtime_1.jsx("h1", __assign({ id: "kc-page-title" }, { children: headerNode }), void 0))) : (displayRequiredFields ? (jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcContentWrapperClass) }, { children: [jsx_runtime_1.jsx("div", __assign({ className: tss_react_1.cx(kcProperties.kcLabelWrapperClass, "subtitle") }, { children: jsx_runtime_1.jsxs("span", __assign({ className: "subtitle" }, { children: [jsx_runtime_1.jsx("span", __assign({ className: "required" }, { children: "*" }), void 0), " ", t("requiredFields")] }), void 0) }), void 0),
jsx_runtime_1.jsxs("div", __assign({ className: "col-md-10" }, { children: [showUsernameNode, jsx_runtime_1.jsx("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormGroupClass) }, { children: jsx_runtime_1.jsxs("div", __assign({ id: "kc-username" }, { children: [jsx_runtime_1.jsx("label", __assign({ id: "kc-attempted-username" }, { children: auth === null || auth === void 0 ? void 0 : auth.attemptedUsername }), void 0),
jsx_runtime_1.jsx("a", __assign({ id: "reset-login", href: url.loginRestartFlowUrl }, { children: jsx_runtime_1.jsxs("div", __assign({ className: "kc-login-tooltip" }, { children: [jsx_runtime_1.jsx("i", { className: tss_react_1.cx(kcProperties.kcResetFlowIcon) }, void 0),
jsx_runtime_1.jsx("span", __assign({ className: "kc-tooltip-text" }, { children: t("restartLoginTooltip") }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0)] }), void 0)) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [showUsernameNode, jsx_runtime_1.jsx("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormGroupClass) }, { children: jsx_runtime_1.jsxs("div", __assign({ id: "kc-username" }, { children: [jsx_runtime_1.jsx("label", __assign({ id: "kc-attempted-username" }, { children: auth === null || auth === void 0 ? void 0 : auth.attemptedUsername }), void 0),
jsx_runtime_1.jsx("a", __assign({ id: "reset-login", href: url.loginRestartFlowUrl }, { children: jsx_runtime_1.jsxs("div", __assign({ className: "kc-login-tooltip" }, { children: [jsx_runtime_1.jsx("i", { className: tss_react_1.cx(kcProperties.kcResetFlowIcon) }, void 0),
jsx_runtime_1.jsx("span", __assign({ className: "kc-tooltip-text" }, { children: t("restartLoginTooltip") }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0)] }, void 0)))] }), void 0),
jsx_runtime_1.jsx("div", __assign({ id: "kc-content" }, { children: jsx_runtime_1.jsxs("div", __assign({ id: "kc-content-wrapper" }, { children: [(displayMessage &&
message !== undefined &&
(message.type !== "warning" ||
!isAppInitiatedAction)) &&
jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx("alert", "alert-" + message.type) }, { children: [message.type === "success" && jsx_runtime_1.jsx("span", { className: tss_react_1.cx(kcProperties.kcFeedbackSuccessIcon) }, void 0),
message.type === "warning" && jsx_runtime_1.jsx("span", { className: tss_react_1.cx(kcProperties.kcFeedbackWarningIcon) }, void 0),
message.type === "error" && jsx_runtime_1.jsx("span", { className: tss_react_1.cx(kcProperties.kcFeedbackErrorIcon) }, void 0),
message.type === "info" && jsx_runtime_1.jsx("span", { className: tss_react_1.cx(kcProperties.kcFeedbackInfoIcon) }, void 0),
jsx_runtime_1.jsx("span", __assign({ className: "kc-feedback-text" }, { children: message.summary }), void 0)] }), void 0), formNode, (auth !== undefined &&
auth.showTryAnotherWayLink &&
showAnotherWayIfPresent) &&
jsx_runtime_1.jsx("form", __assign({ id: "kc-select-try-another-way-form", action: url.loginAction, method: "post", className: tss_react_1.cx(displayWide && kcProperties.kcContentWrapperClass) }, { children: jsx_runtime_1.jsx("div", __assign({ className: tss_react_1.cx(displayWide && [kcProperties.kcFormSocialAccountContentClass, kcProperties.kcFormSocialAccountClass]) }, { children: jsx_runtime_1.jsxs("div", __assign({ className: tss_react_1.cx(kcProperties.kcFormGroupClass) }, { children: [jsx_runtime_1.jsx("input", { type: "hidden", name: "tryAnotherWay", value: "on" }, void 0),
jsx_runtime_1.jsx("a", __assign({ href: "#", id: "try-another-way", onClick: onTryAnotherWayClick }, { children: t("doTryAnotherWay") }), void 0)] }), void 0) }), void 0) }), void 0),
displayInfo &&
jsx_runtime_1.jsx("div", __assign({ id: "kc-info", className: tss_react_1.cx(kcProperties.kcSignUpClass) }, { children: jsx_runtime_1.jsx("div", __assign({ id: "kc-info-wrapper", className: tss_react_1.cx(kcProperties.kcInfoAreaWrapperClass) }, { children: displayInfoNode }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0)] }), void 0));
});
//# sourceMappingURL=Template.js.map

File diff suppressed because one or more lines are too long

11
lib/i18n/KcLanguageTag.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
import { messages } from "./generated_messages/login";
export declare type KcLanguageTag = keyof typeof messages;
export declare type LanguageLabel = "Deutsch" | "Norsk" | "Русский" | "Svenska" | "Português (Brasil)" | "Lietuvių" | "English" | "Italiano" | "Français" | "中文简体" | "Español" | "Čeština" | "日本語" | "Slovenčina" | "Polish" | "Català" | "Nederlands" | "tr";
export declare function getKcLanguageTagLabel(language: KcLanguageTag): LanguageLabel;
/**
* Pass in "fr-FR" or "français" for example, it will return the AvailableLanguage
* it corresponds to: "fr".
* If there is no reasonable match it's guessed from navigator.language.
* If still no matches "en" is returned.
*/
export declare function getBestMatchAmongKcLanguageTag(languageLike: string): KcLanguageTag;

53
lib/i18n/KcLanguageTag.js Normal file
View File

@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBestMatchAmongKcLanguageTag = exports.getKcLanguageTagLabel = void 0;
var objectKeys_1 = require("evt/tools/typeSafety/objectKeys");
var login_1 = require("./generated_messages/login");
/* spell-checker: enable */
function getKcLanguageTagLabel(language) {
switch (language) {
/* spell-checker: disable */
case "es": return "Español";
case "it": return "Italiano";
case "fr": return "Français";
case "ca": return "Català";
case "en": return "English";
case "de": return "Deutsch";
case "no": return "Norsk";
case "pt-BR": return "Português (Brasil)";
case "ru": return "Русский";
case "sk":
case "sv": return "Slovenčina";
case "ja": return "日本語";
case "pl": return "Polish";
case "zh-CN": return "中文简体";
case "sv": return "Svenska";
case "lt": return "Lietuvių";
case "cs": return "Čeština";
case "nl": return "Nederlands";
case "tr": return "tr";
/* spell-checker: enable */
}
return language;
}
exports.getKcLanguageTagLabel = getKcLanguageTagLabel;
var availableLanguages = objectKeys_1.objectKeys(login_1.messages);
/**
* Pass in "fr-FR" or "français" for example, it will return the AvailableLanguage
* it corresponds to: "fr".
* If there is no reasonable match it's guessed from navigator.language.
* If still no matches "en" is returned.
*/
function getBestMatchAmongKcLanguageTag(languageLike) {
var iso2LanguageLike = languageLike.split("-")[0].toLowerCase();
var language = availableLanguages.find(function (language) {
return language.toLowerCase().includes(iso2LanguageLike) ||
getKcLanguageTagLabel(language).toLocaleLowerCase() === languageLike.toLocaleLowerCase();
});
if (language === undefined && languageLike !== navigator.language) {
return getBestMatchAmongKcLanguageTag(navigator.language);
}
return "en";
}
exports.getBestMatchAmongKcLanguageTag = getBestMatchAmongKcLanguageTag;
//# sourceMappingURL=KcLanguageTag.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"KcLanguageTag.js","sourceRoot":"","sources":["../../src/lib/i18n/KcLanguageTag.ts"],"names":[],"mappings":";;;AACA,8DAA6D;AAC7D,oDAAsD;AAStD,2BAA2B;AAE3B,SAAgB,qBAAqB,CAAC,QAAuB;IAEzD,QAAQ,QAAQ,EAAE;QACd,4BAA4B;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC;QAC7B,KAAK,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC;QAC7B,KAAK,IAAI,CAAC,CAAC,OAAO,QAAQ,CAAC;QAC3B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,OAAO,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,oBAAoB,CAAC;QAC1C,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC;QACV,KAAK,IAAI,CAAC,CAAC,OAAO,YAAY,CAAC;QAC/B,KAAK,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC;QACxB,KAAK,IAAI,CAAC,CAAC,OAAO,QAAQ,CAAC;QAC3B,KAAK,OAAO,CAAC,CAAC,OAAO,MAAM,CAAA;QAC3B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC;QAC7B,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,KAAK,IAAI,CAAC,CAAC,OAAO,YAAY,CAAC;QAC/B,KAAK,IAAI,CAAC,CAAC,OAAO,IAAI,CAAA;QACtB,2BAA2B;KAC9B;IAED,OAAO,QAAQ,CAAC;AAEpB,CAAC;AA5BD,sDA4BC;AAED,IAAM,kBAAkB,GAAG,uBAAU,CAAC,gBAAQ,CAAC,CAAC;AAEhD;;;;;EAKE;AACF,SAAgB,8BAA8B,CAC1C,YAAoB;IAGpB,IAAM,gBAAgB,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAElE,IAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,UAAA,QAAQ;QAC7C,OAAA,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACjD,qBAAqB,CAAC,QAAQ,CAAC,CAAC,iBAAiB,EAAE,KAAK,YAAY,CAAC,iBAAiB,EAAE;IADxF,CACwF,CAC3F,CAAC;IAEF,IAAI,QAAQ,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,CAAC,QAAQ,EAAE;QAC/D,OAAO,8BAA8B,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KAC7D;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAhBD,wEAgBC"}

3059
lib/i18n/generated_messages/account.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

239
lib/i18n/generated_messages/admin.d.ts vendored Normal file
View File

@ -0,0 +1,239 @@
export declare const messages: {
readonly ca: {
readonly invalidPasswordHistoryMessage: "Contrasenya incorrecta: no pot ser igual a cap de les últimes {0} contrasenyes.";
readonly invalidPasswordMinDigitsMessage: "Contraseña incorrecta: debe contener al menos {0} caracteres numéricos.";
readonly invalidPasswordMinLengthMessage: "Contrasenya incorrecta: longitud mínima {0}.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Contrasenya incorrecta: ha de contenir almenys {0} lletres minúscules.";
readonly invalidPasswordMinSpecialCharsMessage: "Contrasenya incorrecta: ha de contenir almenys {0} caràcters especials.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Contrasenya incorrecta: ha de contenir almenys {0} lletres majúscules.";
readonly invalidPasswordNotUsernameMessage: "Contrasenya incorrecta: no pot ser igual al nom d''usuari.";
readonly invalidPasswordRegexPatternMessage: "Contrasenya incorrecta: no compleix l''expressió regular.";
};
readonly de: {
readonly invalidPasswordMinLengthMessage: "Ungültiges Passwort: muss mindestens {0} Zeichen beinhalten.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Ungültiges Passwort: muss mindestens {0} Kleinbuchstaben beinhalten.";
readonly invalidPasswordMinDigitsMessage: "Ungültiges Passwort: muss mindestens {0} Ziffern beinhalten.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Ungültiges Passwort: muss mindestens {0} Großbuchstaben beinhalten.";
readonly invalidPasswordMinSpecialCharsMessage: "Ungültiges Passwort: muss mindestens {0} Sonderzeichen beinhalten.";
readonly invalidPasswordNotUsernameMessage: "Ungültiges Passwort: darf nicht identisch mit dem Benutzernamen sein.";
readonly invalidPasswordRegexPatternMessage: "Ungültiges Passwort: stimmt nicht mit Regex-Muster überein.";
readonly invalidPasswordHistoryMessage: "Ungültiges Passwort: darf nicht identisch mit einem der letzten {0} Passwörter sein.";
readonly invalidPasswordBlacklistedMessage: "Ungültiges Passwort: Passwort ist zu bekannt und auf der schwarzen Liste.";
readonly invalidPasswordGenericMessage: "Ungültiges Passwort: neues Passwort erfüllt die Passwort-Anforderungen nicht.";
};
readonly en: {
readonly invalidPasswordMinLengthMessage: "Invalid password: minimum length {0}.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Invalid password: must contain at least {0} lower case characters.";
readonly invalidPasswordMinDigitsMessage: "Invalid password: must contain at least {0} numerical digits.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Invalid password: must contain at least {0} upper case characters.";
readonly invalidPasswordMinSpecialCharsMessage: "Invalid password: must contain at least {0} special characters.";
readonly invalidPasswordNotUsernameMessage: "Invalid password: must not be equal to the username.";
readonly invalidPasswordRegexPatternMessage: "Invalid password: fails to match regex pattern(s).";
readonly invalidPasswordHistoryMessage: "Invalid password: must not be equal to any of last {0} passwords.";
readonly invalidPasswordBlacklistedMessage: "Invalid password: password is blacklisted.";
readonly invalidPasswordGenericMessage: "Invalid password: new password does not match password policies.";
readonly ldapErrorInvalidCustomFilter: "Custom configured LDAP filter does not start with \"(\" or does not end with \")\".";
readonly ldapErrorConnectionTimeoutNotNumber: "Connection Timeout must be a number";
readonly ldapErrorReadTimeoutNotNumber: "Read Timeout must be a number";
readonly ldapErrorMissingClientId: "Client ID needs to be provided in config when Realm Roles Mapping is not used.";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "Not possible to preserve group inheritance and use UID membership type together.";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "Can not set write only when LDAP provider mode is not WRITABLE";
readonly ldapErrorCantWriteOnlyAndReadOnly: "Can not set write-only and read-only together";
readonly ldapErrorCantEnableStartTlsAndConnectionPooling: "Can not enable both StartTLS and connection pooling.";
readonly ldapErrorCantEnableUnsyncedAndImportOff: "Can not disable Importing users when LDAP provider mode is UNSYNCED";
readonly ldapErrorMissingGroupsPathGroup: "Groups path group does not exist - please create the group on specified path first";
readonly clientRedirectURIsFragmentError: "Redirect URIs must not contain an URI fragment";
readonly clientRootURLFragmentError: "Root URL must not contain an URL fragment";
readonly clientRootURLIllegalSchemeError: "Root URL uses an illegal scheme";
readonly clientBaseURLIllegalSchemeError: "Base URL uses an illegal scheme";
readonly clientRedirectURIsIllegalSchemeError: "A redirect URI uses an illegal scheme";
readonly clientBaseURLInvalid: "Base URL is not a valid URL";
readonly clientRootURLInvalid: "Root URL is not a valid URL";
readonly clientRedirectURIsInvalid: "A redirect URI is not a valid URI";
readonly pairwiseMalformedClientRedirectURI: "Client contained an invalid redirect URI.";
readonly pairwiseClientRedirectURIsMissingHost: "Client redirect URIs must contain a valid host component.";
readonly pairwiseClientRedirectURIsMultipleHosts: "Without a configured Sector Identifier URI, client redirect URIs must not contain multiple host components.";
readonly pairwiseMalformedSectorIdentifierURI: "Malformed Sector Identifier URI.";
readonly pairwiseFailedToGetRedirectURIs: "Failed to get redirect URIs from the Sector Identifier URI.";
readonly pairwiseRedirectURIsMismatch: "Client redirect URIs does not match redirect URIs fetched from the Sector Identifier URI.";
};
readonly es: {
readonly invalidPasswordMinLengthMessage: "Contraseña incorrecta: longitud mínima {0}.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Contraseña incorrecta: debe contener al menos {0} letras minúsculas.";
readonly invalidPasswordMinDigitsMessage: "Contraseña incorrecta: debe contener al menos {0} caracteres numéricos.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Contraseña incorrecta: debe contener al menos {0} letras mayúsculas.";
readonly invalidPasswordMinSpecialCharsMessage: "Contraseña incorrecta: debe contener al menos {0} caracteres especiales.";
readonly invalidPasswordNotUsernameMessage: "Contraseña incorrecta: no puede ser igual al nombre de usuario.";
readonly invalidPasswordRegexPatternMessage: "Contraseña incorrecta: no cumple la expresión regular.";
readonly invalidPasswordHistoryMessage: "Contraseña incorrecta: no puede ser igual a ninguna de las últimas {0} contraseñas.";
};
readonly fr: {
readonly invalidPasswordMinLengthMessage: "Mot de passe invalide : longueur minimale requise de {0}.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Mot de passe invalide : doit contenir au moins {0} lettre(s) en minuscule.";
readonly invalidPasswordMinDigitsMessage: "Mot de passe invalide : doit contenir au moins {0} chiffre(s).";
readonly invalidPasswordMinUpperCaseCharsMessage: "Mot de passe invalide : doit contenir au moins {0} lettre(s) en majuscule.";
readonly invalidPasswordMinSpecialCharsMessage: "Mot de passe invalide : doit contenir au moins {0} caractère(s) spéciaux.";
readonly invalidPasswordNotUsernameMessage: "Mot de passe invalide : ne doit pas être identique au nom d''utilisateur.";
readonly invalidPasswordRegexPatternMessage: "Mot de passe invalide : ne valide pas l''expression rationnelle.";
readonly invalidPasswordHistoryMessage: "Mot de passe invalide : ne doit pas être égal aux {0} derniers mot de passe.";
};
readonly it: {};
readonly ja: {
readonly invalidPasswordMinLengthMessage: "無効なパスワード: 最小{0}の長さが必要です。";
readonly invalidPasswordMinLowerCaseCharsMessage: "無効なパスワード: 少なくとも{0}文字の小文字を含む必要があります。";
readonly invalidPasswordMinDigitsMessage: "無効なパスワード: 少なくとも{0}文字の数字を含む必要があります。";
readonly invalidPasswordMinUpperCaseCharsMessage: "無効なパスワード: 少なくとも{0}文字の大文字を含む必要があります。";
readonly invalidPasswordMinSpecialCharsMessage: "無効なパスワード: 少なくとも{0}文字の特殊文字を含む必要があります。";
readonly invalidPasswordNotUsernameMessage: "無効なパスワード: ユーザー名と同じパスワードは禁止されています。";
readonly invalidPasswordRegexPatternMessage: "無効なパスワード: 正規表現パターンと一致しません。";
readonly invalidPasswordHistoryMessage: "無効なパスワード: 最近の{0}パスワードのいずれかと同じパスワードは禁止されています。";
readonly invalidPasswordBlacklistedMessage: "無効なパスワード: パスワードがブラックリストに含まれています。";
readonly invalidPasswordGenericMessage: "無効なパスワード: 新しいパスワードはパスワード・ポリシーと一致しません。";
readonly ldapErrorInvalidCustomFilter: "LDAPフィルターのカスタム設定が、「(」から開始または「)」で終了となっていません。";
readonly ldapErrorConnectionTimeoutNotNumber: "接続タイムアウトは数字でなければなりません";
readonly ldapErrorReadTimeoutNotNumber: "読み取りタイムアウトは数字でなければなりません";
readonly ldapErrorMissingClientId: "レルムロール・マッピングを使用しない場合は、クライアントIDは設定内で提供される必要があります。";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "グループの継承を維持することと、UIDメンバーシップ・タイプを使用することは同時にできません。";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "LDAPプロバイダー・モードがWRITABLEではない場合は、write onlyを設定することはできません。";
readonly ldapErrorCantWriteOnlyAndReadOnly: "write-onlyとread-onlyを一緒に設定することはできません。";
readonly ldapErrorCantEnableStartTlsAndConnectionPooling: "StartTLSと接続プーリングの両方を有効にできません。";
readonly clientRedirectURIsFragmentError: "リダイレクトURIにURIフラグメントを含めることはできません。";
readonly clientRootURLFragmentError: "ルートURLにURLフラグメントを含めることはできません。";
readonly pairwiseMalformedClientRedirectURI: "クライアントに無効なリダイレクトURIが含まれていました。";
readonly pairwiseClientRedirectURIsMissingHost: "クライアントのリダイレクトURIには有効なホスト・コンポーネントが含まれている必要があります。";
readonly pairwiseClientRedirectURIsMultipleHosts: "設定されたセレクター識別子URIがない場合は、クライアントのリダイレクトURIは複数のホスト・コンポーネントを含むことはできません。";
readonly pairwiseMalformedSectorIdentifierURI: "不正なセレクター識別子URIです。";
readonly pairwiseFailedToGetRedirectURIs: "セクター識別子URIからリダイレクトURIを取得できませんでした。";
readonly pairwiseRedirectURIsMismatch: "クライアントのリダイレクトURIは、セクター識別子URIからフェッチされたリダイレクトURIと一致しません。";
};
readonly lt: {
readonly invalidPasswordMinLengthMessage: "Per trumpas slaptažodis: mažiausias ilgis {0}.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Neteisingas slaptažodis: privaloma įvesti {0} mažąją raidę.";
readonly invalidPasswordMinDigitsMessage: "Neteisingas slaptažodis: privaloma įvesti {0} skaitmenį.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Neteisingas slaptažodis: privaloma įvesti {0} didžiąją raidę.";
readonly invalidPasswordMinSpecialCharsMessage: "Neteisingas slaptažodis: privaloma įvesti {0} specialų simbolį.";
readonly invalidPasswordNotUsernameMessage: "Neteisingas slaptažodis: slaptažodis negali sutapti su naudotojo vardu.";
readonly invalidPasswordRegexPatternMessage: "Neteisingas slaptažodis: slaptažodis netenkina regex taisyklės(ių).";
readonly invalidPasswordHistoryMessage: "Neteisingas slaptažodis: slaptažodis negali sutapti su prieš tai buvusiais {0} slaptažodžiais.";
readonly ldapErrorInvalidCustomFilter: "Sukonfigūruotas LDAP filtras neprasideda \"(\" ir nesibaigia \")\" simboliais.";
readonly ldapErrorMissingClientId: "Privaloma nurodyti kliento ID kai srities rolių susiejimas nėra nenaudojamas.";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "Grupių paveldėjimo ir UID narystės tipas kartu negali būti naudojami.";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "Negalima nustatyti rašymo rėžimo kuomet LDAP teikėjo rėžimas ne WRITABLE";
readonly ldapErrorCantWriteOnlyAndReadOnly: "Negalima nustatyti tik rašyti ir tik skaityti kartu";
readonly clientRedirectURIsFragmentError: "Nurodykite URI fragmentą, kurio negali būti peradresuojamuose URI adresuose";
readonly clientRootURLFragmentError: "Nurodykite URL fragmentą, kurio negali būti šakniniame URL adrese";
readonly pairwiseMalformedClientRedirectURI: "Klientas pateikė neteisingą nukreipimo nuorodą.";
readonly pairwiseClientRedirectURIsMissingHost: "Kliento nukreipimo nuorodos privalo būti nurodytos su serverio vardo komponentu.";
readonly pairwiseClientRedirectURIsMultipleHosts: "Kuomet nesukonfigūruotas sektoriaus identifikatoriaus URL, kliento nukreipimo nuorodos privalo talpinti ne daugiau kaip vieną skirtingą serverio vardo komponentą.";
readonly pairwiseMalformedSectorIdentifierURI: "Neteisinga sektoriaus identifikatoriaus URI.";
readonly pairwiseFailedToGetRedirectURIs: "Nepavyko gauti nukreipimo nuorodų iš sektoriaus identifikatoriaus URI.";
readonly pairwiseRedirectURIsMismatch: "Kliento nukreipimo nuoroda neatitinka nukreipimo nuorodų iš sektoriaus identifikatoriaus URI.";
};
readonly nl: {
readonly invalidPasswordMinLengthMessage: "Ongeldig wachtwoord: de minimale lengte is {0} karakters.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Ongeldig wachtwoord: het moet minstens {0} kleine letters bevatten.";
readonly invalidPasswordMinDigitsMessage: "Ongeldig wachtwoord: het moet minstens {0} getallen bevatten.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Ongeldig wachtwoord: het moet minstens {0} hoofdletters bevatten.";
readonly invalidPasswordMinSpecialCharsMessage: "Ongeldig wachtwoord: het moet minstens {0} speciale karakters bevatten.";
readonly invalidPasswordNotUsernameMessage: "Ongeldig wachtwoord: het mag niet overeenkomen met de gebruikersnaam.";
readonly invalidPasswordRegexPatternMessage: "Ongeldig wachtwoord: het voldoet niet aan het door de beheerder ingestelde patroon.";
readonly invalidPasswordHistoryMessage: "Ongeldig wachtwoord: het mag niet overeen komen met een van de laatste {0} wachtwoorden.";
readonly invalidPasswordGenericMessage: "Ongeldig wachtwoord: het nieuwe wachtwoord voldoet niet aan het wachtwoordbeleid.";
readonly ldapErrorInvalidCustomFilter: "LDAP filter met aangepaste configuratie start niet met \"(\" of eindigt niet met \")\".";
readonly ldapErrorConnectionTimeoutNotNumber: "Verbindingstimeout moet een getal zijn";
readonly ldapErrorReadTimeoutNotNumber: "Lees-timeout moet een getal zijn";
readonly ldapErrorMissingClientId: "Client ID moet ingesteld zijn als Realm Roles Mapping niet gebruikt wordt.";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "Kan groepsovererving niet behouden bij UID-lidmaatschapstype.";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "Alleen-schrijven niet mogelijk als LDAP provider mode niet WRITABLE is";
readonly ldapErrorCantWriteOnlyAndReadOnly: "Alleen-schrijven en alleen-lezen mogen niet tegelijk ingesteld zijn";
readonly clientRedirectURIsFragmentError: "Redirect URIs mogen geen URI fragment bevatten";
readonly clientRootURLFragmentError: "Root URL mag geen URL fragment bevatten";
readonly pairwiseMalformedClientRedirectURI: "Client heeft een ongeldige redirect URI.";
readonly pairwiseClientRedirectURIsMissingHost: "Client redirect URIs moeten een geldige host-component bevatten.";
readonly pairwiseClientRedirectURIsMultipleHosts: "Zonder een geconfigureerde Sector Identifier URI mogen client redirect URIs niet meerdere host componenten hebben.";
readonly pairwiseMalformedSectorIdentifierURI: "Onjuist notatie in Sector Identifier URI.";
readonly pairwiseFailedToGetRedirectURIs: "Kon geen redirect URIs verkrijgen van de Sector Identifier URI.";
readonly pairwiseRedirectURIsMismatch: "Client redirect URIs komen niet overeen met redict URIs ontvangen van de Sector Identifier URI.";
};
readonly no: {
readonly invalidPasswordMinLengthMessage: "Ugyldig passord: minimum lengde {0}.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Ugyldig passord: må inneholde minst {0} små bokstaver.";
readonly invalidPasswordMinDigitsMessage: "Ugyldig passord: må inneholde minst {0} sifre.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Ugyldig passord: må inneholde minst {0} store bokstaver.";
readonly invalidPasswordMinSpecialCharsMessage: "Ugyldig passord: må inneholde minst {0} spesialtegn.";
readonly invalidPasswordNotUsernameMessage: "Ugyldig passord: kan ikke være likt brukernavn.";
readonly invalidPasswordRegexPatternMessage: "Ugyldig passord: tilfredsstiller ikke kravene for passord-mønster.";
readonly invalidPasswordHistoryMessage: "Ugyldig passord: kan ikke være likt noen av de {0} foregående passordene.";
readonly ldapErrorInvalidCustomFilter: "Tilpasset konfigurasjon av LDAP-filter starter ikke med \"(\" eller slutter ikke med \")\".";
readonly ldapErrorMissingClientId: "KlientID må være tilgjengelig i config når sikkerhetsdomenerollemapping ikke brukes.";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "Ikke mulig å bevare gruppearv og samtidig bruke UID medlemskapstype.";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "Kan ikke sette write-only når LDAP leverandør-modus ikke er WRITABLE";
readonly ldapErrorCantWriteOnlyAndReadOnly: "Kan ikke sette både write-only og read-only";
};
readonly pl: {};
readonly "pt-BR": {
readonly invalidPasswordMinLengthMessage: "Senha inválida: deve conter ao menos {0} caracteres.";
readonly invalidPasswordMinLowerCaseCharsMessage: "Senha inválida: deve conter ao menos {0} caracteres minúsculos.";
readonly invalidPasswordMinDigitsMessage: "Senha inválida: deve conter ao menos {0} digitos numéricos.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Senha inválida: deve conter ao menos {0} caracteres maiúsculos.";
readonly invalidPasswordMinSpecialCharsMessage: "Senha inválida: deve conter ao menos {0} caracteres especiais.";
readonly invalidPasswordNotUsernameMessage: "Senha inválida: não deve ser igual ao nome de usuário.";
readonly invalidPasswordRegexPatternMessage: "Senha inválida: falha ao passar por padrões.";
readonly invalidPasswordHistoryMessage: "Senha inválida: não deve ser igual às últimas {0} senhas.";
readonly ldapErrorInvalidCustomFilter: "Filtro LDAP não inicia com \"(\" ou não termina com \")\".";
readonly ldapErrorMissingClientId: "ID do cliente precisa ser definido na configuração quando mapeamentos de Roles do Realm não é utilizado.";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "Não é possível preservar herança de grupos e usar tipo de associação de UID ao mesmo tempo.";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "Não é possível definir modo de somente escrita quando o provedor LDAP não suporta escrita";
readonly ldapErrorCantWriteOnlyAndReadOnly: "Não é possível definir somente escrita e somente leitura ao mesmo tempo";
readonly clientRedirectURIsFragmentError: "URIs de redirecionamento não podem conter fragmentos";
readonly clientRootURLFragmentError: "URL raiz não pode conter fragmentos";
};
readonly ru: {
readonly invalidPasswordMinLengthMessage: "Некорректный пароль: длина пароля должна быть не менее {0} символов(а).";
readonly invalidPasswordMinDigitsMessage: "Некорректный пароль: должен содержать не менее {0} цифр(ы).";
readonly invalidPasswordMinLowerCaseCharsMessage: "Некорректный пароль: пароль должен содержать не менее {0} символов(а) в нижнем регистре.";
readonly invalidPasswordMinUpperCaseCharsMessage: "Некорректный пароль: пароль должен содержать не менее {0} символов(а) в верхнем регистре.";
readonly invalidPasswordMinSpecialCharsMessage: "Некорректный пароль: пароль должен содержать не менее {0} спецсимволов(а).";
readonly invalidPasswordNotUsernameMessage: "Некорректный пароль: пароль не должен совпадать с именем пользователя.";
readonly invalidPasswordRegexPatternMessage: "Некорректный пароль: пароль не прошел проверку по регулярному выражению.";
readonly invalidPasswordHistoryMessage: "Некорректный пароль: пароль не должен совпадать с последним(и) {0} паролем(ями).";
readonly invalidPasswordGenericMessage: "Некорректный пароль: новый пароль не соответствует правилам пароля.";
readonly ldapErrorInvalidCustomFilter: "Сконфигурированный пользователем фильтр LDAP не должен начинаться с \"(\" или заканчиваться на \")\".";
readonly ldapErrorMissingClientId: "Client ID должен быть настроен в конфигурации, если не используется сопоставление ролей в realm.";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "Не удалось унаследовать группу и использовать членство UID типа вместе.";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "Невозможно установить режим \"только на запись\", когда LDAP провайдер не в режиме WRITABLE";
readonly ldapErrorCantWriteOnlyAndReadOnly: "Невозможно одновременно установить режимы \"только на чтение\" и \"только на запись\"";
readonly clientRedirectURIsFragmentError: "URI перенаправления не должен содержать фрагмент URI";
readonly clientRootURLFragmentError: "Корневой URL не должен содержать фрагмент URL ";
readonly pairwiseMalformedClientRedirectURI: "Клиент содержит некорректный URI перенаправления.";
readonly pairwiseClientRedirectURIsMissingHost: "URI перенаправления клиента должен содержать корректный компонент хоста.";
readonly pairwiseClientRedirectURIsMultipleHosts: "Без конфигурации по части идентификатора URI, URI перенаправления клиента не может содержать несколько компонентов хоста.";
readonly pairwiseMalformedSectorIdentifierURI: "Искаженная часть идентификатора URI.";
readonly pairwiseFailedToGetRedirectURIs: "Не удалось получить идентификаторы URI перенаправления из части идентификатора URI.";
readonly pairwiseRedirectURIsMismatch: "Клиент URI переадресации не соответствует URI переадресации, полученной из части идентификатора URI.";
};
readonly "zh-CN": {
readonly invalidPasswordMinLengthMessage: "无效的密码:最短长度 {0}.";
readonly invalidPasswordMinLowerCaseCharsMessage: "无效的密码:至少包含 {0} 小写字母";
readonly invalidPasswordMinDigitsMessage: "无效的密码:至少包含 {0} 个数字";
readonly invalidPasswordMinUpperCaseCharsMessage: "无效的密码:最短长度 {0} 大写字母";
readonly invalidPasswordMinSpecialCharsMessage: "无效的密码:最短长度 {0} 特殊字符";
readonly invalidPasswordNotUsernameMessage: "无效的密码: 不可以与用户名相同";
readonly invalidPasswordRegexPatternMessage: "无效的密码: 无法与正则表达式匹配";
readonly invalidPasswordHistoryMessage: "无效的密码:不能与最后使用的 {0} 个密码相同";
readonly ldapErrorInvalidCustomFilter: "定制的 LDAP过滤器不是以 \"(\" 开头或以 \")\"结尾.";
readonly ldapErrorConnectionTimeoutNotNumber: "Connection Timeout 必须是个数字";
readonly ldapErrorMissingClientId: "当域角色映射未启用时,客户端 ID 需要指定。";
readonly ldapErrorCantPreserveGroupInheritanceWithUIDMembershipType: "无法在使用UID成员类型的同时维护组继承属性。";
readonly ldapErrorCantWriteOnlyForReadOnlyLdap: "当LDAP提供方不是可写模式时无法设置只写";
readonly ldapErrorCantWriteOnlyAndReadOnly: "无法同时设置只读和只写";
readonly clientRedirectURIsFragmentError: "重定向URL不应包含URI片段";
readonly clientRootURLFragmentError: "根URL 不应包含 URL 片段";
readonly pairwiseMalformedClientRedirectURI: "客户端包含一个无效的重定向URL";
readonly pairwiseClientRedirectURIsMissingHost: "客户端重定向URL需要有一个有效的主机";
readonly pairwiseClientRedirectURIsMultipleHosts: "Without a configured Sector Identifier URI, client redirect URIs must not contain multiple host components.";
readonly pairwiseMalformedSectorIdentifierURI: "Malformed Sector Identifier URI.";
readonly pairwiseFailedToGetRedirectURIs: "无法从服务器获得重定向URL";
readonly pairwiseRedirectURIsMismatch: "客户端的重定向URI与服务器端获取的URI配置不匹配。";
};
};

Some files were not shown because too many files have changed in this diff Show More