@everymatrix/general-registration 1.11.2 → 1.11.3

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 (21) hide show
  1. package/dist/cjs/checkbox-group-input_13.cjs.entry.js +38 -27
  2. package/dist/collection/components/general-registration/general-registration.css +7 -0
  3. package/dist/collection/components/general-registration/general-registration.js +9 -4
  4. package/dist/components/checkbox-group-input2.js +1 -0
  5. package/dist/components/date-input2.js +2 -2
  6. package/dist/components/email-input2.js +2 -2
  7. package/dist/components/general-registration.js +9 -5
  8. package/dist/components/number-input2.js +2 -2
  9. package/dist/components/password-input2.js +9 -6
  10. package/dist/components/select-input2.js +8 -5
  11. package/dist/components/tel-input2.js +2 -2
  12. package/dist/components/text-input2.js +2 -2
  13. package/dist/components/tooltipIcon.js +1 -1
  14. package/dist/esm/checkbox-group-input_13.entry.js +38 -27
  15. package/dist/general-registration/general-registration.esm.js +1 -1
  16. package/dist/general-registration/{p-a126860a.entry.js → p-82d3088b.entry.js} +78 -78
  17. package/dist/types/Users/{user/workspace/everymatrix → adrian.pripon/Documents/Work/stencil}/widgets-stencil/packages/general-registration/.stencil/packages/general-input/src/utils/types.d.ts +1 -0
  18. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +2 -0
  19. package/dist/types/components/general-registration/general-registration.d.ts +1 -0
  20. package/package.json +1 -1
  21. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +0 -2
@@ -56,7 +56,7 @@ const translate$2 = (key, customLang, values) => {
56
56
  return translation;
57
57
  };
58
58
 
59
- const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMiAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTEuOTA5OSIgeT0iMTYuMTUiIHdpZHRoPSIxLjgyIiBoZWlnaHQ9IjcuNjAwMDEiIHRyYW5zZm9ybT0icm90YXRlKC0xODAgMTEuOTA5OSAxNi4xNSkiIGZpbGw9IiMyQjJEM0YiLz4KPHJlY3QgeD0iMTEuOTA5OSIgeT0iNi42NTAwMiIgd2lkdGg9IjEuODIiIGhlaWdodD0iMS45MDAwMSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCAxMS45MDk5IDYuNjUwMDIpIiBmaWxsPSIjMkIyRDNGIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMC45ODk5OSAxMC40NUMwLjk4OTk5IDQuNjc3NjggNS40NzE5NyAwIDExIDBDMTYuNTI4IDAgMjEuMDEgNC42Nzc2OCAyMS4wMSAxMC40NUMyMS4wMSAxNi4yMjEgMTYuNTI4IDIwLjkgMTEgMjAuOUM1LjQ3MTk3IDIwLjkgMC45ODk5OSAxNi4yMjEgMC45ODk5OSAxMC40NVpNMi44MDk5OSAxMC40NTA2QzIuODA5OTkgMTUuMTcyMyA2LjQ3Njc3IDE5IDExIDE5QzE1LjUyMiAxOSAxOS4xOSAxNS4xNzIzIDE5LjE5IDEwLjQ1MDZDMTkuMTkgNS43Mjg5MSAxNS41MjIgMS45MDAwMSAxMSAxLjkwMDAxQzYuNDc2NzcgMS45MDAwMSAyLjgwOTk5IDUuNzI4OTEgMi44MDk5OSAxMC40NTA2WiIgZmlsbD0iIzJCMkQzRiIvPgo8L3N2Zz4K';
59
+ const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
60
60
 
61
61
  /**
62
62
  * @license
@@ -14734,6 +14734,7 @@ const CheckboxGroupInput = class {
14734
14734
  this.limitStylingAppends = false;
14735
14735
  this.showTooltip = false;
14736
14736
  this.selectedValues = [];
14737
+ this.value = null;
14737
14738
  this.setClientStyling = () => {
14738
14739
  let sheet = document.createElement('style');
14739
14740
  sheet.innerHTML = this.clientStyling;
@@ -29286,7 +29287,7 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
29286
29287
  return date.getTime() < dateToCompare.getTime();
29287
29288
  }
29288
29289
 
29289
- const dateInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:\"Roboto\";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}";
29290
+ const dateInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:\"Roboto\";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:#979797}.date__wrapper--autofilled .date__input::part(input-field){color:#979797}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}";
29290
29291
 
29291
29292
  const DateInput = class {
29292
29293
  constructor(hostRef) {
@@ -29405,7 +29406,7 @@ const DateInput = class {
29405
29406
  if (this.touched) {
29406
29407
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
29407
29408
  }
29408
- return index.h("div", { class: `date__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), index.h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }), index.h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
29409
+ return index.h("div", { class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), index.h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }), index.h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
29409
29410
  index.h("img", { class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
29410
29411
  }
29411
29412
  get element() { return index.getElement(this); }
@@ -29416,7 +29417,7 @@ const DateInput = class {
29416
29417
  };
29417
29418
  DateInput.style = dateInputCss;
29418
29419
 
29419
- const emailInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:\"Roboto\";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}";
29420
+ const emailInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:\"Roboto\";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:#979797}.email__wrapper--autofilled .email__input{color:#979797}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}";
29420
29421
 
29421
29422
  const EmailInput = class {
29422
29423
  constructor(hostRef) {
@@ -29542,7 +29543,7 @@ const EmailInput = class {
29542
29543
  if (this.touched) {
29543
29544
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
29544
29545
  }
29545
- return index.h("div", { class: `email__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'email__wrapper--flex' }, index.h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
29546
+ return index.h("div", { class: `email__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'email__wrapper--flex' }, index.h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
29546
29547
  index.h("img", { class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), index.h("small", { class: 'email__error-message' }, this.errorMessage));
29547
29548
  }
29548
29549
  static get watchers() { return {
@@ -29653,7 +29654,7 @@ const translate = (key, customLang, values) => {
29653
29654
  return translation;
29654
29655
  };
29655
29656
 
29656
- const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__error-message {\n color: #cc0000b3;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
29657
+ const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: #cc0000b3;\n font-size: 13px;\n font-family: \"ubuntu\";\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
29657
29658
 
29658
29659
  const GeneralRegistration = class {
29659
29660
  constructor(hostRef) {
@@ -29685,6 +29686,7 @@ const GeneralRegistration = class {
29685
29686
  this.listOfInputs = [];
29686
29687
  this.emitValue = false;
29687
29688
  this.backButtonPressed = false;
29689
+ this.registerErrors = false;
29688
29690
  this.registrationStepsState = {
29689
29691
  regId: null
29690
29692
  };
@@ -29922,6 +29924,7 @@ const GeneralRegistration = class {
29922
29924
  }
29923
29925
  setRegister() {
29924
29926
  this.isLoading = true;
29927
+ this.registerErrors = false;
29925
29928
  const url = new URL(`${this.endpoint}/v1/player/legislation/register`);
29926
29929
  const headers = new Headers();
29927
29930
  headers.append('Content-Type', 'application/json');
@@ -29934,7 +29937,7 @@ const GeneralRegistration = class {
29934
29937
  fetch(url.href, options)
29935
29938
  .then((res) => {
29936
29939
  if (!res.ok) {
29937
- window.postMessage({ type: 'registrationFailed' }, window.location.href);
29940
+ this.registerErrors = true;
29938
29941
  return res.json().then(error => {
29939
29942
  this.errorCode = error.thirdPartyResponse.errorCode;
29940
29943
  // Show the idomsoft error if it is the case
@@ -29947,17 +29950,19 @@ const GeneralRegistration = class {
29947
29950
  else {
29948
29951
  this.errorMessage = translate(`${this.errorCode}`, this.language) || this.errorCode;
29949
29952
  }
29953
+ window.postMessage({ type: 'registrationFailed', errorMessage: error === null || error === void 0 ? void 0 : error.thirdPartyResponse.message }, window.location.href);
29950
29954
  });
29951
29955
  }
29952
29956
  return res.json();
29953
29957
  })
29954
29958
  .then((data) => {
29955
29959
  this.isLoading = false;
29956
- window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId }, window.location.href);
29960
+ if (!this.registerErrors) {
29961
+ window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId }, window.location.href);
29962
+ }
29957
29963
  })
29958
29964
  .catch((err) => {
29959
29965
  this.isLoading = false;
29960
- window.postMessage({ type: 'registrationFailed' }, window.location.href);
29961
29966
  console.error(err);
29962
29967
  })
29963
29968
  .finally(() => {
@@ -30117,7 +30122,7 @@ const GeneralRegistration = class {
30117
30122
  if (this.isLoading) {
30118
30123
  return index.h("p", null, "Please wait, loading ...");
30119
30124
  }
30120
- return (index.h("div", { class: `registration registration__${this.registrationStep}` }, this.renderForm(), index.h("p", { class: 'registration__error-message' }, this.errorMessage), !this.buttonInsideForm && this.renderButtons()));
30125
+ return (index.h("div", { class: `registration registration__${this.registrationStep}` }, this.renderForm(), index.h("div", { class: 'registration__wrapper--flex' }, index.h("p", { class: 'registration__error-message' }, this.errorMessage)), !this.buttonInsideForm && this.renderButtons()));
30121
30126
  }
30122
30127
  get host() { return index.getElement(this); }
30123
30128
  static get watchers() { return {
@@ -30127,7 +30132,7 @@ const GeneralRegistration = class {
30127
30132
  };
30128
30133
  GeneralRegistration.style = generalRegistrationCss;
30129
30134
 
30130
- const numberInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:\"Roboto\";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}";
30135
+ const numberInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:\"Roboto\";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:#979797}.number__wrapper--autofilled .number__input{color:#979797}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}";
30131
30136
 
30132
30137
  const NumberInput = class {
30133
30138
  constructor(hostRef) {
@@ -30241,7 +30246,7 @@ const NumberInput = class {
30241
30246
  if (this.touched) {
30242
30247
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
30243
30248
  }
30244
- return index.h("div", { class: `number__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'number__wrapper--flex' }, index.h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
30249
+ return index.h("div", { class: `number__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'number__wrapper--flex' }, index.h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
30245
30250
  index.h("img", { class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${invalidClass}`, pattern: this.validationPattern, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: this.handleInput, onBlur: this.handleBlur }), index.h("small", { class: 'number__error-message' }, this.errorMessage));
30246
30251
  }
30247
30252
  static get watchers() { return {
@@ -31066,7 +31071,7 @@ class PasswordField extends TextField {
31066
31071
 
31067
31072
  customElements.define(PasswordField.is, PasswordField);
31068
31073
 
31069
- const passwordInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:\"Roboto\";font-style:normal}.password__wrapper{position:relative;width:100%}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.password__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.password__input{width:inherit;border:none;margin-bottom:5px}.password__input[focused]::part(input-field){border-color:#3E3E3E}.password__input[invalid]::part(input-field){border-color:#cc0000b3}.password__input::part(input-field){border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;width:100%;position:relative;border:2px solid #DEE1EE}.password__input>input:placeholder-shown{color:#979797}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:#FFFFFF;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;height:150px;border:1px solid #B0B0B0}.password__complexity--strength{display:flex;justify-content:space-evenly}.password__complexity--strength meter::-webkit-meter-optimum-value{background:#1F1F1F}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:\"\";position:absolute;width:25px;height:25px;border-top:1px solid #B0B0B0;border-right:0 solid #B0B0B0;border-left:1px solid #B0B0B0;border-bottom:0 solid #B0B0B0;bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:#FFFFFF}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}";
31074
+ const passwordInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:\"Roboto\";font-style:normal}.password__wrapper{position:relative;width:100%}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:#979797}.password__wrapper--autofilled .password__input::part(input-field){color:#979797}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.password__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.password__input{width:inherit;border:none;margin-bottom:5px}.password__input[focused]::part(input-field){border-color:#3E3E3E}.password__input[invalid]::part(input-field){border-color:#cc0000b3}.password__input::part(input-field){border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;width:100%;position:relative;border:2px solid #DEE1EE}.password__input>input:placeholder-shown{color:#979797}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:#FFFFFF;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;height:150px;border:1px solid #B0B0B0}.password__complexity--strength{display:flex;justify-content:space-evenly}.password__complexity--strength meter::-webkit-meter-optimum-value{background:#1F1F1F}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:\"\";position:absolute;width:25px;height:25px;border-top:1px solid #B0B0B0;border-right:0 solid #B0B0B0;border-left:1px solid #B0B0B0;border-bottom:0 solid #B0B0B0;bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:#FFFFFF}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}";
31070
31075
 
31071
31076
  const PasswordInput = class {
31072
31077
  constructor(hostRef) {
@@ -31084,7 +31089,6 @@ const PasswordInput = class {
31084
31089
  this.clientStyling = '';
31085
31090
  this.limitStylingAppends = false;
31086
31091
  this.showTooltip = false;
31087
- this.showPopup = true;
31088
31092
  this.value = '';
31089
31093
  this.touched = false;
31090
31094
  this.originalValid = false;
@@ -31111,6 +31115,10 @@ const PasswordInput = class {
31111
31115
  this.isValid = this.setValidity();
31112
31116
  this.errorMessage = this.setErrorMessage();
31113
31117
  };
31118
+ this.handleFocus = () => {
31119
+ this.showPopup = true;
31120
+ this.calculateComplexity(this.value);
31121
+ };
31114
31122
  this.setClientStyling = () => {
31115
31123
  let sheet = document.createElement('style');
31116
31124
  sheet.innerHTML = this.clientStyling;
@@ -31206,7 +31214,7 @@ const PasswordInput = class {
31206
31214
  .map(rule => {
31207
31215
  const ruleRegex = new RegExp(rule.pattern);
31208
31216
  const passed = ruleRegex.test(password);
31209
- return { rule: rule.displayName, passed };
31217
+ return { rule: rule.displayName, ruleKey: rule.errorKey, passed };
31210
31218
  });
31211
31219
  }
31212
31220
  setValidity() {
@@ -31261,7 +31269,7 @@ const PasswordInput = class {
31261
31269
  const meterValue = passedRules / totalRules;
31262
31270
  const allRulesPassed = this.passwordComplexity.every(complexity => complexity.passed);
31263
31271
  return (index.h("div", { class: `password__complexity ${!this.showPopup ? 'password__complexity--hidden' : ''}` }, index.h("div", { class: 'password__complexity--strength' }, index.h("p", { class: 'password__complexity--text' }, translate$2('passwordStrength', this.language), "\u00A0", index.h("span", { class: 'password__complexity--text-bold' }, translate$2(`${allRulesPassed ? 'passwordStrengthStrong' : 'passwordStrengthWeak'}`, this.language))), index.h("meter", { value: meterValue, min: "0", max: "1" })), index.h("div", null, this.passwordComplexity.map((complexity, index$1) => {
31264
- return (index.h("div", { key: index$1 }, index.h("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), index.h("span", null, translate$2(`${complexity.rule}`, this.language) ? translate$2(`${complexity.rule}`, this.language) : complexity.rule)));
31272
+ return (index.h("div", { key: index$1 }, index.h("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), index.h("span", null, translate$2(`${complexity.ruleKey}`, this.language) ? translate$2(`${complexity.ruleKey}`, this.language) : complexity.rule)));
31265
31273
  }))));
31266
31274
  }
31267
31275
  render() {
@@ -31269,8 +31277,8 @@ const PasswordInput = class {
31269
31277
  if (this.touched) {
31270
31278
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
31271
31279
  }
31272
- return index.h("div", { class: `password__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'password__wrapper--flex' }, index.h("label", { class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'password__wrapper--relative' }, this.tooltip &&
31273
- index.h("img", { class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-password-field", { type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue, required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.placeholder}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: () => this.showPopup = true }), index.h("small", { class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && !this.isDuplicateInput && this.renderComplexityPopup());
31280
+ return index.h("div", { class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'password__wrapper--flex' }, index.h("label", { class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'password__wrapper--relative' }, this.tooltip &&
31281
+ index.h("img", { class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-password-field", { type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue, required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.placeholder}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), index.h("small", { class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && this.showPopup && !this.isDuplicateInput && this.renderComplexityPopup());
31274
31282
  }
31275
31283
  get element() { return index.getElement(this); }
31276
31284
  static get watchers() { return {
@@ -35688,7 +35696,7 @@ class ComboBox extends ComboBoxDataProviderMixin(
35688
35696
 
35689
35697
  customElements.define(ComboBox.is, ComboBox);
35690
35698
 
35691
- const selectInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select{font-family:\"Roboto\";font-style:normal}.select__wrapper{position:relative;width:100%}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.select__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:#3E3E3E}.select__input[invalid]::part(input-field){border-color:#cc0000b3}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:#1F1F1F}.select__input vaadin-month-calendar::part(selected date){background-color:red}.select__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}";
35699
+ const selectInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select{font-family:\"Roboto\";font-style:normal}.select__wrapper{position:relative;width:100%}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:#979797}.select__wrapper--autofilled .select__input::part(input-field){color:#979797}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.select__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:#3E3E3E}.select__input[invalid]::part(input-field){border-color:#cc0000b3}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:#1F1F1F}.select__input vaadin-month-calendar::part(selected date){background-color:red}.select__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}";
35692
35700
 
35693
35701
  const SelectInput = class {
35694
35702
  constructor(hostRef) {
@@ -35747,7 +35755,10 @@ const SelectInput = class {
35747
35755
  this.showTooltip = false;
35748
35756
  }
35749
35757
  connectedCallback() {
35750
- this.displayedOptions = this.options;
35758
+ this.displayedOptions = this.options.map(option => ({
35759
+ label: option.label,
35760
+ value: option.value.toUpperCase()
35761
+ }));
35751
35762
  }
35752
35763
  componentWillLoad() {
35753
35764
  if (this.action && !this.options.length) {
@@ -35775,7 +35786,7 @@ const SelectInput = class {
35775
35786
  this.inputReference = this.element.shadowRoot.querySelector('input');
35776
35787
  this.isValid = this.setValidity();
35777
35788
  if (this.defaultValue) {
35778
- this.value = this.defaultValue;
35789
+ this.value = this.defaultValue.toUpperCase();
35779
35790
  this.valueHandler({ name: this.name, value: this.value });
35780
35791
  }
35781
35792
  }
@@ -35811,8 +35822,8 @@ const SelectInput = class {
35811
35822
  if (this.touched) {
35812
35823
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
35813
35824
  }
35814
- return index.h("div", { class: `select__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'select__wrapper--flex' }, index.h("label", { class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), index.h("div", { class: 'select__wrapper--relative' }, this.tooltip &&
35815
- index.h("img", { class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass}`, "item-label-path": "label", "item-value-path": "value", readOnly: this.autofilled, required: this.validation.mandatory, value: this.defaultValue, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleChange }), index.h("small", { class: 'select__error-message' }, this.errorMessage));
35825
+ return index.h("div", { class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'select__wrapper--flex' }, index.h("label", { class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), index.h("div", { class: 'select__wrapper--relative' }, this.tooltip &&
35826
+ index.h("img", { class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", readOnly: this.autofilled, required: this.validation.mandatory, value: this.defaultValue, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleChange }), index.h("small", { class: 'select__error-message' }, this.errorMessage));
35816
35827
  }
35817
35828
  get element() { return index.getElement(this); }
35818
35829
  static get watchers() { return {
@@ -35822,7 +35833,7 @@ const SelectInput = class {
35822
35833
  };
35823
35834
  SelectInput.style = selectInputCss;
35824
35835
 
35825
- const telInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:\"Roboto\";font-style:normal}.tel__wrapper{position:relative;width:100%}.tel__wrapper--flex{width:inherit;display:flex;align-items:stretch;border-radius:4px;border:2px solid #DEE1EE}.tel__wrapper--flex:focus-within{border:2px solid #3E3E3E}.tel__wrapper--flex--invalid{border:2px solid #cc0000b3}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.tel__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.tel__prefix{width:120px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 4px 4px 0;background-color:#DEE1EE;color:#1F1F1F;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.tel__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;border:none;padding:10px 20px;width:inherit;position:relative;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}";
35836
+ const telInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:\"Roboto\";font-style:normal}.tel__wrapper{position:relative;width:100%}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:#979797}.tel__wrapper--autofilled .tel__input::part(input-field){color:#979797}.tel__wrapper--flex{width:inherit;display:flex;align-items:stretch;border-radius:4px;border:2px solid #DEE1EE}.tel__wrapper--flex:focus-within{border:2px solid #3E3E3E}.tel__wrapper--flex--invalid{border:2px solid #cc0000b3}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.tel__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.tel__prefix{width:120px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 4px 4px 0;background-color:#DEE1EE;color:#1F1F1F;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.tel__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;border:none;padding:10px 20px;width:inherit;position:relative;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}";
35826
35837
 
35827
35838
  const TelInput = class {
35828
35839
  constructor(hostRef) {
@@ -35971,7 +35982,7 @@ const TelInput = class {
35971
35982
  if (this.touched) {
35972
35983
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
35973
35984
  }
35974
- return index.h("div", { class: `tel__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'tel__wrapper--flex-label' }, index.h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'tel__wrapper--relative' }, this.tooltip &&
35985
+ return index.h("div", { class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'tel__wrapper--flex-label' }, index.h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'tel__wrapper--relative' }, this.tooltip &&
35975
35986
  index.h("img", { class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("div", { class: `tel__wrapper--flex ${invalidClass}` }, index.h("vaadin-combo-box", { class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), index.h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), index.h("small", { class: 'tel__error-message' }, this.errorMessage));
35976
35987
  }
35977
35988
  static get watchers() { return {
@@ -35981,7 +35992,7 @@ const TelInput = class {
35981
35992
  };
35982
35993
  TelInput.style = telInputCss;
35983
35994
 
35984
- const textInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:\"Roboto\";font-style:normal}.text__wrapper{position:relative;width:100%}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.text__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.text__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.text__input:focus{outline-color:#3E3E3E}.text__input--invalid{border:2px solid #cc0000b3}.text__input::placeholder{color:#979797}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}";
35995
+ const textInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:\"Roboto\";font-style:normal}.text__wrapper{position:relative;width:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:#979797}.text__wrapper--autofilled .text__input::part(input-field){color:#979797}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.text__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.text__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.text__input:focus{outline-color:#3E3E3E}.text__input--invalid{border:2px solid #cc0000b3}.text__input::placeholder{color:#979797}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}";
35985
35996
 
35986
35997
  const TextInput = class {
35987
35998
  constructor(hostRef) {
@@ -36134,7 +36145,7 @@ const TextInput = class {
36134
36145
  if (this.touched) {
36135
36146
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
36136
36147
  }
36137
- return index.h("div", { class: `text__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'text__wrapper--flex' }, index.h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'text__wrapper--relative' }, this.tooltip &&
36148
+ return index.h("div", { class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'text__wrapper--flex' }, index.h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'text__wrapper--relative' }, this.tooltip &&
36138
36149
  index.h("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), index.h("small", { class: 'text__error-message' }, this.errorMessage));
36139
36150
  }
36140
36151
  static get watchers() { return {
@@ -21,8 +21,15 @@
21
21
  height: 100%;
22
22
  container-type: inline-size;
23
23
  }
24
+ .registration__wrapper {
25
+ display: flex;
26
+ justify-content: center;
27
+ align-items: center;
28
+ }
24
29
  .registration__error-message {
25
30
  color: #cc0000b3;
31
+ font-size: 13px;
32
+ font-family: "ubuntu";
26
33
  }
27
34
  .registration__form {
28
35
  display: grid;
@@ -28,6 +28,7 @@ export class GeneralRegistration {
28
28
  this.listOfInputs = [];
29
29
  this.emitValue = false;
30
30
  this.backButtonPressed = false;
31
+ this.registerErrors = false;
31
32
  this.registrationStepsState = {
32
33
  regId: null
33
34
  };
@@ -265,6 +266,7 @@ export class GeneralRegistration {
265
266
  }
266
267
  setRegister() {
267
268
  this.isLoading = true;
269
+ this.registerErrors = false;
268
270
  const url = new URL(`${this.endpoint}/v1/player/legislation/register`);
269
271
  const headers = new Headers();
270
272
  headers.append('Content-Type', 'application/json');
@@ -277,7 +279,7 @@ export class GeneralRegistration {
277
279
  fetch(url.href, options)
278
280
  .then((res) => {
279
281
  if (!res.ok) {
280
- window.postMessage({ type: 'registrationFailed' }, window.location.href);
282
+ this.registerErrors = true;
281
283
  return res.json().then(error => {
282
284
  this.errorCode = error.thirdPartyResponse.errorCode;
283
285
  // Show the idomsoft error if it is the case
@@ -290,17 +292,19 @@ export class GeneralRegistration {
290
292
  else {
291
293
  this.errorMessage = translate(`${this.errorCode}`, this.language) || this.errorCode;
292
294
  }
295
+ window.postMessage({ type: 'registrationFailed', errorMessage: error === null || error === void 0 ? void 0 : error.thirdPartyResponse.message }, window.location.href);
293
296
  });
294
297
  }
295
298
  return res.json();
296
299
  })
297
300
  .then((data) => {
298
301
  this.isLoading = false;
299
- window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId }, window.location.href);
302
+ if (!this.registerErrors) {
303
+ window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId }, window.location.href);
304
+ }
300
305
  })
301
306
  .catch((err) => {
302
307
  this.isLoading = false;
303
- window.postMessage({ type: 'registrationFailed' }, window.location.href);
304
308
  console.error(err);
305
309
  })
306
310
  .finally(() => {
@@ -469,7 +473,8 @@ export class GeneralRegistration {
469
473
  }
470
474
  return (h("div", { class: `registration registration__${this.registrationStep}` },
471
475
  this.renderForm(),
472
- h("p", { class: 'registration__error-message' }, this.errorMessage),
476
+ h("div", { class: 'registration__wrapper--flex' },
477
+ h("p", { class: 'registration__error-message' }, this.errorMessage)),
473
478
  !this.buttonInsideForm && this.renderButtons()));
474
479
  }
475
480
  static get is() { return "general-registration"; }
@@ -998,6 +998,7 @@ const CheckboxGroupInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
998
998
  this.limitStylingAppends = false;
999
999
  this.showTooltip = false;
1000
1000
  this.selectedValues = [];
1001
+ this.value = null;
1001
1002
  this.setClientStyling = () => {
1002
1003
  let sheet = document.createElement('style');
1003
1004
  sheet.innerHTML = this.clientStyling;
@@ -10149,7 +10149,7 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
10149
10149
  return date.getTime() < dateToCompare.getTime();
10150
10150
  }
10151
10151
 
10152
- const dateInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:\"Roboto\";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}";
10152
+ const dateInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:\"Roboto\";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:#979797}.date__wrapper--autofilled .date__input::part(input-field){color:#979797}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}";
10153
10153
 
10154
10154
  const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10155
10155
  constructor() {
@@ -10270,7 +10270,7 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10270
10270
  if (this.touched) {
10271
10271
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
10272
10272
  }
10273
- return h("div", { class: `date__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }), h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
10273
+ return h("div", { class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }), h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
10274
10274
  h("img", { class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
10275
10275
  }
10276
10276
  get element() { return this; }
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
 
4
- const emailInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:\"Roboto\";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}";
4
+ const emailInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:\"Roboto\";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:#979797}.email__wrapper--autofilled .email__input{color:#979797}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}";
5
5
 
6
6
  const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -129,7 +129,7 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
129
129
  if (this.touched) {
130
130
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
131
131
  }
132
- return h("div", { class: `email__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'email__wrapper--flex' }, h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
132
+ return h("div", { class: `email__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'email__wrapper--flex' }, h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
133
133
  h("img", { class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { class: 'email__error-message' }, this.errorMessage));
134
134
  }
135
135
  static get watchers() { return {
@@ -63,7 +63,7 @@ const translate = (key, customLang, values) => {
63
63
  return translation;
64
64
  };
65
65
 
66
- const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__error-message {\n color: #cc0000b3;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
66
+ const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: #cc0000b3;\n font-size: 13px;\n font-family: \"ubuntu\";\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
67
67
 
68
68
  const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
69
69
  constructor() {
@@ -97,6 +97,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
97
97
  this.listOfInputs = [];
98
98
  this.emitValue = false;
99
99
  this.backButtonPressed = false;
100
+ this.registerErrors = false;
100
101
  this.registrationStepsState = {
101
102
  regId: null
102
103
  };
@@ -334,6 +335,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
334
335
  }
335
336
  setRegister() {
336
337
  this.isLoading = true;
338
+ this.registerErrors = false;
337
339
  const url = new URL(`${this.endpoint}/v1/player/legislation/register`);
338
340
  const headers = new Headers();
339
341
  headers.append('Content-Type', 'application/json');
@@ -346,7 +348,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
346
348
  fetch(url.href, options)
347
349
  .then((res) => {
348
350
  if (!res.ok) {
349
- window.postMessage({ type: 'registrationFailed' }, window.location.href);
351
+ this.registerErrors = true;
350
352
  return res.json().then(error => {
351
353
  this.errorCode = error.thirdPartyResponse.errorCode;
352
354
  // Show the idomsoft error if it is the case
@@ -359,17 +361,19 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
359
361
  else {
360
362
  this.errorMessage = translate(`${this.errorCode}`, this.language) || this.errorCode;
361
363
  }
364
+ window.postMessage({ type: 'registrationFailed', errorMessage: error === null || error === void 0 ? void 0 : error.thirdPartyResponse.message }, window.location.href);
362
365
  });
363
366
  }
364
367
  return res.json();
365
368
  })
366
369
  .then((data) => {
367
370
  this.isLoading = false;
368
- window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId }, window.location.href);
371
+ if (!this.registerErrors) {
372
+ window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId }, window.location.href);
373
+ }
369
374
  })
370
375
  .catch((err) => {
371
376
  this.isLoading = false;
372
- window.postMessage({ type: 'registrationFailed' }, window.location.href);
373
377
  console.error(err);
374
378
  })
375
379
  .finally(() => {
@@ -529,7 +533,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
529
533
  if (this.isLoading) {
530
534
  return h("p", null, "Please wait, loading ...");
531
535
  }
532
- return (h("div", { class: `registration registration__${this.registrationStep}` }, this.renderForm(), h("p", { class: 'registration__error-message' }, this.errorMessage), !this.buttonInsideForm && this.renderButtons()));
536
+ return (h("div", { class: `registration registration__${this.registrationStep}` }, this.renderForm(), h("div", { class: 'registration__wrapper--flex' }, h("p", { class: 'registration__error-message' }, this.errorMessage)), !this.buttonInsideForm && this.renderButtons()));
533
537
  }
534
538
  get host() { return this; }
535
539
  static get watchers() { return {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
 
4
- const numberInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:\"Roboto\";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}";
4
+ const numberInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:\"Roboto\";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:#979797}.number__wrapper--autofilled .number__input{color:#979797}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}";
5
5
 
6
6
  const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -117,7 +117,7 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
117
117
  if (this.touched) {
118
118
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
119
119
  }
120
- return h("div", { class: `number__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'number__wrapper--flex' }, h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
120
+ return h("div", { class: `number__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'number__wrapper--flex' }, h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
121
121
  h("img", { class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${invalidClass}`, pattern: this.validationPattern, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { class: 'number__error-message' }, this.errorMessage));
122
122
  }
123
123
  static get watchers() { return {