@bpost/bp-address-auto-complete-by-component 1.1.17 → 1.1.19
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.
- package/VERSION.md +6 -0
- package/esm2020/lib/box-number/box-number.component.mjs +1 -2
- package/esm2020/lib/street/street.component.mjs +8 -8
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs +7 -8
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs +7 -8
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
2107
|
-
suggestionLocalityName
|
|
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
|
-
|
|
2300
|
-
|
|
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
|
-
|
|
2378
|
-
|
|
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() {
|
|
@@ -3931,7 +3931,6 @@ class BoxNumberComponent {
|
|
|
3931
3931
|
// topSuggestions.forEach(this.parseSingleSuggestion.bind(this));
|
|
3932
3932
|
let perfectMatchFound = false;
|
|
3933
3933
|
for (const sug of topSuggestions) {
|
|
3934
|
-
console.warn('boxnumber::parsing suggestion:', sug);
|
|
3935
3934
|
if (this.parseSingleSuggestion(sug, source) === true) {
|
|
3936
3935
|
perfectMatchFound = true;
|
|
3937
3936
|
}
|