keycloakify 6.7.2 → 6.8.1
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 +6 -3
- package/lib/components/Error.js +4 -4
- package/lib/components/Error.js.map +1 -1
- package/lib/components/IdpReviewUserProfile.d.ts +6 -3
- package/lib/components/IdpReviewUserProfile.js +10 -10
- package/lib/components/IdpReviewUserProfile.js.map +1 -1
- package/lib/components/Info.d.ts +6 -3
- package/lib/components/Info.js +4 -4
- package/lib/components/Info.js.map +1 -1
- package/lib/components/KcApp.d.ts +7 -4
- package/lib/components/KcApp.js +25 -24
- package/lib/components/KcApp.js.map +1 -1
- package/lib/components/Login.d.ts +6 -3
- package/lib/components/Login.js +17 -17
- package/lib/components/Login.js.map +1 -1
- package/lib/components/LoginConfigTotp.d.ts +6 -3
- package/lib/components/LoginConfigTotp.js +25 -25
- package/lib/components/LoginConfigTotp.js.map +1 -1
- package/lib/components/LoginIdpLinkConfirm.d.ts +6 -3
- package/lib/components/LoginIdpLinkConfirm.js +7 -7
- package/lib/components/LoginIdpLinkConfirm.js.map +1 -1
- package/lib/components/LoginIdpLinkEmail.d.ts +6 -3
- package/lib/components/LoginIdpLinkEmail.js +4 -4
- package/lib/components/LoginIdpLinkEmail.js.map +1 -1
- package/lib/components/LoginOtp.d.ts +6 -3
- package/lib/components/LoginOtp.js +19 -19
- package/lib/components/LoginOtp.js.map +1 -1
- package/lib/components/LoginPageExpired.d.ts +6 -3
- package/lib/components/LoginPageExpired.js +4 -4
- package/lib/components/LoginPageExpired.js.map +1 -1
- package/lib/components/LoginPassword.d.ts +6 -3
- package/lib/components/LoginPassword.js +12 -12
- package/lib/components/LoginPassword.js.map +1 -1
- package/lib/components/LoginResetPassword.d.ts +6 -3
- package/lib/components/LoginResetPassword.js +14 -14
- package/lib/components/LoginResetPassword.js.map +1 -1
- package/lib/components/LoginUpdatePassword.d.ts +6 -3
- package/lib/components/LoginUpdatePassword.js +20 -20
- package/lib/components/LoginUpdatePassword.js.map +1 -1
- package/lib/components/LoginUpdateProfile.d.ts +6 -3
- package/lib/components/LoginUpdateProfile.js +31 -31
- package/lib/components/LoginUpdateProfile.js.map +1 -1
- package/lib/components/LoginUsername.d.ts +6 -3
- package/lib/components/LoginUsername.js +13 -13
- package/lib/components/LoginUsername.js.map +1 -1
- package/lib/components/LoginVerifyEmail.d.ts +6 -3
- package/lib/components/LoginVerifyEmail.js +4 -4
- package/lib/components/LoginVerifyEmail.js.map +1 -1
- package/lib/components/LogoutConfirm.d.ts +6 -3
- package/lib/components/LogoutConfirm.js +8 -8
- package/lib/components/LogoutConfirm.js.map +1 -1
- package/lib/components/Register.d.ts +6 -3
- package/lib/components/Register.js +41 -41
- package/lib/components/Register.js.map +1 -1
- package/lib/components/RegisterUserProfile.d.ts +6 -3
- package/lib/components/RegisterUserProfile.js +12 -12
- package/lib/components/RegisterUserProfile.js.map +1 -1
- package/lib/components/Terms.d.ts +6 -3
- package/lib/components/Terms.js +6 -6
- package/lib/components/Terms.js.map +1 -1
- package/lib/components/UpdateUserProfile.d.ts +6 -3
- package/lib/components/UpdateUserProfile.js +11 -11
- package/lib/components/UpdateUserProfile.js.map +1 -1
- package/lib/components/WebauthnAuthenticate.d.ts +6 -3
- package/lib/components/WebauthnAuthenticate.js +18 -18
- package/lib/components/WebauthnAuthenticate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/lib/components/Error.tsx +34 -31
- package/src/lib/components/IdpReviewUserProfile.tsx +50 -47
- package/src/lib/components/Info.tsx +49 -46
- package/src/lib/components/KcApp.tsx +74 -69
- package/src/lib/components/Login.tsx +178 -175
- package/src/lib/components/LoginConfigTotp.tsx +163 -160
- package/src/lib/components/LoginIdpLinkConfirm.tsx +56 -43
- package/src/lib/components/LoginIdpLinkEmail.tsx +34 -31
- package/src/lib/components/LoginOtp.tsx +86 -83
- package/src/lib/components/LoginPageExpired.tsx +38 -35
- package/src/lib/components/LoginPassword.tsx +79 -76
- package/src/lib/components/LoginResetPassword.tsx +67 -64
- package/src/lib/components/LoginUpdatePassword.tsx +105 -102
- package/src/lib/components/LoginUpdateProfile.tsx +108 -105
- package/src/lib/components/LoginUsername.tsx +145 -142
- package/src/lib/components/LoginVerifyEmail.tsx +34 -31
- package/src/lib/components/LogoutConfirm.tsx +57 -54
- package/src/lib/components/Register.tsx +137 -134
- package/src/lib/components/RegisterUserProfile.tsx +63 -60
- package/src/lib/components/Terms.tsx +56 -52
- package/src/lib/components/UpdateUserProfile.tsx +61 -58
- package/src/lib/components/WebauthnAuthenticate.tsx +179 -178
@@ -10,41 +10,41 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
10
10
|
return t;
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
|
-
import
|
13
|
+
import DefaultTemplate from "./Template";
|
14
14
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
15
|
-
const LoginUpdateProfile = memo((
|
16
|
-
var _b, _c, _d
|
17
|
-
|
15
|
+
const LoginUpdateProfile = memo((props) => {
|
16
|
+
var _a, _b, _c, _d;
|
17
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
18
18
|
const { cx } = useCssAndCx();
|
19
19
|
const { msg, msgStr } = i18n;
|
20
20
|
const { url, user, messagesPerField, isAppInitiatedAction } = kcContext;
|
21
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources },
|
22
|
-
user.editUsernameAllowed && (React.createElement("div", { className: cx(
|
23
|
-
React.createElement("div", { className: cx(
|
24
|
-
React.createElement("label", { htmlFor: "username", className: cx(
|
25
|
-
React.createElement("div", { className: cx(
|
26
|
-
React.createElement("input", { type: "text", id: "username", name: "username", defaultValue: (
|
27
|
-
React.createElement("div", { className: cx(
|
28
|
-
React.createElement("div", { className: cx(
|
29
|
-
React.createElement("label", { htmlFor: "email", className: cx(
|
30
|
-
React.createElement("div", { className: cx(
|
31
|
-
React.createElement("input", { type: "text", id: "email", name: "email", defaultValue: (
|
32
|
-
React.createElement("div", { className: cx(
|
33
|
-
React.createElement("div", { className: cx(
|
34
|
-
React.createElement("label", { htmlFor: "firstName", className: cx(
|
35
|
-
React.createElement("div", { className: cx(
|
36
|
-
React.createElement("input", { type: "text", id: "firstName", name: "firstName", defaultValue: (
|
37
|
-
React.createElement("div", { className: cx(
|
38
|
-
React.createElement("div", { className: cx(
|
39
|
-
React.createElement("label", { htmlFor: "lastName", className: cx(
|
40
|
-
React.createElement("div", { className: cx(
|
41
|
-
React.createElement("input", { type: "text", id: "lastName", name: "lastName", defaultValue: (
|
42
|
-
React.createElement("div", { className: cx(
|
43
|
-
React.createElement("div", { id: "kc-form-options", className: cx(
|
44
|
-
React.createElement("div", { className: cx(
|
45
|
-
React.createElement("div", { id: "kc-form-buttons", className: cx(
|
46
|
-
React.createElement("input", { className: cx(
|
47
|
-
React.createElement("button", { className: cx(
|
21
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("loginProfileTitle"), formNode: React.createElement("form", { id: "kc-update-profile-form", className: cx(kcProps.kcFormClass), action: url.loginAction, method: "post" },
|
22
|
+
user.editUsernameAllowed && (React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("username", kcProps.kcFormGroupErrorClass)) },
|
23
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
24
|
+
React.createElement("label", { htmlFor: "username", className: cx(kcProps.kcLabelClass) }, msg("username"))),
|
25
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
26
|
+
React.createElement("input", { type: "text", id: "username", name: "username", defaultValue: (_a = user.username) !== null && _a !== void 0 ? _a : "", className: cx(kcProps.kcInputClass) })))),
|
27
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("email", kcProps.kcFormGroupErrorClass)) },
|
28
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
29
|
+
React.createElement("label", { htmlFor: "email", className: cx(kcProps.kcLabelClass) }, msg("email"))),
|
30
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
31
|
+
React.createElement("input", { type: "text", id: "email", name: "email", defaultValue: (_b = user.email) !== null && _b !== void 0 ? _b : "", className: cx(kcProps.kcInputClass) }))),
|
32
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("firstName", kcProps.kcFormGroupErrorClass)) },
|
33
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
34
|
+
React.createElement("label", { htmlFor: "firstName", className: cx(kcProps.kcLabelClass) }, msg("firstName"))),
|
35
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
36
|
+
React.createElement("input", { type: "text", id: "firstName", name: "firstName", defaultValue: (_c = user.firstName) !== null && _c !== void 0 ? _c : "", className: cx(kcProps.kcInputClass) }))),
|
37
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("lastName", kcProps.kcFormGroupErrorClass)) },
|
38
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
39
|
+
React.createElement("label", { htmlFor: "lastName", className: cx(kcProps.kcLabelClass) }, msg("lastName"))),
|
40
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
41
|
+
React.createElement("input", { type: "text", id: "lastName", name: "lastName", defaultValue: (_d = user.lastName) !== null && _d !== void 0 ? _d : "", className: cx(kcProps.kcInputClass) }))),
|
42
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass) },
|
43
|
+
React.createElement("div", { id: "kc-form-options", className: cx(kcProps.kcFormOptionsClass) },
|
44
|
+
React.createElement("div", { className: cx(kcProps.kcFormOptionsWrapperClass) })),
|
45
|
+
React.createElement("div", { id: "kc-form-buttons", className: cx(kcProps.kcFormButtonsClass) }, isAppInitiatedAction ? (React.createElement(React.Fragment, null,
|
46
|
+
React.createElement("input", { className: cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonLargeClass), type: "submit", defaultValue: msgStr("doSubmit") }),
|
47
|
+
React.createElement("button", { className: cx(kcProps.kcButtonClass, kcProps.kcButtonDefaultClass, kcProps.kcButtonLargeClass), type: "submit", name: "cancel-aia", value: "true" }, msg("doCancel")))) : (React.createElement("input", { className: cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), type: "submit", defaultValue: msgStr("doSubmit") }))))) })));
|
48
48
|
});
|
49
49
|
export default LoginUpdateProfile;
|
50
50
|
//# sourceMappingURL=LoginUpdateProfile.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginUpdateProfile.js","sourceRoot":"","sources":["../../src/lib/components/LoginUpdateProfile.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,
|
1
|
+
{"version":3,"file":"LoginUpdateProfile.js","sourceRoot":"","sources":["../../src/lib/components/LoginUpdateProfile.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAUnD,MAAM,kBAAkB,GAAG,IAAI,CAAC,CAAC,KAAyB,EAAE,EAAE;;IAC1D,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,4BAA4B,GAAG,IAAI,EAAE,QAAQ,GAAG,eAAe,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAAxG,iEAAgG,CAAQ,CAAC;IAE/G,MAAM,E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AAC,CAAC,CACA,+BACI,SAAS,EAAE,EAAE,CACT,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,oBAAoB,EAC5B,OAAO,CAAC,kBAAkB,EAC1B,OAAO,CAAC,kBAAkB,CAC7B,EACD,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,GAClC,CACL,CACC,CACJ,CACH,IAEb,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
|
+
import type { TemplateProps } from "./Template";
|
2
3
|
import type { KcProps } from "./KcProps";
|
3
4
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
4
5
|
import type { I18n } from "../i18n";
|
5
|
-
declare
|
6
|
+
export declare type LoginUsernameProps = KcProps & {
|
6
7
|
kcContext: KcContextBase.LoginUsername;
|
7
8
|
i18n: I18n;
|
8
|
-
doFetchDefaultThemeResources?: boolean
|
9
|
-
|
9
|
+
doFetchDefaultThemeResources?: boolean;
|
10
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
11
|
+
};
|
12
|
+
declare const LoginUsername: React.MemoExoticComponent<(props: LoginUsernameProps) => JSX.Element>;
|
10
13
|
export default LoginUsername;
|
@@ -10,11 +10,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
10
10
|
return t;
|
11
11
|
};
|
12
12
|
import React, { useState, memo } from "react";
|
13
|
-
import
|
13
|
+
import DefaultTemplate from "./Template";
|
14
14
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
15
15
|
import { useConstCallback } from "powerhooks/useConstCallback";
|
16
|
-
const LoginUsername = memo((
|
17
|
-
|
16
|
+
const LoginUsername = memo((props) => {
|
17
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
18
18
|
const { social, realm, url, usernameHidden, login, registrationDisabled } = kcContext;
|
19
19
|
const { msg, msgStr } = i18n;
|
20
20
|
const { cx } = useCssAndCx();
|
@@ -29,9 +29,9 @@ const LoginUsername = memo((_a) => {
|
|
29
29
|
(_a = formElement.querySelector("input[name='email']")) === null || _a === void 0 ? void 0 : _a.setAttribute("name", "username");
|
30
30
|
formElement.submit();
|
31
31
|
});
|
32
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources },
|
33
|
-
React.createElement("div", { id: "kc-form-wrapper", className: cx(realm.password && social.providers && [
|
34
|
-
React.createElement("div", { className: cx(
|
32
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { displayInfo: social.displayInfo, displayWide: realm.password && social.providers !== undefined, headerNode: msg("doLogIn"), formNode: React.createElement("div", { id: "kc-form", className: cx(realm.password && social.providers !== undefined && kcProps.kcContentWrapperClass) },
|
33
|
+
React.createElement("div", { id: "kc-form-wrapper", className: cx(realm.password && social.providers && [kcProps.kcFormSocialAccountContentClass, kcProps.kcFormSocialAccountClass]) }, realm.password && (React.createElement("form", { id: "kc-form-login", onSubmit: onSubmit, action: url.loginAction, method: "post" },
|
34
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass) }, !usernameHidden &&
|
35
35
|
(() => {
|
36
36
|
var _a;
|
37
37
|
const label = !realm.loginWithEmailAllowed
|
@@ -41,14 +41,14 @@ const LoginUsername = memo((_a) => {
|
|
41
41
|
: "usernameOrEmail";
|
42
42
|
const autoCompleteHelper = label === "usernameOrEmail" ? "username" : label;
|
43
43
|
return (React.createElement(React.Fragment, null,
|
44
|
-
React.createElement("label", { htmlFor: autoCompleteHelper, className: cx(
|
45
|
-
React.createElement("input", { tabIndex: 1, id: autoCompleteHelper, className: cx(
|
44
|
+
React.createElement("label", { htmlFor: autoCompleteHelper, className: cx(kcProps.kcLabelClass) }, msg(label)),
|
45
|
+
React.createElement("input", { tabIndex: 1, id: autoCompleteHelper, className: cx(kcProps.kcInputClass),
|
46
46
|
//NOTE: This is used by Google Chrome auto fill so we use it to tell
|
47
47
|
//the browser how to pre fill the form but before submit we put it back
|
48
48
|
//to username because it is what keycloak expects.
|
49
49
|
name: autoCompleteHelper, defaultValue: (_a = login.username) !== null && _a !== void 0 ? _a : "", type: "text", autoFocus: true, autoComplete: "off" })));
|
50
50
|
})()),
|
51
|
-
React.createElement("div", { className: cx(
|
51
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, kcProps.kcFormSettingClass) },
|
52
52
|
React.createElement("div", { id: "kc-form-options" }, realm.rememberMe && !usernameHidden && (React.createElement("div", { className: "checkbox" },
|
53
53
|
React.createElement("label", null,
|
54
54
|
React.createElement("input", Object.assign({ tabIndex: 3, id: "rememberMe", name: "rememberMe", type: "checkbox" }, (login.rememberMe
|
@@ -57,10 +57,10 @@ const LoginUsername = memo((_a) => {
|
|
57
57
|
}
|
58
58
|
: {}))),
|
59
59
|
msg("rememberMe")))))),
|
60
|
-
React.createElement("div", { id: "kc-form-buttons", className: cx(
|
61
|
-
React.createElement("input", { tabIndex: 4, className: cx(
|
62
|
-
realm.password && social.providers !== undefined && (React.createElement("div", { id: "kc-social-providers", className: cx(
|
63
|
-
React.createElement("ul", { className: cx(
|
60
|
+
React.createElement("div", { id: "kc-form-buttons", className: cx(kcProps.kcFormGroupClass) },
|
61
|
+
React.createElement("input", { tabIndex: 4, className: cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), name: "login", id: "kc-login", type: "submit", value: msgStr("doLogIn"), disabled: isLoginButtonDisabled }))))),
|
62
|
+
realm.password && social.providers !== undefined && (React.createElement("div", { id: "kc-social-providers", className: cx(kcProps.kcFormSocialAccountContentClass, kcProps.kcFormSocialAccountClass) },
|
63
|
+
React.createElement("ul", { className: cx(kcProps.kcFormSocialAccountListClass, social.providers.length > 4 && kcProps.kcFormSocialAccountDoubleListClass) }, social.providers.map(p => (React.createElement("li", { key: p.providerId, className: cx(kcProps.kcFormSocialAccountListLinkClass) },
|
64
64
|
React.createElement("a", { href: p.loginUrl, id: `zocial-${p.alias}`, className: cx("zocial", p.providerId) },
|
65
65
|
React.createElement("span", null, p.displayName))))))))), infoNode: realm.password &&
|
66
66
|
realm.registrationAllowed &&
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginUsername.js","sourceRoot":"","sources":["../../src/lib/components/LoginUsername.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,
|
1
|
+
{"version":3,"file":"LoginUsername.js","sourceRoot":"","sources":["../../src/lib/components/LoginUsername.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAW/D,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,KAAyB,EAAE,EAAE;IACrD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,4BAA4B,GAAG,IAAI,EAAE,QAAQ,GAAG,eAAe,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAAxG,iEAAgG,CAAQ,CAAC;IAE/G,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAEtF,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE7B,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC;IAE7B,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,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C,QAAQ;YACd,KAAK,CAAC,mBAAmB;YACzB,CAAC,oBAAoB,IAAI,CACrB,6BAAK,EAAE,EAAC,iBAAiB;YACrB;gBACK,GAAG,CAAC,WAAW,CAAC;gBACjB,2BAAG,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,eAAe,IACpC,GAAG,CAAC,YAAY,CAAC,CAClB,CACD,CACL,CACT,IAEP,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
|
+
import type { TemplateProps } from "./Template";
|
2
3
|
import type { KcProps } from "./KcProps";
|
3
4
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
4
5
|
import type { I18n } from "../i18n";
|
5
|
-
declare
|
6
|
+
export declare type LoginVerifyEmailProps = KcProps & {
|
6
7
|
kcContext: KcContextBase.LoginVerifyEmail;
|
7
8
|
i18n: I18n;
|
8
|
-
doFetchDefaultThemeResources?: boolean
|
9
|
-
|
9
|
+
doFetchDefaultThemeResources?: boolean;
|
10
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
11
|
+
};
|
12
|
+
declare const LoginVerifyEmail: React.MemoExoticComponent<(props: LoginVerifyEmailProps) => JSX.Element>;
|
10
13
|
export default LoginVerifyEmail;
|
@@ -10,12 +10,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
10
10
|
return t;
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
|
-
import
|
14
|
-
const LoginVerifyEmail = memo((
|
15
|
-
|
13
|
+
import DefaultTemplate from "./Template";
|
14
|
+
const LoginVerifyEmail = memo((props) => {
|
15
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
16
16
|
const { msg } = i18n;
|
17
17
|
const { url, user } = kcContext;
|
18
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources },
|
18
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { displayMessage: false, headerNode: msg("emailVerifyTitle"), formNode: React.createElement(React.Fragment, null,
|
19
19
|
React.createElement("p", { className: "instruction" }, msg("emailVerifyInstruction1", user === null || user === void 0 ? void 0 : user.email)),
|
20
20
|
React.createElement("p", { className: "instruction" },
|
21
21
|
msg("emailVerifyInstruction2"),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginVerifyEmail.js","sourceRoot":"","sources":["../../src/lib/components/LoginVerifyEmail.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,
|
1
|
+
{"version":3,"file":"LoginVerifyEmail.js","sourceRoot":"","sources":["../../src/lib/components/LoginVerifyEmail.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAazC,MAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,KAA4B,EAAE,EAAE;IAC3D,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,4BAA4B,GAAG,IAAI,EAAE,QAAQ,GAAG,eAAe,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAAxG,iEAAgG,CAAQ,CAAC;IAE/G,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAErB,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC;IAEhC,OAAO,CACH,oBAAC,QAAQ,oCACC,SAAS,EAAE,IAAI,EAAE,4BAA4B,IAAK,OAAO,KAC/D,cAAc,EAAE,KAAK,EACrB,UAAU,EAAE,GAAG,CAAC,kBAAkB,CAAC,EACnC,QAAQ,EACJ;YACI,2BAAG,SAAS,EAAC,aAAa,IAAE,GAAG,CAAC,yBAAyB,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,CAAK;YAC5E,2BAAG,SAAS,EAAC,aAAa;gBACrB,GAAG,CAAC,yBAAyB,CAAC;gBAC/B,+BAAM;gBACN,2BAAG,IAAI,EAAE,GAAG,CAAC,WAAW,IAAG,GAAG,CAAC,aAAa,CAAC,CAAK;;gBAEjD,GAAG,CAAC,yBAAyB,CAAC,CAC/B,CACL,IAET,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
|
+
import type { TemplateProps } from "./Template";
|
2
3
|
import type { KcProps } from "./KcProps";
|
3
4
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
4
5
|
import type { I18n } from "../i18n";
|
5
|
-
declare
|
6
|
+
export declare type LogoutConfirmProps = KcProps & {
|
6
7
|
kcContext: KcContextBase.LogoutConfirm;
|
7
8
|
i18n: I18n;
|
8
|
-
doFetchDefaultThemeResources?: boolean
|
9
|
-
|
9
|
+
doFetchDefaultThemeResources?: boolean;
|
10
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
11
|
+
};
|
12
|
+
declare const LogoutConfirm: React.MemoExoticComponent<(props: LogoutConfirmProps) => JSX.Element>;
|
10
13
|
export default LogoutConfirm;
|
@@ -11,22 +11,22 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
13
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
14
|
-
import
|
15
|
-
const LogoutConfirm = memo((
|
16
|
-
|
14
|
+
import DefaultTemplate from "./Template";
|
15
|
+
const LogoutConfirm = memo((props) => {
|
16
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
17
17
|
const { url, client, logoutConfirm } = kcContext;
|
18
18
|
const { cx } = useCssAndCx();
|
19
19
|
const { msg, msgStr } = i18n;
|
20
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources },
|
20
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { displayMessage: false, headerNode: msg("logoutConfirmTitle"), formNode: React.createElement(React.Fragment, null,
|
21
21
|
React.createElement("div", { id: "kc-logout-confirm", className: "content-area" },
|
22
22
|
React.createElement("p", { className: "instruction" }, msg("logoutConfirmHeader")),
|
23
23
|
React.createElement("form", { className: "form-actions", action: url.logoutConfirmAction, method: "POST" },
|
24
24
|
React.createElement("input", { type: "hidden", name: "session_code", value: logoutConfirm.code }),
|
25
|
-
React.createElement("div", { className: cx(
|
25
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass) },
|
26
26
|
React.createElement("div", { id: "kc-form-options" },
|
27
|
-
React.createElement("div", { className: cx(
|
28
|
-
React.createElement("div", { id: "kc-form-buttons", className: cx(
|
29
|
-
React.createElement("input", { tabIndex: 4, className: cx(
|
27
|
+
React.createElement("div", { className: cx(kcProps.kcFormOptionsWrapperClass) })),
|
28
|
+
React.createElement("div", { id: "kc-form-buttons", className: cx(kcProps.kcFormGroupClass) },
|
29
|
+
React.createElement("input", { tabIndex: 4, className: cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), name: "confirmLogout", id: "kc-logout", type: "submit", value: msgStr("doLogout") })))),
|
30
30
|
React.createElement("div", { id: "kc-info-message" }, !logoutConfirm.skipLink && client.baseUrl && (React.createElement("p", null,
|
31
31
|
React.createElement("a", { href: client.baseUrl, dangerouslySetInnerHTML: { __html: msgStr("backToApplication") } })))))) })));
|
32
32
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LogoutConfirm.js","sourceRoot":"","sources":["../../src/lib/components/LogoutConfirm.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,
|
1
|
+
{"version":3,"file":"LogoutConfirm.js","sourceRoot":"","sources":["../../src/lib/components/LogoutConfirm.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,eAAe,MAAM,YAAY,CAAC;AAazC,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,KAAyB,EAAE,EAAE;IACrD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,4BAA4B,GAAG,IAAI,EAAE,QAAQ,GAAG,eAAe,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAAxG,iEAAgG,CAAQ,CAAC;IAE/G,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IAEjD,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC;IAE7B,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE7B,OAAO,CACH,oBAAC,QAAQ,oCACC,SAAS,EAAE,IAAI,EAAE,4BAA4B,IAAK,OAAO,KAC/D,cAAc,EAAE,KAAK,EACrB,UAAU,EAAE,GAAG,CAAC,oBAAoB,CAAC,EACrC,QAAQ,EACJ;YACI,6BAAK,EAAE,EAAC,mBAAmB,EAAC,SAAS,EAAC,cAAc;gBAChD,2BAAG,SAAS,EAAC,aAAa,IAAE,GAAG,CAAC,qBAAqB,CAAC,CAAK;gBAC3D,8BAAM,SAAS,EAAC,cAAc,EAAC,MAAM,EAAE,GAAG,CAAC,mBAAmB,EAAE,MAAM,EAAC,MAAM;oBACzE,+BAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAE,aAAa,CAAC,IAAI,GAAI;oBACtE,6BAAK,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC;wBACxC,6BAAK,EAAE,EAAC,iBAAiB;4BACrB,6BAAK,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAQ,CAC3D;wBACN,6BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC;4BAC7D,+BACI,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,EAAE,CACT,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,oBAAoB,EAC5B,OAAO,CAAC,kBAAkB,EAC1B,OAAO,CAAC,kBAAkB,CAC7B,EACD,IAAI,EAAC,eAAe,EACpB,EAAE,EAAC,WAAW,EACd,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,GAC3B,CACA,CACJ,CACH;gBACP,6BAAK,EAAE,EAAC,iBAAiB,IACpB,CAAC,aAAa,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,IAAI,CAC1C;oBACI,2BAAG,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,mBAAmB,CAAC,EAAE,GAAI,CAC7F,CACP,CACC,CACJ,CACP,IAET,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
|
+
import type { TemplateProps } from "./Template";
|
2
3
|
import type { KcProps } from "./KcProps";
|
3
4
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
4
5
|
import type { I18n } from "../i18n";
|
5
|
-
declare
|
6
|
+
export declare type RegisterProps = KcProps & {
|
6
7
|
kcContext: KcContextBase.Register;
|
7
8
|
i18n: I18n;
|
8
|
-
doFetchDefaultThemeResources?: boolean
|
9
|
-
|
9
|
+
doFetchDefaultThemeResources?: boolean;
|
10
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
11
|
+
};
|
12
|
+
declare const Register: React.MemoExoticComponent<(props: RegisterProps) => JSX.Element>;
|
10
13
|
export default Register;
|
@@ -10,56 +10,56 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
10
10
|
return t;
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
|
-
import
|
13
|
+
import DefaultTemplate from "./Template";
|
14
14
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
15
|
-
const Register = memo((
|
16
|
-
var _b, _c, _d
|
17
|
-
|
15
|
+
const Register = memo((props) => {
|
16
|
+
var _a, _b, _c, _d;
|
17
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
18
18
|
const { url, messagesPerField, register, realm, passwordRequired, recaptchaRequired, recaptchaSiteKey } = kcContext;
|
19
19
|
const { msg, msgStr } = i18n;
|
20
20
|
const { cx } = useCssAndCx();
|
21
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources },
|
22
|
-
React.createElement("div", { className: cx(
|
23
|
-
React.createElement("div", { className: cx(
|
24
|
-
React.createElement("label", { htmlFor: "firstName", className: cx(
|
25
|
-
React.createElement("div", { className: cx(
|
26
|
-
React.createElement("input", { type: "text", id: "firstName", className: cx(
|
27
|
-
React.createElement("div", { className: cx(
|
28
|
-
React.createElement("div", { className: cx(
|
29
|
-
React.createElement("label", { htmlFor: "lastName", className: cx(
|
30
|
-
React.createElement("div", { className: cx(
|
31
|
-
React.createElement("input", { type: "text", id: "lastName", className: cx(
|
32
|
-
React.createElement("div", { className: cx(
|
33
|
-
React.createElement("div", { className: cx(
|
34
|
-
React.createElement("label", { htmlFor: "email", className: cx(
|
35
|
-
React.createElement("div", { className: cx(
|
36
|
-
React.createElement("input", { type: "text", id: "email", className: cx(
|
37
|
-
!realm.registrationEmailAsUsername && (React.createElement("div", { className: cx(
|
38
|
-
React.createElement("div", { className: cx(
|
39
|
-
React.createElement("label", { htmlFor: "username", className: cx(
|
40
|
-
React.createElement("div", { className: cx(
|
41
|
-
React.createElement("input", { type: "text", id: "username", className: cx(
|
21
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("registerTitle"), formNode: React.createElement("form", { id: "kc-register-form", className: cx(kcProps.kcFormClass), action: url.registrationAction, method: "post" },
|
22
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("firstName", kcProps.kcFormGroupErrorClass)) },
|
23
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
24
|
+
React.createElement("label", { htmlFor: "firstName", className: cx(kcProps.kcLabelClass) }, msg("firstName"))),
|
25
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
26
|
+
React.createElement("input", { type: "text", id: "firstName", className: cx(kcProps.kcInputClass), name: "firstName", defaultValue: (_a = register.formData.firstName) !== null && _a !== void 0 ? _a : "" }))),
|
27
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("lastName", kcProps.kcFormGroupErrorClass)) },
|
28
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
29
|
+
React.createElement("label", { htmlFor: "lastName", className: cx(kcProps.kcLabelClass) }, msg("lastName"))),
|
30
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
31
|
+
React.createElement("input", { type: "text", id: "lastName", className: cx(kcProps.kcInputClass), name: "lastName", defaultValue: (_b = register.formData.lastName) !== null && _b !== void 0 ? _b : "" }))),
|
32
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("email", kcProps.kcFormGroupErrorClass)) },
|
33
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
34
|
+
React.createElement("label", { htmlFor: "email", className: cx(kcProps.kcLabelClass) }, msg("email"))),
|
35
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
36
|
+
React.createElement("input", { type: "text", id: "email", className: cx(kcProps.kcInputClass), name: "email", defaultValue: (_c = register.formData.email) !== null && _c !== void 0 ? _c : "", autoComplete: "email" }))),
|
37
|
+
!realm.registrationEmailAsUsername && (React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("username", kcProps.kcFormGroupErrorClass)) },
|
38
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
39
|
+
React.createElement("label", { htmlFor: "username", className: cx(kcProps.kcLabelClass) }, msg("username"))),
|
40
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
41
|
+
React.createElement("input", { type: "text", id: "username", className: cx(kcProps.kcInputClass), name: "username", defaultValue: (_d = register.formData.username) !== null && _d !== void 0 ? _d : "", autoComplete: "username" })))),
|
42
42
|
passwordRequired && (React.createElement(React.Fragment, null,
|
43
|
-
React.createElement("div", { className: cx(
|
44
|
-
React.createElement("div", { className: cx(
|
45
|
-
React.createElement("label", { htmlFor: "password", className: cx(
|
46
|
-
React.createElement("div", { className: cx(
|
47
|
-
React.createElement("input", { type: "password", id: "password", className: cx(
|
48
|
-
React.createElement("div", { className: cx(
|
49
|
-
React.createElement("div", { className: cx(
|
50
|
-
React.createElement("label", { htmlFor: "password-confirm", className: cx(
|
51
|
-
React.createElement("div", { className: cx(
|
52
|
-
React.createElement("input", { type: "password", id: "password-confirm", className: cx(
|
43
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("password", kcProps.kcFormGroupErrorClass)) },
|
44
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
45
|
+
React.createElement("label", { htmlFor: "password", className: cx(kcProps.kcLabelClass) }, msg("password"))),
|
46
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
47
|
+
React.createElement("input", { type: "password", id: "password", className: cx(kcProps.kcInputClass), name: "password", autoComplete: "new-password" }))),
|
48
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("password-confirm", kcProps.kcFormGroupErrorClass)) },
|
49
|
+
React.createElement("div", { className: cx(kcProps.kcLabelWrapperClass) },
|
50
|
+
React.createElement("label", { htmlFor: "password-confirm", className: cx(kcProps.kcLabelClass) }, msg("passwordConfirm"))),
|
51
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
52
|
+
React.createElement("input", { type: "password", id: "password-confirm", className: cx(kcProps.kcInputClass), name: "password-confirm" }))))),
|
53
53
|
recaptchaRequired && (React.createElement("div", { className: "form-group" },
|
54
|
-
React.createElement("div", { className: cx(
|
54
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
55
55
|
React.createElement("div", { className: "g-recaptcha", "data-size": "compact", "data-sitekey": recaptchaSiteKey })))),
|
56
|
-
React.createElement("div", { className: cx(
|
57
|
-
React.createElement("div", { id: "kc-form-options", className: cx(
|
58
|
-
React.createElement("div", { className: cx(
|
56
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass) },
|
57
|
+
React.createElement("div", { id: "kc-form-options", className: cx(kcProps.kcFormOptionsClass) },
|
58
|
+
React.createElement("div", { className: cx(kcProps.kcFormOptionsWrapperClass) },
|
59
59
|
React.createElement("span", null,
|
60
60
|
React.createElement("a", { href: url.loginUrl }, msg("backToLogin"))))),
|
61
|
-
React.createElement("div", { id: "kc-form-buttons", className: cx(
|
62
|
-
React.createElement("input", { className: cx(
|
61
|
+
React.createElement("div", { id: "kc-form-buttons", className: cx(kcProps.kcFormButtonsClass) },
|
62
|
+
React.createElement("input", { className: cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), type: "submit", value: msgStr("doRegister") })))) })));
|
63
63
|
});
|
64
64
|
export default Register;
|
65
65
|
//# sourceMappingURL=Register.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Register.js","sourceRoot":"","sources":["../../src/lib/components/Register.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,
|
1
|
+
{"version":3,"file":"Register.js","sourceRoot":"","sources":["../../src/lib/components/Register.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAUnD,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,KAAoB,EAAE,EAAE;;IAC3C,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,4BAA4B,GAAG,IAAI,EAAE,QAAQ,GAAG,eAAe,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAAxG,iEAAgG,CAAQ,CAAC;IAE/G,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAC;IAEpH,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE7B,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC;IAE7B,OAAO,CACH,oBAAC,QAAQ,oCACC,SAAS,EAAE,IAAI,EAAE,4BAA4B,IAAK,OAAO,KAC/D,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,EAChC,QAAQ,EACJ,8BAAM,EAAE,EAAC,kBAAkB,EAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,M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E,IAAI,EAAC,kBAAkB,GAAG,CAC1G,CACJ,CACP,CACN;YACA,iBAAiB,IAAI,CAClB,6BAAK,SAAS,EAAC,YAAY;gBACvB,6BAAK,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC;oBAC3C,6BAAK,SAAS,EAAC,aAAa,eAAW,SAAS,kBAAe,gBAAgB,GAAQ,CACrF,CACJ,CACT;YACD,6BAAK,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBACxC,6BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC;oBAC/D,6BAAK,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,yBAAyB,CAAC;wBACjD;4BACI,2BAAG,IAAI,EAAE,GAAG,CAAC,QAAQ,IAAG,GAAG,CAAC,aAAa,CAAC,CAAK,CAC5C,CACL,CACJ;gBAEN,6BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC;oBAC/D,+BACI,SAAS,EAAE,EAAE,CACT,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,oBAAoB,EAC5B,OAAO,CAAC,kBAAkB,EAC1B,OAAO,CAAC,kBAAkB,CAC7B,EACD,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,GAC7B,CACA,CACJ,CACH,IAEb,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
|
+
import type { TemplateProps } from "./Template";
|
2
3
|
import type { KcProps } from "./KcProps";
|
3
4
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
4
5
|
import type { I18n } from "../i18n";
|
5
|
-
declare
|
6
|
+
export declare type RegisterUserProfileProps = KcProps & {
|
6
7
|
kcContext: KcContextBase.RegisterUserProfile;
|
7
8
|
i18n: I18n;
|
8
|
-
doFetchDefaultThemeResources?: boolean
|
9
|
-
|
9
|
+
doFetchDefaultThemeResources?: boolean;
|
10
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
11
|
+
};
|
12
|
+
declare const RegisterUserProfile: React.MemoExoticComponent<(props: RegisterUserProfileProps) => JSX.Element>;
|
10
13
|
export default RegisterUserProfile;
|
@@ -10,28 +10,28 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
10
10
|
return t;
|
11
11
|
};
|
12
12
|
import React, { useMemo, memo, useState } from "react";
|
13
|
-
import
|
13
|
+
import DefaultTemplate from "./Template";
|
14
14
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
15
15
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
16
|
-
const RegisterUserProfile = memo((
|
17
|
-
|
16
|
+
const RegisterUserProfile = memo((props) => {
|
17
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps_ = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
18
18
|
const { url, messagesPerField, recaptchaRequired, recaptchaSiteKey } = kcContext;
|
19
19
|
const { msg, msgStr } = i18n;
|
20
20
|
const { cx, css } = useCssAndCx();
|
21
|
-
const
|
21
|
+
const kcProps = useMemo(() => (Object.assign(Object.assign({}, kcProps_), { "kcFormGroupClass": cx(kcProps_.kcFormGroupClass, css({ "marginBottom": 20 })) })), [cx, css]);
|
22
22
|
const [isFomSubmittable, setIsFomSubmittable] = useState(false);
|
23
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources },
|
24
|
-
React.createElement(UserProfileFormFields, Object.assign({ kcContext: kcContext, onIsFormSubmittableValueChange: setIsFomSubmittable, i18n: i18n },
|
23
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { displayMessage: messagesPerField.exists("global"), displayRequiredFields: true, headerNode: msg("registerTitle"), formNode: React.createElement("form", { id: "kc-register-form", className: cx(kcProps.kcFormClass), action: url.registrationAction, method: "post" },
|
24
|
+
React.createElement(UserProfileFormFields, Object.assign({ kcContext: kcContext, onIsFormSubmittableValueChange: setIsFomSubmittable, i18n: i18n }, kcProps)),
|
25
25
|
recaptchaRequired && (React.createElement("div", { className: "form-group" },
|
26
|
-
React.createElement("div", { className: cx(
|
26
|
+
React.createElement("div", { className: cx(kcProps.kcInputWrapperClass) },
|
27
27
|
React.createElement("div", { className: "g-recaptcha", "data-size": "compact", "data-sitekey": recaptchaSiteKey })))),
|
28
|
-
React.createElement("div", { className: cx(
|
29
|
-
React.createElement("div", { id: "kc-form-options", className: cx(
|
30
|
-
React.createElement("div", { className: cx(
|
28
|
+
React.createElement("div", { className: cx(kcProps.kcFormGroupClass) },
|
29
|
+
React.createElement("div", { id: "kc-form-options", className: cx(kcProps.kcFormOptionsClass) },
|
30
|
+
React.createElement("div", { className: cx(kcProps.kcFormOptionsWrapperClass) },
|
31
31
|
React.createElement("span", null,
|
32
32
|
React.createElement("a", { href: url.loginUrl }, msg("backToLogin"))))),
|
33
|
-
React.createElement("div", { id: "kc-form-buttons", className: cx(
|
34
|
-
React.createElement("input", { className: cx(
|
33
|
+
React.createElement("div", { id: "kc-form-buttons", className: cx(kcProps.kcFormButtonsClass) },
|
34
|
+
React.createElement("input", { className: cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), type: "submit", value: msgStr("doRegister"), disabled: !isFomSubmittable })))) })));
|
35
35
|
});
|
36
36
|
export default RegisterUserProfile;
|
37
37
|
//# sourceMappingURL=RegisterUserProfile.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RegisterUserProfile.js","sourceRoot":"","sources":["../../src/lib/components/RegisterUserProfile.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAA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