@everymatrix/general-registration 1.80.10 → 1.80.12

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.
@@ -28,6 +28,9 @@ const TRANSLATIONS$1 = {
28
28
  "twofaDescription": "<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",
29
29
  "twofaResendMessage": "Didn't receive the verification code?",
30
30
  "twofaResendButton": "Resend",
31
+ "enterIEAddressManually": "For IRE, enter the address manually",
32
+ "postalLookUpNoAddressFound": "No addresses found for this postal code",
33
+ "searchingForAddresses": "Searching for addresses...",
31
34
  },
32
35
  "hu": {
33
36
  "dateError": "A választott dátumnak {min} és {max} között kell lennie",
@@ -12807,6 +12810,9 @@ const GeneralInput = class {
12807
12810
  this.emitOnClick = false;
12808
12811
  this.twofaDestination = undefined;
12809
12812
  this.twofaResendIntervalSeconds = 60;
12813
+ this.haspostalcodelookup = undefined;
12814
+ this.postalcodelength = undefined;
12815
+ this.addresses = [];
12810
12816
  }
12811
12817
  connectedCallback() {
12812
12818
  if (this.translationUrl) {
@@ -12817,7 +12823,12 @@ const GeneralInput = class {
12817
12823
  var _a;
12818
12824
  switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
12819
12825
  case 'text':
12820
- return h$1("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
12826
+ if (this.haspostalcodelookup && this.name === 'PostalCode') {
12827
+ return h$1("postalcode-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, postalcodelength: this.postalcodelength, addresses: this.addresses });
12828
+ }
12829
+ else {
12830
+ return h$1("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, haspostalcodelookup: this.haspostalcodelookup });
12831
+ }
12821
12832
  case 'email':
12822
12833
  return h$1("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
12823
12834
  case 'number':
@@ -12845,7 +12856,7 @@ const GeneralInput = class {
12845
12856
  }
12846
12857
  }
12847
12858
  render() {
12848
- return (h$1(Host, { key: 'a90dc97926e4f89518fc8520505cf59281840e20', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
12859
+ return (h$1(Host, { key: '7f268156d7372f46b27b38762a2c01281ada038c', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
12849
12860
  }
12850
12861
  };
12851
12862
  GeneralInput.style = GeneralInputStyle0;
@@ -13964,6 +13975,9 @@ const GeneralRegistration = class {
13964
13975
  this.registrationWidgetLoaded = createEvent(this, "registrationWidgetLoaded", 7);
13965
13976
  this.registrationStepUpdated = createEvent(this, "registrationStepUpdated", 7);
13966
13977
  this.validationChange = createEvent(this, "validationChange", 7);
13978
+ this.isSelectingAddress = false;
13979
+ this.lastPostalCode = null;
13980
+ this.selectedCountry = '';
13967
13981
  this.listOfInputValues = [];
13968
13982
  this.listOfInputValidity = [];
13969
13983
  this.listOfActions = [];
@@ -13978,6 +13992,7 @@ const GeneralRegistration = class {
13978
13992
  this.extraActions = [];
13979
13993
  this.registerCredentialsEvent = null;
13980
13994
  this.twofaDestination = '';
13995
+ this.postalcodelength = 5;
13981
13996
  this.registrationStepsState = {
13982
13997
  regId: null
13983
13998
  };
@@ -14024,6 +14039,7 @@ const GeneralRegistration = class {
14024
14039
  this.buttonInsideForm = undefined;
14025
14040
  this.btag = null;
14026
14041
  this.emitOnClick = false;
14042
+ this.haspostalcodelookup = false;
14027
14043
  this.errorMessage = '';
14028
14044
  this.isFormValid = false;
14029
14045
  this.isConsentValid = false;
@@ -14031,10 +14047,12 @@ const GeneralRegistration = class {
14031
14047
  this.isLoading = true;
14032
14048
  this.isLoadingPOST = false;
14033
14049
  this.registrationStep = '';
14034
- this.forms = [];
14050
+ this.forms = {};
14035
14051
  this.limitStylingAppends = false;
14036
14052
  this.autofilled = false;
14037
14053
  this.isInitalInteraction = true;
14054
+ this.addresses = [];
14055
+ this.addressUpdateKey = 0;
14038
14056
  }
14039
14057
  sendStep() {
14040
14058
  this.registrationStepUpdated.emit(this.registrationStep);
@@ -14062,21 +14080,113 @@ const GeneralRegistration = class {
14062
14080
  this.addBtagValue();
14063
14081
  }
14064
14082
  checkInputsValidityHandler(event) {
14065
- // Set isValid state of the input in the list.
14066
14083
  this.listOfInputValidity.find(input => input.name == event.detail.name).isValid = event.detail.valid;
14067
14084
  // Check if any one is invalid.
14068
14085
  this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
14069
14086
  }
14070
14087
  getInputsValueHandler(event) {
14088
+ var _a;
14071
14089
  this.listOfInputValues.find(input => {
14072
14090
  if (input.name == event.detail.name) {
14073
14091
  input.value = event.detail.value;
14074
14092
  input.type = event.detail.type || null;
14075
14093
  }
14076
14094
  });
14095
+ if (this.haspostalcodelookup) {
14096
+ const { name, value } = event.detail;
14097
+ if (name === 'CountryCode') {
14098
+ this.selectedCountry = value;
14099
+ if (value === 'GB') {
14100
+ this.selectedCountry = 'UK';
14101
+ }
14102
+ this.resetAllAddressFields();
14103
+ window.dispatchEvent(new CustomEvent('countryCodeUpdated', {
14104
+ detail: { name, value: this.selectedCountry }
14105
+ }));
14106
+ }
14107
+ if (name === 'PostalCode') {
14108
+ if (!this.isSelectingAddress && this.addresses.length > 0 && value !== this.lastPostalCode) {
14109
+ this.addresses = [];
14110
+ }
14111
+ if (value.length >= this.postalcodelength) {
14112
+ if (this.isSelectingAddress) {
14113
+ return;
14114
+ }
14115
+ // Fetch only if: postal code changed OR no addresses loaded yet
14116
+ const shouldFetch = !this.lastPostalCode || this.lastPostalCode !== value ||
14117
+ this.addresses.length === 0;
14118
+ if (shouldFetch) {
14119
+ const country = this.selectedCountry ||
14120
+ ((_a = this.listOfInputValues.find((i) => i.name === 'CountryCode')) === null || _a === void 0 ? void 0 : _a.value) || '';
14121
+ let postalCode = value;
14122
+ if (this.selectedCountry === 'GB' || this.selectedCountry === 'UK') {
14123
+ if (this.addrDebounce)
14124
+ clearTimeout(this.addrDebounce);
14125
+ this.addrDebounce = setTimeout(() => {
14126
+ this.fetchAddresses(country, postalCode);
14127
+ }, 500);
14128
+ }
14129
+ this.lastPostalCode = value;
14130
+ }
14131
+ }
14132
+ else if (value.length < this.postalcodelength) {
14133
+ this.addresses = [];
14134
+ this.lastPostalCode = null;
14135
+ }
14136
+ }
14137
+ }
14077
14138
  this.stepsStateMachine({ event: 'set', type: 'values' });
14078
14139
  this.handleConditionalValidation(event.detail.name, event.detail.value);
14079
14140
  }
14141
+ handleAddressSelection(event) {
14142
+ const { city, address1, address2 } = event.detail;
14143
+ // Update input values
14144
+ this.listOfInputValues = this.listOfInputValues.map(input => {
14145
+ if (input.name === 'address1')
14146
+ return Object.assign(Object.assign({}, input), { value: address1 || '' });
14147
+ if (input.name === 'address2')
14148
+ return Object.assign(Object.assign({}, input), { value: address2 || '' });
14149
+ if (input.name === 'City')
14150
+ return Object.assign(Object.assign({}, input), { value: city || '' });
14151
+ return input;
14152
+ });
14153
+ if (this.forms[this.registrationStep]) {
14154
+ this.forms[this.registrationStep] = this.forms[this.registrationStep].map(input => {
14155
+ if (input.name === 'address1')
14156
+ return Object.assign(Object.assign({}, input), { defaultValue: address1 });
14157
+ if (input.name === 'address2')
14158
+ return Object.assign(Object.assign({}, input), { defaultValue: address2 });
14159
+ if (input.name === 'City')
14160
+ return Object.assign(Object.assign({}, input), { defaultValue: city });
14161
+ return input;
14162
+ });
14163
+ }
14164
+ // force re-render
14165
+ this.addressUpdateKey = Date.now();
14166
+ this.forms = Object.assign({}, this.forms);
14167
+ this.stepsStateMachine({ event: 'set', type: 'values' });
14168
+ this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
14169
+ this.isSelectingAddress = false;
14170
+ }
14171
+ handleCountryCodeUpdateGlobal(event) {
14172
+ const { name } = event.detail;
14173
+ if (name === 'CountryCode') {
14174
+ const savedState = localStorage.getItem('registrationStepsState');
14175
+ if (savedState) {
14176
+ const parsedState = JSON.parse(savedState);
14177
+ Object.keys(parsedState).forEach(stepKey => {
14178
+ if (parsedState[stepKey] && parsedState[stepKey].registerUserData) {
14179
+ ['address1', 'address2', 'City', 'PostalCode'].forEach(field => {
14180
+ if (parsedState[stepKey].registerUserData[field]) {
14181
+ parsedState[stepKey].registerUserData[field].value = '';
14182
+ }
14183
+ });
14184
+ }
14185
+ });
14186
+ localStorage.setItem('registrationStepsState', JSON.stringify(parsedState));
14187
+ }
14188
+ }
14189
+ }
14080
14190
  handleRequestTwofa() {
14081
14191
  if (!this.twofaDestination)
14082
14192
  return;
@@ -14574,7 +14684,6 @@ const GeneralRegistration = class {
14574
14684
  }
14575
14685
  formatConfig(config) {
14576
14686
  this.listOfInputs = config.content.fields.flatMap((field) => {
14577
- // Special case for inputs that need to be duplicated.
14578
14687
  const duplicateInputRule = field.validate.custom.find(customRule => customRule.rule === 'duplicate-input');
14579
14688
  const inputElement = Object.assign({}, field);
14580
14689
  if (duplicateInputRule) {
@@ -14648,6 +14757,8 @@ const GeneralRegistration = class {
14648
14757
  else {
14649
14758
  this.isConsentReady = false;
14650
14759
  }
14760
+ this.forms[this.registrationStep] = this.listOfInputs;
14761
+ this.forms = Object.assign({}, this.forms);
14651
14762
  // The translations for fields happens here.
14652
14763
  if (this.translationUrl) {
14653
14764
  getTranslations(this.translationUrl).then(() => {
@@ -14667,13 +14778,8 @@ const GeneralRegistration = class {
14667
14778
  })
14668
14779
  .catch((error) => {
14669
14780
  console.error('Failed to fetch translations:', error);
14670
- }).finally(() => {
14671
- this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
14672
14781
  });
14673
14782
  }
14674
- else {
14675
- this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
14676
- }
14677
14783
  // Add the step to the registrationStepsData
14678
14784
  this.registrationStepsState.regId = this.registrationID;
14679
14785
  if (!this.registrationStepsState[this.registrationStep]) {
@@ -14704,19 +14810,22 @@ const GeneralRegistration = class {
14704
14810
  }
14705
14811
  }
14706
14812
  setInitialValidStatus(field) {
14707
- var _a, _b, _c, _d;
14708
- // Input type checkbox, with no validation are valid
14813
+ var _a, _b, _c, _d, _e, _f;
14709
14814
  if (((_a = field.inputType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'checkbox' && ((_b = field.validate) === null || _b === void 0 ? void 0 : _b.mandatory) == false) {
14710
14815
  return true;
14711
14816
  }
14712
- //Checkboxes that are mandatory and set as false || null should't be valid.
14713
14817
  if (((_c = field.inputType) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'checkbox' && ((_d = field.validate) === null || _d === void 0 ? void 0 : _d.mandatory) && field.defaultValue !== 'true') {
14714
14818
  return false;
14715
14819
  }
14716
- //Inputs that have default value and aren't mandatory are valid.
14717
14820
  if (field.defaultValue !== null) {
14718
14821
  return true;
14719
14822
  }
14823
+ if (((_e = field.validate) === null || _e === void 0 ? void 0 : _e.mandatory) === false) {
14824
+ return true;
14825
+ }
14826
+ if (((_f = field.validate) === null || _f === void 0 ? void 0 : _f.mandatory) === true) {
14827
+ return false;
14828
+ }
14720
14829
  return false;
14721
14830
  }
14722
14831
  stepChange(action) {
@@ -14729,23 +14838,98 @@ const GeneralRegistration = class {
14729
14838
  }
14730
14839
  }
14731
14840
  getInvalidStatus(listOfInputs) {
14732
- return listOfInputs.filter(input => input.isValid == false).length > 0;
14841
+ const invalidInputs = listOfInputs.filter(input => {
14842
+ var _a;
14843
+ const inputConfig = this.listOfInputs.find(i => i.name === input.name);
14844
+ if (inputConfig && !inputConfig.validate.mandatory) {
14845
+ const inputValue = (_a = this.listOfInputValues.find(v => v.name === input.name)) === null || _a === void 0 ? void 0 : _a.value;
14846
+ if (!inputValue || inputValue.trim() === '') {
14847
+ return false;
14848
+ }
14849
+ }
14850
+ return input.isValid == false;
14851
+ });
14852
+ return invalidInputs.length > 0;
14733
14853
  }
14734
14854
  renderErrorMessage(errorMsg) {
14735
14855
  return (h$1("p", { class: "registration registration__error-message" }, errorMsg));
14736
14856
  }
14737
- renderForm() {
14738
- return this.forms.map((form, index) => {
14739
- return h$1("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index + 1}` ? 'hidden' : ''}`, ref: el => this.form = el, onClick: this.handleInitialClick }, form[this.registrationStep] && form[this.registrationStep].map((input) => {
14740
- var _a, _b;
14741
- return h$1("div", { key: input.name, class: "input-wrapper" }, h$1("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data
14742
- ? (input.inputType.toLowerCase() === 'checkboxgroup' || input.inputType.toLowerCase() === 'togglecheckbox')
14743
- ? input.data.subFields
14744
- : input.data.values
14745
- : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, "date-format": this.dateFormat, "twofa-destination": this.twofaDestination, "twofa-resend-interval-seconds": (_a = input.customInfo) === null || _a === void 0 ? void 0 : _a.twofaResendIntervalSeconds, "translation-url": this.translationUrl, emitOnClick: this.emitOnClick, onClick: this.handleInitialClick }), ((_b = input.customInfo) === null || _b === void 0 ? void 0 : _b.description) && (h$1("div", { class: "input-description" }, input.customInfo.description)));
14746
- }), form[this.registrationStep] && this.isConsentReady && this.renderConsents(), form[this.registrationStep] && this.buttonInsideForm && this.renderButtons(), h$1("div", { class: 'registration__wrapper--flex' }, h$1("p", { class: 'registration__error-message', innerHTML: this.errorMessage })));
14857
+ resetAllAddressFields() {
14858
+ this.listOfInputValues = this.listOfInputValues.map(input => {
14859
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
14860
+ return Object.assign(Object.assign({}, input), { value: '' });
14861
+ }
14862
+ return input;
14863
+ });
14864
+ // Update forms with new structure
14865
+ Object.keys(this.forms).forEach(stepKey => {
14866
+ this.forms[stepKey] = this.forms[stepKey].map(input => {
14867
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
14868
+ return Object.assign(Object.assign({}, input), { defaultValue: '' });
14869
+ }
14870
+ return input;
14871
+ });
14872
+ });
14873
+ // Reset validity
14874
+ this.listOfInputValidity = this.listOfInputValidity.map(input => {
14875
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
14876
+ return Object.assign(Object.assign({}, input), { isValid: false });
14877
+ }
14878
+ return input;
14879
+ });
14880
+ this.addresses = [];
14881
+ this.forms = Object.assign({}, this.forms);
14882
+ }
14883
+ fetchAddresses(countryCode, postalCode) {
14884
+ var _a;
14885
+ const currentPostalCode = (_a = this.listOfInputValues.find(i => i.name === 'PostalCode')) === null || _a === void 0 ? void 0 : _a.value;
14886
+ if (!currentPostalCode || currentPostalCode.length < this.postalcodelength) {
14887
+ return;
14888
+ }
14889
+ window.dispatchEvent(new CustomEvent('addressFetchStarted', {
14890
+ detail: { postalCode }
14891
+ }));
14892
+ const url = new URL(`${this.endpoint}/api/pam/v1/lookup/addresses?country=${countryCode}&postalCode=${postalCode}`);
14893
+ const headers = new Headers();
14894
+ headers.append('Content-Type', 'application/json');
14895
+ headers.append('Accept', 'application/json');
14896
+ const options = {
14897
+ method: 'GET',
14898
+ headers
14899
+ };
14900
+ fetch(url.href, options)
14901
+ .then(async (res) => {
14902
+ if (!res.ok) {
14903
+ const err = await res.json();
14904
+ throw new Error(`Failed to fetch addresses: ${err.message || JSON.stringify(err)}`);
14905
+ }
14906
+ return res.json();
14907
+ })
14908
+ .then((data) => {
14909
+ var _a;
14910
+ const currentPostalCode = (_a = this.listOfInputValues.find(i => i.name === 'PostalCode')) === null || _a === void 0 ? void 0 : _a.value;
14911
+ if (currentPostalCode && currentPostalCode.length >= this.postalcodelength) {
14912
+ this.addresses = data.addresses || [];
14913
+ }
14914
+ else {
14915
+ this.addresses = [];
14916
+ }
14917
+ })
14918
+ .catch(() => {
14919
+ this.addresses = [];
14920
+ this.lastPostalCode = null;
14747
14921
  });
14748
14922
  }
14923
+ renderForm() {
14924
+ return (h$1("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form`, ref: el => this.form = el, onClick: this.handleInitialClick }, this.forms[this.registrationStep] && this.forms[this.registrationStep].map((input) => {
14925
+ var _a, _b;
14926
+ return h$1("div", { key: input.name, class: "input-wrapper" }, h$1("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data
14927
+ ? (input.inputType.toLowerCase() === 'checkboxgroup' || input.inputType.toLowerCase() === 'togglecheckbox')
14928
+ ? input.data.subFields
14929
+ : input.data.values
14930
+ : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, "date-format": this.dateFormat, "twofa-destination": this.twofaDestination, "twofa-resend-interval-seconds": (_a = input.customInfo) === null || _a === void 0 ? void 0 : _a.twofaResendIntervalSeconds, "translation-url": this.translationUrl, emitOnClick: this.emitOnClick, onClick: this.handleInitialClick, haspostalcodelookup: this.haspostalcodelookup, addresses: this.haspostalcodelookup ? this.addresses : null, postalcodelength: this.haspostalcodelookup ? this.postalcodelength : null, key: ['address1', 'address2', 'City'].includes(input.name) ? `${input.name}-${this.addressUpdateKey}` : input.name }), ((_b = input.customInfo) === null || _b === void 0 ? void 0 : _b.description) && (h$1("div", { class: "input-description" }, input.customInfo.description)));
14931
+ }), this.forms[this.registrationStep] && this.isConsentReady && this.renderConsents(), this.forms[this.registrationStep] && this.buttonInsideForm && this.renderButtons(), h$1("div", { class: 'registration__wrapper--flex' }, h$1("p", { class: 'registration__error-message', innerHTML: this.errorMessage }))));
14932
+ }
14749
14933
  ;
14750
14934
  renderConsents() {
14751
14935
  return (h$1("div", { class: "consentsContainer" }, h$1("player-consents", { endpoint: this.endpoint })));
@@ -15169,6 +15353,354 @@ const PasswordInput = class {
15169
15353
  };
15170
15354
  PasswordInput.style = PasswordInputStyle0;
15171
15355
 
15356
+ const postalcodeInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:\"Roboto\";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.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:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:\"*\";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.input__text-wrapper{position:relative}.input__addresses-container{position:relative;left:0;width:100%;background:var(--emw--color-white);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);max-height:200px;overflow-y:auto;z-index:999;margin-top:4px}.input__addresses-container .options{padding:4px 0}.input__addresses-container .option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6);font-size:14px;line-height:1.4;transition:background-color 0.2s ease;color:var(--emw--registration-gray-800, #333)}.input__addresses-container .option:last-child{border-bottom:none}.input__addresses-container .option:hover{background-color:var(--emw--registration-lightgray-100, #f8f9fa)}.input__addresses-container .option:active{background-color:var(--emw--registration-lightgray-200, #e9ecef)}.input__addresses-container::-webkit-scrollbar{width:6px}.input__addresses-container::-webkit-scrollbar-track{background:var(--emw--registration-lightgray-150, #f1f1f1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb{background:var(--emw--registration-lightgray-300, #c1c1c1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb:hover{background:var(--emw--registration-lightgray-400, #a8a8a8)}.postalcode__no-results-message{color:var(--emw--color-error, var(--emw--color-red, #ed0909));margin-top:10px}.address__manual-input-msg{text-decoration:underline;margin-top:10px;cursor:pointer;transition:opacity 0.3s ease}.address__manual-input-msg:active{opacity:0.7}.postalcode__loading-spinner{display:flex;align-items:center;gap:8px;padding:12px;color:var(--emw--registration-gray-600, #666);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-top:none;background-color:var(--emw--registration-lightgray-50, #f9f9f9)}.loading-spinner{width:14px;height:14px;border:2px solid var(--emw--color-gray-100, #E6E6E6);border-top:2px solid var(--emw--registration-gray-600, #666);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}";
15357
+ const PostalcodeInputStyle0 = postalcodeInputCss;
15358
+
15359
+ const PostalCodeInput = class {
15360
+ constructor(hostRef) {
15361
+ registerInstance(this, hostRef);
15362
+ this.sendAddressValue = createEvent(this, "sendAddressValue", 7);
15363
+ this.sendValidityState = createEvent(this, "sendValidityState", 7);
15364
+ this.sendInputValue = createEvent(this, "sendInputValue", 7);
15365
+ this.value = '';
15366
+ this.validationPattern = '';
15367
+ this.hasManualAddressBeenTriggered = false;
15368
+ this.touched = false;
15369
+ this.maxPostalCodeLength = '10';
15370
+ this.handleInput = (event) => {
15371
+ const inputValue = event.target.value;
15372
+ const upperCaseValue = inputValue.toUpperCase();
15373
+ this.value = upperCaseValue;
15374
+ this.touched = true;
15375
+ this.currentPostalCode = upperCaseValue;
15376
+ this.showNoResultsMessage = false;
15377
+ if (this.inputReference) {
15378
+ this.inputReference.value = upperCaseValue;
15379
+ }
15380
+ if (this.value.length < this.postalcodelength) {
15381
+ this.openAddressDropdown = false;
15382
+ this.isFetchingAddresses = false;
15383
+ }
15384
+ if (this.value === '' || this.value.length < 1) {
15385
+ this.openAddressDropdown = false;
15386
+ this.isFetchingAddresses = false;
15387
+ }
15388
+ if (this.debounceTime) {
15389
+ clearTimeout(this.debounceTime);
15390
+ }
15391
+ this.debounceTime = setTimeout(() => {
15392
+ // Trigger address lookup when postal code reaches minimum length
15393
+ if (this.value.length >= this.postalcodelength) {
15394
+ sessionStorage.setItem('currentPostalCode', this.value);
15395
+ this.showNoResultsMessage = false;
15396
+ if (this.addresses && this.addresses.length > 0) {
15397
+ this.openAddressDropdown = true;
15398
+ }
15399
+ }
15400
+ // Validate input and update error state
15401
+ const wasValid = this.isValid;
15402
+ this.isValid = this.setValidity();
15403
+ this.errorMessage = this.setErrorMessage();
15404
+ // Emit validity state if changed
15405
+ if (wasValid !== this.isValid) {
15406
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
15407
+ }
15408
+ this.emitValueHandler(true);
15409
+ }, 300);
15410
+ };
15411
+ this.handleBlur = (event) => {
15412
+ this.value = event.target.value;
15413
+ this.touched = true;
15414
+ this.isValid = this.setValidity();
15415
+ this.errorMessage = this.setErrorMessage();
15416
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
15417
+ this.showNoResultsMessage = false;
15418
+ // hide 'no addresses found' msg
15419
+ if (!this.openAddressDropdown) {
15420
+ this.showNoResultsMessage = false;
15421
+ }
15422
+ };
15423
+ this.handleFocus = () => {
15424
+ const hasSearchTerm = this.currentPostalCode && this.currentPostalCode.length >= this.postalcodelength;
15425
+ if (hasSearchTerm) {
15426
+ this.openAddressDropdown = true;
15427
+ }
15428
+ };
15429
+ this.handlePostalCode = (e, data) => {
15430
+ e.stopPropagation();
15431
+ const address1 = `${data.street}`.trim();
15432
+ const address2 = `${data.number}`.trim();
15433
+ const city = `${data.city}`.trim();
15434
+ this.sendAddressValue.emit({ city, address1, address2 });
15435
+ this.value = this.currentPostalCode.toLocaleUpperCase();
15436
+ this.touched = true;
15437
+ this.isValid = true;
15438
+ this.openAddressDropdown = false;
15439
+ this.showNoResultsMessage = false;
15440
+ this.isFetchingAddresses = false;
15441
+ this.valueHandler({ name: this.name, value: this.value });
15442
+ this.validityStateHandler({ valid: true, name: this.name });
15443
+ this.valueHandler({ name: 'address1', value: address1 });
15444
+ this.valueHandler({ name: 'City', value: city });
15445
+ if (address2) {
15446
+ this.valueHandler({ name: 'address2', value: address2 });
15447
+ }
15448
+ this.refreshTrigger++;
15449
+ };
15450
+ this.enterAddressManually = () => {
15451
+ const refs = window.targetInputRefs;
15452
+ if (!refs)
15453
+ return;
15454
+ // Define all address fields that need to be filled manually
15455
+ const allFields = [
15456
+ { name: 'PostalCode', ref: refs['PostalCode'], minLength: this.postalcodelength },
15457
+ { name: 'address1', ref: refs['address1'] },
15458
+ { name: 'address2', ref: refs['address2'] },
15459
+ { name: 'City', ref: refs['City'] }
15460
+ ];
15461
+ // Required fields for address validation
15462
+ const requiredFields = [
15463
+ { name: 'PostalCode', ref: refs['PostalCode'], minLength: this.postalcodelength },
15464
+ { name: 'address1', ref: refs['address1'] },
15465
+ { name: 'City', ref: refs['City'] }
15466
+ ];
15467
+ // find the first required field that is empty or incomplete
15468
+ const targetField = requiredFields.find(field => {
15469
+ var _a;
15470
+ const value = ((_a = field.ref) === null || _a === void 0 ? void 0 : _a.value) || '';
15471
+ return field.minLength ? (value.length === 0 || value.length < field.minLength) : value.length === 0;
15472
+ });
15473
+ const targetInput = (targetField === null || targetField === void 0 ? void 0 : targetField.ref) || refs['address1'] || refs['PostalCode'];
15474
+ targetInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
15475
+ if (!this.hasManualAddressBeenTriggered) {
15476
+ this.hasManualAddressBeenTriggered = true;
15477
+ allFields.forEach(field => {
15478
+ var _a;
15479
+ if (field.ref) {
15480
+ const inputElement = ((_a = field.ref.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input')) || field.ref;
15481
+ if (inputElement) {
15482
+ inputElement.classList.add('pulse-border');
15483
+ // remove animation when it ends
15484
+ const handleAnimationEnd = () => {
15485
+ inputElement.classList.remove('pulse-border');
15486
+ inputElement.removeEventListener('animationend', handleAnimationEnd);
15487
+ };
15488
+ inputElement.addEventListener('animationend', handleAnimationEnd);
15489
+ }
15490
+ }
15491
+ });
15492
+ targetInput.focus();
15493
+ }
15494
+ else {
15495
+ targetInput.focus();
15496
+ }
15497
+ };
15498
+ this.setClientStyling = () => {
15499
+ let sheet = document.createElement('style');
15500
+ sheet.innerHTML = this.clientStyling;
15501
+ this.stylingContainer.prepend(sheet);
15502
+ };
15503
+ this.handleOutsideClick = (event) => {
15504
+ if (!this.openAddressDropdown)
15505
+ return;
15506
+ const path = event.composedPath ? event.composedPath() : [];
15507
+ const isInputClick = path.includes(this.inputReference);
15508
+ const isDropdownClick = path.includes(this.addressesDropdownRef);
15509
+ const isOptionClick = path.some(el => { var _a; return el instanceof Element && ((_a = el.classList) === null || _a === void 0 ? void 0 : _a.contains('option')); });
15510
+ if (!isInputClick && !isDropdownClick && !isOptionClick) {
15511
+ this.openAddressDropdown = false;
15512
+ this.showNoResultsMessage = false;
15513
+ }
15514
+ };
15515
+ this.name = 'PostalCode';
15516
+ this.displayName = undefined;
15517
+ this.placeholder = undefined;
15518
+ this.validation = undefined;
15519
+ this.defaultValue = '';
15520
+ this.autofilled = undefined;
15521
+ this.tooltip = undefined;
15522
+ this.language = undefined;
15523
+ this.emitValue = undefined;
15524
+ this.clientStyling = '';
15525
+ this.postalcodelength = undefined;
15526
+ this.addresses = undefined;
15527
+ this.isValid = undefined;
15528
+ this.errorMessage = '';
15529
+ this.limitStylingAppends = false;
15530
+ this.showTooltip = false;
15531
+ this.selectedCountryCode = '';
15532
+ this.currentPostalCode = '';
15533
+ this.openAddressDropdown = false;
15534
+ this.showNoResultsMessage = false;
15535
+ this.refreshTrigger = 0;
15536
+ this.isFetchingAddresses = false;
15537
+ }
15538
+ handleStylingChange(newValue, oldValue) {
15539
+ if (newValue !== oldValue)
15540
+ this.setClientStyling();
15541
+ }
15542
+ validityChanged() {
15543
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
15544
+ if (this.emitValue == true) {
15545
+ this.valueHandler({ name: this.name, value: this.value });
15546
+ }
15547
+ }
15548
+ emitValueHandler(newValue) {
15549
+ if (newValue == true && this.isValid) {
15550
+ this.valueHandler({ name: this.name, value: this.value });
15551
+ }
15552
+ if (newValue === true && !this.value.length) {
15553
+ this.valueHandler({ name: this.name, value: this.value });
15554
+ }
15555
+ }
15556
+ handleAddresses(newValue) {
15557
+ if (newValue && newValue.length > 0) {
15558
+ this.openAddressDropdown = true;
15559
+ this.showNoResultsMessage = false;
15560
+ }
15561
+ else {
15562
+ this.openAddressDropdown = false;
15563
+ if (this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength) {
15564
+ setTimeout(() => {
15565
+ if (this.currentPostalCode.length >= this.postalcodelength && !this.isFetchingAddresses) {
15566
+ this.showNoResultsMessage = true;
15567
+ }
15568
+ }, 200);
15569
+ }
15570
+ }
15571
+ this.isFetchingAddresses = false;
15572
+ }
15573
+ validityStateHandler(inputStateEvent) {
15574
+ this.sendValidityState.emit(inputStateEvent);
15575
+ }
15576
+ valueHandler(inputValueEvent) {
15577
+ this.sendInputValue.emit(inputValueEvent);
15578
+ }
15579
+ handleClickOutside(event) {
15580
+ const path = event.composedPath();
15581
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
15582
+ this.showTooltip = false;
15583
+ }
15584
+ }
15585
+ handleCountryCodeUpdate(event) {
15586
+ const { name, value } = event.detail;
15587
+ this.selectedCountryCode = value;
15588
+ if (name === 'CountryCode') {
15589
+ this.resetPostalCodeField();
15590
+ this.refreshTrigger++;
15591
+ }
15592
+ }
15593
+ handleFetchStarted() {
15594
+ this.showNoResultsMessage = false;
15595
+ this.isFetchingAddresses = true;
15596
+ this.openAddressDropdown = false;
15597
+ }
15598
+ connectedCallback() {
15599
+ this.validationPattern = this.setPattern();
15600
+ }
15601
+ componentDidRender() {
15602
+ if (!this.limitStylingAppends && this.stylingContainer) {
15603
+ if (this.clientStyling)
15604
+ this.setClientStyling();
15605
+ this.limitStylingAppends = true;
15606
+ }
15607
+ }
15608
+ componentDidLoad() {
15609
+ if (this.defaultValue) {
15610
+ this.value = this.defaultValue;
15611
+ this.valueHandler({ name: this.name, value: this.value });
15612
+ }
15613
+ if (this.inputReference) {
15614
+ window.targetInputRefs = window.targetInputRefs || {};
15615
+ window.targetInputRefs[this.name] = this.inputReference;
15616
+ }
15617
+ this.isValid = this.setValidity();
15618
+ document.addEventListener('click', this.handleOutsideClick);
15619
+ }
15620
+ disconnectedCallback() {
15621
+ document.removeEventListener('click', this.handleOutsideClick);
15622
+ }
15623
+ setValidity() {
15624
+ if (!this.inputReference) {
15625
+ return false;
15626
+ }
15627
+ const inputIsValid = this.inputReference.validity.valid;
15628
+ const inputMatchValidation = !this.inputReference.value || this.inputReference.value.match(this.validationPattern) !== null;
15629
+ return inputIsValid && inputMatchValidation;
15630
+ }
15631
+ setPattern() {
15632
+ var _a, _b;
15633
+ if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15634
+ return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
15635
+ }
15636
+ }
15637
+ setErrorMessage() {
15638
+ var _a, _b;
15639
+ if (!this.touched) {
15640
+ return '';
15641
+ }
15642
+ if (this.inputReference.validity.valueMissing) {
15643
+ return translate$1('requiredError', this.language);
15644
+ }
15645
+ if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
15646
+ return translate$1('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
15647
+ }
15648
+ if (this.inputReference.value.match(this.validationPattern) == null) {
15649
+ const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
15650
+ const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
15651
+ return translate$1(`${errorCode}`, this.language) || errorMessage;
15652
+ }
15653
+ return '';
15654
+ }
15655
+ resetPostalCodeField() {
15656
+ this.value = '';
15657
+ this.currentPostalCode = '';
15658
+ this.showNoResultsMessage = false;
15659
+ this.openAddressDropdown = false;
15660
+ this.isFetchingAddresses = false;
15661
+ sessionStorage.removeItem('currentPostalCode');
15662
+ if (this.inputReference) {
15663
+ this.inputReference.value = '';
15664
+ }
15665
+ this.valueHandler({ name: this.name, value: '' });
15666
+ this.validityStateHandler({ valid: false, name: this.name });
15667
+ }
15668
+ renderTooltip() {
15669
+ if (this.showTooltip) {
15670
+ return (h$1("div", { class: `text__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
15671
+ }
15672
+ return null;
15673
+ }
15674
+ determineInputValue() {
15675
+ // Store address input refs for manual entry function
15676
+ if (this.inputReference && this.name) {
15677
+ window.targetInputRefs = window.targetInputRefs || {};
15678
+ window.targetInputRefs[this.name] = this.inputReference;
15679
+ }
15680
+ return this.value || this.currentPostalCode || sessionStorage.getItem('currentPostalCode') || this.defaultValue;
15681
+ }
15682
+ render() {
15683
+ var _a, _b;
15684
+ let invalidClass = '';
15685
+ if (this.touched) {
15686
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15687
+ }
15688
+ let isUKCountry = this.selectedCountryCode === 'UK' || this.selectedCountryCode === 'GB';
15689
+ let showAddressesDropdown = ((_a = this.addresses) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.openAddressDropdown && isUKCountry;
15690
+ let shouldShowNoResults = this.showNoResultsMessage && this.currentPostalCode &&
15691
+ this.currentPostalCode.length >= this.postalcodelength && (((_b = this.addresses) === null || _b === void 0 ? void 0 : _b.length) === 0) && isUKCountry;
15692
+ let showLoadingMessage = this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength;
15693
+ return (h$1("div", { key: '9618edb268c4c1cffa450bb3dbd778ab5197e6f3', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h$1("div", { key: '932d83f8895024ba1d7490e01505b651625def00', class: 'text__wrapper--flex' }, h$1("label", { key: '0c2281a6670fda698469815be19d0e99b18dbe65', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$1("div", { key: '70eacd1179b9b9dc0def1cd18fab22bd090999b0', class: 'text__wrapper--relative' }, this.tooltip && (h$1("img", { key: '1237da82659dc9558020b0675a1a645c500f77de', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip })), this.renderTooltip())), h$1("div", { key: '65db0837d507b90217802e6f6d08800ae91404c6', class: 'input__text-wrapper' }, h$1("input", { key: '4c05c552d1d1dfe70fb872d44c0f2bc3f4c62c31', name: this.name, id: `${this.name}__input`, value: this.determineInputValue(), type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.maxPostalCodeLength, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), !isUKCountry && (h$1("p", { key: 'c0f93584fa3f970a27793178517807968a03d252', class: "address__manual-input-msg", onClick: () => this.enterAddressManually() }, translate$1('enterIEAddressManually', this.language))), showAddressesDropdown && (h$1("div", { key: '2f24716dbc7b5ed8f70f0f61a787c97fa75d3fba', class: "input__addresses-container", ref: (el) => (this.addressesDropdownRef = el) }, h$1("div", { key: '63b89521d94589aeb082f2ee98f31c0508c3b070', class: "options" }, this.addresses.map((addr, index) => (h$1("div", { key: index, class: "option", onClick: (e) => this.handlePostalCode(e, addr) }, addr.street, " ", addr.number, " ", addr.city)))))), showLoadingMessage && (h$1("div", { key: 'd1f3deaf9936e00ff05ac37d635a3dadb11a0db8', class: "postalcode__loading-spinner" }, h$1("div", { key: 'ee7c1a5275b8e5824a9e3ffbd39d1476ced9d0a1', class: "loading-spinner" }), h$1("span", { key: '198c01371a98fa07d35ff64fad5714176ffdcb0d' }, translate$1('searchingForAddresses', this.language)))), shouldShowNoResults && (h$1("div", { key: 'e4f098805673d2708bb3fe2ff6dccc61308fc27a', class: "postalcode__no-results-message" }, translate$1('postalLookUpNoAddressFound', this.language)))), h$1("small", { key: 'e84296325688a134e49f521ecfa1ff44ed13fcc9', class: 'text__error-message' }, this.errorMessage)));
15694
+ }
15695
+ static get watchers() { return {
15696
+ "clientStyling": ["handleStylingChange"],
15697
+ "isValid": ["validityChanged"],
15698
+ "emitValue": ["emitValueHandler"],
15699
+ "addresses": ["handleAddresses"]
15700
+ }; }
15701
+ };
15702
+ PostalCodeInput.style = PostalcodeInputStyle0;
15703
+
15172
15704
  const radioInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";
15173
15705
  const RadioInputStyle0 = radioInputCss;
15174
15706
 
@@ -15252,8 +15784,8 @@ const RadioInput = class {
15252
15784
  return null;
15253
15785
  }
15254
15786
  render() {
15255
- return h$1("fieldset", { key: '8dd2ac2660557c45e3e7e1a514d94e8e0f90d4f2', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("legend", { key: '609396bda45ad1d2ceb49a023bdc090833724ed4', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h$1("div", { class: 'radio__wrapper' }, h$1("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), h$1("label", { htmlFor: `${option.label}__input` }, option.label))), h$1("small", { key: 'e3c097e5f460316759d74e1f06a4f9f805deb29e', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
15256
- h$1("img", { key: 'a71bf8fe647776214c36a87befff42b39b95106a', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
15787
+ return h$1("fieldset", { key: '88357307488334074a397c636210575b8af1e2c3', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("legend", { key: '25f656d5b155c392cad79c89410833c3491531f8', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h$1("div", { class: 'radio__wrapper' }, h$1("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), h$1("label", { htmlFor: `${option.label}__input` }, option.label))), h$1("small", { key: '08def575050905f964d6921d4ed4f071fccdf4da', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
15788
+ h$1("img", { key: '485fa4888f626f1cf44f179f498f257af6c41b58', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
15257
15789
  }
15258
15790
  static get watchers() { return {
15259
15791
  "clientStyling": ["handleStylingChange"],
@@ -15451,10 +15983,10 @@ const SelectInput = class {
15451
15983
  if (this.touched) {
15452
15984
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15453
15985
  }
15454
- return h$1("div", { key: '493268c1af30e1120317b916ed911598737405bd', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("div", { key: '232dc6989da291dfaececee8199081394d33ee41', class: 'select__wrapper--flex' }, h$1("label", { key: 'fb03628e1953f679c21bd8da88bfe47f1bcbab4e', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h$1("div", { key: '02581db26e8093b6968fd91fbd08782dfc24118e', class: 'select__wrapper--relative' }, this.tooltip &&
15455
- h$1("img", { key: '4da026564dcee19491e055070341317266a888f9', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? h$1("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", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
15986
+ return h$1("div", { key: '68a8d63f045706ea65a8a9edf3aeec381ff93c52', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("div", { key: '1e4c7d1ad9add75ff495ab2aec2bc1556339c8d7', class: 'select__wrapper--flex' }, h$1("label", { key: '8698e76f945ed1c9d94597ca9f12d8c03d54ce31', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h$1("div", { key: 'bf34dd8c2155e9eca8d9da427e9775ee5685c3c6', class: 'select__wrapper--relative' }, this.tooltip &&
15987
+ h$1("img", { key: 'f396770070f3e2710120bb87d059f78aa1b5e372', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? h$1("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", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
15456
15988
  :
15457
- h$1("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h$1("small", { key: 'f0f0de66fe7a135a2d514e41725be1c7b29c17c0', class: 'select__error-message' }, this.errorMessage));
15989
+ h$1("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h$1("small", { key: '21327ad926828b95552046b42ac14f69d7012513', class: 'select__error-message' }, this.errorMessage));
15458
15990
  }
15459
15991
  static get watchers() { return {
15460
15992
  "clientStyling": ["handleStylingChange"],
@@ -15647,8 +16179,8 @@ const TelInput = class {
15647
16179
  if (this.touched) {
15648
16180
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15649
16181
  }
15650
- return h$1("div", { key: '698bb9cc01d144ccf2f20fbac7d519c8b4523c23', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("div", { key: '08792dad79d529f079011d1bd82a77b74865f1f0', class: 'tel__wrapper--flex-label' }, h$1("label", { key: '5528ee07e57b5855d03bb55c5d77608019983bde', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$1("div", { key: '5e62f2fe0751d9108422db4670c17ce623e97e8d', class: 'tel__wrapper--relative' }, this.tooltip &&
15651
- h$1("img", { key: '050486adda9b04f3ce3502bf7fe25450e564c54b', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$1("div", { key: '8944d4b99907ab9c355ac392379064150bc73d70', class: `tel__wrapper--flex ${invalidClass}` }, h$1("vaadin-combo-box", { key: 'adcbc0cb5f371c10fe5a21a577647f5354a45428', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.disablePhonePrefix, onChange: (e) => this.handlePrefixInput(e) }), h$1("input", { key: '701228afeca7ccb0bccfde015fec41638a7901ec', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: (_a = this.phoneValue) !== null && _a !== void 0 ? _a : '', placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), h$1("small", { key: '5230fb8be4b5b47cedc088f5ed777a3462492ed5', class: 'tel__error-message' }, this.errorMessage));
16182
+ return h$1("div", { key: '9b01d1059b470ec9f57c6f852df12aa17d7a58e2', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("div", { key: '7ad94c73b7b14f63d1b0aa395cd4b2220d80bf7f', class: 'tel__wrapper--flex-label' }, h$1("label", { key: '2995bfd5f655c71a454281edf967ab4afff2b61c', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$1("div", { key: '45c874ffd76f0c56eb971728acc6bcf3c31afc64', class: 'tel__wrapper--relative' }, this.tooltip &&
16183
+ h$1("img", { key: '3ecfbb61507ea4fbe02c804679293adf7961ce18', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$1("div", { key: 'b2dc1d8af7ea60bc56347ae73c315cf5539d6e7a', class: `tel__wrapper--flex ${invalidClass}` }, h$1("vaadin-combo-box", { key: '3ad4d43799026bd4f3b06d9ad94eee17e81daced', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.disablePhonePrefix, onChange: (e) => this.handlePrefixInput(e) }), h$1("input", { key: '6773fa69b3f657ccc4798db91b3c9966ef1ad6bc', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: (_a = this.phoneValue) !== null && _a !== void 0 ? _a : '', placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), h$1("small", { key: '799b137bb4cf96cb7cffa77a6934eeab3e34f4ee', class: 'tel__error-message' }, this.errorMessage));
15652
16184
  }
15653
16185
  static get watchers() { return {
15654
16186
  "clientStyling": ["handleStylingChange"],
@@ -15658,7 +16190,7 @@ const TelInput = class {
15658
16190
  };
15659
16191
  TelInput.style = TelInputStyle0;
15660
16192
 
15661
- 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%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.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:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:\"*\";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}";
16193
+ 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%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.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:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:\"*\";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}";
15662
16194
  const TextInputStyle0 = textInputCss;
15663
16195
 
15664
16196
  const TextInput = class {
@@ -15669,6 +16201,7 @@ const TextInput = class {
15669
16201
  this.value = '';
15670
16202
  this.validationPattern = '';
15671
16203
  this.duplicateInputValue = null;
16204
+ this.postalcodelength = 5;
15672
16205
  this.touched = false;
15673
16206
  this.handleInput = (event) => {
15674
16207
  this.value = event.target.value;
@@ -15707,10 +16240,12 @@ const TextInput = class {
15707
16240
  this.emitValue = undefined;
15708
16241
  this.isDuplicateInput = undefined;
15709
16242
  this.clientStyling = '';
16243
+ this.haspostalcodelookup = undefined;
15710
16244
  this.isValid = undefined;
15711
16245
  this.errorMessage = '';
15712
16246
  this.limitStylingAppends = false;
15713
16247
  this.showTooltip = false;
16248
+ this.selectedCountryCode = '';
15714
16249
  }
15715
16250
  handleStylingChange(newValue, oldValue) {
15716
16251
  if (newValue !== oldValue)
@@ -15765,6 +16300,42 @@ const TextInput = class {
15765
16300
  this.errorMessage = this.setErrorMessage();
15766
16301
  }
15767
16302
  }
16303
+ handleCountryCodeUpdate(event) {
16304
+ const { name, value } = event.detail;
16305
+ this.selectedCountryCode = value;
16306
+ if (name === 'CountryCode' && ['address1', 'address2', 'City'].includes(this.name)) {
16307
+ this.value = '';
16308
+ this.touched = false;
16309
+ this.errorMessage = '';
16310
+ this.isValid = false;
16311
+ if (this.inputReference) {
16312
+ this.inputReference.value = '';
16313
+ }
16314
+ this.valueHandler({ name: this.name, value: '' });
16315
+ this.validityStateHandler({ valid: false, name: this.name });
16316
+ }
16317
+ }
16318
+ handleAddressSelection(event) {
16319
+ const { city, address1, address2 } = event.detail;
16320
+ if (!['address1', 'address2', 'City'].includes(this.name)) {
16321
+ return;
16322
+ }
16323
+ let newValue = '';
16324
+ if (this.name === 'address1') {
16325
+ newValue = address1;
16326
+ }
16327
+ else if (this.name === 'address2') {
16328
+ newValue = address2;
16329
+ }
16330
+ else if (this.name === 'City') {
16331
+ newValue = city;
16332
+ }
16333
+ this.value = newValue;
16334
+ this.touched = true;
16335
+ this.isValid = true;
16336
+ this.valueHandler({ name: this.name, value: newValue });
16337
+ this.validityStateHandler({ valid: true, name: this.name });
16338
+ }
15768
16339
  connectedCallback() {
15769
16340
  this.validationPattern = this.setPattern();
15770
16341
  }
@@ -15785,12 +16356,15 @@ const TextInput = class {
15785
16356
  this.touched = true;
15786
16357
  }
15787
16358
  }
16359
+ if (this.haspostalcodelookup) {
16360
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(this.name)) {
16361
+ window.targetInputRefs = window.targetInputRefs || {};
16362
+ window.targetInputRefs[this.name] = this.inputReference;
16363
+ }
16364
+ }
15788
16365
  this.isValid = this.setValidity();
15789
16366
  }
15790
16367
  setValidity() {
15791
- if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
15792
- return false;
15793
- }
15794
16368
  if (!this.inputReference) {
15795
16369
  return false;
15796
16370
  }
@@ -15834,8 +16408,9 @@ const TextInput = class {
15834
16408
  if (this.touched) {
15835
16409
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15836
16410
  }
15837
- return h$1("div", { key: 'a769be49d47bf5eac45467f9355aa2d51cb1ff81', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h$1("div", { key: '3885727132e83f4381c455ec04fe49bb3feb58a2', class: 'text__wrapper--flex' }, h$1("label", { key: '36132d614d6f921af8dda5fef9466fdbc8b83f2f', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$1("div", { key: 'ac112a8be59094ee2c347c1853e1f36781246831', class: 'text__wrapper--relative' }, this.tooltip &&
15838
- h$1("img", { key: '31d5bc82b517facc92cc84e4191bc33946bbc06c', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$1("input", { key: '3bea6c3cbd01c55ac8e120078afdb784b5d65aee', 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, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h$1("small", { key: '6139392a22701626a0001d41c558593be83aabf2', class: 'text__error-message' }, this.errorMessage));
16411
+ const displayValue = this.value || this.defaultValue;
16412
+ return h$1("div", { key: '2126d45a756f9f10a1428f6f2f296d119833949e', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h$1("div", { key: '86adc0243bf02a5d68e8fe2ad25fddbf042041ca', class: 'text__wrapper--flex' }, h$1("label", { key: '81bf4d3010bd780471d97d7356062ed6c762151b', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$1("div", { key: '2b1cc8ad108901ab8bd0d42b5d59d5f59faf923c', class: 'text__wrapper--relative' }, this.tooltip &&
16413
+ h$1("img", { key: 'dc3714a7e7924972454c0532ced7c1928f998e01', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$1("input", { key: 'c615746d8604f9ef6fb1ec2ad3075ba4aa1dc928', name: this.name, id: `${this.name}__input`, value: displayValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h$1("small", { key: '4f4e50d2593f32a40ec8c71aa452ac890cb51751', class: 'text__error-message' }, this.errorMessage));
15839
16414
  }
15840
16415
  static get watchers() { return {
15841
16416
  "clientStyling": ["handleStylingChange"],
@@ -15943,8 +16518,8 @@ const ToggleCheckboxInput = class {
15943
16518
  return null;
15944
16519
  }
15945
16520
  render() {
15946
- return h$1("div", { key: '355926a9da2977c88b7ae205ddd6468d1a86e2d2', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("div", { key: '3bbf491f4fdf22800ad091de584bcac3c2018308', class: 'togglecheckbox__wrapper--flex' }, h$1("input", { key: '14654df4ce258c95c7bc23ffd2420c5f0d5eb65e', class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel()), h$1("small", { key: 'db4624ed73f644db0a8f0b92738497fca64ea035', class: 'togglecheckbox__error-message' }, this.errorMessage), h$1("div", { key: '898d353c570f9ce19c758585f721f6cb50c35fb0', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
15947
- h$1("img", { key: '1007896417922d0e2bcaaf4c65a5f362e5e3bb49', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h$1("div", { key: '260480a129168c8868ae0539ba9f9edbec35f87b', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
16521
+ return h$1("div", { key: '58e1c4145712f9547f59eaf43015d46c13e04f2c', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h$1("div", { key: '5230bc70f55ee7d3d4db2eed2b17c3e4f3ce9a23', class: 'togglecheckbox__wrapper--flex' }, h$1("input", { key: '063c24818b3f4c5fa8362751640c8e51b9ff2868', class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel()), h$1("small", { key: 'df35a1484f167b4bad9e4c82d82e069260be6608', class: 'togglecheckbox__error-message' }, this.errorMessage), h$1("div", { key: '6783791e9d5e882cc47cfdf501737c0309deb9ec', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
16522
+ h$1("img", { key: '8bc868f9d6828fe65a6ad684c0c50d6dbf434239', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h$1("div", { key: '9258e49a1730b9bcec06ae2be98644a729a8741b', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
15948
16523
  return h$1("general-input", { type: subfield.inputType, name: subfield.name, displayName: subfield.displayName, validation: subfield.validate, action: subfield.action || null, defaultValue: subfield.defaultValue, autofilled: subfield.autofill, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: subfield.tooltip, placeholder: subfield.placeholder == null ? '' : subfield.placeholder, ref: el => this.subFieldsObject[subfield.name] = el });
15949
16524
  })));
15950
16525
  }
@@ -16156,9 +16731,9 @@ const TwofaInput = class {
16156
16731
  return null;
16157
16732
  }
16158
16733
  render() {
16159
- return (h$1("div", { key: '0f7d2f80e6335fcb08b1c61f6e52f51205a30092', class: "twofa" }, h$1("div", { key: 'd23240ccceb2ac4af5c5a2a1800eccd6013271e3', class: 'twofa__error-message' }, h$1("p", { key: '72fafd1608f5ae7402be900800100a141fefb72a' }, this.errorMessage)), h$1("div", { key: '98f5a5614fb895672a175d0415f66b5849b82f85', class: "twofa__description", innerHTML: translate$1('twofaDescription', this.language, { values: { destination: this.destination } }) }), h$1("div", { key: '5fd4f8999dc44e372369f03223d53c1d56a1eab4', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
16734
+ return (h$1("div", { key: '8672e39d15057a9e866ba1cb79e50f2d319aa989', class: "twofa", ref: el => this.stylingContainer = el }, h$1("div", { key: 'ae7f658dd357340918e6f9565934660b3ef944ac', class: 'twofa__error-message' }, h$1("p", { key: '8ef6aecdc7a31b1c4b801f69c8970b8df79bd127' }, this.errorMessage)), h$1("div", { key: '86966527af6e1c3313847f0ae07f89d3ae3411fb', class: "twofa__description", innerHTML: translate$1('twofaDescription', this.language, { values: { destination: this.destination } }) }), h$1("div", { key: 'e8ebb1da615c25ddce6e06c4aee158355dc433c3', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
16160
16735
  return (h$1("input", { key: idx, ref: el => this.setInputRef(el, idx), id: `otp-input-${idx}`, type: "text", maxLength: 2, value: char, onInput: (event) => this.handleInput(event, idx), onKeyDown: (event) => this.handleKeyDown(event, idx), onPaste: (event) => this.handlePaste(event) }));
16161
- })), h$1("div", { key: 'b6e5b2ba4e10cbbd092aaef4d13e0f6a640b3c29', class: "twofa__button-wrapper" }, h$1("p", { key: 'eba4ae1393d89db6729cfff7d5bc4eb5a4ab0b43', class: "twofa__resend-message" }, translate$1('twofaResendMessage', this.language)), h$1("button", { key: '58069e9cb76ecf1776f0733a9f8bc20387e71ad3', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
16736
+ })), h$1("div", { key: '707d2423dd21097dbc591bd15fbf57b5c2e7bddc', class: "twofa__button-wrapper" }, h$1("p", { key: 'abc31161f53c6b41aef93b0f27fefced03bac990', class: "twofa__resend-message" }, translate$1('twofaResendMessage', this.language)), h$1("button", { key: '3f7e329e16a524a4849ffb6b98e0df2f4dec136c', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
16162
16737
  ? translate$1('twofaResendButton', this.language)
16163
16738
  : this.formatTime()))));
16164
16739
  }
@@ -16170,4 +16745,4 @@ const TwofaInput = class {
16170
16745
  };
16171
16746
  TwofaInput.style = TwofaInputStyle0;
16172
16747
 
16173
- export { CheckboxGroupInput as checkbox_group_input, CheckboxInput as checkbox_input, DateInput as date_input, EmailInput as email_input, GeneralInput as general_input, GeneralRegistration as general_registration, NumberInput as number_input, PasswordInput as password_input, RadioInput as radio_input, SelectInput as select_input, TelInput as tel_input, TextInput as text_input, ToggleCheckboxInput as toggle_checkbox_input, TwofaInput as twofa_input };
16748
+ export { CheckboxGroupInput as checkbox_group_input, CheckboxInput as checkbox_input, DateInput as date_input, EmailInput as email_input, GeneralInput as general_input, GeneralRegistration as general_registration, NumberInput as number_input, PasswordInput as password_input, PostalCodeInput as postalcode_input, RadioInput as radio_input, SelectInput as select_input, TelInput as tel_input, TextInput as text_input, ToggleCheckboxInput as toggle_checkbox_input, TwofaInput as twofa_input };