@bpost/bp-address-auto-complete-by-component 1.1.17 → 1.1.18

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.
@@ -2103,8 +2103,8 @@ class StreetComponent {
2103
2103
  const suggestionStreetName = this.transformStreetNameInLowercaseAndWithoutDiacritics(lang.streetName);
2104
2104
  const suggestionMunicipalityName = this.transformStreetNameInLowercaseAndWithoutDiacritics(lang.municipalityName);
2105
2105
  const suggestionLocalityName = lang.localityName ? this.transformStreetNameInLowercaseAndWithoutDiacritics(lang.localityName) : '';
2106
- const municipalityMatches = suggestionMunicipalityName === this.prefillData.prefillMunicipalityName ||
2107
- suggestionLocalityName === this.prefillData.prefillMunicipalityName ||
2106
+ const municipalityMatches = suggestionMunicipalityName.startsWith(this.prefillData.prefillMunicipalityName) ||
2107
+ suggestionLocalityName.startsWith(this.prefillData.prefillMunicipalityName) ||
2108
2108
  this.isCrossLanguageMunicipalityMatch(suggestionMunicipalityName, this.prefillData.prefillMunicipalityName) ||
2109
2109
  this.isCrossLanguageMunicipalityMatch(suggestionLocalityName, this.prefillData.prefillMunicipalityName);
2110
2110
  console.log('Municipality matches:', municipalityMatches);
@@ -2296,8 +2296,8 @@ class StreetComponent {
2296
2296
  }
2297
2297
  else {
2298
2298
  this.clearInputEventEmitter.emit('STREET');
2299
- // this.clearInputEventEmitter.emit('STREET_NUMBER');
2300
- // this.clearInputEventEmitter.emit('BOX_NUMBER');
2299
+ this.clearInputEventEmitter.emit('STREET_NUMBER');
2300
+ this.clearInputEventEmitter.emit('BOX_NUMBER');
2301
2301
  // this.clearInput(true);
2302
2302
  }
2303
2303
  break;
@@ -2360,7 +2360,6 @@ class StreetComponent {
2360
2360
  }
2361
2361
  clearInput(focus, emit = true) {
2362
2362
  // console.warn('street clearInput called ...', focus, emit);
2363
- // console.log(this.selectedAddress,"selectedadreess");
2364
2363
  this.clearWidget();
2365
2364
  this.resetArrowSelectedIndex();
2366
2365
  this.previousIndex = -1;
@@ -2373,9 +2372,10 @@ class StreetComponent {
2373
2372
  this.streetSearchInput.nativeElement.focus();
2374
2373
  }
2375
2374
  if (emit) {
2375
+ // this.clearInputEventEmitter.emit('STREET');
2376
2376
  this.clearInputEventEmitter.emit(/*'STREET'*/ InputNameType.STREET);
2377
- // this.clearInputEventEmitter.emit(/*'STREET_NUMBER'*/ InputNameType.STREET_NUMBER);
2378
- // this.clearInputEventEmitter.emit(/*'BOX_NUMBER'*/ InputNameType.BOX_NUMBER);
2377
+ this.clearInputEventEmitter.emit(/*'STREET_NUMBER'*/ InputNameType.STREET_NUMBER);
2378
+ this.clearInputEventEmitter.emit(/*'BOX_NUMBER'*/ InputNameType.BOX_NUMBER);
2379
2379
  }
2380
2380
  }
2381
2381
  clearSuggestions() {