keycloakify 6.8.2 → 6.8.4
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 +4 -0
- package/lib/components/IdpReviewUserProfile.js +7 -8
- package/lib/components/IdpReviewUserProfile.js.map +1 -1
- package/lib/components/KcApp.d.ts +1 -1
- package/lib/components/Login.js +16 -17
- package/lib/components/Login.js.map +1 -1
- package/lib/components/LoginConfigTotp.js +17 -18
- package/lib/components/LoginConfigTotp.js.map +1 -1
- package/lib/components/LoginIdpLinkConfirm.js +4 -5
- package/lib/components/LoginIdpLinkConfirm.js.map +1 -1
- package/lib/components/LoginOtp.js +17 -18
- package/lib/components/LoginOtp.js.map +1 -1
- package/lib/components/LoginPassword.js +8 -9
- package/lib/components/LoginPassword.js.map +1 -1
- package/lib/components/LoginResetPassword.js +12 -13
- package/lib/components/LoginResetPassword.js.map +1 -1
- package/lib/components/LoginUpdatePassword.js +18 -19
- package/lib/components/LoginUpdatePassword.js.map +1 -1
- package/lib/components/LoginUpdateProfile.js +28 -29
- package/lib/components/LoginUpdateProfile.js.map +1 -1
- package/lib/components/LoginUsername.js +12 -13
- package/lib/components/LoginUsername.js.map +1 -1
- package/lib/components/LogoutConfirm.js +5 -6
- package/lib/components/LogoutConfirm.js.map +1 -1
- package/lib/components/Register.js +38 -39
- package/lib/components/Register.js.map +1 -1
- package/lib/components/RegisterUserProfile.js +10 -12
- package/lib/components/RegisterUserProfile.js.map +1 -1
- package/lib/components/Template.js +26 -27
- package/lib/components/Template.js.map +1 -1
- package/lib/components/Terms.js +3 -4
- package/lib/components/Terms.js.map +1 -1
- package/lib/components/UpdateUserProfile.js +8 -9
- package/lib/components/UpdateUserProfile.js.map +1 -1
- package/lib/components/WebauthnAuthenticate.js +16 -17
- package/lib/components/WebauthnAuthenticate.js.map +1 -1
- package/lib/components/shared/UserProfileCommons.js +19 -15
- package/lib/components/shared/UserProfileCommons.js.map +1 -1
- package/lib/tools/clsx.d.ts +3 -0
- package/lib/tools/clsx.js +6 -0
- package/lib/tools/clsx.js.map +1 -0
- package/lib/tools/useCssAndCx.d.ts +7 -1
- package/lib/tools/useCssAndCx.js +9 -6
- package/lib/tools/useCssAndCx.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -4
- package/src/lib/components/IdpReviewUserProfile.tsx +7 -9
- package/src/lib/components/KcApp.tsx +1 -1
- package/src/lib/components/Login.tsx +17 -19
- package/src/lib/components/LoginConfigTotp.tsx +17 -19
- package/src/lib/components/LoginIdpLinkConfirm.tsx +4 -6
- package/src/lib/components/LoginOtp.tsx +18 -20
- package/src/lib/components/LoginPassword.tsx +8 -10
- package/src/lib/components/LoginResetPassword.tsx +12 -14
- package/src/lib/components/LoginUpdatePassword.tsx +21 -21
- package/src/lib/components/LoginUpdateProfile.tsx +29 -31
- package/src/lib/components/LoginUsername.tsx +13 -15
- package/src/lib/components/LogoutConfirm.tsx +5 -7
- package/src/lib/components/Register.tsx +40 -40
- package/src/lib/components/RegisterUserProfile.tsx +10 -20
- package/src/lib/components/Template.tsx +26 -28
- package/src/lib/components/Terms.tsx +3 -5
- package/src/lib/components/UpdateUserProfile.tsx +9 -11
- package/src/lib/components/WebauthnAuthenticate.tsx +16 -18
- package/src/lib/components/shared/UserProfileCommons.tsx +30 -27
- package/src/lib/tools/clsx.ts +7 -0
- package/src/lib/tools/useCssAndCx.ts +9 -8
package/README.md
CHANGED
@@ -11,21 +11,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { useState, memo } from "react";
|
13
13
|
import DefaultTemplate from "./Template";
|
14
|
-
import {
|
14
|
+
import { clsx } from "../tools/clsx";
|
15
15
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
16
16
|
const IdpReviewUserProfile = memo((props) => {
|
17
17
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
18
|
-
const { cx } = useCssAndCx();
|
19
18
|
const { msg, msgStr } = i18n;
|
20
19
|
const { url } = kcContext;
|
21
20
|
const [isFomSubmittable, setIsFomSubmittable] = useState(false);
|
22
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("loginIdpReviewProfileTitle"), formNode: React.createElement("form", { id: "kc-idp-review-profile-form", className:
|
21
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("loginIdpReviewProfileTitle"), formNode: React.createElement("form", { id: "kc-idp-review-profile-form", className: clsx(kcProps.kcFormClass), action: url.loginAction, method: "post" },
|
23
22
|
React.createElement(UserProfileFormFields, Object.assign({ kcContext: kcContext, onIsFormSubmittableValueChange: setIsFomSubmittable, i18n: i18n }, kcProps)),
|
24
|
-
React.createElement("div", { className:
|
25
|
-
React.createElement("div", { id: "kc-form-options", className:
|
26
|
-
React.createElement("div", { className:
|
27
|
-
React.createElement("div", { id: "kc-form-buttons", className:
|
28
|
-
React.createElement("input", { className:
|
23
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
24
|
+
React.createElement("div", { id: "kc-form-options", className: clsx(kcProps.kcFormOptionsClass) },
|
25
|
+
React.createElement("div", { className: clsx(kcProps.kcFormOptionsWrapperClass) })),
|
26
|
+
React.createElement("div", { id: "kc-form-buttons", className: clsx(kcProps.kcFormButtonsClass) },
|
27
|
+
React.createElement("input", { className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), type: "submit", value: msgStr("doSubmit"), disabled: !isFomSubmittable })))) })));
|
29
28
|
});
|
30
29
|
export default IdpReviewUserProfile;
|
31
30
|
//# sourceMappingURL=IdpReviewUserProfile.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IdpReviewUserProfile.js","sourceRoot":"","sources":["../../src/lib/components/IdpReviewUserProfile.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"IdpReviewUserProfile.js","sourceRoot":"","sources":["../../src/lib/components/IdpReviewUserProfile.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AASpE,MAAM,oBAAoB,GAAG,IAAI,CAAC,CAAC,KAAgC,EAAE,EAAE;IACnE,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,GAAG,IAAI,CAAC;IAE7B,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;IAE1B,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhE,OAAO,CACH,oBAAC,QAAQ,oCACC,SAAS,EAAE,IAAI,EAAE,4BAA4B,IAAK,OAAO,KAC/D,UAAU,EAAE,GAAG,CAAC,4BAA4B,CAAC,EAC7C,QAAQ,EACJ,8BAAM,EAAE,EAAC,4BAA4B,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,EAAC,MAAM;YAC9G,oBAAC,qBAAqB,kBAAC,SAAS,EAAE,SAAS,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,IAAM,OAAO,EAAI;YAE7H,6BAAK,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBAC1C,6BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;oBACjE,6BAAK,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAI,CACzD;gBACN,6BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;oBACjE,+BACI,SAAS,EAAE,IAAI,CACX,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,UAAU,CAAC,EACzB,QAAQ,EAAE,CAAC,gBAAgB,GAC7B,CACA,CACJ,CACH,IAEb,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
|
@@ -7,7 +7,7 @@ export declare type KcAppProps = KcProps & {
|
|
7
7
|
kcContext: KcContextBase;
|
8
8
|
i18n?: I18n;
|
9
9
|
doFetchDefaultThemeResources?: boolean;
|
10
|
-
Template
|
10
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
11
11
|
};
|
12
12
|
declare const KcApp: React.MemoExoticComponent<(props_: KcAppProps) => JSX.Element | null>;
|
13
13
|
export default KcApp;
|
package/lib/components/Login.js
CHANGED
@@ -11,13 +11,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { useState, memo } from "react";
|
13
13
|
import DefaultTemplate from "./Template";
|
14
|
-
import {
|
14
|
+
import { clsx } from "../tools/clsx";
|
15
15
|
import { useConstCallback } from "powerhooks/useConstCallback";
|
16
16
|
const Login = memo((props) => {
|
17
17
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
18
18
|
const { social, realm, url, usernameEditDisabled, login, auth, registrationDisabled } = kcContext;
|
19
19
|
const { msg, msgStr } = i18n;
|
20
|
-
const { cx } = useCssAndCx();
|
21
20
|
const [isLoginButtonDisabled, setIsLoginButtonDisabled] = useState(false);
|
22
21
|
const onSubmit = useConstCallback(e => {
|
23
22
|
var _a;
|
@@ -29,9 +28,9 @@ const Login = memo((props) => {
|
|
29
28
|
(_a = formElement.querySelector("input[name='email']")) === null || _a === void 0 ? void 0 : _a.setAttribute("name", "username");
|
30
29
|
formElement.submit();
|
31
30
|
});
|
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:
|
33
|
-
React.createElement("div", { id: "kc-form-wrapper", className:
|
34
|
-
React.createElement("div", { className:
|
31
|
+
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: clsx(realm.password && social.providers !== undefined && kcProps.kcContentWrapperClass) },
|
32
|
+
React.createElement("div", { id: "kc-form-wrapper", className: clsx(realm.password && social.providers && [kcProps.kcFormSocialAccountContentClass, kcProps.kcFormSocialAccountClass]) }, realm.password && (React.createElement("form", { id: "kc-form-login", onSubmit: onSubmit, action: url.loginAction, method: "post" },
|
33
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) }, (() => {
|
35
34
|
var _a;
|
36
35
|
const label = !realm.loginWithEmailAllowed
|
37
36
|
? "username"
|
@@ -40,8 +39,8 @@ const Login = memo((props) => {
|
|
40
39
|
: "usernameOrEmail";
|
41
40
|
const autoCompleteHelper = label === "usernameOrEmail" ? "username" : label;
|
42
41
|
return (React.createElement(React.Fragment, null,
|
43
|
-
React.createElement("label", { htmlFor: autoCompleteHelper, className:
|
44
|
-
React.createElement("input", Object.assign({ tabIndex: 1, id: autoCompleteHelper, className:
|
42
|
+
React.createElement("label", { htmlFor: autoCompleteHelper, className: clsx(kcProps.kcLabelClass) }, msg(label)),
|
43
|
+
React.createElement("input", Object.assign({ tabIndex: 1, id: autoCompleteHelper, className: clsx(kcProps.kcInputClass),
|
45
44
|
//NOTE: This is used by Google Chrome auto fill so we use it to tell
|
46
45
|
//the browser how to pre fill the form but before submit we put it back
|
47
46
|
//to username because it is what keycloak expects.
|
@@ -52,10 +51,10 @@ const Login = memo((props) => {
|
|
52
51
|
"autoComplete": "off"
|
53
52
|
})))));
|
54
53
|
})()),
|
55
|
-
React.createElement("div", { className:
|
56
|
-
React.createElement("label", { htmlFor: "password", className:
|
57
|
-
React.createElement("input", { tabIndex: 2, id: "password", className:
|
58
|
-
React.createElement("div", { className:
|
54
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
55
|
+
React.createElement("label", { htmlFor: "password", className: clsx(kcProps.kcLabelClass) }, msg("password")),
|
56
|
+
React.createElement("input", { tabIndex: 2, id: "password", className: clsx(kcProps.kcInputClass), name: "password", type: "password", autoComplete: "off" })),
|
57
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass, kcProps.kcFormSettingClass) },
|
59
58
|
React.createElement("div", { id: "kc-form-options" }, realm.rememberMe && !usernameEditDisabled && (React.createElement("div", { className: "checkbox" },
|
60
59
|
React.createElement("label", null,
|
61
60
|
React.createElement("input", Object.assign({ tabIndex: 3, id: "rememberMe", name: "rememberMe", type: "checkbox" }, (login.rememberMe
|
@@ -64,18 +63,18 @@ const Login = memo((props) => {
|
|
64
63
|
}
|
65
64
|
: {}))),
|
66
65
|
msg("rememberMe"))))),
|
67
|
-
React.createElement("div", { className:
|
66
|
+
React.createElement("div", { className: clsx(kcProps.kcFormOptionsWrapperClass) }, realm.resetPasswordAllowed && (React.createElement("span", null,
|
68
67
|
React.createElement("a", { tabIndex: 5, href: url.loginResetCredentialsUrl }, msg("doForgotPassword")))))),
|
69
|
-
React.createElement("div", { id: "kc-form-buttons", className:
|
68
|
+
React.createElement("div", { id: "kc-form-buttons", className: clsx(kcProps.kcFormGroupClass) },
|
70
69
|
React.createElement("input", Object.assign({ type: "hidden", id: "id-hidden-input", name: "credentialId" }, ((auth === null || auth === void 0 ? void 0 : auth.selectedCredential) !== undefined
|
71
70
|
? {
|
72
71
|
"value": auth.selectedCredential
|
73
72
|
}
|
74
73
|
: {}))),
|
75
|
-
React.createElement("input", { tabIndex: 4, className:
|
76
|
-
realm.password && social.providers !== undefined && (React.createElement("div", { id: "kc-social-providers", className:
|
77
|
-
React.createElement("ul", { className:
|
78
|
-
React.createElement("a", { href: p.loginUrl, id: `zocial-${p.alias}`, className:
|
74
|
+
React.createElement("input", { tabIndex: 4, className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), name: "login", id: "kc-login", type: "submit", value: msgStr("doLogIn"), disabled: isLoginButtonDisabled }))))),
|
75
|
+
realm.password && social.providers !== undefined && (React.createElement("div", { id: "kc-social-providers", className: clsx(kcProps.kcFormSocialAccountContentClass, kcProps.kcFormSocialAccountClass) },
|
76
|
+
React.createElement("ul", { className: clsx(kcProps.kcFormSocialAccountListClass, social.providers.length > 4 && kcProps.kcFormSocialAccountDoubleListClass) }, social.providers.map(p => (React.createElement("li", { key: p.providerId, className: clsx(kcProps.kcFormSocialAccountListLinkClass) },
|
77
|
+
React.createElement("a", { href: p.loginUrl, id: `zocial-${p.alias}`, className: clsx("zocial", p.providerId) },
|
79
78
|
React.createElement("span", null, p.displayName))))))))), infoNode: realm.password &&
|
80
79
|
realm.registrationAllowed &&
|
81
80
|
!registrationDisabled && (React.createElement("div", { id: "kc-registration" },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Login.js","sourceRoot":"","sources":["../../src/lib/components/Login.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"Login.js","sourceRoot":"","sources":["../../src/lib/components/Login.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAW/D,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,KAAiB,EAAE,EAAE;IACrC,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,oBAAoB,EAAE,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAElG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE7B,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1E,MAAM,QAAQ,GAAG,gBAAgB,CAAoC,CAAC,CAAC,EAAE;;QACrE,CAAC,CAAC,cAAc,EAAE,CAAC;QAEnB,wBAA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QAAQ,EAAE,qBAAqB,GACjC,CACA,CACH,CACV,CACC;YACL,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,CACjD,6BAAK,EAAE,EAAC,qBAAqB,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,OAAO,CAAC,wBAAwB,CAAC;gBACpH,4BACI,SAAS,EAAE,IAAI,CACX,OAAO,CAAC,4BAA4B,EACpC,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,kCAAkC,CAC5E,IAEA,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACvB,4BAAI,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,gCAAgC,CAAC;oBAC5E,2BAAG,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC;wBACjF,kCAAO,CAAC,CAAC,WAAW,CAAQ,CAC5B,CACH,CACR,CAAC,CACD,CACH,CACT,CACC,EAEV,QAAQ,EACJ,KAAK,CAAC,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,KAAK,CAAC"}
|
@@ -11,12 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
13
|
import DefaultTemplate from "./Template";
|
14
|
-
import {
|
14
|
+
import { clsx } from "../tools/clsx";
|
15
15
|
const LoginConfigTotp = memo((props) => {
|
16
16
|
var _a;
|
17
17
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
18
18
|
const { url, isAppInitiatedAction, totp, mode, messagesPerField } = kcContext;
|
19
|
-
const { cx } = useCssAndCx();
|
20
19
|
const { msg, msgStr } = i18n;
|
21
20
|
const algToKeyUriAlg = {
|
22
21
|
"HmacSHA1": "SHA1",
|
@@ -65,30 +64,30 @@ const LoginConfigTotp = memo((props) => {
|
|
65
64
|
React.createElement("li", null,
|
66
65
|
React.createElement("p", null, msg("loginTotpStep3")),
|
67
66
|
React.createElement("p", null, msg("loginTotpStep3DeviceName")))),
|
68
|
-
React.createElement("form", { action: url.loginAction, className:
|
69
|
-
React.createElement("div", { className:
|
70
|
-
React.createElement("div", { className:
|
71
|
-
React.createElement("label", { htmlFor: "totp", className:
|
67
|
+
React.createElement("form", { action: url.loginAction, className: clsx(kcProps.kcFormClass), id: "kc-totp-settings-form", method: "post" },
|
68
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
69
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
70
|
+
React.createElement("label", { htmlFor: "totp", className: clsx(kcProps.kcLabelClass) }, msg("authenticatorCode")),
|
72
71
|
" ",
|
73
72
|
React.createElement("span", { className: "required" }, "*")),
|
74
|
-
React.createElement("div", { className:
|
75
|
-
React.createElement("input", { type: "text", id: "totp", name: "totp", autoComplete: "off", className:
|
76
|
-
messagesPerField.existsError("totp") && (React.createElement("span", { id: "input-error-otp-code", className:
|
73
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
74
|
+
React.createElement("input", { type: "text", id: "totp", name: "totp", autoComplete: "off", className: clsx(kcProps.kcInputClass), "aria-invalid": messagesPerField.existsError("totp") }),
|
75
|
+
messagesPerField.existsError("totp") && (React.createElement("span", { id: "input-error-otp-code", className: clsx(kcProps.kcInputErrorMessageClass), "aria-live": "polite" }, messagesPerField.get("totp")))),
|
77
76
|
React.createElement("input", { type: "hidden", id: "totpSecret", name: "totpSecret", value: totp.totpSecret }),
|
78
77
|
mode && React.createElement("input", { type: "hidden", id: "mode", value: mode })),
|
79
|
-
React.createElement("div", { className:
|
80
|
-
React.createElement("div", { className:
|
81
|
-
React.createElement("label", { htmlFor: "userLabel", className:
|
78
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
79
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
80
|
+
React.createElement("label", { htmlFor: "userLabel", className: clsx(kcProps.kcLabelClass) }, msg("loginTotpDeviceName")),
|
82
81
|
" ",
|
83
82
|
totp.otpCredentials.length >= 1 && React.createElement("span", { className: "required" }, "*")),
|
84
|
-
React.createElement("div", { className:
|
85
|
-
React.createElement("input", { type: "text", id: "userLabel", name: "userLabel", autoComplete: "off", className:
|
86
|
-
messagesPerField.existsError("userLabel") && (React.createElement("span", { id: "input-error-otp-label", className:
|
83
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
84
|
+
React.createElement("input", { type: "text", id: "userLabel", name: "userLabel", autoComplete: "off", className: clsx(kcProps.kcInputClass), "aria-invalid": messagesPerField.existsError("userLabel") }),
|
85
|
+
messagesPerField.existsError("userLabel") && (React.createElement("span", { id: "input-error-otp-label", className: clsx(kcProps.kcInputErrorMessageClass), "aria-live": "polite" }, messagesPerField.get("userLabel"))))),
|
87
86
|
isAppInitiatedAction ? (React.createElement(React.Fragment, null,
|
88
|
-
React.createElement("input", { type: "submit", className:
|
89
|
-
React.createElement("button", { type: "submit", className:
|
87
|
+
React.createElement("input", { type: "submit", className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonLargeClass), id: "saveTOTPBtn", value: msgStr("doSubmit") }),
|
88
|
+
React.createElement("button", { type: "submit", className: clsx(kcProps.kcButtonClass, kcProps.kcButtonDefaultClass, kcProps.kcButtonLargeClass, kcProps.kcButtonLargeClass), id: "cancelTOTPBtn", name: "cancel-aia", value: "true" },
|
90
89
|
"$",
|
91
|
-
msg("doCancel")))) : (React.createElement("input", { type: "submit", className:
|
90
|
+
msg("doCancel")))) : (React.createElement("input", { type: "submit", className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonLargeClass), id: "saveTOTPBtn", value: msgStr("doSubmit") })))) })));
|
92
91
|
});
|
93
92
|
export default LoginConfigTotp;
|
94
93
|
//# sourceMappingURL=LoginConfigTotp.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginConfigTotp.js","sourceRoot":"","sources":["../../src/lib/components/LoginConfigTotp.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"LoginConfigTotp.js","sourceRoot":"","sources":["../../src/lib/components/LoginConfigTotp.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAUrC,MAAM,eAAe,GAAG,IAAI,CAAC,CAAC,KAA2B,EAAE,EAAE;;IACzD,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,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,SA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,CAAC,EAChG,EAAE,EAAC,aAAa,EAChB,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,GAC3B,CACL,CACE,CACR,IAET,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
@@ -11,16 +11,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
13
|
import DefaultTemplate from "./Template";
|
14
|
-
import {
|
14
|
+
import { clsx } from "../tools/clsx";
|
15
15
|
const LoginIdpLinkConfirm = memo((props) => {
|
16
16
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
17
17
|
const { url, idpAlias } = kcContext;
|
18
18
|
const { msg } = i18n;
|
19
|
-
const { cx } = useCssAndCx();
|
20
19
|
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("confirmLinkIdpTitle"), formNode: React.createElement("form", { id: "kc-register-form", action: url.loginAction, method: "post" },
|
21
|
-
React.createElement("div", { className:
|
22
|
-
React.createElement("button", { type: "submit", className:
|
23
|
-
React.createElement("button", { type: "submit", className:
|
20
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
21
|
+
React.createElement("button", { type: "submit", className: clsx(kcProps.kcButtonClass, kcProps.kcButtonDefaultClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), name: "submitAction", id: "updateProfile", value: "updateProfile" }, msg("confirmLinkIdpReviewProfile")),
|
22
|
+
React.createElement("button", { type: "submit", className: clsx(kcProps.kcButtonClass, kcProps.kcButtonDefaultClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), name: "submitAction", id: "linkAccount", value: "linkAccount" }, msg("confirmLinkIdpContinue", idpAlias)))) })));
|
24
23
|
});
|
25
24
|
export default LoginIdpLinkConfirm;
|
26
25
|
//# sourceMappingURL=LoginIdpLinkConfirm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginIdpLinkConfirm.js","sourceRoot":"","sources":["../../src/lib/components/LoginIdpLinkConfirm.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"LoginIdpLinkConfirm.js","sourceRoot":"","sources":["../../src/lib/components/LoginIdpLinkConfirm.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAUrC,MAAM,mBAAmB,GAAG,IAAI,CAAC,CAAC,KAA+B,EAAE,EAAE;IACjE,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,QAAQ,EAAE,GAAG,SAAS,CAAC;IAEpC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAErB,OAAO,CACH,oBAAC,QAAQ,oCACC,SAAS,EAAE,IAAI,EAAE,4BAA4B,IAAK,OAAO,KAC/D,UAAU,EAAE,GAAG,CAAC,qBAAqB,CAAC,EACtC,QAAQ,EACJ,8BAAM,EAAE,EAAC,kBAAkB,EAAC,MAAM,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,EAAC,MAAM;YAC9D,6BAAK,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBAC1C,gCACI,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CACX,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,oBAAoB,EAC5B,OAAO,CAAC,kBAAkB,EAC1B,OAAO,CAAC,kBAAkB,CAC7B,EACD,IAAI,EAAC,cAAc,EACnB,EAAE,EAAC,eAAe,EAClB,KAAK,EAAC,eAAe,IAEpB,GAAG,CAAC,6BAA6B,CAAC,CAC9B;gBACT,gCACI,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CACX,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,oBAAoB,EAC5B,OAAO,CAAC,kBAAkB,EAC1B,OAAO,CAAC,kBAAkB,CAC7B,EACD,IAAI,EAAC,cAAc,EACnB,EAAE,EAAC,aAAa,EAChB,KAAK,EAAC,aAAa,IAElB,GAAG,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CACnC,CACP,CACH,IAEb,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
@@ -13,11 +13,10 @@ import React, { useEffect, memo } from "react";
|
|
13
13
|
import DefaultTemplate from "./Template";
|
14
14
|
import { headInsert } from "../tools/headInsert";
|
15
15
|
import { pathJoin } from "../../bin/tools/pathJoin";
|
16
|
-
import {
|
16
|
+
import { clsx } from "../tools/clsx";
|
17
17
|
const LoginOtp = memo((props) => {
|
18
18
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
19
19
|
const { otpLogin, url } = kcContext;
|
20
|
-
const { cx } = useCssAndCx();
|
21
20
|
const { msg, msgStr } = i18n;
|
22
21
|
useEffect(() => {
|
23
22
|
let isCleanedUp = false;
|
@@ -33,23 +32,23 @@ const LoginOtp = memo((props) => {
|
|
33
32
|
isCleanedUp = true;
|
34
33
|
};
|
35
34
|
}, []);
|
36
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("doLogIn"), formNode: React.createElement("form", { id: "kc-otp-login-form", className:
|
37
|
-
otpLogin.userOtpCredentials.length > 1 && (React.createElement("div", { className:
|
38
|
-
React.createElement("div", { className:
|
35
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("doLogIn"), formNode: React.createElement("form", { id: "kc-otp-login-form", className: clsx(kcProps.kcFormClass), action: url.loginAction, method: "post" },
|
36
|
+
otpLogin.userOtpCredentials.length > 1 && (React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
37
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) }, otpLogin.userOtpCredentials.map(otpCredential => (React.createElement("div", { key: otpCredential.id, className: clsx(kcProps.kcSelectOTPListClass) },
|
39
38
|
React.createElement("input", { type: "hidden", value: "${otpCredential.id}" }),
|
40
|
-
React.createElement("div", { className:
|
41
|
-
React.createElement("span", { className:
|
42
|
-
React.createElement("h2", { className:
|
43
|
-
React.createElement("div", { className:
|
44
|
-
React.createElement("div", { className:
|
45
|
-
React.createElement("label", { htmlFor: "otp", className:
|
46
|
-
React.createElement("div", { className:
|
47
|
-
React.createElement("input", { id: "otp", name: "otp", autoComplete: "off", type: "text", className:
|
48
|
-
React.createElement("div", { className:
|
49
|
-
React.createElement("div", { id: "kc-form-options", className:
|
50
|
-
React.createElement("div", { className:
|
51
|
-
React.createElement("div", { id: "kc-form-buttons", className:
|
52
|
-
React.createElement("input", { className:
|
39
|
+
React.createElement("div", { className: clsx(kcProps.kcSelectOTPListItemClass) },
|
40
|
+
React.createElement("span", { className: clsx(kcProps.kcAuthenticatorOtpCircleClass) }),
|
41
|
+
React.createElement("h2", { className: clsx(kcProps.kcSelectOTPItemHeadingClass) }, otpCredential.userLabel)))))))),
|
42
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
43
|
+
React.createElement("div", { className: clsx(kcProps.kcLabelWrapperClass) },
|
44
|
+
React.createElement("label", { htmlFor: "otp", className: clsx(kcProps.kcLabelClass) }, msg("loginOtpOneTime"))),
|
45
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
46
|
+
React.createElement("input", { id: "otp", name: "otp", autoComplete: "off", type: "text", className: clsx(kcProps.kcInputClass), autoFocus: true }))),
|
47
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
48
|
+
React.createElement("div", { id: "kc-form-options", className: clsx(kcProps.kcFormOptionsClass) },
|
49
|
+
React.createElement("div", { className: clsx(kcProps.kcFormOptionsWrapperClass) })),
|
50
|
+
React.createElement("div", { id: "kc-form-buttons", className: clsx(kcProps.kcFormButtonsClass) },
|
51
|
+
React.createElement("input", { className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), name: "login", id: "kc-login", type: "submit", value: msgStr("doLogIn") })))) })));
|
53
52
|
});
|
54
53
|
function evaluateInlineScript() {
|
55
54
|
$(document).ready(function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginOtp.js","sourceRoot":"","sources":["../../src/lib/components/LoginOtp.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"LoginOtp.js","sourceRoot":"","sources":["../../src/lib/components/LoginOtp.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,UAAU,EAAE,MAAM,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AAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;aAC3D;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,GAAG,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;QACtD,IAAI,WAAW,EAAE;YACb,WAAW,CAAC,KAAK,EAAE,CAAC;SACvB;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,eAAe,QAAQ,CAAC"}
|
@@ -11,14 +11,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { useState, memo } from "react";
|
13
13
|
import DefaultTemplate from "./Template";
|
14
|
-
import {
|
14
|
+
import { clsx } from "../tools/clsx";
|
15
15
|
import { useConstCallback } from "powerhooks/useConstCallback";
|
16
16
|
const LoginPassword = memo((props) => {
|
17
17
|
var _a;
|
18
18
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
19
19
|
const { realm, url, login } = kcContext;
|
20
20
|
const { msg, msgStr } = i18n;
|
21
|
-
const { cx } = useCssAndCx();
|
22
21
|
const [isLoginButtonDisabled, setIsLoginButtonDisabled] = useState(false);
|
23
22
|
const onSubmit = useConstCallback(e => {
|
24
23
|
e.preventDefault();
|
@@ -29,16 +28,16 @@ const LoginPassword = memo((props) => {
|
|
29
28
|
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("doLogIn"), formNode: React.createElement("div", { id: "kc-form" },
|
30
29
|
React.createElement("div", { id: "kc-form-wrapper" },
|
31
30
|
React.createElement("form", { id: "kc-form-login", onSubmit: onSubmit, action: url.loginAction, method: "post" },
|
32
|
-
React.createElement("div", { className:
|
31
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
33
32
|
React.createElement("hr", null),
|
34
|
-
React.createElement("label", { htmlFor: "password", className:
|
35
|
-
React.createElement("input", { tabIndex: 2, id: "password", className:
|
36
|
-
React.createElement("div", { className:
|
33
|
+
React.createElement("label", { htmlFor: "password", className: clsx(kcProps.kcLabelClass) }, msg("password")),
|
34
|
+
React.createElement("input", { tabIndex: 2, id: "password", className: clsx(kcProps.kcInputClass), name: "password", type: "password", autoFocus: true, autoComplete: "on", defaultValue: (_a = login.password) !== null && _a !== void 0 ? _a : "" })),
|
35
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass, kcProps.kcFormSettingClass) },
|
37
36
|
React.createElement("div", { id: "kc-form-options" }),
|
38
|
-
React.createElement("div", { className:
|
37
|
+
React.createElement("div", { className: clsx(kcProps.kcFormOptionsWrapperClass) }, realm.resetPasswordAllowed && (React.createElement("span", null,
|
39
38
|
React.createElement("a", { tabIndex: 5, href: url.loginResetCredentialsUrl }, msg("doForgotPassword")))))),
|
40
|
-
React.createElement("div", { id: "kc-form-buttons", className:
|
41
|
-
React.createElement("input", { tabIndex: 4, className:
|
39
|
+
React.createElement("div", { id: "kc-form-buttons", className: clsx(kcProps.kcFormGroupClass) },
|
40
|
+
React.createElement("input", { tabIndex: 4, className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), name: "login", id: "kc-login", type: "submit", value: msgStr("doLogIn"), disabled: isLoginButtonDisabled }))))) })));
|
42
41
|
});
|
43
42
|
export default LoginPassword;
|
44
43
|
//# sourceMappingURL=LoginPassword.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginPassword.js","sourceRoot":"","sources":["../../src/lib/components/LoginPassword.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"LoginPassword.js","sourceRoot":"","sources":["../../src/lib/components/Lo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AAC,EACxB,QAAQ,EAAE,qBAAqB,GACjC,CACA,CACH,CACL,CACJ,IAEZ,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
@@ -11,29 +11,28 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
13
|
import DefaultTemplate from "./Template";
|
14
|
-
import {
|
14
|
+
import { clsx } from "../tools/clsx";
|
15
15
|
const LoginResetPassword = memo((props) => {
|
16
16
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
17
17
|
const { url, realm, auth } = kcContext;
|
18
18
|
const { msg, msgStr } = i18n;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
React.createElement("label", { htmlFor: "username", className: cx(kcProps.kcLabelClass) }, !realm.loginWithEmailAllowed
|
19
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { displayMessage: false, headerNode: msg("emailForgotTitle"), formNode: React.createElement("form", { id: "kc-reset-password-form", className: clsx(kcProps.kcFormClass), action: url.loginAction, method: "post" },
|
20
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
21
|
+
React.createElement("div", { className: clsx(kcProps.kcLabelWrapperClass) },
|
22
|
+
React.createElement("label", { htmlFor: "username", className: clsx(kcProps.kcLabelClass) }, !realm.loginWithEmailAllowed
|
24
23
|
? msg("username")
|
25
24
|
: !realm.registrationEmailAsUsername
|
26
25
|
? msg("usernameOrEmail")
|
27
26
|
: msg("email"))),
|
28
|
-
React.createElement("div", { className:
|
29
|
-
React.createElement("input", { type: "text", id: "username", name: "username", className:
|
30
|
-
React.createElement("div", { className:
|
31
|
-
React.createElement("div", { id: "kc-form-options", className:
|
32
|
-
React.createElement("div", { className:
|
27
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
28
|
+
React.createElement("input", { type: "text", id: "username", name: "username", className: clsx(kcProps.kcInputClass), autoFocus: true, defaultValue: auth !== undefined && auth.showUsername ? auth.attemptedUsername : undefined }))),
|
29
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass, kcProps.kcFormSettingClass) },
|
30
|
+
React.createElement("div", { id: "kc-form-options", className: clsx(kcProps.kcFormOptionsClass) },
|
31
|
+
React.createElement("div", { className: clsx(kcProps.kcFormOptionsWrapperClass) },
|
33
32
|
React.createElement("span", null,
|
34
33
|
React.createElement("a", { href: url.loginUrl }, msg("backToLogin"))))),
|
35
|
-
React.createElement("div", { id: "kc-form-buttons", className:
|
36
|
-
React.createElement("input", { className:
|
34
|
+
React.createElement("div", { id: "kc-form-buttons", className: clsx(kcProps.kcFormButtonsClass) },
|
35
|
+
React.createElement("input", { className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), type: "submit", value: msgStr("doSubmit") })))), infoNode: msg("emailInstruction") })));
|
37
36
|
});
|
38
37
|
export default LoginResetPassword;
|
39
38
|
//# sourceMappingURL=LoginResetPassword.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginResetPassword.js","sourceRoot":"","sources":["../../src/lib/components/LoginResetPassword.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"LoginResetPassword.js","sourceRoot":"","sources":["../../src/lib/components/LoginResetPassword.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CA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,EACb,IAAI,EAAC,UAAU,EACf,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EACrC,SAAS,QACT,YAAY,EAAE,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,GAC5F,CACA,CACJ;YACN,6BAAK,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,kBAAkB,CAAC;gBACtE,6BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;oBACjE,6BAAK,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC;wBACnD;4BACI,2BAAG,IAAI,EAAE,GAAG,CAAC,QAAQ,IAAG,GAAG,CAAC,aAAa,CAAC,CAAK,CAC5C,CACL,CACJ;gBAEN,6BAAK,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;oBACjE,+BACI,SAAS,EAAE,IAAI,CACX,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,UAAU,CAAC,GAC3B,CACA,CACJ,CACH,EAEX,QAAQ,EAAE,GAAG,CAAC,kBAAkB,CAAC,IACnC,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
@@ -11,34 +11,33 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { memo } from "react";
|
13
13
|
import DefaultTemplate from "./Template";
|
14
|
-
import {
|
14
|
+
import { clsx } from "../tools/clsx";
|
15
15
|
const LoginUpdatePassword = memo((props) => {
|
16
16
|
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate } = props, kcProps = __rest(props, ["kcContext", "i18n", "doFetchDefaultThemeResources", "Template"]);
|
17
|
-
const { cx } = useCssAndCx();
|
18
17
|
const { msg, msgStr } = i18n;
|
19
18
|
const { url, messagesPerField, isAppInitiatedAction, username } = kcContext;
|
20
|
-
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("updatePasswordTitle"), formNode: React.createElement("form", { id: "kc-passwd-update-form", className:
|
19
|
+
return (React.createElement(Template, Object.assign({}, Object.assign({ kcContext, i18n, doFetchDefaultThemeResources }, kcProps), { headerNode: msg("updatePasswordTitle"), formNode: React.createElement("form", { id: "kc-passwd-update-form", className: clsx(kcProps.kcFormClass), action: url.loginAction, method: "post" },
|
21
20
|
React.createElement("input", { type: "text", id: "username", name: "username", value: username, readOnly: true, autoComplete: "username", style: { display: "none" } }),
|
22
21
|
React.createElement("input", { type: "password", id: "password", name: "password", autoComplete: "current-password", style: { display: "none" } }),
|
23
|
-
React.createElement("div", { className:
|
24
|
-
React.createElement("div", { className:
|
25
|
-
React.createElement("label", { htmlFor: "password-new", className:
|
26
|
-
React.createElement("div", { className:
|
27
|
-
React.createElement("input", { type: "password", id: "password-new", name: "password-new", autoFocus: true, autoComplete: "new-password", className:
|
28
|
-
React.createElement("div", { className:
|
29
|
-
React.createElement("div", { className:
|
30
|
-
React.createElement("label", { htmlFor: "password-confirm", className:
|
31
|
-
React.createElement("div", { className:
|
32
|
-
React.createElement("input", { type: "password", id: "password-confirm", name: "password-confirm", autoComplete: "new-password", className:
|
33
|
-
React.createElement("div", { className:
|
34
|
-
React.createElement("div", { id: "kc-form-options", className:
|
35
|
-
React.createElement("div", { className:
|
22
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("password", kcProps.kcFormGroupErrorClass)) },
|
23
|
+
React.createElement("div", { className: clsx(kcProps.kcLabelWrapperClass) },
|
24
|
+
React.createElement("label", { htmlFor: "password-new", className: clsx(kcProps.kcLabelClass) }, msg("passwordNew"))),
|
25
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
26
|
+
React.createElement("input", { type: "password", id: "password-new", name: "password-new", autoFocus: true, autoComplete: "new-password", className: clsx(kcProps.kcInputClass) }))),
|
27
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass, messagesPerField.printIfExists("password-confirm", kcProps.kcFormGroupErrorClass)) },
|
28
|
+
React.createElement("div", { className: clsx(kcProps.kcLabelWrapperClass) },
|
29
|
+
React.createElement("label", { htmlFor: "password-confirm", className: clsx(kcProps.kcLabelClass) }, msg("passwordConfirm"))),
|
30
|
+
React.createElement("div", { className: clsx(kcProps.kcInputWrapperClass) },
|
31
|
+
React.createElement("input", { type: "password", id: "password-confirm", name: "password-confirm", autoComplete: "new-password", className: clsx(kcProps.kcInputClass) }))),
|
32
|
+
React.createElement("div", { className: clsx(kcProps.kcFormGroupClass) },
|
33
|
+
React.createElement("div", { id: "kc-form-options", className: clsx(kcProps.kcFormOptionsClass) },
|
34
|
+
React.createElement("div", { className: clsx(kcProps.kcFormOptionsWrapperClass) }, isAppInitiatedAction && (React.createElement("div", { className: "checkbox" },
|
36
35
|
React.createElement("label", null,
|
37
36
|
React.createElement("input", { type: "checkbox", id: "logout-sessions", name: "logout-sessions", value: "on", checked: true }),
|
38
37
|
msgStr("logoutOtherSessions")))))),
|
39
|
-
React.createElement("div", { id: "kc-form-buttons", className:
|
40
|
-
React.createElement("input", { className:
|
41
|
-
React.createElement("button", { className:
|
38
|
+
React.createElement("div", { id: "kc-form-buttons", className: clsx(kcProps.kcFormButtonsClass) }, isAppInitiatedAction ? (React.createElement(React.Fragment, null,
|
39
|
+
React.createElement("input", { className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonLargeClass), type: "submit", defaultValue: msgStr("doSubmit") }),
|
40
|
+
React.createElement("button", { className: clsx(kcProps.kcButtonClass, kcProps.kcButtonDefaultClass, kcProps.kcButtonLargeClass), type: "submit", name: "cancel-aia", value: "true" }, msg("doCancel")))) : (React.createElement("input", { className: clsx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonBlockClass, kcProps.kcButtonLargeClass), type: "submit", defaultValue: msgStr("doSubmit") }))))) })));
|
42
41
|
});
|
43
42
|
export default LoginUpdatePassword;
|
44
43
|
//# sourceMappingURL=LoginUpdatePassword.js.map
|