keycloakify 10.0.0-rc.41 → 10.0.0-rc.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/453.index.js +4 -4
- package/bin/shared/buildContext.d.ts +49 -0
- package/package.json +2 -1
- package/src/bin/eject-page.ts +4 -4
- package/stories/account/pages/Account.stories.tsx +5 -5
- package/stories/account/pages/FederatedIdentity.stories.tsx +6 -6
- package/stories/account/pages/Log.stories.tsx +5 -5
- package/stories/account/pages/Password.stories.tsx +6 -6
- package/stories/account/pages/Sessions.stories.tsx +6 -6
- package/stories/account/pages/Totp.stories.tsx +8 -8
- package/stories/login/pages/Code.stories.tsx +5 -5
- package/stories/login/pages/DeleteAccountConfirm.stories.tsx +5 -5
- package/stories/login/pages/DeleteCredential.stories.tsx +5 -5
- package/stories/login/pages/Error.stories.tsx +6 -6
- package/stories/login/pages/FrontchannelLogout.stories.tsx +5 -5
- package/stories/login/pages/IdpReviewUserProfile.stories.tsx +5 -5
- package/stories/login/pages/Info.stories.tsx +7 -7
- package/stories/login/pages/Login.stories.tsx +13 -13
- package/stories/login/pages/LoginConfigTotp.stories.tsx +7 -7
- package/stories/login/pages/LoginDeviceVerifyUserCode.stories.tsx +5 -5
- package/stories/login/pages/LoginIdpLinkConfirm.stories.tsx +5 -5
- package/stories/login/pages/LoginIdpLinkEmail.stories.tsx +5 -5
- package/stories/login/pages/LoginOauth2DeviceVerifyUserCode.stories.tsx +5 -5
- package/stories/login/pages/LoginOauthGrant.stories.tsx +5 -5
- package/stories/login/pages/LoginOtp.stories.tsx +5 -5
- package/stories/login/pages/LoginPageExpired.stories.tsx +5 -5
- package/stories/login/pages/LoginPassword.stories.tsx +5 -5
- package/stories/login/pages/LoginRecoveryAuthnCodeConfig.stories.tsx +5 -5
- package/stories/login/pages/LoginRecoveryAuthnCodeInput.stories.tsx +5 -5
- package/stories/login/pages/LoginResetOtp.stories.tsx +5 -5
- package/stories/login/pages/LoginResetPassword.stories.tsx +6 -6
- package/stories/login/pages/LoginUpdatePassword.stories.tsx +5 -5
- package/stories/login/pages/LoginUpdateProfile.stories.tsx +5 -5
- package/stories/login/pages/LoginUsername.stories.tsx +6 -6
- package/stories/login/pages/LoginVerifyEmail.stories.tsx +5 -5
- package/stories/login/pages/LoginX509Info.stories.tsx +5 -5
- package/stories/login/pages/LogoutConfirm.stories.tsx +5 -5
- package/stories/login/pages/Register.stories.tsx +11 -11
- package/stories/login/pages/SamlPostForm.stories.tsx +5 -5
- package/stories/login/pages/SelectAuthenticator.stories.tsx +6 -6
- package/stories/login/pages/Terms.stories.tsx +7 -7
- package/stories/login/pages/UpdateEmail.stories.tsx +5 -5
- package/stories/login/pages/WebauthnAuthenticate.stories.tsx +5 -5
- package/stories/login/pages/WebauthnError.stories.tsx +5 -5
- package/stories/login/pages/WebauthnRegister.stories.tsx +5 -5
package/bin/453.index.js
CHANGED
@@ -109,7 +109,7 @@ async function command(params) {
|
|
109
109
|
pageIdOrComponent !== userProfileFormFieldsValue) {
|
110
110
|
break edit_KcApp;
|
111
111
|
}
|
112
|
-
const kcAppTsxPath = (0,path__WEBPACK_IMPORTED_MODULE_5__.join)(themeSrcDirPath, themeType, "
|
112
|
+
const kcAppTsxPath = (0,path__WEBPACK_IMPORTED_MODULE_5__.join)(themeSrcDirPath, themeType, "KcPage.tsx");
|
113
113
|
const kcAppTsxCode = fs__WEBPACK_IMPORTED_MODULE_4__.readFileSync(kcAppTsxPath).toString("utf8");
|
114
114
|
const modifiedKcAppTsxCode = (() => {
|
115
115
|
switch (pageIdOrComponent) {
|
@@ -121,7 +121,7 @@ async function command(params) {
|
|
121
121
|
(0,tsafe_assert__WEBPACK_IMPORTED_MODULE_7__.assert)(false);
|
122
122
|
})();
|
123
123
|
if (kcAppTsxCode === modifiedKcAppTsxCode) {
|
124
|
-
console.log(chalk__WEBPACK_IMPORTED_MODULE_10___default().red("Unable to automatically update
|
124
|
+
console.log(chalk__WEBPACK_IMPORTED_MODULE_10___default().red("Unable to automatically update KcPage.tsx, please update it manually"));
|
125
125
|
return;
|
126
126
|
}
|
127
127
|
fs__WEBPACK_IMPORTED_MODULE_4__.writeFileSync(kcAppTsxPath, Buffer.from(modifiedKcAppTsxCode, "utf8"));
|
@@ -133,14 +133,14 @@ async function command(params) {
|
|
133
133
|
``,
|
134
134
|
`You now need to update your page router:`,
|
135
135
|
``,
|
136
|
-
`${chalk__WEBPACK_IMPORTED_MODULE_10___default().bold((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(".", (0,path__WEBPACK_IMPORTED_MODULE_5__.relative)(process.cwd(), themeSrcDirPath), themeType, "
|
136
|
+
`${chalk__WEBPACK_IMPORTED_MODULE_10___default().bold((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(".", (0,path__WEBPACK_IMPORTED_MODULE_5__.relative)(process.cwd(), themeSrcDirPath), themeType, "KcPage.tsx"))}:`,
|
137
137
|
chalk__WEBPACK_IMPORTED_MODULE_10___default().grey("```"),
|
138
138
|
`// ...`,
|
139
139
|
``,
|
140
140
|
chalk__WEBPACK_IMPORTED_MODULE_10___default().green(`+const ${componentBasename.replace(/.tsx$/, "")} = lazy(() => import("./pages/${componentBasename}"));`),
|
141
141
|
...[
|
142
142
|
``,
|
143
|
-
` export default function
|
143
|
+
` export default function KcPage(props: { kcContext: KcContext; }) {`,
|
144
144
|
``,
|
145
145
|
` // ...`,
|
146
146
|
``,
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import type { CliCommandOptions } from "../main";
|
2
|
+
export type BuildContext = {
|
3
|
+
bundler: "vite" | "webpack";
|
4
|
+
themeVersion: string;
|
5
|
+
themeNames: string[];
|
6
|
+
extraThemeProperties: string[] | undefined;
|
7
|
+
groupId: string;
|
8
|
+
artifactId: string;
|
9
|
+
loginThemeResourcesFromKeycloakVersion: string;
|
10
|
+
projectDirPath: string;
|
11
|
+
projectBuildDirPath: string;
|
12
|
+
/** Directory that keycloakify outputs to. Defaults to {cwd}/build_keycloak */
|
13
|
+
keycloakifyBuildDirPath: string;
|
14
|
+
publicDirPath: string;
|
15
|
+
cacheDirPath: string;
|
16
|
+
/** If your app is hosted under a subpath, it's the case in CRA if you have "homepage": "https://example.com/my-app" in your package.json
|
17
|
+
* In this case the urlPathname will be "/my-app/" */
|
18
|
+
urlPathname: string | undefined;
|
19
|
+
assetsDirPath: string;
|
20
|
+
npmWorkspaceRootDirPath: string;
|
21
|
+
kcContextExclusionsFtlCode: string | undefined;
|
22
|
+
environmentVariables: {
|
23
|
+
name: string;
|
24
|
+
default: string;
|
25
|
+
}[];
|
26
|
+
};
|
27
|
+
export type BuildOptions = {
|
28
|
+
themeName?: string | string[];
|
29
|
+
environmentVariables?: {
|
30
|
+
name: string;
|
31
|
+
default: string;
|
32
|
+
}[];
|
33
|
+
extraThemeProperties?: string[];
|
34
|
+
artifactId?: string;
|
35
|
+
groupId?: string;
|
36
|
+
loginThemeResourcesFromKeycloakVersion?: string;
|
37
|
+
keycloakifyBuildDirPath?: string;
|
38
|
+
kcContextExclusionsFtl?: string;
|
39
|
+
};
|
40
|
+
export type ResolvedViteConfig = {
|
41
|
+
buildDir: string;
|
42
|
+
publicDir: string;
|
43
|
+
assetsDir: string;
|
44
|
+
urlPathname: string | undefined;
|
45
|
+
buildOptions: BuildOptions;
|
46
|
+
};
|
47
|
+
export declare function getBuildContext(params: {
|
48
|
+
cliCommandOptions: CliCommandOptions;
|
49
|
+
}): BuildContext;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "keycloakify",
|
3
|
-
"version": "10.0.0-rc.
|
3
|
+
"version": "10.0.0-rc.43",
|
4
4
|
"description": "Create Keycloak themes using React",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -788,6 +788,7 @@
|
|
788
788
|
"bin/shared/constants.js",
|
789
789
|
"bin/shared/constants.d.ts",
|
790
790
|
"bin/shared/constants.js.map",
|
791
|
+
"bin/shared/buildContext.d.ts",
|
791
792
|
"vite-plugin/index.d.ts",
|
792
793
|
"vite-plugin/vite-plugin.d.ts",
|
793
794
|
"vite-plugin/index.js"
|
package/src/bin/eject-page.ts
CHANGED
@@ -149,7 +149,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
149
149
|
break edit_KcApp;
|
150
150
|
}
|
151
151
|
|
152
|
-
const kcAppTsxPath = pathJoin(themeSrcDirPath, themeType, "
|
152
|
+
const kcAppTsxPath = pathJoin(themeSrcDirPath, themeType, "KcPage.tsx");
|
153
153
|
|
154
154
|
const kcAppTsxCode = fs.readFileSync(kcAppTsxPath).toString("utf8");
|
155
155
|
|
@@ -172,7 +172,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
172
172
|
if (kcAppTsxCode === modifiedKcAppTsxCode) {
|
173
173
|
console.log(
|
174
174
|
chalk.red(
|
175
|
-
"Unable to automatically update
|
175
|
+
"Unable to automatically update KcPage.tsx, please update it manually"
|
176
176
|
)
|
177
177
|
);
|
178
178
|
return;
|
@@ -201,7 +201,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
201
201
|
".",
|
202
202
|
pathRelative(process.cwd(), themeSrcDirPath),
|
203
203
|
themeType,
|
204
|
-
"
|
204
|
+
"KcPage.tsx"
|
205
205
|
)
|
206
206
|
)}:`,
|
207
207
|
chalk.grey("```"),
|
@@ -215,7 +215,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|
215
215
|
),
|
216
216
|
...[
|
217
217
|
``,
|
218
|
-
` export default function
|
218
|
+
` export default function KcPage(props: { kcContext: KcContext; }) {`,
|
219
219
|
``,
|
220
220
|
` // ...`,
|
221
221
|
``,
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "account.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "account/account.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "federatedIdentity.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "account/federatedIdentity.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
19
19
|
|
20
20
|
export const NotConnected: Story = {
|
21
21
|
render: () => (
|
22
|
-
<
|
22
|
+
<KcPageStory
|
23
23
|
kcContext={{
|
24
24
|
pageId: "federatedIdentity.ftl",
|
25
25
|
federatedIdentity: {
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({
|
6
6
|
pageId: "log.ftl"
|
7
7
|
});
|
8
8
|
|
9
9
|
const meta = {
|
10
10
|
title: "account/log.ftl",
|
11
|
-
component:
|
12
|
-
} satisfies Meta<typeof
|
11
|
+
component: KcPageStory
|
12
|
+
} satisfies Meta<typeof KcPageStory>;
|
13
13
|
|
14
14
|
export default meta;
|
15
15
|
|
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>;
|
|
17
17
|
|
18
18
|
export const Default: Story = {
|
19
19
|
render: () => (
|
20
|
-
<
|
20
|
+
<KcPageStory
|
21
21
|
kcContext={{
|
22
22
|
log: {
|
23
23
|
events: [
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "password.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "account/password.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
19
19
|
|
20
20
|
export const WithMessage: Story = {
|
21
21
|
render: () => (
|
22
|
-
<
|
22
|
+
<KcPageStory
|
23
23
|
kcContext={{
|
24
24
|
message: { type: "success", summary: "This is a test message" }
|
25
25
|
}}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "sessions.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "account/sessions.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
@@ -15,7 +15,7 @@ type Story = StoryObj<typeof meta>;
|
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
17
|
render: () => (
|
18
|
-
<
|
18
|
+
<KcPageStory
|
19
19
|
kcContext={{
|
20
20
|
sessions: {
|
21
21
|
sessions: [
|
@@ -45,7 +45,7 @@ export const Default: Story = {
|
|
45
45
|
|
46
46
|
export const WithError: Story = {
|
47
47
|
render: () => (
|
48
|
-
<
|
48
|
+
<KcPageStory
|
49
49
|
kcContext={{
|
50
50
|
url: { passwordUrl: "/auth/realms/keycloakify/account/password" },
|
51
51
|
stateChecker: "xQ7EOgFrLi4EvnJ8dbXKhwFGWk_bkOp0X89mhilt1os",
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "totp.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "account/totp.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
@@ -15,7 +15,7 @@ type Story = StoryObj<typeof meta>;
|
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
17
|
render: () => (
|
18
|
-
<
|
18
|
+
<KcPageStory
|
19
19
|
kcContext={{
|
20
20
|
totp: {
|
21
21
|
enabled: false,
|
@@ -51,7 +51,7 @@ export const Default: Story = {
|
|
51
51
|
|
52
52
|
export const WithTotpEnabled: Story = {
|
53
53
|
render: () => (
|
54
|
-
<
|
54
|
+
<KcPageStory
|
55
55
|
kcContext={{
|
56
56
|
totp: {
|
57
57
|
enabled: true,
|
@@ -98,7 +98,7 @@ export const WithTotpEnabled: Story = {
|
|
98
98
|
|
99
99
|
export const WithManualMode: Story = {
|
100
100
|
render: () => (
|
101
|
-
<
|
101
|
+
<KcPageStory
|
102
102
|
kcContext={{
|
103
103
|
mode: "manual",
|
104
104
|
totp: {
|
@@ -136,7 +136,7 @@ export const WithManualMode: Story = {
|
|
136
136
|
|
137
137
|
export const MoreThanOneTotpProviders: Story = {
|
138
138
|
render: () => (
|
139
|
-
<
|
139
|
+
<KcPageStory
|
140
140
|
kcContext={{
|
141
141
|
totp: {
|
142
142
|
enabled: true,
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "code.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/code.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "delete-account-confirm.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/delete-account-confirm.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "delete-credential.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/delete-credential.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "error.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/error.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
19
19
|
|
20
20
|
export const WithAnotherMessage: Story = {
|
21
21
|
render: () => (
|
22
|
-
<
|
22
|
+
<KcPageStory
|
23
23
|
kcContext={{
|
24
24
|
message: { summary: "With another error message" }
|
25
25
|
}}
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "frontchannel-logout.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/frontchannel-logout.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "idp-review-user-profile.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/idp-review-user-profile.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "info.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/info.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
@@ -15,7 +15,7 @@ type Story = StoryObj<typeof meta>;
|
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
17
|
render: () => (
|
18
|
-
<
|
18
|
+
<KcPageStory
|
19
19
|
kcContext={{
|
20
20
|
message: {
|
21
21
|
summary: "Server info message"
|
@@ -27,7 +27,7 @@ export const Default: Story = {
|
|
27
27
|
|
28
28
|
export const WithLinkBack: Story = {
|
29
29
|
render: () => (
|
30
|
-
<
|
30
|
+
<KcPageStory
|
31
31
|
kcContext={{
|
32
32
|
message: {
|
33
33
|
summary: "Server message"
|
@@ -40,7 +40,7 @@ export const WithLinkBack: Story = {
|
|
40
40
|
|
41
41
|
export const WithRequiredActions: Story = {
|
42
42
|
render: () => (
|
43
|
-
<
|
43
|
+
<KcPageStory
|
44
44
|
kcContext={{
|
45
45
|
message: {
|
46
46
|
summary: "Server message"
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
3
|
-
import {
|
3
|
+
import { createKcPageStory } from "../KcPageStory";
|
4
4
|
|
5
|
-
const {
|
5
|
+
const { KcPageStory } = createKcPageStory({ pageId: "login.ftl" });
|
6
6
|
|
7
7
|
const meta = {
|
8
8
|
title: "login/login.ftl",
|
9
|
-
component:
|
10
|
-
} satisfies Meta<typeof
|
9
|
+
component: KcPageStory
|
10
|
+
} satisfies Meta<typeof KcPageStory>;
|
11
11
|
|
12
12
|
export default meta;
|
13
13
|
|
14
14
|
type Story = StoryObj<typeof meta>;
|
15
15
|
|
16
16
|
export const Default: Story = {
|
17
|
-
render: () => <
|
17
|
+
render: () => <KcPageStory />
|
18
18
|
};
|
19
19
|
|
20
20
|
export const WithoutRegistration: Story = {
|
21
21
|
render: () => (
|
22
|
-
<
|
22
|
+
<KcPageStory
|
23
23
|
kcContext={{
|
24
24
|
realm: { registrationAllowed: false }
|
25
25
|
}}
|
@@ -29,7 +29,7 @@ export const WithoutRegistration: Story = {
|
|
29
29
|
|
30
30
|
export const WithoutRememberMe: Story = {
|
31
31
|
render: () => (
|
32
|
-
<
|
32
|
+
<KcPageStory
|
33
33
|
kcContext={{
|
34
34
|
realm: { rememberMe: false }
|
35
35
|
}}
|
@@ -39,7 +39,7 @@ export const WithoutRememberMe: Story = {
|
|
39
39
|
|
40
40
|
export const WithoutPasswordReset: Story = {
|
41
41
|
render: () => (
|
42
|
-
<
|
42
|
+
<KcPageStory
|
43
43
|
kcContext={{
|
44
44
|
realm: { resetPasswordAllowed: false }
|
45
45
|
}}
|
@@ -49,7 +49,7 @@ export const WithoutPasswordReset: Story = {
|
|
49
49
|
|
50
50
|
export const WithEmailAsUsername: Story = {
|
51
51
|
render: () => (
|
52
|
-
<
|
52
|
+
<KcPageStory
|
53
53
|
kcContext={{
|
54
54
|
realm: { loginWithEmailAllowed: false }
|
55
55
|
}}
|
@@ -59,7 +59,7 @@ export const WithEmailAsUsername: Story = {
|
|
59
59
|
|
60
60
|
export const WithPresetUsername: Story = {
|
61
61
|
render: () => (
|
62
|
-
<
|
62
|
+
<KcPageStory
|
63
63
|
kcContext={{
|
64
64
|
login: { username: "max.mustermann@mail.com" }
|
65
65
|
}}
|
@@ -69,7 +69,7 @@ export const WithPresetUsername: Story = {
|
|
69
69
|
|
70
70
|
export const WithImmutablePresetUsername: Story = {
|
71
71
|
render: () => (
|
72
|
-
<
|
72
|
+
<KcPageStory
|
73
73
|
kcContext={{
|
74
74
|
auth: {
|
75
75
|
attemptedUsername: "max.mustermann@mail.com",
|
@@ -87,7 +87,7 @@ export const WithImmutablePresetUsername: Story = {
|
|
87
87
|
|
88
88
|
export const WithSocialProviders: Story = {
|
89
89
|
render: () => (
|
90
|
-
<
|
90
|
+
<KcPageStory
|
91
91
|
kcContext={{
|
92
92
|
social: {
|
93
93
|
displayInfo: true,
|
@@ -173,7 +173,7 @@ export const WithSocialProviders: Story = {
|
|
173
173
|
|
174
174
|
export const WithoutPasswordField: Story = {
|
175
175
|
render: () => (
|
176
|
-
<
|
176
|
+
<KcPageStory
|
177
177
|
kcContext={{
|
178
178
|
realm: { password: false }
|
179
179
|
}}
|