@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.
@@ -32,6 +32,9 @@ const TRANSLATIONS$1 = {
32
32
  "twofaDescription": "<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",
33
33
  "twofaResendMessage": "Didn't receive the verification code?",
34
34
  "twofaResendButton": "Resend",
35
+ "enterIEAddressManually": "For IRE, enter the address manually",
36
+ "postalLookUpNoAddressFound": "No addresses found for this postal code",
37
+ "searchingForAddresses": "Searching for addresses...",
35
38
  },
36
39
  "hu": {
37
40
  "dateError": "A választott dátumnak {min} és {max} között kell lennie",
@@ -12811,6 +12814,9 @@ const GeneralInput = class {
12811
12814
  this.emitOnClick = false;
12812
12815
  this.twofaDestination = undefined;
12813
12816
  this.twofaResendIntervalSeconds = 60;
12817
+ this.haspostalcodelookup = undefined;
12818
+ this.postalcodelength = undefined;
12819
+ this.addresses = [];
12814
12820
  }
12815
12821
  connectedCallback() {
12816
12822
  if (this.translationUrl) {
@@ -12821,7 +12827,12 @@ const GeneralInput = class {
12821
12827
  var _a;
12822
12828
  switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
12823
12829
  case 'text':
12824
- return index.h("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 });
12830
+ if (this.haspostalcodelookup && this.name === 'PostalCode') {
12831
+ return index.h("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 });
12832
+ }
12833
+ else {
12834
+ return index.h("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 });
12835
+ }
12825
12836
  case 'email':
12826
12837
  return index.h("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 });
12827
12838
  case 'number':
@@ -12849,7 +12860,7 @@ const GeneralInput = class {
12849
12860
  }
12850
12861
  }
12851
12862
  render() {
12852
- return (index.h(index.Host, { key: 'a90dc97926e4f89518fc8520505cf59281840e20', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
12863
+ return (index.h(index.Host, { key: '7f268156d7372f46b27b38762a2c01281ada038c', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
12853
12864
  }
12854
12865
  };
12855
12866
  GeneralInput.style = GeneralInputStyle0;
@@ -13968,6 +13979,9 @@ const GeneralRegistration = class {
13968
13979
  this.registrationWidgetLoaded = index.createEvent(this, "registrationWidgetLoaded", 7);
13969
13980
  this.registrationStepUpdated = index.createEvent(this, "registrationStepUpdated", 7);
13970
13981
  this.validationChange = index.createEvent(this, "validationChange", 7);
13982
+ this.isSelectingAddress = false;
13983
+ this.lastPostalCode = null;
13984
+ this.selectedCountry = '';
13971
13985
  this.listOfInputValues = [];
13972
13986
  this.listOfInputValidity = [];
13973
13987
  this.listOfActions = [];
@@ -13982,6 +13996,7 @@ const GeneralRegistration = class {
13982
13996
  this.extraActions = [];
13983
13997
  this.registerCredentialsEvent = null;
13984
13998
  this.twofaDestination = '';
13999
+ this.postalcodelength = 5;
13985
14000
  this.registrationStepsState = {
13986
14001
  regId: null
13987
14002
  };
@@ -14028,6 +14043,7 @@ const GeneralRegistration = class {
14028
14043
  this.buttonInsideForm = undefined;
14029
14044
  this.btag = null;
14030
14045
  this.emitOnClick = false;
14046
+ this.haspostalcodelookup = false;
14031
14047
  this.errorMessage = '';
14032
14048
  this.isFormValid = false;
14033
14049
  this.isConsentValid = false;
@@ -14035,10 +14051,12 @@ const GeneralRegistration = class {
14035
14051
  this.isLoading = true;
14036
14052
  this.isLoadingPOST = false;
14037
14053
  this.registrationStep = '';
14038
- this.forms = [];
14054
+ this.forms = {};
14039
14055
  this.limitStylingAppends = false;
14040
14056
  this.autofilled = false;
14041
14057
  this.isInitalInteraction = true;
14058
+ this.addresses = [];
14059
+ this.addressUpdateKey = 0;
14042
14060
  }
14043
14061
  sendStep() {
14044
14062
  this.registrationStepUpdated.emit(this.registrationStep);
@@ -14066,21 +14084,113 @@ const GeneralRegistration = class {
14066
14084
  this.addBtagValue();
14067
14085
  }
14068
14086
  checkInputsValidityHandler(event) {
14069
- // Set isValid state of the input in the list.
14070
14087
  this.listOfInputValidity.find(input => input.name == event.detail.name).isValid = event.detail.valid;
14071
14088
  // Check if any one is invalid.
14072
14089
  this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
14073
14090
  }
14074
14091
  getInputsValueHandler(event) {
14092
+ var _a;
14075
14093
  this.listOfInputValues.find(input => {
14076
14094
  if (input.name == event.detail.name) {
14077
14095
  input.value = event.detail.value;
14078
14096
  input.type = event.detail.type || null;
14079
14097
  }
14080
14098
  });
14099
+ if (this.haspostalcodelookup) {
14100
+ const { name, value } = event.detail;
14101
+ if (name === 'CountryCode') {
14102
+ this.selectedCountry = value;
14103
+ if (value === 'GB') {
14104
+ this.selectedCountry = 'UK';
14105
+ }
14106
+ this.resetAllAddressFields();
14107
+ window.dispatchEvent(new CustomEvent('countryCodeUpdated', {
14108
+ detail: { name, value: this.selectedCountry }
14109
+ }));
14110
+ }
14111
+ if (name === 'PostalCode') {
14112
+ if (!this.isSelectingAddress && this.addresses.length > 0 && value !== this.lastPostalCode) {
14113
+ this.addresses = [];
14114
+ }
14115
+ if (value.length >= this.postalcodelength) {
14116
+ if (this.isSelectingAddress) {
14117
+ return;
14118
+ }
14119
+ // Fetch only if: postal code changed OR no addresses loaded yet
14120
+ const shouldFetch = !this.lastPostalCode || this.lastPostalCode !== value ||
14121
+ this.addresses.length === 0;
14122
+ if (shouldFetch) {
14123
+ const country = this.selectedCountry ||
14124
+ ((_a = this.listOfInputValues.find((i) => i.name === 'CountryCode')) === null || _a === void 0 ? void 0 : _a.value) || '';
14125
+ let postalCode = value;
14126
+ if (this.selectedCountry === 'GB' || this.selectedCountry === 'UK') {
14127
+ if (this.addrDebounce)
14128
+ clearTimeout(this.addrDebounce);
14129
+ this.addrDebounce = setTimeout(() => {
14130
+ this.fetchAddresses(country, postalCode);
14131
+ }, 500);
14132
+ }
14133
+ this.lastPostalCode = value;
14134
+ }
14135
+ }
14136
+ else if (value.length < this.postalcodelength) {
14137
+ this.addresses = [];
14138
+ this.lastPostalCode = null;
14139
+ }
14140
+ }
14141
+ }
14081
14142
  this.stepsStateMachine({ event: 'set', type: 'values' });
14082
14143
  this.handleConditionalValidation(event.detail.name, event.detail.value);
14083
14144
  }
14145
+ handleAddressSelection(event) {
14146
+ const { city, address1, address2 } = event.detail;
14147
+ // Update input values
14148
+ this.listOfInputValues = this.listOfInputValues.map(input => {
14149
+ if (input.name === 'address1')
14150
+ return Object.assign(Object.assign({}, input), { value: address1 || '' });
14151
+ if (input.name === 'address2')
14152
+ return Object.assign(Object.assign({}, input), { value: address2 || '' });
14153
+ if (input.name === 'City')
14154
+ return Object.assign(Object.assign({}, input), { value: city || '' });
14155
+ return input;
14156
+ });
14157
+ if (this.forms[this.registrationStep]) {
14158
+ this.forms[this.registrationStep] = this.forms[this.registrationStep].map(input => {
14159
+ if (input.name === 'address1')
14160
+ return Object.assign(Object.assign({}, input), { defaultValue: address1 });
14161
+ if (input.name === 'address2')
14162
+ return Object.assign(Object.assign({}, input), { defaultValue: address2 });
14163
+ if (input.name === 'City')
14164
+ return Object.assign(Object.assign({}, input), { defaultValue: city });
14165
+ return input;
14166
+ });
14167
+ }
14168
+ // force re-render
14169
+ this.addressUpdateKey = Date.now();
14170
+ this.forms = Object.assign({}, this.forms);
14171
+ this.stepsStateMachine({ event: 'set', type: 'values' });
14172
+ this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
14173
+ this.isSelectingAddress = false;
14174
+ }
14175
+ handleCountryCodeUpdateGlobal(event) {
14176
+ const { name } = event.detail;
14177
+ if (name === 'CountryCode') {
14178
+ const savedState = localStorage.getItem('registrationStepsState');
14179
+ if (savedState) {
14180
+ const parsedState = JSON.parse(savedState);
14181
+ Object.keys(parsedState).forEach(stepKey => {
14182
+ if (parsedState[stepKey] && parsedState[stepKey].registerUserData) {
14183
+ ['address1', 'address2', 'City', 'PostalCode'].forEach(field => {
14184
+ if (parsedState[stepKey].registerUserData[field]) {
14185
+ parsedState[stepKey].registerUserData[field].value = '';
14186
+ }
14187
+ });
14188
+ }
14189
+ });
14190
+ localStorage.setItem('registrationStepsState', JSON.stringify(parsedState));
14191
+ }
14192
+ }
14193
+ }
14084
14194
  handleRequestTwofa() {
14085
14195
  if (!this.twofaDestination)
14086
14196
  return;
@@ -14578,7 +14688,6 @@ const GeneralRegistration = class {
14578
14688
  }
14579
14689
  formatConfig(config) {
14580
14690
  this.listOfInputs = config.content.fields.flatMap((field) => {
14581
- // Special case for inputs that need to be duplicated.
14582
14691
  const duplicateInputRule = field.validate.custom.find(customRule => customRule.rule === 'duplicate-input');
14583
14692
  const inputElement = Object.assign({}, field);
14584
14693
  if (duplicateInputRule) {
@@ -14652,6 +14761,8 @@ const GeneralRegistration = class {
14652
14761
  else {
14653
14762
  this.isConsentReady = false;
14654
14763
  }
14764
+ this.forms[this.registrationStep] = this.listOfInputs;
14765
+ this.forms = Object.assign({}, this.forms);
14655
14766
  // The translations for fields happens here.
14656
14767
  if (this.translationUrl) {
14657
14768
  getTranslations(this.translationUrl).then(() => {
@@ -14671,13 +14782,8 @@ const GeneralRegistration = class {
14671
14782
  })
14672
14783
  .catch((error) => {
14673
14784
  console.error('Failed to fetch translations:', error);
14674
- }).finally(() => {
14675
- this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
14676
14785
  });
14677
14786
  }
14678
- else {
14679
- this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
14680
- }
14681
14787
  // Add the step to the registrationStepsData
14682
14788
  this.registrationStepsState.regId = this.registrationID;
14683
14789
  if (!this.registrationStepsState[this.registrationStep]) {
@@ -14708,19 +14814,22 @@ const GeneralRegistration = class {
14708
14814
  }
14709
14815
  }
14710
14816
  setInitialValidStatus(field) {
14711
- var _a, _b, _c, _d;
14712
- // Input type checkbox, with no validation are valid
14817
+ var _a, _b, _c, _d, _e, _f;
14713
14818
  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) {
14714
14819
  return true;
14715
14820
  }
14716
- //Checkboxes that are mandatory and set as false || null should't be valid.
14717
14821
  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') {
14718
14822
  return false;
14719
14823
  }
14720
- //Inputs that have default value and aren't mandatory are valid.
14721
14824
  if (field.defaultValue !== null) {
14722
14825
  return true;
14723
14826
  }
14827
+ if (((_e = field.validate) === null || _e === void 0 ? void 0 : _e.mandatory) === false) {
14828
+ return true;
14829
+ }
14830
+ if (((_f = field.validate) === null || _f === void 0 ? void 0 : _f.mandatory) === true) {
14831
+ return false;
14832
+ }
14724
14833
  return false;
14725
14834
  }
14726
14835
  stepChange(action) {
@@ -14733,23 +14842,98 @@ const GeneralRegistration = class {
14733
14842
  }
14734
14843
  }
14735
14844
  getInvalidStatus(listOfInputs) {
14736
- return listOfInputs.filter(input => input.isValid == false).length > 0;
14845
+ const invalidInputs = listOfInputs.filter(input => {
14846
+ var _a;
14847
+ const inputConfig = this.listOfInputs.find(i => i.name === input.name);
14848
+ if (inputConfig && !inputConfig.validate.mandatory) {
14849
+ const inputValue = (_a = this.listOfInputValues.find(v => v.name === input.name)) === null || _a === void 0 ? void 0 : _a.value;
14850
+ if (!inputValue || inputValue.trim() === '') {
14851
+ return false;
14852
+ }
14853
+ }
14854
+ return input.isValid == false;
14855
+ });
14856
+ return invalidInputs.length > 0;
14737
14857
  }
14738
14858
  renderErrorMessage(errorMsg) {
14739
14859
  return (index.h("p", { class: "registration registration__error-message" }, errorMsg));
14740
14860
  }
14741
- renderForm() {
14742
- return this.forms.map((form, index$1) => {
14743
- return index.h("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index$1 + 1}` ? 'hidden' : ''}`, ref: el => this.form = el, onClick: this.handleInitialClick }, form[this.registrationStep] && form[this.registrationStep].map((input) => {
14744
- var _a, _b;
14745
- return index.h("div", { key: input.name, class: "input-wrapper" }, index.h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data
14746
- ? (input.inputType.toLowerCase() === 'checkboxgroup' || input.inputType.toLowerCase() === 'togglecheckbox')
14747
- ? input.data.subFields
14748
- : input.data.values
14749
- : [], 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) && (index.h("div", { class: "input-description" }, input.customInfo.description)));
14750
- }), form[this.registrationStep] && this.isConsentReady && this.renderConsents(), form[this.registrationStep] && this.buttonInsideForm && this.renderButtons(), index.h("div", { class: 'registration__wrapper--flex' }, index.h("p", { class: 'registration__error-message', innerHTML: this.errorMessage })));
14861
+ resetAllAddressFields() {
14862
+ this.listOfInputValues = this.listOfInputValues.map(input => {
14863
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
14864
+ return Object.assign(Object.assign({}, input), { value: '' });
14865
+ }
14866
+ return input;
14867
+ });
14868
+ // Update forms with new structure
14869
+ Object.keys(this.forms).forEach(stepKey => {
14870
+ this.forms[stepKey] = this.forms[stepKey].map(input => {
14871
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
14872
+ return Object.assign(Object.assign({}, input), { defaultValue: '' });
14873
+ }
14874
+ return input;
14875
+ });
14876
+ });
14877
+ // Reset validity
14878
+ this.listOfInputValidity = this.listOfInputValidity.map(input => {
14879
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
14880
+ return Object.assign(Object.assign({}, input), { isValid: false });
14881
+ }
14882
+ return input;
14883
+ });
14884
+ this.addresses = [];
14885
+ this.forms = Object.assign({}, this.forms);
14886
+ }
14887
+ fetchAddresses(countryCode, postalCode) {
14888
+ var _a;
14889
+ const currentPostalCode = (_a = this.listOfInputValues.find(i => i.name === 'PostalCode')) === null || _a === void 0 ? void 0 : _a.value;
14890
+ if (!currentPostalCode || currentPostalCode.length < this.postalcodelength) {
14891
+ return;
14892
+ }
14893
+ window.dispatchEvent(new CustomEvent('addressFetchStarted', {
14894
+ detail: { postalCode }
14895
+ }));
14896
+ const url = new URL(`${this.endpoint}/api/pam/v1/lookup/addresses?country=${countryCode}&postalCode=${postalCode}`);
14897
+ const headers = new Headers();
14898
+ headers.append('Content-Type', 'application/json');
14899
+ headers.append('Accept', 'application/json');
14900
+ const options = {
14901
+ method: 'GET',
14902
+ headers
14903
+ };
14904
+ fetch(url.href, options)
14905
+ .then(async (res) => {
14906
+ if (!res.ok) {
14907
+ const err = await res.json();
14908
+ throw new Error(`Failed to fetch addresses: ${err.message || JSON.stringify(err)}`);
14909
+ }
14910
+ return res.json();
14911
+ })
14912
+ .then((data) => {
14913
+ var _a;
14914
+ const currentPostalCode = (_a = this.listOfInputValues.find(i => i.name === 'PostalCode')) === null || _a === void 0 ? void 0 : _a.value;
14915
+ if (currentPostalCode && currentPostalCode.length >= this.postalcodelength) {
14916
+ this.addresses = data.addresses || [];
14917
+ }
14918
+ else {
14919
+ this.addresses = [];
14920
+ }
14921
+ })
14922
+ .catch(() => {
14923
+ this.addresses = [];
14924
+ this.lastPostalCode = null;
14751
14925
  });
14752
14926
  }
14927
+ renderForm() {
14928
+ return (index.h("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) => {
14929
+ var _a, _b;
14930
+ return index.h("div", { key: input.name, class: "input-wrapper" }, index.h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data
14931
+ ? (input.inputType.toLowerCase() === 'checkboxgroup' || input.inputType.toLowerCase() === 'togglecheckbox')
14932
+ ? input.data.subFields
14933
+ : input.data.values
14934
+ : [], 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) && (index.h("div", { class: "input-description" }, input.customInfo.description)));
14935
+ }), this.forms[this.registrationStep] && this.isConsentReady && this.renderConsents(), this.forms[this.registrationStep] && this.buttonInsideForm && this.renderButtons(), index.h("div", { class: 'registration__wrapper--flex' }, index.h("p", { class: 'registration__error-message', innerHTML: this.errorMessage }))));
14936
+ }
14753
14937
  ;
14754
14938
  renderConsents() {
14755
14939
  return (index.h("div", { class: "consentsContainer" }, index.h("player-consents", { endpoint: this.endpoint })));
@@ -15173,6 +15357,354 @@ const PasswordInput = class {
15173
15357
  };
15174
15358
  PasswordInput.style = PasswordInputStyle0;
15175
15359
 
15360
+ 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)}}";
15361
+ const PostalcodeInputStyle0 = postalcodeInputCss;
15362
+
15363
+ const PostalCodeInput = class {
15364
+ constructor(hostRef) {
15365
+ index.registerInstance(this, hostRef);
15366
+ this.sendAddressValue = index.createEvent(this, "sendAddressValue", 7);
15367
+ this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
15368
+ this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
15369
+ this.value = '';
15370
+ this.validationPattern = '';
15371
+ this.hasManualAddressBeenTriggered = false;
15372
+ this.touched = false;
15373
+ this.maxPostalCodeLength = '10';
15374
+ this.handleInput = (event) => {
15375
+ const inputValue = event.target.value;
15376
+ const upperCaseValue = inputValue.toUpperCase();
15377
+ this.value = upperCaseValue;
15378
+ this.touched = true;
15379
+ this.currentPostalCode = upperCaseValue;
15380
+ this.showNoResultsMessage = false;
15381
+ if (this.inputReference) {
15382
+ this.inputReference.value = upperCaseValue;
15383
+ }
15384
+ if (this.value.length < this.postalcodelength) {
15385
+ this.openAddressDropdown = false;
15386
+ this.isFetchingAddresses = false;
15387
+ }
15388
+ if (this.value === '' || this.value.length < 1) {
15389
+ this.openAddressDropdown = false;
15390
+ this.isFetchingAddresses = false;
15391
+ }
15392
+ if (this.debounceTime) {
15393
+ clearTimeout(this.debounceTime);
15394
+ }
15395
+ this.debounceTime = setTimeout(() => {
15396
+ // Trigger address lookup when postal code reaches minimum length
15397
+ if (this.value.length >= this.postalcodelength) {
15398
+ sessionStorage.setItem('currentPostalCode', this.value);
15399
+ this.showNoResultsMessage = false;
15400
+ if (this.addresses && this.addresses.length > 0) {
15401
+ this.openAddressDropdown = true;
15402
+ }
15403
+ }
15404
+ // Validate input and update error state
15405
+ const wasValid = this.isValid;
15406
+ this.isValid = this.setValidity();
15407
+ this.errorMessage = this.setErrorMessage();
15408
+ // Emit validity state if changed
15409
+ if (wasValid !== this.isValid) {
15410
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
15411
+ }
15412
+ this.emitValueHandler(true);
15413
+ }, 300);
15414
+ };
15415
+ this.handleBlur = (event) => {
15416
+ this.value = event.target.value;
15417
+ this.touched = true;
15418
+ this.isValid = this.setValidity();
15419
+ this.errorMessage = this.setErrorMessage();
15420
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
15421
+ this.showNoResultsMessage = false;
15422
+ // hide 'no addresses found' msg
15423
+ if (!this.openAddressDropdown) {
15424
+ this.showNoResultsMessage = false;
15425
+ }
15426
+ };
15427
+ this.handleFocus = () => {
15428
+ const hasSearchTerm = this.currentPostalCode && this.currentPostalCode.length >= this.postalcodelength;
15429
+ if (hasSearchTerm) {
15430
+ this.openAddressDropdown = true;
15431
+ }
15432
+ };
15433
+ this.handlePostalCode = (e, data) => {
15434
+ e.stopPropagation();
15435
+ const address1 = `${data.street}`.trim();
15436
+ const address2 = `${data.number}`.trim();
15437
+ const city = `${data.city}`.trim();
15438
+ this.sendAddressValue.emit({ city, address1, address2 });
15439
+ this.value = this.currentPostalCode.toLocaleUpperCase();
15440
+ this.touched = true;
15441
+ this.isValid = true;
15442
+ this.openAddressDropdown = false;
15443
+ this.showNoResultsMessage = false;
15444
+ this.isFetchingAddresses = false;
15445
+ this.valueHandler({ name: this.name, value: this.value });
15446
+ this.validityStateHandler({ valid: true, name: this.name });
15447
+ this.valueHandler({ name: 'address1', value: address1 });
15448
+ this.valueHandler({ name: 'City', value: city });
15449
+ if (address2) {
15450
+ this.valueHandler({ name: 'address2', value: address2 });
15451
+ }
15452
+ this.refreshTrigger++;
15453
+ };
15454
+ this.enterAddressManually = () => {
15455
+ const refs = window.targetInputRefs;
15456
+ if (!refs)
15457
+ return;
15458
+ // Define all address fields that need to be filled manually
15459
+ const allFields = [
15460
+ { name: 'PostalCode', ref: refs['PostalCode'], minLength: this.postalcodelength },
15461
+ { name: 'address1', ref: refs['address1'] },
15462
+ { name: 'address2', ref: refs['address2'] },
15463
+ { name: 'City', ref: refs['City'] }
15464
+ ];
15465
+ // Required fields for address validation
15466
+ const requiredFields = [
15467
+ { name: 'PostalCode', ref: refs['PostalCode'], minLength: this.postalcodelength },
15468
+ { name: 'address1', ref: refs['address1'] },
15469
+ { name: 'City', ref: refs['City'] }
15470
+ ];
15471
+ // find the first required field that is empty or incomplete
15472
+ const targetField = requiredFields.find(field => {
15473
+ var _a;
15474
+ const value = ((_a = field.ref) === null || _a === void 0 ? void 0 : _a.value) || '';
15475
+ return field.minLength ? (value.length === 0 || value.length < field.minLength) : value.length === 0;
15476
+ });
15477
+ const targetInput = (targetField === null || targetField === void 0 ? void 0 : targetField.ref) || refs['address1'] || refs['PostalCode'];
15478
+ targetInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
15479
+ if (!this.hasManualAddressBeenTriggered) {
15480
+ this.hasManualAddressBeenTriggered = true;
15481
+ allFields.forEach(field => {
15482
+ var _a;
15483
+ if (field.ref) {
15484
+ const inputElement = ((_a = field.ref.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input')) || field.ref;
15485
+ if (inputElement) {
15486
+ inputElement.classList.add('pulse-border');
15487
+ // remove animation when it ends
15488
+ const handleAnimationEnd = () => {
15489
+ inputElement.classList.remove('pulse-border');
15490
+ inputElement.removeEventListener('animationend', handleAnimationEnd);
15491
+ };
15492
+ inputElement.addEventListener('animationend', handleAnimationEnd);
15493
+ }
15494
+ }
15495
+ });
15496
+ targetInput.focus();
15497
+ }
15498
+ else {
15499
+ targetInput.focus();
15500
+ }
15501
+ };
15502
+ this.setClientStyling = () => {
15503
+ let sheet = document.createElement('style');
15504
+ sheet.innerHTML = this.clientStyling;
15505
+ this.stylingContainer.prepend(sheet);
15506
+ };
15507
+ this.handleOutsideClick = (event) => {
15508
+ if (!this.openAddressDropdown)
15509
+ return;
15510
+ const path = event.composedPath ? event.composedPath() : [];
15511
+ const isInputClick = path.includes(this.inputReference);
15512
+ const isDropdownClick = path.includes(this.addressesDropdownRef);
15513
+ const isOptionClick = path.some(el => { var _a; return el instanceof Element && ((_a = el.classList) === null || _a === void 0 ? void 0 : _a.contains('option')); });
15514
+ if (!isInputClick && !isDropdownClick && !isOptionClick) {
15515
+ this.openAddressDropdown = false;
15516
+ this.showNoResultsMessage = false;
15517
+ }
15518
+ };
15519
+ this.name = 'PostalCode';
15520
+ this.displayName = undefined;
15521
+ this.placeholder = undefined;
15522
+ this.validation = undefined;
15523
+ this.defaultValue = '';
15524
+ this.autofilled = undefined;
15525
+ this.tooltip = undefined;
15526
+ this.language = undefined;
15527
+ this.emitValue = undefined;
15528
+ this.clientStyling = '';
15529
+ this.postalcodelength = undefined;
15530
+ this.addresses = undefined;
15531
+ this.isValid = undefined;
15532
+ this.errorMessage = '';
15533
+ this.limitStylingAppends = false;
15534
+ this.showTooltip = false;
15535
+ this.selectedCountryCode = '';
15536
+ this.currentPostalCode = '';
15537
+ this.openAddressDropdown = false;
15538
+ this.showNoResultsMessage = false;
15539
+ this.refreshTrigger = 0;
15540
+ this.isFetchingAddresses = false;
15541
+ }
15542
+ handleStylingChange(newValue, oldValue) {
15543
+ if (newValue !== oldValue)
15544
+ this.setClientStyling();
15545
+ }
15546
+ validityChanged() {
15547
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
15548
+ if (this.emitValue == true) {
15549
+ this.valueHandler({ name: this.name, value: this.value });
15550
+ }
15551
+ }
15552
+ emitValueHandler(newValue) {
15553
+ if (newValue == true && this.isValid) {
15554
+ this.valueHandler({ name: this.name, value: this.value });
15555
+ }
15556
+ if (newValue === true && !this.value.length) {
15557
+ this.valueHandler({ name: this.name, value: this.value });
15558
+ }
15559
+ }
15560
+ handleAddresses(newValue) {
15561
+ if (newValue && newValue.length > 0) {
15562
+ this.openAddressDropdown = true;
15563
+ this.showNoResultsMessage = false;
15564
+ }
15565
+ else {
15566
+ this.openAddressDropdown = false;
15567
+ if (this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength) {
15568
+ setTimeout(() => {
15569
+ if (this.currentPostalCode.length >= this.postalcodelength && !this.isFetchingAddresses) {
15570
+ this.showNoResultsMessage = true;
15571
+ }
15572
+ }, 200);
15573
+ }
15574
+ }
15575
+ this.isFetchingAddresses = false;
15576
+ }
15577
+ validityStateHandler(inputStateEvent) {
15578
+ this.sendValidityState.emit(inputStateEvent);
15579
+ }
15580
+ valueHandler(inputValueEvent) {
15581
+ this.sendInputValue.emit(inputValueEvent);
15582
+ }
15583
+ handleClickOutside(event) {
15584
+ const path = event.composedPath();
15585
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
15586
+ this.showTooltip = false;
15587
+ }
15588
+ }
15589
+ handleCountryCodeUpdate(event) {
15590
+ const { name, value } = event.detail;
15591
+ this.selectedCountryCode = value;
15592
+ if (name === 'CountryCode') {
15593
+ this.resetPostalCodeField();
15594
+ this.refreshTrigger++;
15595
+ }
15596
+ }
15597
+ handleFetchStarted() {
15598
+ this.showNoResultsMessage = false;
15599
+ this.isFetchingAddresses = true;
15600
+ this.openAddressDropdown = false;
15601
+ }
15602
+ connectedCallback() {
15603
+ this.validationPattern = this.setPattern();
15604
+ }
15605
+ componentDidRender() {
15606
+ if (!this.limitStylingAppends && this.stylingContainer) {
15607
+ if (this.clientStyling)
15608
+ this.setClientStyling();
15609
+ this.limitStylingAppends = true;
15610
+ }
15611
+ }
15612
+ componentDidLoad() {
15613
+ if (this.defaultValue) {
15614
+ this.value = this.defaultValue;
15615
+ this.valueHandler({ name: this.name, value: this.value });
15616
+ }
15617
+ if (this.inputReference) {
15618
+ window.targetInputRefs = window.targetInputRefs || {};
15619
+ window.targetInputRefs[this.name] = this.inputReference;
15620
+ }
15621
+ this.isValid = this.setValidity();
15622
+ document.addEventListener('click', this.handleOutsideClick);
15623
+ }
15624
+ disconnectedCallback() {
15625
+ document.removeEventListener('click', this.handleOutsideClick);
15626
+ }
15627
+ setValidity() {
15628
+ if (!this.inputReference) {
15629
+ return false;
15630
+ }
15631
+ const inputIsValid = this.inputReference.validity.valid;
15632
+ const inputMatchValidation = !this.inputReference.value || this.inputReference.value.match(this.validationPattern) !== null;
15633
+ return inputIsValid && inputMatchValidation;
15634
+ }
15635
+ setPattern() {
15636
+ var _a, _b;
15637
+ if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15638
+ return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
15639
+ }
15640
+ }
15641
+ setErrorMessage() {
15642
+ var _a, _b;
15643
+ if (!this.touched) {
15644
+ return '';
15645
+ }
15646
+ if (this.inputReference.validity.valueMissing) {
15647
+ return translate$1('requiredError', this.language);
15648
+ }
15649
+ if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
15650
+ return translate$1('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
15651
+ }
15652
+ if (this.inputReference.value.match(this.validationPattern) == null) {
15653
+ const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
15654
+ const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
15655
+ return translate$1(`${errorCode}`, this.language) || errorMessage;
15656
+ }
15657
+ return '';
15658
+ }
15659
+ resetPostalCodeField() {
15660
+ this.value = '';
15661
+ this.currentPostalCode = '';
15662
+ this.showNoResultsMessage = false;
15663
+ this.openAddressDropdown = false;
15664
+ this.isFetchingAddresses = false;
15665
+ sessionStorage.removeItem('currentPostalCode');
15666
+ if (this.inputReference) {
15667
+ this.inputReference.value = '';
15668
+ }
15669
+ this.valueHandler({ name: this.name, value: '' });
15670
+ this.validityStateHandler({ valid: false, name: this.name });
15671
+ }
15672
+ renderTooltip() {
15673
+ if (this.showTooltip) {
15674
+ return (index.h("div", { class: `text__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
15675
+ }
15676
+ return null;
15677
+ }
15678
+ determineInputValue() {
15679
+ // Store address input refs for manual entry function
15680
+ if (this.inputReference && this.name) {
15681
+ window.targetInputRefs = window.targetInputRefs || {};
15682
+ window.targetInputRefs[this.name] = this.inputReference;
15683
+ }
15684
+ return this.value || this.currentPostalCode || sessionStorage.getItem('currentPostalCode') || this.defaultValue;
15685
+ }
15686
+ render() {
15687
+ var _a, _b;
15688
+ let invalidClass = '';
15689
+ if (this.touched) {
15690
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15691
+ }
15692
+ let isUKCountry = this.selectedCountryCode === 'UK' || this.selectedCountryCode === 'GB';
15693
+ let showAddressesDropdown = ((_a = this.addresses) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.openAddressDropdown && isUKCountry;
15694
+ let shouldShowNoResults = this.showNoResultsMessage && this.currentPostalCode &&
15695
+ this.currentPostalCode.length >= this.postalcodelength && (((_b = this.addresses) === null || _b === void 0 ? void 0 : _b.length) === 0) && isUKCountry;
15696
+ let showLoadingMessage = this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength;
15697
+ return (index.h("div", { key: '9618edb268c4c1cffa450bb3dbd778ab5197e6f3', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, index.h("div", { key: '932d83f8895024ba1d7490e01505b651625def00', class: 'text__wrapper--flex' }, index.h("label", { key: '0c2281a6670fda698469815be19d0e99b18dbe65', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: '70eacd1179b9b9dc0def1cd18fab22bd090999b0', class: 'text__wrapper--relative' }, this.tooltip && (index.h("img", { key: '1237da82659dc9558020b0675a1a645c500f77de', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip })), this.renderTooltip())), index.h("div", { key: '65db0837d507b90217802e6f6d08800ae91404c6', class: 'input__text-wrapper' }, index.h("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 && (index.h("p", { key: 'c0f93584fa3f970a27793178517807968a03d252', class: "address__manual-input-msg", onClick: () => this.enterAddressManually() }, translate$1('enterIEAddressManually', this.language))), showAddressesDropdown && (index.h("div", { key: '2f24716dbc7b5ed8f70f0f61a787c97fa75d3fba', class: "input__addresses-container", ref: (el) => (this.addressesDropdownRef = el) }, index.h("div", { key: '63b89521d94589aeb082f2ee98f31c0508c3b070', class: "options" }, this.addresses.map((addr, index$1) => (index.h("div", { key: index$1, class: "option", onClick: (e) => this.handlePostalCode(e, addr) }, addr.street, " ", addr.number, " ", addr.city)))))), showLoadingMessage && (index.h("div", { key: 'd1f3deaf9936e00ff05ac37d635a3dadb11a0db8', class: "postalcode__loading-spinner" }, index.h("div", { key: 'ee7c1a5275b8e5824a9e3ffbd39d1476ced9d0a1', class: "loading-spinner" }), index.h("span", { key: '198c01371a98fa07d35ff64fad5714176ffdcb0d' }, translate$1('searchingForAddresses', this.language)))), shouldShowNoResults && (index.h("div", { key: 'e4f098805673d2708bb3fe2ff6dccc61308fc27a', class: "postalcode__no-results-message" }, translate$1('postalLookUpNoAddressFound', this.language)))), index.h("small", { key: 'e84296325688a134e49f521ecfa1ff44ed13fcc9', class: 'text__error-message' }, this.errorMessage)));
15698
+ }
15699
+ static get watchers() { return {
15700
+ "clientStyling": ["handleStylingChange"],
15701
+ "isValid": ["validityChanged"],
15702
+ "emitValue": ["emitValueHandler"],
15703
+ "addresses": ["handleAddresses"]
15704
+ }; }
15705
+ };
15706
+ PostalCodeInput.style = PostalcodeInputStyle0;
15707
+
15176
15708
  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}";
15177
15709
  const RadioInputStyle0 = radioInputCss;
15178
15710
 
@@ -15256,8 +15788,8 @@ const RadioInput = class {
15256
15788
  return null;
15257
15789
  }
15258
15790
  render() {
15259
- return index.h("fieldset", { key: '8dd2ac2660557c45e3e7e1a514d94e8e0f90d4f2', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("legend", { key: '609396bda45ad1d2ceb49a023bdc090833724ed4', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => index.h("div", { class: 'radio__wrapper' }, index.h("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) }), index.h("label", { htmlFor: `${option.label}__input` }, option.label))), index.h("small", { key: 'e3c097e5f460316759d74e1f06a4f9f805deb29e', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
15260
- index.h("img", { key: 'a71bf8fe647776214c36a87befff42b39b95106a', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
15791
+ return index.h("fieldset", { key: '88357307488334074a397c636210575b8af1e2c3', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("legend", { key: '25f656d5b155c392cad79c89410833c3491531f8', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => index.h("div", { class: 'radio__wrapper' }, index.h("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) }), index.h("label", { htmlFor: `${option.label}__input` }, option.label))), index.h("small", { key: '08def575050905f964d6921d4ed4f071fccdf4da', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
15792
+ index.h("img", { key: '485fa4888f626f1cf44f179f498f257af6c41b58', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
15261
15793
  }
15262
15794
  static get watchers() { return {
15263
15795
  "clientStyling": ["handleStylingChange"],
@@ -15455,10 +15987,10 @@ const SelectInput = class {
15455
15987
  if (this.touched) {
15456
15988
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15457
15989
  }
15458
- return index.h("div", { key: '493268c1af30e1120317b916ed911598737405bd', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '232dc6989da291dfaececee8199081394d33ee41', class: 'select__wrapper--flex' }, index.h("label", { key: 'fb03628e1953f679c21bd8da88bfe47f1bcbab4e', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), index.h("div", { key: '02581db26e8093b6968fd91fbd08782dfc24118e', class: 'select__wrapper--relative' }, this.tooltip &&
15459
- index.h("img", { key: '4da026564dcee19491e055070341317266a888f9', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? 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", 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 })
15990
+ return index.h("div", { key: '68a8d63f045706ea65a8a9edf3aeec381ff93c52', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '1e4c7d1ad9add75ff495ab2aec2bc1556339c8d7', class: 'select__wrapper--flex' }, index.h("label", { key: '8698e76f945ed1c9d94597ca9f12d8c03d54ce31', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), index.h("div", { key: 'bf34dd8c2155e9eca8d9da427e9775ee5685c3c6', class: 'select__wrapper--relative' }, this.tooltip &&
15991
+ index.h("img", { key: 'f396770070f3e2710120bb87d059f78aa1b5e372', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? 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", 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 })
15460
15992
  :
15461
- index.h("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 }), index.h("small", { key: 'f0f0de66fe7a135a2d514e41725be1c7b29c17c0', class: 'select__error-message' }, this.errorMessage));
15993
+ index.h("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 }), index.h("small", { key: '21327ad926828b95552046b42ac14f69d7012513', class: 'select__error-message' }, this.errorMessage));
15462
15994
  }
15463
15995
  static get watchers() { return {
15464
15996
  "clientStyling": ["handleStylingChange"],
@@ -15651,8 +16183,8 @@ const TelInput = class {
15651
16183
  if (this.touched) {
15652
16184
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15653
16185
  }
15654
- return index.h("div", { key: '698bb9cc01d144ccf2f20fbac7d519c8b4523c23', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '08792dad79d529f079011d1bd82a77b74865f1f0', class: 'tel__wrapper--flex-label' }, index.h("label", { key: '5528ee07e57b5855d03bb55c5d77608019983bde', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: '5e62f2fe0751d9108422db4670c17ce623e97e8d', class: 'tel__wrapper--relative' }, this.tooltip &&
15655
- index.h("img", { key: '050486adda9b04f3ce3502bf7fe25450e564c54b', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("div", { key: '8944d4b99907ab9c355ac392379064150bc73d70', class: `tel__wrapper--flex ${invalidClass}` }, index.h("vaadin-combo-box", { key: 'adcbc0cb5f371c10fe5a21a577647f5354a45428', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.disablePhonePrefix, onChange: (e) => this.handlePrefixInput(e) }), index.h("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 })), index.h("small", { key: '5230fb8be4b5b47cedc088f5ed777a3462492ed5', class: 'tel__error-message' }, this.errorMessage));
16186
+ return index.h("div", { key: '9b01d1059b470ec9f57c6f852df12aa17d7a58e2', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '7ad94c73b7b14f63d1b0aa395cd4b2220d80bf7f', class: 'tel__wrapper--flex-label' }, index.h("label", { key: '2995bfd5f655c71a454281edf967ab4afff2b61c', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: '45c874ffd76f0c56eb971728acc6bcf3c31afc64', class: 'tel__wrapper--relative' }, this.tooltip &&
16187
+ index.h("img", { key: '3ecfbb61507ea4fbe02c804679293adf7961ce18', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("div", { key: 'b2dc1d8af7ea60bc56347ae73c315cf5539d6e7a', class: `tel__wrapper--flex ${invalidClass}` }, index.h("vaadin-combo-box", { key: '3ad4d43799026bd4f3b06d9ad94eee17e81daced', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.disablePhonePrefix, onChange: (e) => this.handlePrefixInput(e) }), index.h("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 })), index.h("small", { key: '799b137bb4cf96cb7cffa77a6934eeab3e34f4ee', class: 'tel__error-message' }, this.errorMessage));
15656
16188
  }
15657
16189
  static get watchers() { return {
15658
16190
  "clientStyling": ["handleStylingChange"],
@@ -15662,7 +16194,7 @@ const TelInput = class {
15662
16194
  };
15663
16195
  TelInput.style = TelInputStyle0;
15664
16196
 
15665
- 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}";
16197
+ 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)}}";
15666
16198
  const TextInputStyle0 = textInputCss;
15667
16199
 
15668
16200
  const TextInput = class {
@@ -15673,6 +16205,7 @@ const TextInput = class {
15673
16205
  this.value = '';
15674
16206
  this.validationPattern = '';
15675
16207
  this.duplicateInputValue = null;
16208
+ this.postalcodelength = 5;
15676
16209
  this.touched = false;
15677
16210
  this.handleInput = (event) => {
15678
16211
  this.value = event.target.value;
@@ -15711,10 +16244,12 @@ const TextInput = class {
15711
16244
  this.emitValue = undefined;
15712
16245
  this.isDuplicateInput = undefined;
15713
16246
  this.clientStyling = '';
16247
+ this.haspostalcodelookup = undefined;
15714
16248
  this.isValid = undefined;
15715
16249
  this.errorMessage = '';
15716
16250
  this.limitStylingAppends = false;
15717
16251
  this.showTooltip = false;
16252
+ this.selectedCountryCode = '';
15718
16253
  }
15719
16254
  handleStylingChange(newValue, oldValue) {
15720
16255
  if (newValue !== oldValue)
@@ -15769,6 +16304,42 @@ const TextInput = class {
15769
16304
  this.errorMessage = this.setErrorMessage();
15770
16305
  }
15771
16306
  }
16307
+ handleCountryCodeUpdate(event) {
16308
+ const { name, value } = event.detail;
16309
+ this.selectedCountryCode = value;
16310
+ if (name === 'CountryCode' && ['address1', 'address2', 'City'].includes(this.name)) {
16311
+ this.value = '';
16312
+ this.touched = false;
16313
+ this.errorMessage = '';
16314
+ this.isValid = false;
16315
+ if (this.inputReference) {
16316
+ this.inputReference.value = '';
16317
+ }
16318
+ this.valueHandler({ name: this.name, value: '' });
16319
+ this.validityStateHandler({ valid: false, name: this.name });
16320
+ }
16321
+ }
16322
+ handleAddressSelection(event) {
16323
+ const { city, address1, address2 } = event.detail;
16324
+ if (!['address1', 'address2', 'City'].includes(this.name)) {
16325
+ return;
16326
+ }
16327
+ let newValue = '';
16328
+ if (this.name === 'address1') {
16329
+ newValue = address1;
16330
+ }
16331
+ else if (this.name === 'address2') {
16332
+ newValue = address2;
16333
+ }
16334
+ else if (this.name === 'City') {
16335
+ newValue = city;
16336
+ }
16337
+ this.value = newValue;
16338
+ this.touched = true;
16339
+ this.isValid = true;
16340
+ this.valueHandler({ name: this.name, value: newValue });
16341
+ this.validityStateHandler({ valid: true, name: this.name });
16342
+ }
15772
16343
  connectedCallback() {
15773
16344
  this.validationPattern = this.setPattern();
15774
16345
  }
@@ -15789,12 +16360,15 @@ const TextInput = class {
15789
16360
  this.touched = true;
15790
16361
  }
15791
16362
  }
16363
+ if (this.haspostalcodelookup) {
16364
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(this.name)) {
16365
+ window.targetInputRefs = window.targetInputRefs || {};
16366
+ window.targetInputRefs[this.name] = this.inputReference;
16367
+ }
16368
+ }
15792
16369
  this.isValid = this.setValidity();
15793
16370
  }
15794
16371
  setValidity() {
15795
- if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
15796
- return false;
15797
- }
15798
16372
  if (!this.inputReference) {
15799
16373
  return false;
15800
16374
  }
@@ -15838,8 +16412,9 @@ const TextInput = class {
15838
16412
  if (this.touched) {
15839
16413
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
15840
16414
  }
15841
- return index.h("div", { key: 'a769be49d47bf5eac45467f9355aa2d51cb1ff81', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, index.h("div", { key: '3885727132e83f4381c455ec04fe49bb3feb58a2', class: 'text__wrapper--flex' }, index.h("label", { key: '36132d614d6f921af8dda5fef9466fdbc8b83f2f', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: 'ac112a8be59094ee2c347c1853e1f36781246831', class: 'text__wrapper--relative' }, this.tooltip &&
15842
- index.h("img", { key: '31d5bc82b517facc92cc84e4191bc33946bbc06c', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("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 }), index.h("small", { key: '6139392a22701626a0001d41c558593be83aabf2', class: 'text__error-message' }, this.errorMessage));
16415
+ const displayValue = this.value || this.defaultValue;
16416
+ return index.h("div", { key: '2126d45a756f9f10a1428f6f2f296d119833949e', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, index.h("div", { key: '86adc0243bf02a5d68e8fe2ad25fddbf042041ca', class: 'text__wrapper--flex' }, index.h("label", { key: '81bf4d3010bd780471d97d7356062ed6c762151b', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: '2b1cc8ad108901ab8bd0d42b5d59d5f59faf923c', class: 'text__wrapper--relative' }, this.tooltip &&
16417
+ index.h("img", { key: 'dc3714a7e7924972454c0532ced7c1928f998e01', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("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 }), index.h("small", { key: '4f4e50d2593f32a40ec8c71aa452ac890cb51751', class: 'text__error-message' }, this.errorMessage));
15843
16418
  }
15844
16419
  static get watchers() { return {
15845
16420
  "clientStyling": ["handleStylingChange"],
@@ -15947,8 +16522,8 @@ const ToggleCheckboxInput = class {
15947
16522
  return null;
15948
16523
  }
15949
16524
  render() {
15950
- return index.h("div", { key: '355926a9da2977c88b7ae205ddd6468d1a86e2d2', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '3bbf491f4fdf22800ad091de584bcac3c2018308', class: 'togglecheckbox__wrapper--flex' }, index.h("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()), index.h("small", { key: 'db4624ed73f644db0a8f0b92738497fca64ea035', class: 'togglecheckbox__error-message' }, this.errorMessage), index.h("div", { key: '898d353c570f9ce19c758585f721f6cb50c35fb0', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
15951
- index.h("img", { key: '1007896417922d0e2bcaaf4c65a5f362e5e3bb49', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("div", { key: '260480a129168c8868ae0539ba9f9edbec35f87b', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
16525
+ return index.h("div", { key: '58e1c4145712f9547f59eaf43015d46c13e04f2c', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '5230bc70f55ee7d3d4db2eed2b17c3e4f3ce9a23', class: 'togglecheckbox__wrapper--flex' }, index.h("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()), index.h("small", { key: 'df35a1484f167b4bad9e4c82d82e069260be6608', class: 'togglecheckbox__error-message' }, this.errorMessage), index.h("div", { key: '6783791e9d5e882cc47cfdf501737c0309deb9ec', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
16526
+ index.h("img", { key: '8bc868f9d6828fe65a6ad684c0c50d6dbf434239', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("div", { key: '9258e49a1730b9bcec06ae2be98644a729a8741b', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
15952
16527
  return index.h("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 });
15953
16528
  })));
15954
16529
  }
@@ -16160,9 +16735,9 @@ const TwofaInput = class {
16160
16735
  return null;
16161
16736
  }
16162
16737
  render() {
16163
- return (index.h("div", { key: '0f7d2f80e6335fcb08b1c61f6e52f51205a30092', class: "twofa" }, index.h("div", { key: 'd23240ccceb2ac4af5c5a2a1800eccd6013271e3', class: 'twofa__error-message' }, index.h("p", { key: '72fafd1608f5ae7402be900800100a141fefb72a' }, this.errorMessage)), index.h("div", { key: '98f5a5614fb895672a175d0415f66b5849b82f85', class: "twofa__description", innerHTML: translate$1('twofaDescription', this.language, { values: { destination: this.destination } }) }), index.h("div", { key: '5fd4f8999dc44e372369f03223d53c1d56a1eab4', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
16738
+ return (index.h("div", { key: '8672e39d15057a9e866ba1cb79e50f2d319aa989', class: "twofa", ref: el => this.stylingContainer = el }, index.h("div", { key: 'ae7f658dd357340918e6f9565934660b3ef944ac', class: 'twofa__error-message' }, index.h("p", { key: '8ef6aecdc7a31b1c4b801f69c8970b8df79bd127' }, this.errorMessage)), index.h("div", { key: '86966527af6e1c3313847f0ae07f89d3ae3411fb', class: "twofa__description", innerHTML: translate$1('twofaDescription', this.language, { values: { destination: this.destination } }) }), index.h("div", { key: 'e8ebb1da615c25ddce6e06c4aee158355dc433c3', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
16164
16739
  return (index.h("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) }));
16165
- })), index.h("div", { key: 'b6e5b2ba4e10cbbd092aaef4d13e0f6a640b3c29', class: "twofa__button-wrapper" }, index.h("p", { key: 'eba4ae1393d89db6729cfff7d5bc4eb5a4ab0b43', class: "twofa__resend-message" }, translate$1('twofaResendMessage', this.language)), index.h("button", { key: '58069e9cb76ecf1776f0733a9f8bc20387e71ad3', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
16740
+ })), index.h("div", { key: '707d2423dd21097dbc591bd15fbf57b5c2e7bddc', class: "twofa__button-wrapper" }, index.h("p", { key: 'abc31161f53c6b41aef93b0f27fefced03bac990', class: "twofa__resend-message" }, translate$1('twofaResendMessage', this.language)), index.h("button", { key: '3f7e329e16a524a4849ffb6b98e0df2f4dec136c', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
16166
16741
  ? translate$1('twofaResendButton', this.language)
16167
16742
  : this.formatTime()))));
16168
16743
  }
@@ -16182,6 +16757,7 @@ exports.general_input = GeneralInput;
16182
16757
  exports.general_registration = GeneralRegistration;
16183
16758
  exports.number_input = NumberInput;
16184
16759
  exports.password_input = PasswordInput;
16760
+ exports.postalcode_input = PostalCodeInput;
16185
16761
  exports.radio_input = RadioInput;
16186
16762
  exports.select_input = SelectInput;
16187
16763
  exports.tel_input = TelInput;