@bpost/bp-address-auto-complete-by-component 1.1.15 → 1.1.16

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.
@@ -240,7 +240,7 @@ class HttpService {
240
240
  let headers = new HttpHeaders();
241
241
  // Attention !
242
242
  // Need to reassign as the 'set' is returning a clone of the headera object !!!
243
- headers = headers.set('x-api-key', /*'bBkvimXYnAaEEKMyGqoWO2XiaZCQyqUi7VReYzPJ'*/ this.apiKey);
243
+ headers = headers.set('x-api-key', this.apiKey);
244
244
  return headers;
245
245
  }
246
246
  get(url, options) {
@@ -4483,7 +4483,7 @@ class LibAddressAutocompleteByComponentComponent {
4483
4483
  this.httpService = httpService;
4484
4484
  this.selectedLanguage = null;
4485
4485
  this.baseUrl = "https://api.mailops.bpost.cloud/roa-info/externalMailingAddressProofingRest/autocomplete/";
4486
- this.defaultApiKey = 'cyRkKOD73O1DOdgcDLLnsaOiDh6OyOkt3BBT5JU1';
4486
+ this.defaultApiKey = '';
4487
4487
  this.usedLocalityUrl = this.baseUrl + 'locality';
4488
4488
  this.usedStreetUrl = this.baseUrl + 'street';
4489
4489
  this.usedStreetNumberUrl = this.baseUrl + 'streetNumber';
@@ -5706,6 +5706,26 @@ class LibAddressAutocompleteByComponentComponent {
5706
5706
  this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
5707
5707
  // this.quitPrefillMode();
5708
5708
  }
5709
+ else {
5710
+ this.updatePostalCodeLocality(address);
5711
+ this.updateStreetName(address);
5712
+ this.updateStreetNumber(address);
5713
+ this.streetAddress = address;
5714
+ this.streetNumberAddress = address;
5715
+ if (address.hasOwnProperty('isComplete') && address.isComplete === true) {
5716
+ this.autocompleteStreetNb.addressIsComplete = true;
5717
+ if (addressIsNotInList) {
5718
+ this.autocompleteBoxNb.streetNumber = address.houseNumber;
5719
+ }
5720
+ else {
5721
+ this.autocompleteBoxNb.streetNumber = '';
5722
+ }
5723
+ }
5724
+ else {
5725
+ this.autocompleteBoxNb.streetNumber = address.houseNumber;
5726
+ }
5727
+ this.autocompleteBoxNb.searchText = '';
5728
+ }
5709
5729
  /*
5710
5730
  const boxNumber = this.prefillData.parameters.boxNumber;
5711
5731
  if ( ! addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '') )