keycloakify 6.3.5 → 6.4.0
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/README.md +6 -0
- package/lib/components/Error.d.ts +2 -1
- package/lib/components/Error.js +2 -2
- package/lib/components/Error.js.map +1 -1
- package/lib/components/IdpReviewUserProfile.d.ts +2 -1
- package/lib/components/IdpReviewUserProfile.js +2 -2
- package/lib/components/IdpReviewUserProfile.js.map +1 -1
- package/lib/components/Info.d.ts +2 -1
- package/lib/components/Info.js +2 -2
- package/lib/components/Info.js.map +1 -1
- package/lib/components/KcApp.d.ts +1 -0
- package/lib/components/KcApp.js.map +1 -1
- package/lib/components/Login.d.ts +2 -1
- package/lib/components/Login.js +2 -2
- package/lib/components/Login.js.map +1 -1
- package/lib/components/LoginConfigTotp.d.ts +2 -1
- package/lib/components/LoginConfigTotp.js +2 -2
- package/lib/components/LoginConfigTotp.js.map +1 -1
- package/lib/components/LoginIdpLinkConfirm.d.ts +2 -1
- package/lib/components/LoginIdpLinkConfirm.js +2 -2
- package/lib/components/LoginIdpLinkConfirm.js.map +1 -1
- package/lib/components/LoginIdpLinkEmail.d.ts +2 -1
- package/lib/components/LoginIdpLinkEmail.js +2 -2
- package/lib/components/LoginIdpLinkEmail.js.map +1 -1
- package/lib/components/LoginOtp.d.ts +2 -1
- package/lib/components/LoginOtp.js +2 -2
- package/lib/components/LoginOtp.js.map +1 -1
- package/lib/components/LoginPageExpired.d.ts +2 -1
- package/lib/components/LoginPageExpired.js +2 -2
- package/lib/components/LoginPageExpired.js.map +1 -1
- package/lib/components/LoginResetPassword.d.ts +2 -1
- package/lib/components/LoginResetPassword.js +2 -2
- package/lib/components/LoginResetPassword.js.map +1 -1
- package/lib/components/LoginUpdatePassword.d.ts +2 -1
- package/lib/components/LoginUpdatePassword.js +2 -2
- package/lib/components/LoginUpdatePassword.js.map +1 -1
- package/lib/components/LoginUpdateProfile.d.ts +2 -1
- package/lib/components/LoginUpdateProfile.js +2 -2
- package/lib/components/LoginUpdateProfile.js.map +1 -1
- package/lib/components/LoginVerifyEmail.d.ts +2 -1
- package/lib/components/LoginVerifyEmail.js +2 -2
- package/lib/components/LoginVerifyEmail.js.map +1 -1
- package/lib/components/LogoutConfirm.d.ts +2 -1
- package/lib/components/LogoutConfirm.js +2 -2
- package/lib/components/LogoutConfirm.js.map +1 -1
- package/lib/components/Register.d.ts +2 -1
- package/lib/components/Register.js +2 -2
- package/lib/components/Register.js.map +1 -1
- package/lib/components/RegisterUserProfile.d.ts +2 -1
- package/lib/components/RegisterUserProfile.js +2 -2
- package/lib/components/RegisterUserProfile.js.map +1 -1
- package/lib/components/Terms.d.ts +2 -1
- package/lib/components/Terms.js +2 -2
- package/lib/components/Terms.js.map +1 -1
- package/lib/components/UpdateUserProfile.d.ts +2 -1
- package/lib/components/UpdateUserProfile.js +2 -2
- package/lib/components/UpdateUserProfile.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/lib/components/Error.tsx +30 -24
- package/src/lib/components/IdpReviewUserProfile.tsx +41 -30
- package/src/lib/components/Info.tsx +41 -35
- package/src/lib/components/KcApp.tsx +64 -58
- package/src/lib/components/Login.tsx +174 -166
- package/src/lib/components/LoginConfigTotp.tsx +158 -152
- package/src/lib/components/LoginIdpLinkConfirm.tsx +42 -36
- package/src/lib/components/LoginIdpLinkEmail.tsx +30 -24
- package/src/lib/components/LoginOtp.tsx +75 -64
- package/src/lib/components/LoginPageExpired.tsx +34 -28
- package/src/lib/components/LoginResetPassword.tsx +63 -52
- package/src/lib/components/LoginUpdatePassword.tsx +101 -95
- package/src/lib/components/LoginUpdateProfile.tsx +103 -91
- package/src/lib/components/LoginVerifyEmail.tsx +30 -24
- package/src/lib/components/LogoutConfirm.tsx +53 -47
- package/src/lib/components/Register.tsx +126 -115
- package/src/lib/components/RegisterUserProfile.tsx +59 -48
- package/src/lib/components/Terms.tsx +51 -45
- package/src/lib/components/UpdateUserProfile.tsx +57 -51
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "keycloakify",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.4.0",
|
4
4
|
"description": "Keycloak theme generator for Reacts app",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -1277,12 +1277,12 @@
|
|
1277
1277
|
"@octokit/rest": "^18.12.0",
|
1278
1278
|
"cheerio": "^1.0.0-rc.5",
|
1279
1279
|
"cli-select": "^1.1.2",
|
1280
|
-
"evt": "^2.4.
|
1280
|
+
"evt": "^2.4.2",
|
1281
1281
|
"memoizee": "^0.4.15",
|
1282
1282
|
"minimal-polyfills": "^2.2.2",
|
1283
1283
|
"minimist": "^1.2.6",
|
1284
1284
|
"path-browserify": "^1.0.1",
|
1285
|
-
"powerhooks": "^0.20.
|
1285
|
+
"powerhooks": "^0.20.17",
|
1286
1286
|
"react-markdown": "^5.0.3",
|
1287
1287
|
"scripting-tools": "^0.19.13",
|
1288
1288
|
"tsafe": "^1.0.1",
|
@@ -4,31 +4,37 @@ import type { KcProps } from "./KcProps";
|
|
4
4
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
5
5
|
import type { I18n } from "../i18n";
|
6
6
|
|
7
|
-
const Error = memo(
|
8
|
-
|
7
|
+
const Error = memo(
|
8
|
+
({
|
9
|
+
kcContext,
|
10
|
+
i18n,
|
11
|
+
doFetchDefaultThemeResources = true,
|
12
|
+
...props
|
13
|
+
}: { kcContext: KcContextBase.Error; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
14
|
+
const { message, client } = kcContext;
|
9
15
|
|
10
|
-
|
16
|
+
const { msg } = i18n;
|
11
17
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
</
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
return (
|
19
|
+
<Template
|
20
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
21
|
+
displayMessage={false}
|
22
|
+
headerNode={msg("errorTitle")}
|
23
|
+
formNode={
|
24
|
+
<div id="kc-error-message">
|
25
|
+
<p className="instruction">{message.summary}</p>
|
26
|
+
{client !== undefined && client.baseUrl !== undefined && (
|
27
|
+
<p>
|
28
|
+
<a id="backToApplication" href={client.baseUrl}>
|
29
|
+
{msg("backToApplication")}
|
30
|
+
</a>
|
31
|
+
</p>
|
32
|
+
)}
|
33
|
+
</div>
|
34
|
+
}
|
35
|
+
/>
|
36
|
+
);
|
37
|
+
}
|
38
|
+
);
|
33
39
|
|
34
40
|
export default Error;
|
@@ -6,41 +6,52 @@ import { useCssAndCx } from "../tools/useCssAndCx";
|
|
6
6
|
import type { I18n } from "../i18n";
|
7
7
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
8
8
|
|
9
|
-
const IdpReviewUserProfile = memo(
|
10
|
-
|
9
|
+
const IdpReviewUserProfile = memo(
|
10
|
+
({
|
11
|
+
kcContext,
|
12
|
+
i18n,
|
13
|
+
doFetchDefaultThemeResources = true,
|
14
|
+
...props
|
15
|
+
}: { kcContext: KcContextBase.IdpReviewUserProfile; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
16
|
+
const { cx } = useCssAndCx();
|
11
17
|
|
12
|
-
|
18
|
+
const { msg, msgStr } = i18n;
|
13
19
|
|
14
|
-
|
20
|
+
const { url } = kcContext;
|
15
21
|
|
16
|
-
|
22
|
+
const [isFomSubmittable, setIsFomSubmittable] = useState(false);
|
17
23
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<UserProfileFormFields kcContext={kcContext} onIsFormSubmittableValueChange={setIsFomSubmittable} i18n={i18n} {...props} />
|
24
|
+
return (
|
25
|
+
<Template
|
26
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
27
|
+
headerNode={msg("loginIdpReviewProfileTitle")}
|
28
|
+
formNode={
|
29
|
+
<form id="kc-idp-review-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
30
|
+
<UserProfileFormFields kcContext={kcContext} onIsFormSubmittableValueChange={setIsFomSubmittable} i18n={i18n} {...props} />
|
26
31
|
|
27
|
-
|
28
|
-
|
29
|
-
|
32
|
+
<div className={cx(props.kcFormGroupClass)}>
|
33
|
+
<div id="kc-form-options" className={cx(props.kcFormOptionsClass)}>
|
34
|
+
<div className={cx(props.kcFormOptionsWrapperClass)} />
|
35
|
+
</div>
|
36
|
+
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
37
|
+
<input
|
38
|
+
className={cx(
|
39
|
+
props.kcButtonClass,
|
40
|
+
props.kcButtonPrimaryClass,
|
41
|
+
props.kcButtonBlockClass,
|
42
|
+
props.kcButtonLargeClass
|
43
|
+
)}
|
44
|
+
type="submit"
|
45
|
+
value={msgStr("doSubmit")}
|
46
|
+
disabled={!isFomSubmittable}
|
47
|
+
/>
|
48
|
+
</div>
|
30
49
|
</div>
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
/>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
</form>
|
41
|
-
}
|
42
|
-
/>
|
43
|
-
);
|
44
|
-
});
|
50
|
+
</form>
|
51
|
+
}
|
52
|
+
/>
|
53
|
+
);
|
54
|
+
}
|
55
|
+
);
|
45
56
|
|
46
57
|
export default IdpReviewUserProfile;
|
@@ -5,47 +5,53 @@ import { assert } from "../tools/assert";
|
|
5
5
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
6
6
|
import type { I18n } from "../i18n";
|
7
7
|
|
8
|
-
const Info = memo(
|
9
|
-
|
8
|
+
const Info = memo(
|
9
|
+
({
|
10
|
+
kcContext,
|
11
|
+
i18n,
|
12
|
+
doFetchDefaultThemeResources = true,
|
13
|
+
...props
|
14
|
+
}: { kcContext: KcContextBase.Info; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
15
|
+
const { msgStr, msg } = i18n;
|
10
16
|
|
11
|
-
|
17
|
+
assert(kcContext.message !== undefined);
|
12
18
|
|
13
|
-
|
19
|
+
const { messageHeader, message, requiredActions, skipLink, pageRedirectUri, actionUri, client } = kcContext;
|
14
20
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
{message.summary}
|
21
|
+
return (
|
22
|
+
<Template
|
23
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
24
|
+
displayMessage={false}
|
25
|
+
headerNode={messageHeader !== undefined ? <>{messageHeader}</> : <>{message.summary}</>}
|
26
|
+
formNode={
|
27
|
+
<div id="kc-info-message">
|
28
|
+
<p className="instruction">
|
29
|
+
{message.summary}
|
25
30
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
</p>
|
30
|
-
{!skipLink && pageRedirectUri !== undefined ? (
|
31
|
-
<p>
|
32
|
-
<a href={pageRedirectUri}>{msg("backToApplication")}</a>
|
33
|
-
</p>
|
34
|
-
) : actionUri !== undefined ? (
|
35
|
-
<p>
|
36
|
-
<a href={actionUri}>{msg("proceedWithAction")}</a>
|
31
|
+
{requiredActions !== undefined && (
|
32
|
+
<b>{requiredActions.map(requiredAction => msgStr(`requiredAction.${requiredAction}` as const)).join(",")}</b>
|
33
|
+
)}
|
37
34
|
</p>
|
38
|
-
|
39
|
-
client.baseUrl !== undefined && (
|
35
|
+
{!skipLink && pageRedirectUri !== undefined ? (
|
40
36
|
<p>
|
41
|
-
<a href={
|
37
|
+
<a href={pageRedirectUri}>{msg("backToApplication")}</a>
|
42
38
|
</p>
|
43
|
-
)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
39
|
+
) : actionUri !== undefined ? (
|
40
|
+
<p>
|
41
|
+
<a href={actionUri}>{msg("proceedWithAction")}</a>
|
42
|
+
</p>
|
43
|
+
) : (
|
44
|
+
client.baseUrl !== undefined && (
|
45
|
+
<p>
|
46
|
+
<a href={client.baseUrl}>{msg("backToApplication")}</a>
|
47
|
+
</p>
|
48
|
+
)
|
49
|
+
)}
|
50
|
+
</div>
|
51
|
+
}
|
52
|
+
/>
|
53
|
+
);
|
54
|
+
}
|
55
|
+
);
|
50
56
|
|
51
57
|
export default Info;
|
@@ -23,67 +23,73 @@ const LogoutConfirm = lazy(() => import("./LogoutConfirm"));
|
|
23
23
|
const UpdateUserProfile = lazy(() => import("./UpdateUserProfile"));
|
24
24
|
const IdpReviewUserProfile = lazy(() => import("./IdpReviewUserProfile"));
|
25
25
|
|
26
|
-
const KcApp = memo(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
const KcApp = memo(
|
27
|
+
({
|
28
|
+
kcContext,
|
29
|
+
i18n: userProvidedI18n,
|
30
|
+
...kcProps
|
31
|
+
}: { kcContext: KcContextBase; i18n?: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
32
|
+
const i18n = (function useClosure() {
|
33
|
+
const i18n = useI18n({
|
34
|
+
kcContext,
|
35
|
+
"extraMessages": {},
|
36
|
+
"doSkip": userProvidedI18n !== undefined
|
37
|
+
});
|
33
38
|
|
34
|
-
|
35
|
-
|
39
|
+
return userProvidedI18n ?? i18n;
|
40
|
+
})();
|
36
41
|
|
37
|
-
|
38
|
-
|
39
|
-
|
42
|
+
if (i18n === null) {
|
43
|
+
return null;
|
44
|
+
}
|
40
45
|
|
41
|
-
|
46
|
+
const props = { i18n, ...kcProps };
|
42
47
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
}
|
48
|
+
return (
|
49
|
+
<Suspense>
|
50
|
+
{(() => {
|
51
|
+
switch (kcContext.pageId) {
|
52
|
+
case "login.ftl":
|
53
|
+
return <Login {...{ kcContext, ...props }} />;
|
54
|
+
case "register.ftl":
|
55
|
+
return <Register {...{ kcContext, ...props }} />;
|
56
|
+
case "register-user-profile.ftl":
|
57
|
+
return <RegisterUserProfile {...{ kcContext, ...props }} />;
|
58
|
+
case "info.ftl":
|
59
|
+
return <Info {...{ kcContext, ...props }} />;
|
60
|
+
case "error.ftl":
|
61
|
+
return <Error {...{ kcContext, ...props }} />;
|
62
|
+
case "login-reset-password.ftl":
|
63
|
+
return <LoginResetPassword {...{ kcContext, ...props }} />;
|
64
|
+
case "login-verify-email.ftl":
|
65
|
+
return <LoginVerifyEmail {...{ kcContext, ...props }} />;
|
66
|
+
case "terms.ftl":
|
67
|
+
return <Terms {...{ kcContext, ...props }} />;
|
68
|
+
case "login-otp.ftl":
|
69
|
+
return <LoginOtp {...{ kcContext, ...props }} />;
|
70
|
+
case "login-update-password.ftl":
|
71
|
+
return <LoginUpdatePassword {...{ kcContext, ...props }} />;
|
72
|
+
case "login-update-profile.ftl":
|
73
|
+
return <LoginUpdateProfile {...{ kcContext, ...props }} />;
|
74
|
+
case "login-idp-link-confirm.ftl":
|
75
|
+
return <LoginIdpLinkConfirm {...{ kcContext, ...props }} />;
|
76
|
+
case "login-idp-link-email.ftl":
|
77
|
+
return <LoginIdpLinkEmail {...{ kcContext, ...props }} />;
|
78
|
+
case "login-page-expired.ftl":
|
79
|
+
return <LoginPageExpired {...{ kcContext, ...props }} />;
|
80
|
+
case "login-config-totp.ftl":
|
81
|
+
return <LoginConfigTotp {...{ kcContext, ...props }} />;
|
82
|
+
case "logout-confirm.ftl":
|
83
|
+
return <LogoutConfirm {...{ kcContext, ...props }} />;
|
84
|
+
case "update-user-profile.ftl":
|
85
|
+
return <UpdateUserProfile {...{ kcContext, ...props }} />;
|
86
|
+
case "idp-review-user-profile.ftl":
|
87
|
+
return <IdpReviewUserProfile {...{ kcContext, ...props }} />;
|
88
|
+
}
|
89
|
+
})()}
|
90
|
+
</Suspense>
|
91
|
+
);
|
92
|
+
}
|
93
|
+
);
|
88
94
|
|
89
95
|
export default KcApp;
|