@bpost/bp-address-auto-complete-by-component 1.1.13 → 1.1.14

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.
@@ -3060,9 +3060,36 @@ class StreetNumberComponent {
3060
3060
  this.sequenceNumber += 1;
3061
3061
  this.consumedNumber = this.sequenceNumber;
3062
3062
  this.clearSuggestions();
3063
+ if (this.suggestionLevel === SuggestionLevelType.None) {
3064
+ console.log('(A) do not use suggestions for street number');
3065
+ this.streetNumberChanged.emit(this.searchText);
3066
+ if (source === SourceType.SOURCE_PREFILLED)
3067
+ this.prefillAnalyzeData();
3068
+ }
3063
3069
  }
3064
3070
  else {
3065
- if (!this.validatedByBackend) {
3071
+ if (this.suggestionLevel === SuggestionLevelType.None) {
3072
+ console.log('(B) do not use suggestions for street number');
3073
+ this.streetNumberChanged.emit(this.searchText);
3074
+ if (source === SourceType.SOURCE_PREFILLED) {
3075
+ this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3076
+ let suggestion = {
3077
+ 'address': {
3078
+ 'string': this.searchText.toUpperCase(),
3079
+ 'municipalityName': this.locality,
3080
+ 'localityName': this.locality,
3081
+ 'postalCode': this.postalCode,
3082
+ 'searchBarString': this.searchText.toUpperCase(),
3083
+ 'houseNumber': this.searchText.toUpperCase(),
3084
+ 'streetName': this.streetName
3085
+ }
3086
+ };
3087
+ this.prefillData.prefillStreetNumberPerfectMatchSuggestion = suggestion;
3088
+ this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
3089
+ this.prefillAnalyzeData();
3090
+ }
3091
+ }
3092
+ else if (!this.validatedByBackend) {
3066
3093
  if (source === SourceType.SOURCE_PREFILLED) {
3067
3094
  this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3068
3095
  let suggestion = {
@@ -4021,9 +4048,17 @@ class BoxNumberComponent {
4021
4048
  this.sequenceNumber += 1;
4022
4049
  this.consumedNumber = this.sequenceNumber;
4023
4050
  this.clearSuggestions();
4051
+ if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
4052
+ console.log('do not use suggestions for box number');
4053
+ this.boxNumberChanged.emit(this.searchText);
4054
+ }
4024
4055
  }
4025
4056
  else {
4026
- if (!this.validatedByBackend) {
4057
+ if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
4058
+ console.log('do not use suggestions for box number');
4059
+ this.boxNumberChanged.emit(this.searchText);
4060
+ }
4061
+ else if (!this.validatedByBackend) {
4027
4062
  if (source === SourceType.SOURCE_PREFILLED) {
4028
4063
  this.prefillData.prefillBoxNumberPerfectMatchFound = true;
4029
4064
  let suggestion = {