@everymatrix/user-login 1.76.3 → 1.76.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.
Files changed (14) hide show
  1. package/dist/cjs/user-login.cjs.entry.js +2350 -443
  2. package/dist/collection/components/user-login/user-login.js +14 -14
  3. package/dist/esm/user-login.entry.js +2350 -443
  4. package/dist/user-login/user-login.entry.js +2377 -448
  5. package/package.json +1 -1
  6. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  7. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +0 -0
  8. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +0 -0
  9. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/main.d.ts +0 -0
  10. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/preview.d.ts +0 -0
  11. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/index.d.ts +0 -0
  12. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  13. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  14. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -10,7 +10,7 @@ export class UserLogin {
10
10
  * Fetch phone prefixes from the API
11
11
  */
12
12
  this.getPhoneCodes = () => {
13
- const url = new URL('v1/player/operatorSupportedPhoneCodes', this.endpoint);
13
+ const url = new URL(`${this.endpoint}/v1/player/operatorSupportedPhoneCodes`);
14
14
  return fetch(url.href)
15
15
  .then(res => res.json())
16
16
  .then(data => data.phoneCodes.map(code => ({ label: code, value: code })))
@@ -117,7 +117,7 @@ export class UserLogin {
117
117
  * Login API call
118
118
  */
119
119
  this.userLogin = async () => {
120
- const url = new URL('v1/player/legislation/login', this.endpoint);
120
+ const url = new URL(`${this.endpoint}/v1/player/legislation/login`);
121
121
  const headers = new Headers();
122
122
  headers.append('Content-Type', 'application/json');
123
123
  const body = JSON.stringify({
@@ -396,7 +396,7 @@ export class UserLogin {
396
396
  * @returns A Promise that resolves once the configuration is fetched and set.
397
397
  */
398
398
  getLoginConfig() {
399
- const url = new URL('/api/v1/players/password-management/auth/password/config', this.endpoint);
399
+ const url = new URL(`${this.endpoint}/api/v1/players/password-management/auth/password/config`);
400
400
  return new Promise((resolve, reject) => {
401
401
  fetch(url.href)
402
402
  .then((res) => {
@@ -533,22 +533,22 @@ export class UserLogin {
533
533
  * Render function
534
534
  */
535
535
  render() {
536
- let visibilityIcon = h("span", { key: '17a42d9a37e06421175c2c85f8205f4e95dab9a2', class: "InputIcon" }, this.isPasswordVisible &&
537
- h("svg", { key: '88a3f6ee23edce4471abc515baa3d30c9f91a039', 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("g", { key: '9ee713e2c958d19d97540c7d6267e751cd01cfaa', transform: "translate(-110.856 -23.242)" }, h("circle", { key: 'c868d148b462089e118aedf53505cf401868fe1f', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { key: '5dcbec1c977d47e99453b59616703cfe790131d2', transform: "translate(117.499 27.37)" }, h("path", { key: 'c452c3048ccbff625ff429a91f438ae30361e958', class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), h("path", { key: '033efd45112a75f990b193c6079e5ed9a1d0e8f7', class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), h("g", { key: 'a3b23aaebd8db82a8f682726055589b678b5acc0', transform: "translate(110.856 24.899)" }, h("path", { key: 'aa46db22aed4f96a497b373309c6dd506171fead', 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("path", { key: '3e68c27c826086e99f547bf7805cbdf2006c329b', 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("rect", { key: '3a4139b603a28f2ccaf1e09d6624c27be0cb08e4', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
538
- h("svg", { key: '96f0715b9955db2c0f0bb489ac9a580a290e0ef2', 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("g", { key: '16f482a976f565e07ffaa04f90f4820e48df4416', transform: "translate(-14.185 -27.832)" }, h("path", { key: 'bb5cb52fc653c177da3bf0656de53e5f89f7716e', 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("circle", { key: '2f866cde7789efdabc537e69a80459f4553417a9', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
539
- let userIdentification = h("div", { key: 'a0ec518061cc8261ae61f3c0fb9015564d8bc740', class: "FormBox" }, h("div", { key: '5917d251c49adaf1dfb0d7fef92209f5dd8d83c0', class: "FormValue", onKeyDown: this.handleSubmit }, this.loginByPhoneNumber === 'true'
536
+ let visibilityIcon = h("span", { key: '0d6558cb486268fda39ac77445c6e998d253a517', class: "InputIcon" }, this.isPasswordVisible &&
537
+ h("svg", { key: 'adf44dc6e61cd6438a657cdcb74a2e84e7d5e137', 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("g", { key: 'ca94bb39a7f2feeb544e21455408c34557952b41', transform: "translate(-110.856 -23.242)" }, h("circle", { key: '1ffb28be1409476667802e28a5faeaafcbef6976', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { key: '36fe22015204ca2a4cddc24d9ed77866abbfdbd7', transform: "translate(117.499 27.37)" }, h("path", { key: '5d46770d6faf1803fa8a4ba4e1f60d31a3372425', class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), h("path", { key: '7b6b903fcfbaeb7edd6802c10329a9cd2af1abcd', class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), h("g", { key: '3882adf670d5b540dcb6c4e68890e4263306ec00', transform: "translate(110.856 24.899)" }, h("path", { key: '61a4960d9c6c18f85e3ea218ee0824d74c47056c', 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("path", { key: '1fe3c80283b7702308e88055f225106af4030f9e', 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("rect", { key: 'cabf887b43352ebf5a3a0bfa4ca095309e4a70b3', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
538
+ h("svg", { key: 'f6dbf36b06aa3c36441b27088cd6356d8821f465', 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("g", { key: '7dfd60a6d06cde3c9e8ce1caf171ee3c8712869e', transform: "translate(-14.185 -27.832)" }, h("path", { key: 'b292961cab1d974e4c73486145209b0aa4091967', 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("circle", { key: '56f4b93651cd34c226c1ebaf89bae3d1f1c8b966', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
539
+ let userIdentification = h("div", { key: 'a7464d93d2d740e1c3719380d3c4dd2d2850c2d3', class: "FormBox" }, h("div", { key: '649f35a430fdda39d0abfec49548f49ad9e83a3f', class: "FormValue", onKeyDown: this.handleSubmit }, this.loginByPhoneNumber === 'true'
540
540
  ? h("div", { class: (!this.isValidUserPhone && this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox ' }, h("div", { class: "PhoneInputBox" }, h("div", { class: "PrefixBox" }, this.isPrefixEditable === 'true'
541
541
  ? h("vaadin-combo-box", { items: this.phoneCodes, value: this.userPrefix, onChange: this.handleInputChangePartial('prefix') })
542
542
  : h("div", { class: "UneditablePrefix" }, this.userPrefix), h("label", { class: (this.userPrefix ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone && this.errorForFields['phone'] ? 'FieldInvalid' : '') }, translate('userPrefix', this.lang))), h("div", { class: "PhoneBox" }, h("input", { type: "text", placeholder: '', value: this.userPhone, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), h("label", { class: (this.userPhone ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone && this.errorForFields['phone'] ? 'FieldInvalid' : '') }, translate('userPhone', this.lang)), !this.isValidUserPhone && this.errorForFields['phone'] &&
543
543
  h("p", { class: "CredentialsError" }, translate('userPhoneError', this.lang)))))
544
544
  : h("div", { class: (!this.isValidUserEmail && this.errorForFields['user']) ? 'InputBox InputInvalidBox' : 'InputBox' }, h("input", { type: "text", placeholder: '', value: this.userNameEmail, onInput: this.handleInputChangePartial('user'), autocapitalize: "none", required: true }), h("label", { class: (this.userNameEmail ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserEmail && this.errorForFields['user'] ? 'FieldInvalid' : '') }, translate('userEmail', this.lang)), !this.isValidUserEmail && this.errorForFields['user'] &&
545
- h("p", { class: "CredentialsError" }, translate('userEmailError', this.lang))), h("div", { key: '3dde57b0da5b624c6074e18be799b9397ee3a4bd', class: (!this.isValidPassword && this.errorForFields['password']) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h("input", { key: '26377edde4c4b441b62928038aa7594cd1c38c17', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: 'e0d6141642a041b6750e291f2f89a4611d300e62', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword && this.errorForFields['password'] ? 'FieldInvalid' : '') }, translate('password', this.lang)), !this.isValidPassword && this.errorForFields['password'] &&
546
- h("p", { key: 'f5759ba48c08b86986a71b7f5f4228f5df714205', class: "CredentialsError" }, translate('userPasswordError', this.lang))), this.passwordReset == 'true' &&
547
- h("div", { key: 'ba52d0113d92d3a73f03f03fdb6c507a01f36d4e', class: "ForgotPassword" }, h("button", { key: '3a9beae7915f8e59f94c6946f63f6670e1a31796', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
548
- h("slot", { key: 'a570cbac33d9aec255766e748d60bb5176c0cefd', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
549
- h("slot", { key: '7ca0ea9dc4bda24f5ba19443488f9111a514017e', name: "google" }), h("button", { key: 'e007c737f3cd285a8ca5a38d6008ffc7873b38cd', disabled: this.checkIsDisabled(), class: "SubmitCredentials", onClick: this.handleLogin }, translate('login', this.lang)), this.hasError &&
550
- h("p", { key: 'b5f9bd3ef5dcc665f6e07c0937b4d9866e386766', class: "CredentialsError" }, this.errorMessage)));
551
- return h("section", { key: '5be8447f2a695eabbf9cdd470c165ac0adb421d0', ref: el => this.stylingContainer = el }, userIdentification);
545
+ h("p", { class: "CredentialsError" }, translate('userEmailError', this.lang))), h("div", { key: '6bf2faa1148c74fdfc064db20b4c67caf7ccc0a4', class: (!this.isValidPassword && this.errorForFields['password']) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h("input", { key: '2790ffe79dda4ea476a67d39b990567df5cba6f9', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: '264062df20741877c52c0b16b009cdb69c429a9a', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword && this.errorForFields['password'] ? 'FieldInvalid' : '') }, translate('password', this.lang)), !this.isValidPassword && this.errorForFields['password'] &&
546
+ h("p", { key: '941e5b75f0de8eca84759014f8b4a717806b421e', class: "CredentialsError" }, translate('userPasswordError', this.lang))), this.passwordReset == 'true' &&
547
+ h("div", { key: 'c5015322e15f5fa8655ed0ab01e14693841b4d41', class: "ForgotPassword" }, h("button", { key: '90430af45c824ee1466c207ebb6f496950513f77', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
548
+ h("slot", { key: 'f3ea71cde8cc44d896bec7c5911f17e559a475a9', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
549
+ h("slot", { key: 'd6b8fee751222eb2c716fceaef0d14617a407a32', name: "google" }), h("button", { key: '84c58b047f9c0c38a9be658375f7176d75267873', disabled: this.checkIsDisabled(), class: "SubmitCredentials", onClick: this.handleLogin }, translate('login', this.lang)), this.hasError &&
550
+ h("p", { key: 'a4037b2549e6778fca50135bffd0f73af4206274', class: "CredentialsError" }, this.errorMessage)));
551
+ return h("section", { key: 'b4eff6d96497ace1f0b4fec8999ec11212628280', ref: el => this.stylingContainer = el }, userIdentification);
552
552
  }
553
553
  static get is() { return "user-login"; }
554
554
  static get encapsulation() { return "shadow"; }