diff --git a/README.md b/README.md index 8122560..aa9fb9c 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,18 @@ npm run build-keycloak-theme Note that by default Keycloakify generates multiple .jar files for different versions of Keycloak. You can customize this behavior, see documentation [here](https://docs.keycloakify.dev/v/v10/targetting-specific-keycloak-versions). +# Initializing the account theme + +```bash +npx keycloakify initialize-account-theme +``` + +# Initializing the email theme + +```bash +npx keycloakify initialize-email-theme +``` + # GitHub Actions The starter comes with a generic GitHub Actions workflow that builds the theme and publishes diff --git a/package.json b/package.json index 510126c..b267ce1 100755 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "license": "MIT", "keywords": [], "dependencies": { - "keycloakify": "10.0.0-rc.117", + "keycloakify": "10.0.0-rc.119", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/src/account/KcContext.ts b/src/account/KcContext.ts deleted file mode 100644 index a043f25..0000000 --- a/src/account/KcContext.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -import type { ExtendKcContext } from "keycloakify/account"; -import type { KcEnvName, ThemeName } from "../kc.gen"; - -export type KcContextExtension = { - themeName: ThemeName; - properties: Record & {}; -}; - -export type KcContextExtensionPerPage = {}; - -export type KcContext = ExtendKcContext; diff --git a/src/account/KcPage.tsx b/src/account/KcPage.tsx deleted file mode 100644 index f743327..0000000 --- a/src/account/KcPage.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Suspense } from "react"; -import type { ClassKey } from "keycloakify/account"; -import type { KcContext } from "./KcContext"; -import { useI18n } from "./i18n"; -import DefaultPage from "keycloakify/account/DefaultPage"; -import Template from "keycloakify/account/Template"; - -export default function KcPage(props: { kcContext: KcContext }) { - const { kcContext } = props; - - const { i18n } = useI18n({ kcContext }); - - return ( - - {(() => { - switch (kcContext.pageId) { - default: - return ( - - ); - } - })()} - - ); -} - -const classes = {} satisfies { [key in ClassKey]?: string }; diff --git a/src/account/KcPageStory.tsx b/src/account/KcPageStory.tsx deleted file mode 100644 index f9656b2..0000000 --- a/src/account/KcPageStory.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import type { DeepPartial } from "keycloakify/tools/DeepPartial"; -import type { KcContext } from "./KcContext"; -import { createGetKcContextMock } from "keycloakify/account/KcContext"; -import type { KcContextExtension, KcContextExtensionPerPage } from "./KcContext"; -import KcPage from "./KcPage"; -import { themeNames, kcEnvDefaults } from "../kc.gen"; - -const kcContextExtension: KcContextExtension = { - themeName: themeNames[0], - properties: { - ...kcEnvDefaults - } -}; -const kcContextExtensionPerPage: KcContextExtensionPerPage = {}; - -export const { getKcContextMock } = createGetKcContextMock({ - kcContextExtension, - kcContextExtensionPerPage, - overrides: {}, - overridesPerPage: {} -}); - -export function createKcPageStory(params: { - pageId: PageId; -}) { - const { pageId } = params; - - function KcPageStory(props: { - kcContext?: DeepPartial>; - }) { - const { kcContext: overrides } = props; - - const kcContextMock = getKcContextMock({ - pageId, - overrides - }); - - return ; - } - - return { KcPageStory }; -} diff --git a/src/account/i18n.ts b/src/account/i18n.ts deleted file mode 100644 index c4ad70c..0000000 --- a/src/account/i18n.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createUseI18n } from "keycloakify/account"; - -export const { useI18n, ofTypeI18n } = createUseI18n({}); - -export type I18n = typeof ofTypeI18n; diff --git a/vite.config.ts b/vite.config.ts index 5b465e7..cb8365c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,5 +4,7 @@ import { keycloakify } from "keycloakify/vite-plugin"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react(), keycloakify({})] + plugins: [react(), keycloakify({ + accountThemeImplementation: "none" + })] }); diff --git a/yarn.lock b/yarn.lock index 838657c..614cabe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4015,10 +4015,10 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -keycloakify@10.0.0-rc.117: - version "10.0.0-rc.117" - resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-10.0.0-rc.117.tgz#f72454dedcd5a4a5f49c50af3d9284fceadcd345" - integrity sha512-YopVW4sLLIz/9Iia/Hfvt1ZI4DpPPg724IN2LP9pKGU1UDsjU/zFyF9J6Aqv/gXUua+Kz2oNcD0bNiig1DmalA== +keycloakify@10.0.0-rc.119: + version "10.0.0-rc.119" + resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-10.0.0-rc.119.tgz#511a2ae2c2e8ae9116de27e2ff51424beea8807c" + integrity sha512-PCTgJEg+hMcFdR0tfxG1eXGbCeLRNRVmzGqb3O8Wg/NGgcP5Snt8WLzIDhIaKiLpXJq8NuKam2VZxOWT+UEbfA== dependencies: tsafe "^1.6.6"