@everymatrix/user-login 1.74.5 → 1.74.7

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.
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/locale.utils";
3
3
  import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
4
4
  import { dispatchCustomEvent } from "../../../../../../../../libs/custom-events/src/index";
5
- import "@vaadin/combo-box";
5
+ import "../../../../../../../libs/vaadin-facade/index";
6
6
  export class UserLogin {
7
7
  constructor() {
8
8
  this.errorCode = '';
@@ -520,20 +520,20 @@ export class UserLogin {
520
520
  * Render function
521
521
  */
522
522
  render() {
523
- let visibilityIcon = h("span", { key: '440c1543806b331f65d22f2ffdd6296e2375d097', class: "InputIcon" }, this.isPasswordVisible &&
524
- h("svg", { key: '4081220320ffec1f943670b48d47c8c595af15e8', 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: '1f6270905ceed2da75206e9ead564f3a9a0eb316', transform: "translate(-110.856 -23.242)" }, h("circle", { key: '4be62140190a1acd0b2b2a56987c9684b81da387', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { key: '09a01c6d8d60269acc62924d4ea20e91d53c6a0b', transform: "translate(117.499 27.37)" }, h("path", { key: '0e886fb3e4e7b5e8e0567f3aaacb26c807ac9e1a', 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: 'c7844648b6998a34b7e43149793fe3680bcb6076', 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: 'a7d28dd7fca5071e9fed655fbdb1d841183e227e', transform: "translate(110.856 24.899)" }, h("path", { key: '292b0cd213a09c055da45917286529b90ff5709c', 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: 'b0eecb9f5098bf1f60590f7e95f47af2684b4914', 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: '45d216043ff4219e7e105e13b112e2927491877c', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
525
- h("svg", { key: '1dae06e9691d1cba3e0c38c057bb70d074b9f6e9', 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: '8845423b1458efe803a300b4db3829b8710ca37e', transform: "translate(-14.185 -27.832)" }, h("path", { key: 'a7ec698c56195f460d2cca8c58bfe025bf694364', 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: 'a147d9e28f682aadbce9e3e5af18f08273310fab', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
526
- let userIdentification = h("div", { key: 'ab34ec8cd790d6750ac66eae1bd5f396154b12a0', class: "FormBox" }, h("div", { key: '58069f59cb73f9c5ec95c419a615e8e5a03f4bb8', class: "FormValue", onKeyDown: this.handleSubmit }, this.loginByPhoneNumber === 'true'
523
+ let visibilityIcon = h("span", { key: '43f1247ac5ed302e6d2b5650313001b38e683e97', class: "InputIcon" }, this.isPasswordVisible &&
524
+ h("svg", { key: '698179c240b4bef5f0ff4d862fdbf09b395bb0a5', 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: 'ce73a3080503f8a2f6a4f840dbb161a9d3a8eedd', transform: "translate(-110.856 -23.242)" }, h("circle", { key: '0867f397b59b5a6b0e7fe94c9edf94229524b4f6', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { key: 'f017279a225a3bc63cf6dc5b42bf26b71f922a1f', transform: "translate(117.499 27.37)" }, h("path", { key: 'ceaf5af773c1102810e0fcf5e5b0b570300f7bd7', 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: '211a60a2c98510145ce688ce4618eed8aff0da3c', 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: '7960dccad151e48ef06d339ec8d03617b3eb4305', transform: "translate(110.856 24.899)" }, h("path", { key: '2926ac1c4b300b255bfb29cf6e6207afb0831f94', 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: '0514f0430ff6ee9d998c5696cdac300552a303ef', 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: '785233bec57697e9c9bfff1fd8dc2b43eb2863a7', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
525
+ h("svg", { key: 'fd8618621222e6d31636b5a2c6f51959e26babc2', 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: '3936873f4257eb63f791492c0ff9552e0aaf8c39', transform: "translate(-14.185 -27.832)" }, h("path", { key: '9c373bff66d4ec60d58a46b531f6df044d257277', 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: 'a0b427d4e025010982fae8f02987c641bbf1f5fa', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
526
+ let userIdentification = h("div", { key: '733de15575cf29c5e3e38c8808ae397cc0830de6', class: "FormBox" }, h("div", { key: 'd2331feb9336e5273e582e6a43afdc73e605809e', class: "FormValue", onKeyDown: this.handleSubmit }, this.loginByPhoneNumber === 'true'
527
527
  ? h("div", { class: (!this.isValidUserPhone && this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox ' }, h("div", { class: "PhoneInputBox" }, h("div", { class: "PrefixBox" }, h("vaadin-combo-box", { items: this.phoneCodes, value: this.userPrefix, onChange: this.handleInputChangePartial('prefix') }), 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'] &&
528
528
  h("p", { class: "CredentialsError" }, translate('userPhoneError', this.lang)))))
529
529
  : 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'] &&
530
- h("p", { class: "CredentialsError" }, translate('userEmailError', this.lang))), h("div", { key: '56c65f559a9a657665270fc3cd991e80404945a1', class: (!this.isValidPassword && this.errorForFields['password']) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h("input", { key: 'cd07a213276f82b76fb55aa2653c557de2488540', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: 'e5161d8a06849c9f7703152081640abdd81eca46', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword && this.errorForFields['password'] ? 'FieldInvalid' : '') }, translate('password', this.lang)), !this.isValidPassword && this.errorForFields['password'] &&
531
- h("p", { key: '37faa730e174be75aecc69da07088defc713b915', class: "CredentialsError" }, translate('userPasswordError', this.lang))), this.passwordReset == 'true' &&
532
- h("div", { key: '32879632fe93fa80de451bf19f1be0edf051b770', class: "ForgotPassword" }, h("button", { key: '39e2fca470449b00ef1993c18bb9adeae5473f9e', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
533
- h("slot", { key: 'd7bb301b9f07a1760d0c5817514e839738fb95ea', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
534
- h("slot", { key: '9bd7ae0c4dc05a941ace9c46ab7de28b89b8a3de', name: "google" }), h("button", { key: '1a16e9e6ad0778a823f465bc3639e691896ff36c', disabled: this.checkIsDisabled(), class: "SubmitCredentials", onClick: this.handleLogin }, translate('login', this.lang)), this.hasError &&
535
- h("p", { key: '1a7984400f60e457a8a60171b2d740e3ee0faef3', class: "CredentialsError" }, this.errorMessage)));
536
- return h("section", { key: '9034903165726e4fcb51b14729f89257adbecab1', ref: el => this.stylingContainer = el }, userIdentification);
530
+ h("p", { class: "CredentialsError" }, translate('userEmailError', this.lang))), h("div", { key: '8d601c9d832a8ea007e06a2b44de2d9ca91c0b62', class: (!this.isValidPassword && this.errorForFields['password']) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h("input", { key: '8fb58344b576c8a7447563b34951db654a7aee3c', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: '9b295941d8b8f2577c69f580ccec088fff8de281', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword && this.errorForFields['password'] ? 'FieldInvalid' : '') }, translate('password', this.lang)), !this.isValidPassword && this.errorForFields['password'] &&
531
+ h("p", { key: '39b413b1ddd610b78e3531b524c9f8e8db595447', class: "CredentialsError" }, translate('userPasswordError', this.lang))), this.passwordReset == 'true' &&
532
+ h("div", { key: '9ac0a93c99815058108e330ee4e67486b1988dd6', class: "ForgotPassword" }, h("button", { key: '4207bce48f0c9c5a3a0c7b4608b8c4c312a9fca4', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
533
+ h("slot", { key: '13f38491c7f555ceee40ac8904a13c9b2a155dfb', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
534
+ h("slot", { key: '992bf64861bf815c3819812a973b7242d495f110', name: "google" }), h("button", { key: '0250eb60b578d210fdf783a6017aac56ca6ff1e9', disabled: this.checkIsDisabled(), class: "SubmitCredentials", onClick: this.handleLogin }, translate('login', this.lang)), this.hasError &&
535
+ h("p", { key: 'e2b692c28a444486aa48e08956e8a4adafbe6930', class: "CredentialsError" }, this.errorMessage)));
536
+ return h("section", { key: '0274c19391978fc4f119bfb9c3545e6271f5ee3d', ref: el => this.stylingContainer = el }, userIdentification);
537
537
  }
538
538
  static get is() { return "user-login"; }
539
539
  static get encapsulation() { return "shadow"; }