@everymatrix/pam-forgot-password 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.
@@ -33,6 +33,9 @@ const TRANSLATIONS = {
33
33
  "twofaDescription": "<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",
34
34
  "twofaResendMessage": "Didn't receive the verification code?",
35
35
  "twofaResendButton": "Resend",
36
+ "enterIEAddressManually": "For IRE, enter the address manually",
37
+ "postalLookUpNoAddressFound": "No addresses found for this postal code",
38
+ "searchingForAddresses": "Searching for addresses...",
36
39
  },
37
40
  "hu": {
38
41
  "dateError": "A választott dátumnak {min} és {max} között kell lennie",
@@ -12812,6 +12815,9 @@ const GeneralInput = class {
12812
12815
  this.emitOnClick = false;
12813
12816
  this.twofaDestination = undefined;
12814
12817
  this.twofaResendIntervalSeconds = 60;
12818
+ this.haspostalcodelookup = undefined;
12819
+ this.postalcodelength = undefined;
12820
+ this.addresses = [];
12815
12821
  }
12816
12822
  connectedCallback() {
12817
12823
  if (this.translationUrl) {
@@ -12822,7 +12828,12 @@ const GeneralInput = class {
12822
12828
  var _a;
12823
12829
  switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
12824
12830
  case 'text':
12825
- 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 });
12831
+ if (this.haspostalcodelookup && this.name === 'PostalCode') {
12832
+ 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 });
12833
+ }
12834
+ else {
12835
+ 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 });
12836
+ }
12826
12837
  case 'email':
12827
12838
  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 });
12828
12839
  case 'number':
@@ -12850,7 +12861,7 @@ const GeneralInput = class {
12850
12861
  }
12851
12862
  }
12852
12863
  render() {
12853
- return (index.h(index.Host, { key: 'a90dc97926e4f89518fc8520505cf59281840e20', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
12864
+ return (index.h(index.Host, { key: '7f268156d7372f46b27b38762a2c01281ada038c', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
12854
12865
  }
12855
12866
  };
12856
12867
  GeneralInput.style = GeneralInputStyle0;
@@ -13249,6 +13260,354 @@ const PasswordInput = class {
13249
13260
  };
13250
13261
  PasswordInput.style = PasswordInputStyle0;
13251
13262
 
13263
+ 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)}}";
13264
+ const PostalcodeInputStyle0 = postalcodeInputCss;
13265
+
13266
+ const PostalCodeInput = class {
13267
+ constructor(hostRef) {
13268
+ index.registerInstance(this, hostRef);
13269
+ this.sendAddressValue = index.createEvent(this, "sendAddressValue", 7);
13270
+ this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
13271
+ this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
13272
+ this.value = '';
13273
+ this.validationPattern = '';
13274
+ this.hasManualAddressBeenTriggered = false;
13275
+ this.touched = false;
13276
+ this.maxPostalCodeLength = '10';
13277
+ this.handleInput = (event) => {
13278
+ const inputValue = event.target.value;
13279
+ const upperCaseValue = inputValue.toUpperCase();
13280
+ this.value = upperCaseValue;
13281
+ this.touched = true;
13282
+ this.currentPostalCode = upperCaseValue;
13283
+ this.showNoResultsMessage = false;
13284
+ if (this.inputReference) {
13285
+ this.inputReference.value = upperCaseValue;
13286
+ }
13287
+ if (this.value.length < this.postalcodelength) {
13288
+ this.openAddressDropdown = false;
13289
+ this.isFetchingAddresses = false;
13290
+ }
13291
+ if (this.value === '' || this.value.length < 1) {
13292
+ this.openAddressDropdown = false;
13293
+ this.isFetchingAddresses = false;
13294
+ }
13295
+ if (this.debounceTime) {
13296
+ clearTimeout(this.debounceTime);
13297
+ }
13298
+ this.debounceTime = setTimeout(() => {
13299
+ // Trigger address lookup when postal code reaches minimum length
13300
+ if (this.value.length >= this.postalcodelength) {
13301
+ sessionStorage.setItem('currentPostalCode', this.value);
13302
+ this.showNoResultsMessage = false;
13303
+ if (this.addresses && this.addresses.length > 0) {
13304
+ this.openAddressDropdown = true;
13305
+ }
13306
+ }
13307
+ // Validate input and update error state
13308
+ const wasValid = this.isValid;
13309
+ this.isValid = this.setValidity();
13310
+ this.errorMessage = this.setErrorMessage();
13311
+ // Emit validity state if changed
13312
+ if (wasValid !== this.isValid) {
13313
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
13314
+ }
13315
+ this.emitValueHandler(true);
13316
+ }, 300);
13317
+ };
13318
+ this.handleBlur = (event) => {
13319
+ this.value = event.target.value;
13320
+ this.touched = true;
13321
+ this.isValid = this.setValidity();
13322
+ this.errorMessage = this.setErrorMessage();
13323
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
13324
+ this.showNoResultsMessage = false;
13325
+ // hide 'no addresses found' msg
13326
+ if (!this.openAddressDropdown) {
13327
+ this.showNoResultsMessage = false;
13328
+ }
13329
+ };
13330
+ this.handleFocus = () => {
13331
+ const hasSearchTerm = this.currentPostalCode && this.currentPostalCode.length >= this.postalcodelength;
13332
+ if (hasSearchTerm) {
13333
+ this.openAddressDropdown = true;
13334
+ }
13335
+ };
13336
+ this.handlePostalCode = (e, data) => {
13337
+ e.stopPropagation();
13338
+ const address1 = `${data.street}`.trim();
13339
+ const address2 = `${data.number}`.trim();
13340
+ const city = `${data.city}`.trim();
13341
+ this.sendAddressValue.emit({ city, address1, address2 });
13342
+ this.value = this.currentPostalCode.toLocaleUpperCase();
13343
+ this.touched = true;
13344
+ this.isValid = true;
13345
+ this.openAddressDropdown = false;
13346
+ this.showNoResultsMessage = false;
13347
+ this.isFetchingAddresses = false;
13348
+ this.valueHandler({ name: this.name, value: this.value });
13349
+ this.validityStateHandler({ valid: true, name: this.name });
13350
+ this.valueHandler({ name: 'address1', value: address1 });
13351
+ this.valueHandler({ name: 'City', value: city });
13352
+ if (address2) {
13353
+ this.valueHandler({ name: 'address2', value: address2 });
13354
+ }
13355
+ this.refreshTrigger++;
13356
+ };
13357
+ this.enterAddressManually = () => {
13358
+ const refs = window.targetInputRefs;
13359
+ if (!refs)
13360
+ return;
13361
+ // Define all address fields that need to be filled manually
13362
+ const allFields = [
13363
+ { name: 'PostalCode', ref: refs['PostalCode'], minLength: this.postalcodelength },
13364
+ { name: 'address1', ref: refs['address1'] },
13365
+ { name: 'address2', ref: refs['address2'] },
13366
+ { name: 'City', ref: refs['City'] }
13367
+ ];
13368
+ // Required fields for address validation
13369
+ const requiredFields = [
13370
+ { name: 'PostalCode', ref: refs['PostalCode'], minLength: this.postalcodelength },
13371
+ { name: 'address1', ref: refs['address1'] },
13372
+ { name: 'City', ref: refs['City'] }
13373
+ ];
13374
+ // find the first required field that is empty or incomplete
13375
+ const targetField = requiredFields.find(field => {
13376
+ var _a;
13377
+ const value = ((_a = field.ref) === null || _a === void 0 ? void 0 : _a.value) || '';
13378
+ return field.minLength ? (value.length === 0 || value.length < field.minLength) : value.length === 0;
13379
+ });
13380
+ const targetInput = (targetField === null || targetField === void 0 ? void 0 : targetField.ref) || refs['address1'] || refs['PostalCode'];
13381
+ targetInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
13382
+ if (!this.hasManualAddressBeenTriggered) {
13383
+ this.hasManualAddressBeenTriggered = true;
13384
+ allFields.forEach(field => {
13385
+ var _a;
13386
+ if (field.ref) {
13387
+ const inputElement = ((_a = field.ref.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input')) || field.ref;
13388
+ if (inputElement) {
13389
+ inputElement.classList.add('pulse-border');
13390
+ // remove animation when it ends
13391
+ const handleAnimationEnd = () => {
13392
+ inputElement.classList.remove('pulse-border');
13393
+ inputElement.removeEventListener('animationend', handleAnimationEnd);
13394
+ };
13395
+ inputElement.addEventListener('animationend', handleAnimationEnd);
13396
+ }
13397
+ }
13398
+ });
13399
+ targetInput.focus();
13400
+ }
13401
+ else {
13402
+ targetInput.focus();
13403
+ }
13404
+ };
13405
+ this.setClientStyling = () => {
13406
+ let sheet = document.createElement('style');
13407
+ sheet.innerHTML = this.clientStyling;
13408
+ this.stylingContainer.prepend(sheet);
13409
+ };
13410
+ this.handleOutsideClick = (event) => {
13411
+ if (!this.openAddressDropdown)
13412
+ return;
13413
+ const path = event.composedPath ? event.composedPath() : [];
13414
+ const isInputClick = path.includes(this.inputReference);
13415
+ const isDropdownClick = path.includes(this.addressesDropdownRef);
13416
+ const isOptionClick = path.some(el => { var _a; return el instanceof Element && ((_a = el.classList) === null || _a === void 0 ? void 0 : _a.contains('option')); });
13417
+ if (!isInputClick && !isDropdownClick && !isOptionClick) {
13418
+ this.openAddressDropdown = false;
13419
+ this.showNoResultsMessage = false;
13420
+ }
13421
+ };
13422
+ this.name = 'PostalCode';
13423
+ this.displayName = undefined;
13424
+ this.placeholder = undefined;
13425
+ this.validation = undefined;
13426
+ this.defaultValue = '';
13427
+ this.autofilled = undefined;
13428
+ this.tooltip = undefined;
13429
+ this.language = undefined;
13430
+ this.emitValue = undefined;
13431
+ this.clientStyling = '';
13432
+ this.postalcodelength = undefined;
13433
+ this.addresses = undefined;
13434
+ this.isValid = undefined;
13435
+ this.errorMessage = '';
13436
+ this.limitStylingAppends = false;
13437
+ this.showTooltip = false;
13438
+ this.selectedCountryCode = '';
13439
+ this.currentPostalCode = '';
13440
+ this.openAddressDropdown = false;
13441
+ this.showNoResultsMessage = false;
13442
+ this.refreshTrigger = 0;
13443
+ this.isFetchingAddresses = false;
13444
+ }
13445
+ handleStylingChange(newValue, oldValue) {
13446
+ if (newValue !== oldValue)
13447
+ this.setClientStyling();
13448
+ }
13449
+ validityChanged() {
13450
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
13451
+ if (this.emitValue == true) {
13452
+ this.valueHandler({ name: this.name, value: this.value });
13453
+ }
13454
+ }
13455
+ emitValueHandler(newValue) {
13456
+ if (newValue == true && this.isValid) {
13457
+ this.valueHandler({ name: this.name, value: this.value });
13458
+ }
13459
+ if (newValue === true && !this.value.length) {
13460
+ this.valueHandler({ name: this.name, value: this.value });
13461
+ }
13462
+ }
13463
+ handleAddresses(newValue) {
13464
+ if (newValue && newValue.length > 0) {
13465
+ this.openAddressDropdown = true;
13466
+ this.showNoResultsMessage = false;
13467
+ }
13468
+ else {
13469
+ this.openAddressDropdown = false;
13470
+ if (this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength) {
13471
+ setTimeout(() => {
13472
+ if (this.currentPostalCode.length >= this.postalcodelength && !this.isFetchingAddresses) {
13473
+ this.showNoResultsMessage = true;
13474
+ }
13475
+ }, 200);
13476
+ }
13477
+ }
13478
+ this.isFetchingAddresses = false;
13479
+ }
13480
+ validityStateHandler(inputStateEvent) {
13481
+ this.sendValidityState.emit(inputStateEvent);
13482
+ }
13483
+ valueHandler(inputValueEvent) {
13484
+ this.sendInputValue.emit(inputValueEvent);
13485
+ }
13486
+ handleClickOutside(event) {
13487
+ const path = event.composedPath();
13488
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
13489
+ this.showTooltip = false;
13490
+ }
13491
+ }
13492
+ handleCountryCodeUpdate(event) {
13493
+ const { name, value } = event.detail;
13494
+ this.selectedCountryCode = value;
13495
+ if (name === 'CountryCode') {
13496
+ this.resetPostalCodeField();
13497
+ this.refreshTrigger++;
13498
+ }
13499
+ }
13500
+ handleFetchStarted() {
13501
+ this.showNoResultsMessage = false;
13502
+ this.isFetchingAddresses = true;
13503
+ this.openAddressDropdown = false;
13504
+ }
13505
+ connectedCallback() {
13506
+ this.validationPattern = this.setPattern();
13507
+ }
13508
+ componentDidRender() {
13509
+ if (!this.limitStylingAppends && this.stylingContainer) {
13510
+ if (this.clientStyling)
13511
+ this.setClientStyling();
13512
+ this.limitStylingAppends = true;
13513
+ }
13514
+ }
13515
+ componentDidLoad() {
13516
+ if (this.defaultValue) {
13517
+ this.value = this.defaultValue;
13518
+ this.valueHandler({ name: this.name, value: this.value });
13519
+ }
13520
+ if (this.inputReference) {
13521
+ window.targetInputRefs = window.targetInputRefs || {};
13522
+ window.targetInputRefs[this.name] = this.inputReference;
13523
+ }
13524
+ this.isValid = this.setValidity();
13525
+ document.addEventListener('click', this.handleOutsideClick);
13526
+ }
13527
+ disconnectedCallback() {
13528
+ document.removeEventListener('click', this.handleOutsideClick);
13529
+ }
13530
+ setValidity() {
13531
+ if (!this.inputReference) {
13532
+ return false;
13533
+ }
13534
+ const inputIsValid = this.inputReference.validity.valid;
13535
+ const inputMatchValidation = !this.inputReference.value || this.inputReference.value.match(this.validationPattern) !== null;
13536
+ return inputIsValid && inputMatchValidation;
13537
+ }
13538
+ setPattern() {
13539
+ var _a, _b;
13540
+ if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
13541
+ return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
13542
+ }
13543
+ }
13544
+ setErrorMessage() {
13545
+ var _a, _b;
13546
+ if (!this.touched) {
13547
+ return '';
13548
+ }
13549
+ if (this.inputReference.validity.valueMissing) {
13550
+ return translate('requiredError', this.language);
13551
+ }
13552
+ if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
13553
+ return translate('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
13554
+ }
13555
+ if (this.inputReference.value.match(this.validationPattern) == null) {
13556
+ const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
13557
+ const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
13558
+ return translate(`${errorCode}`, this.language) || errorMessage;
13559
+ }
13560
+ return '';
13561
+ }
13562
+ resetPostalCodeField() {
13563
+ this.value = '';
13564
+ this.currentPostalCode = '';
13565
+ this.showNoResultsMessage = false;
13566
+ this.openAddressDropdown = false;
13567
+ this.isFetchingAddresses = false;
13568
+ sessionStorage.removeItem('currentPostalCode');
13569
+ if (this.inputReference) {
13570
+ this.inputReference.value = '';
13571
+ }
13572
+ this.valueHandler({ name: this.name, value: '' });
13573
+ this.validityStateHandler({ valid: false, name: this.name });
13574
+ }
13575
+ renderTooltip() {
13576
+ if (this.showTooltip) {
13577
+ return (index.h("div", { class: `text__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
13578
+ }
13579
+ return null;
13580
+ }
13581
+ determineInputValue() {
13582
+ // Store address input refs for manual entry function
13583
+ if (this.inputReference && this.name) {
13584
+ window.targetInputRefs = window.targetInputRefs || {};
13585
+ window.targetInputRefs[this.name] = this.inputReference;
13586
+ }
13587
+ return this.value || this.currentPostalCode || sessionStorage.getItem('currentPostalCode') || this.defaultValue;
13588
+ }
13589
+ render() {
13590
+ var _a, _b;
13591
+ let invalidClass = '';
13592
+ if (this.touched) {
13593
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
13594
+ }
13595
+ let isUKCountry = this.selectedCountryCode === 'UK' || this.selectedCountryCode === 'GB';
13596
+ let showAddressesDropdown = ((_a = this.addresses) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.openAddressDropdown && isUKCountry;
13597
+ let shouldShowNoResults = this.showNoResultsMessage && this.currentPostalCode &&
13598
+ this.currentPostalCode.length >= this.postalcodelength && (((_b = this.addresses) === null || _b === void 0 ? void 0 : _b.length) === 0) && isUKCountry;
13599
+ let showLoadingMessage = this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength;
13600
+ 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('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('searchingForAddresses', this.language)))), shouldShowNoResults && (index.h("div", { key: 'e4f098805673d2708bb3fe2ff6dccc61308fc27a', class: "postalcode__no-results-message" }, translate('postalLookUpNoAddressFound', this.language)))), index.h("small", { key: 'e84296325688a134e49f521ecfa1ff44ed13fcc9', class: 'text__error-message' }, this.errorMessage)));
13601
+ }
13602
+ static get watchers() { return {
13603
+ "clientStyling": ["handleStylingChange"],
13604
+ "isValid": ["validityChanged"],
13605
+ "emitValue": ["emitValueHandler"],
13606
+ "addresses": ["handleAddresses"]
13607
+ }; }
13608
+ };
13609
+ PostalCodeInput.style = PostalcodeInputStyle0;
13610
+
13252
13611
  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}";
13253
13612
  const RadioInputStyle0 = radioInputCss;
13254
13613
 
@@ -13332,8 +13691,8 @@ const RadioInput = class {
13332
13691
  return null;
13333
13692
  }
13334
13693
  render() {
13335
- 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 &&
13336
- index.h("img", { key: 'a71bf8fe647776214c36a87befff42b39b95106a', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
13694
+ 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 &&
13695
+ index.h("img", { key: '485fa4888f626f1cf44f179f498f257af6c41b58', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
13337
13696
  }
13338
13697
  static get watchers() { return {
13339
13698
  "clientStyling": ["handleStylingChange"],
@@ -13531,10 +13890,10 @@ const SelectInput = class {
13531
13890
  if (this.touched) {
13532
13891
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
13533
13892
  }
13534
- 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 &&
13535
- 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 })
13893
+ 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 &&
13894
+ 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 })
13536
13895
  :
13537
- 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));
13896
+ 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));
13538
13897
  }
13539
13898
  static get watchers() { return {
13540
13899
  "clientStyling": ["handleStylingChange"],
@@ -13727,8 +14086,8 @@ const TelInput = class {
13727
14086
  if (this.touched) {
13728
14087
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
13729
14088
  }
13730
- 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 &&
13731
- 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));
14089
+ 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 &&
14090
+ 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));
13732
14091
  }
13733
14092
  static get watchers() { return {
13734
14093
  "clientStyling": ["handleStylingChange"],
@@ -13738,7 +14097,7 @@ const TelInput = class {
13738
14097
  };
13739
14098
  TelInput.style = TelInputStyle0;
13740
14099
 
13741
- 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}";
14100
+ 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)}}";
13742
14101
  const TextInputStyle0 = textInputCss;
13743
14102
 
13744
14103
  const TextInput = class {
@@ -13749,6 +14108,7 @@ const TextInput = class {
13749
14108
  this.value = '';
13750
14109
  this.validationPattern = '';
13751
14110
  this.duplicateInputValue = null;
14111
+ this.postalcodelength = 5;
13752
14112
  this.touched = false;
13753
14113
  this.handleInput = (event) => {
13754
14114
  this.value = event.target.value;
@@ -13787,10 +14147,12 @@ const TextInput = class {
13787
14147
  this.emitValue = undefined;
13788
14148
  this.isDuplicateInput = undefined;
13789
14149
  this.clientStyling = '';
14150
+ this.haspostalcodelookup = undefined;
13790
14151
  this.isValid = undefined;
13791
14152
  this.errorMessage = '';
13792
14153
  this.limitStylingAppends = false;
13793
14154
  this.showTooltip = false;
14155
+ this.selectedCountryCode = '';
13794
14156
  }
13795
14157
  handleStylingChange(newValue, oldValue) {
13796
14158
  if (newValue !== oldValue)
@@ -13845,6 +14207,42 @@ const TextInput = class {
13845
14207
  this.errorMessage = this.setErrorMessage();
13846
14208
  }
13847
14209
  }
14210
+ handleCountryCodeUpdate(event) {
14211
+ const { name, value } = event.detail;
14212
+ this.selectedCountryCode = value;
14213
+ if (name === 'CountryCode' && ['address1', 'address2', 'City'].includes(this.name)) {
14214
+ this.value = '';
14215
+ this.touched = false;
14216
+ this.errorMessage = '';
14217
+ this.isValid = false;
14218
+ if (this.inputReference) {
14219
+ this.inputReference.value = '';
14220
+ }
14221
+ this.valueHandler({ name: this.name, value: '' });
14222
+ this.validityStateHandler({ valid: false, name: this.name });
14223
+ }
14224
+ }
14225
+ handleAddressSelection(event) {
14226
+ const { city, address1, address2 } = event.detail;
14227
+ if (!['address1', 'address2', 'City'].includes(this.name)) {
14228
+ return;
14229
+ }
14230
+ let newValue = '';
14231
+ if (this.name === 'address1') {
14232
+ newValue = address1;
14233
+ }
14234
+ else if (this.name === 'address2') {
14235
+ newValue = address2;
14236
+ }
14237
+ else if (this.name === 'City') {
14238
+ newValue = city;
14239
+ }
14240
+ this.value = newValue;
14241
+ this.touched = true;
14242
+ this.isValid = true;
14243
+ this.valueHandler({ name: this.name, value: newValue });
14244
+ this.validityStateHandler({ valid: true, name: this.name });
14245
+ }
13848
14246
  connectedCallback() {
13849
14247
  this.validationPattern = this.setPattern();
13850
14248
  }
@@ -13865,12 +14263,15 @@ const TextInput = class {
13865
14263
  this.touched = true;
13866
14264
  }
13867
14265
  }
14266
+ if (this.haspostalcodelookup) {
14267
+ if (['address1', 'address2', 'City', 'PostalCode'].includes(this.name)) {
14268
+ window.targetInputRefs = window.targetInputRefs || {};
14269
+ window.targetInputRefs[this.name] = this.inputReference;
14270
+ }
14271
+ }
13868
14272
  this.isValid = this.setValidity();
13869
14273
  }
13870
14274
  setValidity() {
13871
- if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
13872
- return false;
13873
- }
13874
14275
  if (!this.inputReference) {
13875
14276
  return false;
13876
14277
  }
@@ -13914,8 +14315,9 @@ const TextInput = class {
13914
14315
  if (this.touched) {
13915
14316
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
13916
14317
  }
13917
- 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 &&
13918
- 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));
14318
+ const displayValue = this.value || this.defaultValue;
14319
+ 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 &&
14320
+ 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));
13919
14321
  }
13920
14322
  static get watchers() { return {
13921
14323
  "clientStyling": ["handleStylingChange"],
@@ -14023,8 +14425,8 @@ const ToggleCheckboxInput = class {
14023
14425
  return null;
14024
14426
  }
14025
14427
  render() {
14026
- 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 &&
14027
- 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 => {
14428
+ 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 &&
14429
+ 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 => {
14028
14430
  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 });
14029
14431
  })));
14030
14432
  }
@@ -14236,9 +14638,9 @@ const TwofaInput = class {
14236
14638
  return null;
14237
14639
  }
14238
14640
  render() {
14239
- 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('twofaDescription', this.language, { values: { destination: this.destination } }) }), index.h("div", { key: '5fd4f8999dc44e372369f03223d53c1d56a1eab4', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
14641
+ 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('twofaDescription', this.language, { values: { destination: this.destination } }) }), index.h("div", { key: 'e8ebb1da615c25ddce6e06c4aee158355dc433c3', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
14240
14642
  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) }));
14241
- })), index.h("div", { key: 'b6e5b2ba4e10cbbd092aaef4d13e0f6a640b3c29', class: "twofa__button-wrapper" }, index.h("p", { key: 'eba4ae1393d89db6729cfff7d5bc4eb5a4ab0b43', class: "twofa__resend-message" }, translate('twofaResendMessage', this.language)), index.h("button", { key: '58069e9cb76ecf1776f0733a9f8bc20387e71ad3', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
14643
+ })), index.h("div", { key: '707d2423dd21097dbc591bd15fbf57b5c2e7bddc', class: "twofa__button-wrapper" }, index.h("p", { key: 'abc31161f53c6b41aef93b0f27fefced03bac990', class: "twofa__resend-message" }, translate('twofaResendMessage', this.language)), index.h("button", { key: '3f7e329e16a524a4849ffb6b98e0df2f4dec136c', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
14242
14644
  ? translate('twofaResendButton', this.language)
14243
14645
  : this.formatTime()))));
14244
14646
  }
@@ -14432,6 +14834,7 @@ exports.email_input = EmailInput;
14432
14834
  exports.general_input = GeneralInput;
14433
14835
  exports.number_input = NumberInput;
14434
14836
  exports.password_input = PasswordInput;
14837
+ exports.postalcode_input = PostalCodeInput;
14435
14838
  exports.radio_input = RadioInput;
14436
14839
  exports.select_input = SelectInput;
14437
14840
  exports.tel_input = TelInput;
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
71
71
  }
72
72
  switch(bundleId) {
73
73
 
74
- case 'checkbox-group-input_15.cjs':
74
+ case 'checkbox-group-input_16.cjs':
75
75
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
76
76
  /* webpackMode: "lazy" */
77
- './checkbox-group-input_15.cjs.entry.js')); }).then(processMod, consoleError);
77
+ './checkbox-group-input_16.cjs.entry.js')); }).then(processMod, consoleError);
78
78
  }
79
79
  }
80
80
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(