@everymatrix/user-login 1.61.1 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-2eb404c0.js → index-430b4c77.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-login.cjs.entry.js +169 -45
- package/dist/cjs/user-login.cjs.js +2 -2
- package/dist/collection/components/user-login/user-login.js +134 -21
- package/dist/collection/utils/locale.utils.js +36 -24
- package/dist/collection/utils/types.js +1 -0
- package/dist/esm/{index-996f8854.js → index-16e95691.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/user-login.entry.js +169 -45
- package/dist/esm/user-login.js +3 -3
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/user-login/user-login.d.ts +32 -0
- package/dist/types/components.d.ts +6 -0
- package/dist/types/utils/types.d.ts +6 -0
- package/dist/user-login/{p-05a62ad8.entry.js → p-20f0604a.entry.js} +48 -48
- package/dist/user-login/p-55620ccb.js +2 -0
- package/dist/user-login/user-login.esm.js +1 -1
- package/package.json +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +0 -2
- package/dist/user-login/p-8cb697c3.js +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-login/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, h as h$2 } from './index-
|
|
1
|
+
import { r as registerInstance, h as h$2 } from './index-16e95691.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const TRANSLATIONS = {
|
|
5
5
|
"en": {
|
|
6
|
-
"invalidField": "
|
|
6
|
+
"invalidField": "Sorry, that username/email address and/or password has not been recognized.",
|
|
7
7
|
"forgotPassword": "Forgot Password",
|
|
8
8
|
"userEmail": "Username or Email",
|
|
9
9
|
"userPhone": "Phone number",
|
|
@@ -16,10 +16,11 @@ const TRANSLATIONS = {
|
|
|
16
16
|
"GmErr_USER_ACCOUNT_BLOCKED": "You’re currently unable to login to your account - please contact Customer Services for more information.",
|
|
17
17
|
"setUpPassowrd": "You need to reset your password",
|
|
18
18
|
"Unauthorized": "The player account number, e-mail address or password is incorrect",
|
|
19
|
-
"CountryRestricted": "Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support."
|
|
19
|
+
"CountryRestricted": "Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.",
|
|
20
|
+
"configError": "An unexpected error has occured when fetchig the configuration"
|
|
20
21
|
},
|
|
21
22
|
"tr": {
|
|
22
|
-
"invalidField": "
|
|
23
|
+
"invalidField": "Üzgünüz, bu kullanıcı adı/e-posta adresi ve/veya şifre tanınmadı.",
|
|
23
24
|
"forgotPassword": "Şifremi Unuttum",
|
|
24
25
|
"userEmail": "Kullanıcı Adı veya E-posta",
|
|
25
26
|
"userPhone": "Telefon numarası",
|
|
@@ -32,10 +33,11 @@ const TRANSLATIONS = {
|
|
|
32
33
|
"GmErr_USER_ACCOUNT_BLOCKED": "Şu anda hesabınıza giriş yapamıyorsunuz - daha fazla bilgi için Müşteri Hizmetleri ile iletişime geçin.",
|
|
33
34
|
"setUpPassowrd": "Şifrenizi sıfırlamanız gerekiyor",
|
|
34
35
|
"Unauthorized": "Oyuncu hesap numarası, e-posta adresi veya şifre hatalı",
|
|
35
|
-
"CountryRestricted": "Kısıtlı bir yargı bölgesinden kayıt yapılamaz. Daha fazla sorunla karşılaşırsanız, lütfen destek ile iletişime geçin."
|
|
36
|
+
"CountryRestricted": "Kısıtlı bir yargı bölgesinden kayıt yapılamaz. Daha fazla sorunla karşılaşırsanız, lütfen destek ile iletişime geçin.",
|
|
37
|
+
"configError": "Yapılandırma alınırken beklenmeyen bir hata oluştu"
|
|
36
38
|
},
|
|
37
39
|
"en-us": {
|
|
38
|
-
"invalidField": "
|
|
40
|
+
"invalidField": "Sorry, that username/email address and/or password has not been recognized.",
|
|
39
41
|
"forgotPassword": "Forgot Password",
|
|
40
42
|
"userEmail": "Username or Email",
|
|
41
43
|
"userPhone": "Phone number",
|
|
@@ -48,10 +50,11 @@ const TRANSLATIONS = {
|
|
|
48
50
|
"GmErr_USER_ACCOUNT_BLOCKED": "You’re currently unable to login to your account - please contact Customer Services for more information.",
|
|
49
51
|
"setUpPassowrd": "You need to reset your password",
|
|
50
52
|
"Unauthorized": "The player account number, e-mail address or password is incorrect",
|
|
51
|
-
"CountryRestricted": "Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support."
|
|
53
|
+
"CountryRestricted": "Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.",
|
|
54
|
+
"configError": "An unexpected error has occured when fetchig the configuration"
|
|
52
55
|
},
|
|
53
56
|
"ro": {
|
|
54
|
-
"invalidField": "
|
|
57
|
+
"invalidField": "Ne pare rău, acest nume de utilizator/adresă de e-mail și/sau parolă nu a fost recunoscut.",
|
|
55
58
|
"forgotPassword": "Ați uitat parola",
|
|
56
59
|
"userEmail": "Nume utilizator sau email",
|
|
57
60
|
"userPhone": "Număr de telefon",
|
|
@@ -64,10 +67,11 @@ const TRANSLATIONS = {
|
|
|
64
67
|
"GmErr_USER_ACCOUNT_BLOCKED": "În prezent, nu vă puteți conecta la contul dvs. - vă rugăm să contactați Serviciul Clienți pentru mai multe informații.",
|
|
65
68
|
"setUpPassowrd": "Trebuie să vă resetați parola",
|
|
66
69
|
"Unauthorized": "Numărul contului de jucător, adresa de e-mail sau parola sunt incorecte",
|
|
67
|
-
"CountryRestricted": "Înregistrarea nu este posibilă dintr-o jurisdicție restricționată. Dacă întâmpinați alte probleme, vă rugăm să contactați asistența."
|
|
70
|
+
"CountryRestricted": "Înregistrarea nu este posibilă dintr-o jurisdicție restricționată. Dacă întâmpinați alte probleme, vă rugăm să contactați asistența.",
|
|
71
|
+
"configError": "A apărut o eroare neașteptată la preluarea configurației"
|
|
68
72
|
},
|
|
69
73
|
"hr": {
|
|
70
|
-
"invalidField": "
|
|
74
|
+
"invalidField": "Žao nam je, to korisničko ime/adresa e-pošte i/ili lozinka nisu prepoznati.",
|
|
71
75
|
"forgotPassword": "Zaboravljena lozinka",
|
|
72
76
|
"userEmail": "Korisničko ime ili email",
|
|
73
77
|
"userPhone": "Broj telefona",
|
|
@@ -80,10 +84,11 @@ const TRANSLATIONS = {
|
|
|
80
84
|
"Forbidden_UserAccount_Blocked": "Vaš račun je blokiran",
|
|
81
85
|
"GmErr_USER_ACCOUNT_BLOCKED": "Trenutno se ne možete prijaviti na svoj račun - molimo kontaktirajte Službu za korisnike za više informacija.",
|
|
82
86
|
"Unauthorized": "Lozinka, e-mail adresa ili korisničko ime su pogrešno uneseni",
|
|
83
|
-
"CountryRestricted": "Prijava nije moguća iz zemlje ograničene jurisdikcije. U slučaju daljnjih poteškoća, molimo kontaktirajte podršku."
|
|
87
|
+
"CountryRestricted": "Prijava nije moguća iz zemlje ograničene jurisdikcije. U slučaju daljnjih poteškoća, molimo kontaktirajte podršku.",
|
|
88
|
+
"configError": "Došlo je do neočekivane pogreške prilikom dohvaćanja konfiguracije"
|
|
84
89
|
},
|
|
85
90
|
"fr": {
|
|
86
|
-
"invalidField": "
|
|
91
|
+
"invalidField": "Désolé, ce nom d'utilisateur/adresse e-mail et/ou mot de passe n'a pas été reconnu.",
|
|
87
92
|
"forgotPassword": "Mot de passe oublié",
|
|
88
93
|
"userEmail": "Nom d'utilisateur ou email",
|
|
89
94
|
"userPhone": "Numéro de téléphone",
|
|
@@ -96,10 +101,11 @@ const TRANSLATIONS = {
|
|
|
96
101
|
"GmErr_USER_ACCOUNT_BLOCKED": "Vous ne pouvez actuellement pas vous connecter à votre compte - veuillez contacter le service client pour plus d'informations.",
|
|
97
102
|
"setUpPassowrd": "Vous devez réinitialiser votre mot de passe",
|
|
98
103
|
"Unauthorized": "Le numéro de compte joueur, l'adresse e-mail ou le mot de passe est incorrect",
|
|
99
|
-
"CountryRestricted": "L'inscription n'est pas possible depuis une juridiction restreinte. Si vous rencontrez d'autres problèmes, veuillez contacter le support."
|
|
104
|
+
"CountryRestricted": "L'inscription n'est pas possible depuis une juridiction restreinte. Si vous rencontrez d'autres problèmes, veuillez contacter le support.",
|
|
105
|
+
"configError": "Une erreur inattendue s'est produite lors de la récupération de la configuration"
|
|
100
106
|
},
|
|
101
107
|
"cs": {
|
|
102
|
-
"invalidField": "
|
|
108
|
+
"invalidField": "Omlouváme se, toto uživatelské jméno/e-mailová adresa a/nebo heslo nebyly rozpoznány.",
|
|
103
109
|
"forgotPassword": "Zaboravio sam lozinku ",
|
|
104
110
|
"userEmail": "Korisničko ime ili email",
|
|
105
111
|
"userPhone": "Telefonní číslo",
|
|
@@ -112,10 +118,11 @@ const TRANSLATIONS = {
|
|
|
112
118
|
"GmErr_USER_ACCOUNT_BLOCKED": "Momentálně se nemůžete přihlásit ke svému účtu - pro více informací kontaktujte zákaznický servis.",
|
|
113
119
|
"setUpPassowrd": "Musíte resetovat své heslo",
|
|
114
120
|
"Unauthorized": "Číslo účtu hráče, e-mailová adresa nebo heslo je nesprávné",
|
|
115
|
-
"CountryRestricted": "Registrace není možná z omezené jurisdikce. Pokud narazíte na další potíže, kontaktujte prosím podporu."
|
|
121
|
+
"CountryRestricted": "Registrace není možná z omezené jurisdikce. Pokud narazíte na další potíže, kontaktujte prosím podporu.",
|
|
122
|
+
"configError": "Při načítání konfigurace došlo k neočekávané chybě"
|
|
116
123
|
},
|
|
117
124
|
"de": {
|
|
118
|
-
"invalidField": "
|
|
125
|
+
"invalidField": "Entschuldigung, dieser Benutzername/diese E-Mail-Adresse und/oder dieses Passwort wurde nicht erkannt.",
|
|
119
126
|
"forgotPassword": "Passwort vergessen",
|
|
120
127
|
"userEmail": "Benutzername oder E-Mail",
|
|
121
128
|
"userPhone": "Telefonnummer",
|
|
@@ -128,10 +135,11 @@ const TRANSLATIONS = {
|
|
|
128
135
|
"GmErr_USER_ACCOUNT_BLOCKED": "Sie können sich derzeit nicht in Ihr Konto einloggen - bitte kontaktieren Sie den Kundenservice für weitere Informationen.",
|
|
129
136
|
"setUpPassowrd": "Sie müssen Ihr Passwort zurücksetzen",
|
|
130
137
|
"Unauthorized": "Die Spieler-Kontonummer, E-Mail-Adresse oder das Passwort ist falsch",
|
|
131
|
-
"CountryRestricted": "Eine Registrierung ist aus einer eingeschränkten Gerichtsbarkeit nicht möglich. Wenn Sie weitere Probleme haben, wenden Sie sich bitte an den Support."
|
|
138
|
+
"CountryRestricted": "Eine Registrierung ist aus einer eingeschränkten Gerichtsbarkeit nicht möglich. Wenn Sie weitere Probleme haben, wenden Sie sich bitte an den Support.",
|
|
139
|
+
"configError": "Beim Abrufen der Konfiguration ist ein unerwarteter Fehler aufgetreten"
|
|
132
140
|
},
|
|
133
141
|
"pt-br": {
|
|
134
|
-
"invalidField": "
|
|
142
|
+
"invalidField": "Desculpe, esse nome de usuário/endereço de e-mail e/ou senha não foram reconhecidos.",
|
|
135
143
|
"forgotPassword": "Esqueceu a senha",
|
|
136
144
|
"userEmail": "Nome de usuário ou e-mail",
|
|
137
145
|
"userPhone": "Número de telefone",
|
|
@@ -144,10 +152,11 @@ const TRANSLATIONS = {
|
|
|
144
152
|
"GmErr_USER_ACCOUNT_BLOCKED": "Você não pode fazer login na sua conta no momento - entre em contato com o Atendimento ao Cliente para mais informações.",
|
|
145
153
|
"setUpPassowrd": "Você precisa redefinir sua senha",
|
|
146
154
|
"Unauthorized": "O número da conta de jogador, o endereço de e-mail ou a senha estão incorretos",
|
|
147
|
-
"CountryRestricted": "O registro não é possível a partir de uma jurisdição restrita. Caso encontre outros problemas, entre em contato com o suporte."
|
|
155
|
+
"CountryRestricted": "O registro não é possível a partir de uma jurisdição restrita. Caso encontre outros problemas, entre em contato com o suporte.",
|
|
156
|
+
"configError": "Ocorreu um erro inesperado ao buscar a configuração"
|
|
148
157
|
},
|
|
149
158
|
"es-mx": {
|
|
150
|
-
"invalidField": "
|
|
159
|
+
"invalidField": "Lo siento, ese nombre de usuario/dirección de correo electrónico y/o contraseña no ha sido reconocido.",
|
|
151
160
|
"forgotPassword": "Olvidé la contraseña",
|
|
152
161
|
"userEmail": "Nombre de usuario o correo electrónico",
|
|
153
162
|
"userPhone": "Número de teléfono",
|
|
@@ -160,10 +169,11 @@ const TRANSLATIONS = {
|
|
|
160
169
|
"GmErr_USER_ACCOUNT_BLOCKED": "Actualmente no puede iniciar sesión en su cuenta - comuníquese con el Servicio al Cliente para obtener más información.",
|
|
161
170
|
"setUpPassowrd": "Necesitas restablecer tu contraseña",
|
|
162
171
|
"Unauthorized": "El número de cuenta de jugador, la dirección de correo electrónico o la contraseña son incorrectos",
|
|
163
|
-
"CountryRestricted": "El registro no es posible desde una jurisdicción restringida. Si encuentra más problemas, por favor contacte al soporte."
|
|
172
|
+
"CountryRestricted": "El registro no es posible desde una jurisdicción restringida. Si encuentra más problemas, por favor contacte al soporte.",
|
|
173
|
+
"configError": "Se ha producido un error inesperado al obtener la configuración"
|
|
164
174
|
},
|
|
165
175
|
"es": {
|
|
166
|
-
"invalidField": "
|
|
176
|
+
"invalidField": "Lo siento, ese nombre de usuario/dirección de correo electrónico y/o contraseña no ha sido reconocido.",
|
|
167
177
|
"forgotPassword": "Olvidé mi contraseña",
|
|
168
178
|
"userEmail": "Nombre de usuario o correo electrónico",
|
|
169
179
|
"userPhone": "Número de teléfono",
|
|
@@ -176,10 +186,11 @@ const TRANSLATIONS = {
|
|
|
176
186
|
"GmErr_USER_ACCOUNT_BLOCKED": "Actualmente no puede iniciar sesión en su cuenta - comuníquese con el Servicio al Cliente para obtener más información.",
|
|
177
187
|
"setUpPassowrd": "Necesitas restablecer tu contraseña",
|
|
178
188
|
"Unauthorized": "El número de cuenta, correo electrónico o contraseña es incorrecto",
|
|
179
|
-
"CountryRestricted": "No es posible registrarse desde una jurisdicción restringida. Si encuentra más problemas, comuníquese con el soporte."
|
|
189
|
+
"CountryRestricted": "No es posible registrarse desde una jurisdicción restringida. Si encuentra más problemas, comuníquese con el soporte.",
|
|
190
|
+
"configError": "Se ha producido un error inesperado al obtener la configuración"
|
|
180
191
|
},
|
|
181
192
|
"pt": {
|
|
182
|
-
"invalidField": "
|
|
193
|
+
"invalidField": "Desculpe, esse nome de usuário/endereço de e-mail e/ou senha não foram reconhecidos.",
|
|
183
194
|
"forgotPassword": "Esqueceu a senha",
|
|
184
195
|
"userEmail": "Nome de usuário ou email",
|
|
185
196
|
"userPhone": "Número de telefone",
|
|
@@ -192,7 +203,8 @@ const TRANSLATIONS = {
|
|
|
192
203
|
"GmErr_USER_ACCOUNT_BLOCKED": "Você não pode fazer login na sua conta no momento - entre em contato com o Atendimento ao Cliente para mais informações.",
|
|
193
204
|
"setUpPassowrd": "Você precisa redefinir a sua senha",
|
|
194
205
|
"Unauthorized": "O número da conta, e-mail ou senha está incorreto",
|
|
195
|
-
"CountryRestricted": "Não é possível se registrar de uma jurisdição restrita. Se encontrar mais problemas, entre em contato com o suporte."
|
|
206
|
+
"CountryRestricted": "Não é possível se registrar de uma jurisdição restrita. Se encontrar mais problemas, entre em contato com o suporte.",
|
|
207
|
+
"configError": "Ocorreu um erro inesperado ao procurar a configuração"
|
|
196
208
|
}
|
|
197
209
|
};
|
|
198
210
|
const getTranslations = (url) => {
|
|
@@ -306,7 +318,7 @@ const dispatchCustomEvent = (type, data = {}) => {
|
|
|
306
318
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
307
319
|
*/
|
|
308
320
|
|
|
309
|
-
function defineCustomElement(CustomElement, version = '24.5.
|
|
321
|
+
function defineCustomElement(CustomElement, version = '24.5.10') {
|
|
310
322
|
Object.defineProperty(CustomElement, 'version', {
|
|
311
323
|
get() {
|
|
312
324
|
return version;
|
|
@@ -21901,6 +21913,9 @@ const UserLogin = class {
|
|
|
21901
21913
|
contact: this.userNameEmail,
|
|
21902
21914
|
password: this.userPassword
|
|
21903
21915
|
};
|
|
21916
|
+
if (this.captchaData.isEnabled) {
|
|
21917
|
+
headers['X-Captcha-Response'] = this.captchaData.token;
|
|
21918
|
+
}
|
|
21904
21919
|
const options = {
|
|
21905
21920
|
method: 'POST',
|
|
21906
21921
|
headers,
|
|
@@ -21952,10 +21967,12 @@ const UserLogin = class {
|
|
|
21952
21967
|
if (sessionId) {
|
|
21953
21968
|
this.isLoginLoading = false;
|
|
21954
21969
|
window.postMessage({ type: 'UserSessionID', session: sessionId, userid: playerId }, window.location.href);
|
|
21955
|
-
window.postMessage({
|
|
21970
|
+
window.postMessage({
|
|
21971
|
+
type: 'WidgetNotification', data: {
|
|
21956
21972
|
type: 'success',
|
|
21957
21973
|
message: translate$1('successMessage', this.lang)
|
|
21958
|
-
}
|
|
21974
|
+
}
|
|
21975
|
+
}, window.location.href);
|
|
21959
21976
|
this.hasError = false;
|
|
21960
21977
|
}
|
|
21961
21978
|
}
|
|
@@ -22006,10 +22023,12 @@ const UserLogin = class {
|
|
|
22006
22023
|
}
|
|
22007
22024
|
if (data.sessionId) {
|
|
22008
22025
|
window.postMessage({ type: 'UserSessionID', session: data.sessionId, userid: data.userId }, window.location.href);
|
|
22009
|
-
window.postMessage({
|
|
22026
|
+
window.postMessage({
|
|
22027
|
+
type: 'WidgetNotification', data: {
|
|
22010
22028
|
type: 'success',
|
|
22011
22029
|
message: translate$1('successMessage', this.lang)
|
|
22012
|
-
}
|
|
22030
|
+
}
|
|
22031
|
+
}, window.location.href);
|
|
22013
22032
|
this.hasError = false;
|
|
22014
22033
|
dispatchCustomEvent('logged_in', { userId: data.userId });
|
|
22015
22034
|
}
|
|
@@ -22078,6 +22097,10 @@ const UserLogin = class {
|
|
|
22078
22097
|
this.isValidPassword = this.validate('password', inputValue);
|
|
22079
22098
|
break;
|
|
22080
22099
|
}
|
|
22100
|
+
if (!this.isValidUserEmail || !this.isValidUserPhone || !this.isValidPassword) {
|
|
22101
|
+
this.hasError = true;
|
|
22102
|
+
this.errorMessage = translate$1('invalidField', this.lang);
|
|
22103
|
+
}
|
|
22081
22104
|
};
|
|
22082
22105
|
// this partially applies the location to avoid constructing an anonymous function in jsx, i.e. (e)=>handleInputChange(e,location), which would be needed for 2 args
|
|
22083
22106
|
this.handleInputChangePartial = (location) => (e) => this.handleInputChange(e, location);
|
|
@@ -22139,6 +22162,12 @@ const UserLogin = class {
|
|
|
22139
22162
|
this.hasError = false;
|
|
22140
22163
|
this.userPrefixOptions = undefined;
|
|
22141
22164
|
this.isLoginLoading = false;
|
|
22165
|
+
this.captchaData = {
|
|
22166
|
+
isEnabled: true,
|
|
22167
|
+
token: '',
|
|
22168
|
+
provider: '',
|
|
22169
|
+
siteKey: ''
|
|
22170
|
+
};
|
|
22142
22171
|
this.mbSource = undefined;
|
|
22143
22172
|
}
|
|
22144
22173
|
/**
|
|
@@ -22180,6 +22209,14 @@ const UserLogin = class {
|
|
|
22180
22209
|
if (this.translationUrl.length > 2) {
|
|
22181
22210
|
await getTranslations(this.translationUrl);
|
|
22182
22211
|
}
|
|
22212
|
+
this.getLoginConfig().then(() => {
|
|
22213
|
+
this.appendCaptchaScript();
|
|
22214
|
+
}).catch((error) => {
|
|
22215
|
+
console.error(error);
|
|
22216
|
+
this.hasError = true;
|
|
22217
|
+
this.errorMessage = translate$1('configError', this.lang);
|
|
22218
|
+
this.sendErrorNotification(this.errorMessage);
|
|
22219
|
+
});
|
|
22183
22220
|
}
|
|
22184
22221
|
/**
|
|
22185
22222
|
* Lifecycle method: Set up event listeners after the component is rendered
|
|
@@ -22199,6 +22236,92 @@ const UserLogin = class {
|
|
|
22199
22236
|
window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
|
|
22200
22237
|
window.postMessage({ type: 'UserLoginDidLoad' });
|
|
22201
22238
|
}
|
|
22239
|
+
/**
|
|
22240
|
+
* Fetches the login configuration from the backend API.
|
|
22241
|
+
*
|
|
22242
|
+
* @returns A Promise that resolves once the configuration is fetched and set.
|
|
22243
|
+
*/
|
|
22244
|
+
getLoginConfig() {
|
|
22245
|
+
const url = new URL('/api/v1/players/password-management/auth/password/config', this.endpoint);
|
|
22246
|
+
return new Promise((resolve, reject) => {
|
|
22247
|
+
fetch(url.href)
|
|
22248
|
+
.then((res) => {
|
|
22249
|
+
if (!res.ok) {
|
|
22250
|
+
throw new Error(`HTTP error! Status: ${res.status}`);
|
|
22251
|
+
}
|
|
22252
|
+
return res.json();
|
|
22253
|
+
})
|
|
22254
|
+
.then((res) => {
|
|
22255
|
+
const { captcha } = res;
|
|
22256
|
+
if (captcha && typeof captcha.provider === 'string') {
|
|
22257
|
+
captcha.provider = captcha.provider.toLowerCase();
|
|
22258
|
+
}
|
|
22259
|
+
this.captchaData = Object.assign({}, captcha);
|
|
22260
|
+
resolve();
|
|
22261
|
+
})
|
|
22262
|
+
.catch((error) => {
|
|
22263
|
+
console.error('Error fetching login configuration:', error);
|
|
22264
|
+
reject(error);
|
|
22265
|
+
});
|
|
22266
|
+
});
|
|
22267
|
+
}
|
|
22268
|
+
/**
|
|
22269
|
+
* Handles the integration of CAPTCHA based on the login configuration.
|
|
22270
|
+
* Dynamically injects the necessary CAPTCHA script if enabled.
|
|
22271
|
+
*/
|
|
22272
|
+
handleCaptcha() {
|
|
22273
|
+
const { isEnabled, provider, siteKey } = this.captchaData;
|
|
22274
|
+
if (!isEnabled) {
|
|
22275
|
+
return;
|
|
22276
|
+
}
|
|
22277
|
+
if (!['cloudflare', 'google'].includes(provider)) {
|
|
22278
|
+
return;
|
|
22279
|
+
}
|
|
22280
|
+
if (provider === 'cloudflare') {
|
|
22281
|
+
window.turnstile.render('#turnstileContainer', {
|
|
22282
|
+
sitekey: siteKey,
|
|
22283
|
+
theme: 'light',
|
|
22284
|
+
callback: this.captchaCallback.bind(this),
|
|
22285
|
+
});
|
|
22286
|
+
}
|
|
22287
|
+
else if (provider === 'google') {
|
|
22288
|
+
window.grecaptcha.ready(() => {
|
|
22289
|
+
window.grecaptcha.render('googleContainer', {
|
|
22290
|
+
sitekey: siteKey,
|
|
22291
|
+
callback: this.captchaCallback.bind(this),
|
|
22292
|
+
theme: 'light'
|
|
22293
|
+
});
|
|
22294
|
+
});
|
|
22295
|
+
}
|
|
22296
|
+
}
|
|
22297
|
+
/**
|
|
22298
|
+
* Common callback function for CAPTCHA response handling.
|
|
22299
|
+
* @param token CAPTCHA response token.
|
|
22300
|
+
*/
|
|
22301
|
+
captchaCallback(token) {
|
|
22302
|
+
this.captchaData.token = token;
|
|
22303
|
+
this.captchaData = Object.assign({}, this.captchaData); // Needed to tell Stencil something was changed
|
|
22304
|
+
}
|
|
22305
|
+
/**
|
|
22306
|
+
* Dynamically loads the Turnstile script and renders CAPTCHA when ready.
|
|
22307
|
+
* @param src - The URL of the CAPTCHA script to load.
|
|
22308
|
+
* @param captcha - The CAPTCHA configuration.
|
|
22309
|
+
*/
|
|
22310
|
+
appendCaptchaScript() {
|
|
22311
|
+
const { isEnabled, provider } = this.captchaData;
|
|
22312
|
+
if (!isEnabled) {
|
|
22313
|
+
return;
|
|
22314
|
+
}
|
|
22315
|
+
const script = document.createElement('script');
|
|
22316
|
+
if (provider === 'cloudflare') {
|
|
22317
|
+
script.src = 'https://challenges.cloudflare.com/turnstile/v0/api.js';
|
|
22318
|
+
}
|
|
22319
|
+
else if (provider === 'google') {
|
|
22320
|
+
script.src = 'https://www.google.com/recaptcha/api.js';
|
|
22321
|
+
}
|
|
22322
|
+
script.onload = this.handleCaptcha.bind(this);
|
|
22323
|
+
document.head.appendChild(script);
|
|
22324
|
+
}
|
|
22202
22325
|
/**
|
|
22203
22326
|
* Lifecycle method: Clean up event listeners when the component is removed
|
|
22204
22327
|
*/
|
|
@@ -22211,10 +22334,12 @@ const UserLogin = class {
|
|
|
22211
22334
|
*/
|
|
22212
22335
|
sendErrorNotification(errorMessage) {
|
|
22213
22336
|
window.postMessage({ type: "HasError", error: errorMessage }, window.location.href);
|
|
22214
|
-
window.postMessage({
|
|
22337
|
+
window.postMessage({
|
|
22338
|
+
type: 'WidgetNotification', data: {
|
|
22215
22339
|
type: 'error',
|
|
22216
22340
|
message: errorMessage
|
|
22217
|
-
}
|
|
22341
|
+
}
|
|
22342
|
+
}, window.location.href);
|
|
22218
22343
|
}
|
|
22219
22344
|
/**
|
|
22220
22345
|
* Debounce function to limit API calls
|
|
@@ -22248,20 +22373,19 @@ const UserLogin = class {
|
|
|
22248
22373
|
* Render function
|
|
22249
22374
|
*/
|
|
22250
22375
|
render() {
|
|
22251
|
-
let visibilityIcon = h$2("span", { key: '
|
|
22252
|
-
h$2("svg", { key: '
|
|
22253
|
-
h$2("svg", { key: '
|
|
22254
|
-
let userIdentification = h$2("div", { key: '
|
|
22255
|
-
? h$2("div", { class: (!this.isValidUserPhone || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox ' }, h$2("div", { class: "PhoneInputBox" }, h$2("div", { class: "PrefixBox" }, h$2("vaadin-combo-box", { items: this.userPrefixOptions, value: this.userPrefix, onChange: this.handleInputChangePartial('prefix') }), h$2("label", { class: (this.userPrefix ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate$1('userPrefix', this.lang))), h$2("div", { class: "PhoneBox" }, h$2("input", { type: "text", placeholder: '', value: this.userPhone, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), h$2("label", { class: (this.userPhone ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate$1('userPhone', this.lang))))
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
|
|
22259
|
-
h$2("
|
|
22260
|
-
h$2("div", { key: '894ff57a5c2eb6561ecd4b5e1b507c605001ca92', class: "ForgotPassword" }, h$2("button", { key: '77e12a76aa3a9ce581f06405bd2b07e80787ac09', onClick: this.resetPassword }, translate$1('forgotPassword', this.lang))), h$2("button", { key: 'a0b0f632c1950f6544230842d71605ac594f7cea', disabled: ((this.loginByPhoneNumber !== 'true' && (!this.isValidUserEmail || !this.userNameEmail)) ||
|
|
22376
|
+
let visibilityIcon = h$2("span", { key: '1192a2390f0b5ea646c8e96a7a3f17e18b16a306', class: "InputIcon" }, this.isPasswordVisible &&
|
|
22377
|
+
h$2("svg", { key: '13fcccd4457633040b0bf29fed962961df64176c', onClick: () => this.togglePassword(), class: "TogglePasswordVisibility", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.844", height: "12.887", viewBox: "0 0 18.844 12.887" }, h$2("g", { key: '19762a0b0287c8e2a51a3b3bba7cecb353a4f379', transform: "translate(-110.856 -23.242)" }, h$2("circle", { key: '4f46b166744078ea7f8b0f13e26b359ebb8f03da', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h$2("g", { key: '7a82fe4e4f4ed670f8d83c8b774bda62673c548a', transform: "translate(117.499 27.37)" }, h$2("path", { key: '0454916b36c2a2994fa6e7ccf2feac38861d283d', class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), h$2("path", { key: '3d166e1f5b399ea5f9013fdaa24bf64b68f531b5', class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), h$2("g", { key: '8c5e38f057b58a3afcb8a5cc6a44bb852cfa7204', transform: "translate(110.856 24.899)" }, h$2("path", { key: '72910c3a6ba83dac758dfa7aa36721364ebf8a6d', class: "PasswordVisibilityIcon", d: "M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z", transform: "translate(-110.856 -33.157)" }), h$2("path", { key: 'd795428138b8ed6cf47ff846dcc69f3940892776', class: "PasswordVisibilityIcon", d: "M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z", transform: "translate(-130.743 -29.617)" })), h$2("rect", { key: 'ca376eb5a1a7300b5893936ad987808576933081', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
|
|
22378
|
+
h$2("svg", { key: 'd69b7a469e213542bc6deb56156cfa86febbe8ac', onClick: () => this.togglePassword(), class: "TogglePasswordVisibility PasswordVisible", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.843", height: "10.5", viewBox: "0 0 18.843 10.5" }, h$2("g", { key: 'd45723a6916ece014694c1ea1fa171ebc905d21f', transform: "translate(-14.185 -27.832)" }, h$2("path", { key: 'd19d2b273a2c9366d6039ad87b1a1df203a49d2e', class: "PasswordVisibilityIcon", d: "M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z", transform: "translate(0)" }), h$2("circle", { key: '3127ecec570ef7f567ecb5f3362d65986669de0e', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
|
|
22379
|
+
let userIdentification = h$2("div", { key: '69731dda5bf4fd23c0f143de9a662bd12388cc73', class: "FormBox" }, h$2("div", { key: '5b0ca2d058095a6abfdcf3c5feeb9b2e0a7e894c', class: "FormValue" }, this.loginByPhoneNumber === 'true'
|
|
22380
|
+
? h$2("div", { class: (!this.isValidUserPhone || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox ' }, h$2("div", { class: "PhoneInputBox" }, h$2("div", { class: "PrefixBox" }, h$2("vaadin-combo-box", { items: this.userPrefixOptions, value: this.userPrefix, onChange: this.handleInputChangePartial('prefix') }), h$2("label", { class: (this.userPrefix ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate$1('userPrefix', this.lang))), h$2("div", { class: "PhoneBox" }, h$2("input", { type: "text", placeholder: '', value: this.userPhone, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), h$2("label", { class: (this.userPhone ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate$1('userPhone', this.lang)))))
|
|
22381
|
+
: h$2("div", { class: (!this.isValidUserEmail || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, h$2("input", { type: "text", placeholder: '', value: this.userNameEmail, onInput: this.handleInputChangePartial('user'), autocapitalize: "none", required: true }), h$2("label", { class: (this.userNameEmail ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserEmail || this.hasError ? 'FieldInvalid' : '') }, translate$1('userEmail', this.lang))), h$2("div", { key: '20c86c0ca9a72f7d50453b297d976c84149011fa', class: (!this.isValidPassword || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h$2("input", { key: '825f782812500632eab0082b2e6309442372d3b8', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h$2("label", { key: 'f3f1e9a14433a5002d51444f3f5de4c680633950', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword || this.hasError ? 'FieldInvalid' : '') }, translate$1('password', this.lang))), this.passwordReset == 'true' &&
|
|
22382
|
+
h$2("div", { key: 'e59b1fc8dde8d6ef5758404fd544ef914b9b0807', class: "ForgotPassword" }, h$2("button", { key: 'b147c546b39422d3eb8461229696333e9283ee03', onClick: this.resetPassword }, translate$1('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
|
|
22383
|
+
h$2("slot", { key: '30bb77473faed7c143719196599782ab4625314c', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
|
|
22384
|
+
h$2("slot", { key: '3c67a39492482cf483dbc7306e9f93c74c847e73', name: "google" }), h$2("button", { key: '27b2016e65c4d910d297b0ebd014553258046a93', disabled: ((this.loginByPhoneNumber !== 'true' && (!this.isValidUserEmail || !this.userNameEmail)) ||
|
|
22261
22385
|
(this.loginByPhoneNumber === 'true' && (!this.isValidUserPhone || !this.userPhone || !this.userPrefix)) ||
|
|
22262
|
-
!this.userPassword || !this.isValidPassword) || this.isLoginLoading, class: "SubmitCredentials", onClick: this.handleLogin }, translate$1('login', this.lang)), this.hasError &&
|
|
22263
|
-
h$2("p", { key: '
|
|
22264
|
-
return h$2("section", { key: '
|
|
22386
|
+
!this.userPassword || !this.isValidPassword) || this.isLoginLoading || (this.captchaData.isEnabled && !this.captchaData.token), class: "SubmitCredentials", onClick: this.handleLogin }, translate$1('login', this.lang)), this.hasError &&
|
|
22387
|
+
h$2("p", { key: '33d142c5a20d8c3003b51c4ecad256215314c2b3', class: "CredentialsError" }, this.errorMessage)));
|
|
22388
|
+
return h$2("section", { key: '02a36db14f738bd0f84dc0267aea6bff4fd331d8', ref: el => this.stylingContainer = el }, userIdentification);
|
|
22265
22389
|
}
|
|
22266
22390
|
static get watchers() { return {
|
|
22267
22391
|
"translationUrl": ["handleNewTranslations"],
|
package/dist/esm/user-login.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-16e95691.js';
|
|
2
|
+
export { s as setNonce } from './index-16e95691.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"userPhoneRegex":[513,"user-phone-regex"],"userPhoneRegexOptions":[513,"user-phone-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"version":[513],"loginByPhoneNumber":[513,"login-by-phone-number"],"mbSource":[513,"mb-source"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"userPhone":[32],"userPrefix":[32],"isValidPassword":[32],"isValidUserPhone":[32],"isPasswordVisible":[32],"errorMessage":[32],"hasError":[32],"userPrefixOptions":[32],"isLoginLoading":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"userPhoneRegex":[513,"user-phone-regex"],"userPhoneRegexOptions":[513,"user-phone-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"version":[513],"loginByPhoneNumber":[513,"login-by-phone-number"],"mbSource":[513,"mb-source"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"userPhone":[32],"userPrefix":[32],"isValidPassword":[32],"isValidUserPhone":[32],"isPasswordVisible":[32],"errorMessage":[32],"hasError":[32],"userPrefixOptions":[32],"isLoginLoading":[32],"captchaData":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CaptchaData } from '../../utils/types';
|
|
1
2
|
import '@vaadin/combo-box';
|
|
2
3
|
export declare class UserLogin {
|
|
3
4
|
/**
|
|
@@ -104,6 +105,15 @@ export declare class UserLogin {
|
|
|
104
105
|
* Boolean for preventing user for clicking multiple times the login button
|
|
105
106
|
*/
|
|
106
107
|
private isLoginLoading;
|
|
108
|
+
/**
|
|
109
|
+
* Captcha configuration and state.
|
|
110
|
+
* Stores captcha-related data, including its status, token, provider, and site key.
|
|
111
|
+
*/
|
|
112
|
+
captchaData: CaptchaData;
|
|
113
|
+
/**
|
|
114
|
+
* The source identifier for message bus styling.
|
|
115
|
+
* This is used to apply styles dynamically from a stream.
|
|
116
|
+
*/
|
|
107
117
|
mbSource: string;
|
|
108
118
|
private errorCode;
|
|
109
119
|
private stylingContainer;
|
|
@@ -135,6 +145,28 @@ export declare class UserLogin {
|
|
|
135
145
|
* Lifecycle method: Set up event listeners after the component is rendered
|
|
136
146
|
*/
|
|
137
147
|
componentDidLoad(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Fetches the login configuration from the backend API.
|
|
150
|
+
*
|
|
151
|
+
* @returns A Promise that resolves once the configuration is fetched and set.
|
|
152
|
+
*/
|
|
153
|
+
getLoginConfig(): Promise<void>;
|
|
154
|
+
/**
|
|
155
|
+
* Handles the integration of CAPTCHA based on the login configuration.
|
|
156
|
+
* Dynamically injects the necessary CAPTCHA script if enabled.
|
|
157
|
+
*/
|
|
158
|
+
handleCaptcha(): void;
|
|
159
|
+
/**
|
|
160
|
+
* Common callback function for CAPTCHA response handling.
|
|
161
|
+
* @param token CAPTCHA response token.
|
|
162
|
+
*/
|
|
163
|
+
private captchaCallback;
|
|
164
|
+
/**
|
|
165
|
+
* Dynamically loads the Turnstile script and renders CAPTCHA when ready.
|
|
166
|
+
* @param src - The URL of the CAPTCHA script to load.
|
|
167
|
+
* @param captcha - The CAPTCHA configuration.
|
|
168
|
+
*/
|
|
169
|
+
appendCaptchaScript(): void;
|
|
138
170
|
/**
|
|
139
171
|
* Lifecycle method: Clean up event listeners when the component is removed
|
|
140
172
|
*/
|
|
@@ -27,6 +27,9 @@ export namespace Components {
|
|
|
27
27
|
* If set to true, login will be done by phone number, else by username/email
|
|
28
28
|
*/
|
|
29
29
|
"loginByPhoneNumber": string;
|
|
30
|
+
/**
|
|
31
|
+
* The source identifier for message bus styling. This is used to apply styles dynamically from a stream.
|
|
32
|
+
*/
|
|
30
33
|
"mbSource": string;
|
|
31
34
|
/**
|
|
32
35
|
* Regular expression for validating the password
|
|
@@ -99,6 +102,9 @@ declare namespace LocalJSX {
|
|
|
99
102
|
* If set to true, login will be done by phone number, else by username/email
|
|
100
103
|
*/
|
|
101
104
|
"loginByPhoneNumber"?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The source identifier for message bus styling. This is used to apply styles dynamically from a stream.
|
|
107
|
+
*/
|
|
102
108
|
"mbSource"?: string;
|
|
103
109
|
/**
|
|
104
110
|
* Regular expression for validating the password
|