@bpost/bp-address-auto-complete-by-component 1.1.29 → 1.1.30

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.
@@ -2663,16 +2663,17 @@ class StreetNumberComponent {
2663
2663
  }
2664
2664
  ngOnChanges(changes) {
2665
2665
  if (changes) {
2666
- if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined) {
2666
+ if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
2667
+ && !this.prefilling && !changes.hasOwnProperty('prefillData')) {
2667
2668
  this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
2668
2669
  this.setSelectedAddress(this.autofillData.selectedAddress);
2670
+ this.isPrefillWithNoMatch = false;
2669
2671
  }
2670
2672
  else {
2671
2673
  if (changes.hasOwnProperty('streetName')
2672
2674
  && !changes.streetName.firstChange
2673
2675
  && !changes.hasOwnProperty('prefillData') && !this.prefilling) {
2674
2676
  this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
2675
- // this.addressIsComplete = false;
2676
2677
  if (this.showDebugMessageToConsole) {
2677
2678
  console.warn('street name - ngOnchanges - streetName changes detection');
2678
2679
  }
@@ -2696,13 +2697,8 @@ class StreetNumberComponent {
2696
2697
  if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
2697
2698
  this.prefilling = true;
2698
2699
  this.addressIsComplete = false;
2699
- // console.log('streetNumber::ngOnChanges', this.addressIsComplete);
2700
2700
  this.searchText = this.loadParams(changes.prefillData.currentValue);
2701
2701
  if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.STREET_NUMBER) {
2702
- /*
2703
- this.onInputChange(/*'prefilled'* / SourceType.SOURCE_PREFILLED);
2704
- this.streetNumberSearchInput.nativeElement.focus();
2705
- */
2706
2702
  this.collapseDropdown = true;
2707
2703
  this.prefillData.prefillStreetNumber
2708
2704
  = this.transformStreetNumberInLowercaseAndWithoutDiacritics(this.prefillData.parameters.streetNumber);
@@ -2768,7 +2764,7 @@ class StreetNumberComponent {
2768
2764
  }
2769
2765
  onFocus() {
2770
2766
  this.collapseDropdown = false;
2771
- if (this.prefillData !== null && this.prefillData.prefillStreetNumberPerfectMatchFound != false) {
2767
+ if (this.prefillData !== null && this.prefillData.prefillStreetNumberPerfectMatchFound != false && this.addressIsComplete) {
2772
2768
  this.collapseDropdown = true;
2773
2769
  }
2774
2770
  // this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
@@ -2849,6 +2845,10 @@ class StreetNumberComponent {
2849
2845
  */
2850
2846
  // this.addressIsComplete = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? true : false;
2851
2847
  this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
2848
+ // Ensure user's prefill value is displayed when notInListAllowed
2849
+ if (this.notInListAllowed && this.prefillData.prefillStreetNumber) {
2850
+ this.searchText = this.prefillData.parameters.streetNumber;
2851
+ }
2852
2852
  this.prefillAnalyzeData();
2853
2853
  }
2854
2854
  else {
@@ -3017,8 +3017,7 @@ class StreetNumberComponent {
3017
3017
  }
3018
3018
  }
3019
3019
  else {
3020
- // If prefilling, then check if no match for a non-empty boxNumber
3021
- // If this is the case, simulate the selection of the 'not-in-list' suggestion
3020
+ // notInListAllowed=true: build a 'not-in-list' suggestion from the prefilled number
3022
3021
  if (this.prefilling && this.notInListAllowed
3023
3022
  && this.prefillData.prefillStreetNumberPerfectMatchFound === false
3024
3023
  && this.prefillData.prefillStreetNumber !== null
@@ -3031,6 +3030,33 @@ class StreetNumberComponent {
3031
3030
  }
3032
3031
  this.prefillCheckForPerfectMatch(suggestion);
3033
3032
  }
3033
+ // notInListAllowed=false and no perfect match:
3034
+ // Check whether any API suggestion starts with the prefilled value (prefix match).
3035
+ // - Prefix match exists (e.g. "1" → "10","11","18"): leave searchText as-is so the
3036
+ // parent's "not found" else branch shows the dropdown with the prefilled value.
3037
+ // - No prefix match (e.g. "145896" → "56"): auto-select the first complete suggestion
3038
+ // so the parent's "found" branch completes the address automatically.
3039
+ if (this.prefilling && !this.notInListAllowed
3040
+ && this.prefillData.prefillStreetNumberPerfectMatchFound === false
3041
+ && this.prefillData.prefillStreetNumber !== null
3042
+ && this.prefillData.prefillStreetNumber !== undefined
3043
+ && this.prefillData.prefillStreetNumber.length > 0) {
3044
+ const prefillLower = this.prefillData.prefillStreetNumber.toLowerCase();
3045
+ const hasPrefixMatch = this.suggestions.some(s => s.houseNumber && s.houseNumber.toLowerCase().startsWith(prefillLower));
3046
+ if (!hasPrefixMatch) {
3047
+ // Prefer a suggestion with isComplete=true; fall back to first suggestion that has a
3048
+ // house number in case language-specific sub-objects (dutch/french) lack isComplete.
3049
+ const autoSelect = this.suggestions.find(s => s.hasOwnProperty('isComplete') && s.isComplete === true)
3050
+ || this.suggestions.find(s => s.houseNumber != null);
3051
+ if (autoSelect) {
3052
+ this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3053
+ this.prefillData.prefillStreetNumberPerfectMatchSuggestion = { address: autoSelect };
3054
+ this.searchText = autoSelect.houseNumber;
3055
+ }
3056
+ }
3057
+ // If hasPrefixMatch: searchText stays as the prefilled value;
3058
+ // the parent's else branch will display it and keep the dropdown open.
3059
+ }
3034
3060
  }
3035
3061
  }
3036
3062
  else {
@@ -3041,8 +3067,13 @@ class StreetNumberComponent {
3041
3067
  const notInListSuggestion = { string: this.searchText, 'not-in-list': true };
3042
3068
  const streetSuggestion = this.prefillData.prefillStreetPerfectMatchSuggestion;
3043
3069
  const combined = { ...streetSuggestion.address, ...notInListSuggestion };
3044
- delete combined.mailBoxid;
3070
+ delete combined.mailBoxid; // mixed-case variant
3071
+ delete combined.mailBoxId; // camelCase variant (internal API field name)
3072
+ delete combined.pdpId;
3045
3073
  delete combined.suffixId;
3074
+ if (combined.geoSanction) {
3075
+ combined.geoSanction = combined.geoSanction.substring(0, 25);
3076
+ }
3046
3077
  // combined.boxNumber = combined.string;
3047
3078
  combined.houseNumber = combined.string;
3048
3079
  combined.searchBarString = combined.string;
@@ -3089,7 +3120,13 @@ class StreetNumberComponent {
3089
3120
  suggestion.address = suggestionToAdd;
3090
3121
  this.prefillCheckForPerfectMatch(suggestion);
3091
3122
  }
3092
- if (this.suggestionLevel !== SuggestionLevelType.StreetNumber && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
3123
+ // Skip checkForPerfectMatch when prefill already found a match to prevent a second
3124
+ // clickSuggestion call that would overwrite searchText with searchBarString.
3125
+ const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
3126
+ && this.prefillData && this.prefillData.prefillStreetNumberPerfectMatchFound === true;
3127
+ if (!skipNonPrefillCheck
3128
+ && this.suggestionLevel !== SuggestionLevelType.StreetNumber
3129
+ && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
3093
3130
  suggestion.address = suggestionToAdd;
3094
3131
  const isPerfectMatch = this.checkForPerfectMatch(suggestion);
3095
3132
  if (!isPerfectMatch) {
@@ -3101,25 +3138,22 @@ class StreetNumberComponent {
3101
3138
  }
3102
3139
  checkForPerfectMatch(suggestion) {
3103
3140
  if (!this.addressIsComplete) {
3104
- // if (this.showDebugMessageToConsole) {
3105
- console.log('streetNumber - checking suggestion for perfect match', suggestion, this.searchText);
3106
- // }
3107
3141
  const sugAddress = suggestion.address;
3108
3142
  const suggestionStreetNumber = this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + sugAddress.houseNumber);
3109
3143
  if (suggestionStreetNumber === ('' + this.searchText)) {
3110
3144
  this.searchText = sugAddress.houseNumber;
3111
3145
  if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
3112
3146
  this.clickSuggestion(null, sugAddress);
3147
+ // clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
3148
+ // Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
3149
+ this.searchText = sugAddress.houseNumber;
3113
3150
  this.addressIsComplete = true;
3114
- // console.log('streetNumber::prefillCheckForPerfectMatch', this.addressIsComplete);
3115
- // if (this.showDebugMessageToConsole && this.addressIsComplete === true) {
3116
- console.log('ADDRESS COMPLETE ON STREET NUMBER !');
3117
- // }
3118
3151
  return true;
3119
3152
  }
3120
3153
  else {
3121
3154
  if (this.suggestionLevel !== SuggestionLevelType.StreetNumber && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
3122
3155
  this.clickSuggestion(null, sugAddress); // house number found
3156
+ this.searchText = sugAddress.houseNumber;
3123
3157
  }
3124
3158
  }
3125
3159
  }
@@ -3147,11 +3181,10 @@ class StreetNumberComponent {
3147
3181
  this.searchText = sugAddress.houseNumber;
3148
3182
  if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
3149
3183
  this.clickSuggestion(null, sugAddress);
3184
+ // clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
3185
+ // Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
3186
+ this.searchText = sugAddress.houseNumber;
3150
3187
  this.addressIsComplete = true;
3151
- // console.log('streetNumber::prefillCheckForPerfectMatch', this.addressIsComplete);
3152
- // if (this.showDebugMessageToConsole && this.addressIsComplete === true) {
3153
- console.log('ADDRESS COMPLETE ON STREET NUMBER !');
3154
- // }
3155
3188
  }
3156
3189
  }
3157
3190
  }
@@ -3186,7 +3219,6 @@ class StreetNumberComponent {
3186
3219
  this.consumedNumber = this.sequenceNumber;
3187
3220
  this.clearSuggestions();
3188
3221
  if (this.suggestionLevel === SuggestionLevelType.None) {
3189
- console.log('(A) do not use suggestions for street number');
3190
3222
  this.streetNumberChanged.emit(this.searchText);
3191
3223
  if (source === SourceType.SOURCE_PREFILLED)
3192
3224
  this.prefillAnalyzeData();
@@ -3194,7 +3226,6 @@ class StreetNumberComponent {
3194
3226
  }
3195
3227
  else {
3196
3228
  if (this.suggestionLevel === SuggestionLevelType.None) {
3197
- console.log('(B) do not use suggestions for street number');
3198
3229
  this.streetNumberChanged.emit(this.searchText);
3199
3230
  if (source === SourceType.SOURCE_PREFILLED)
3200
3231
  this.prefillAnalyzeData();
@@ -3231,6 +3262,7 @@ class StreetNumberComponent {
3231
3262
  this.resetArrowSelectedIndex();
3232
3263
  if (!source) {
3233
3264
  this.prefilling = false;
3265
+ this.isPrefillWithNoMatch = false;
3234
3266
  if (this.showDebugMessageToConsole) {
3235
3267
  console.log('streetNumber::onInputChange -> calling valueChanged');
3236
3268
  }
@@ -3242,7 +3274,6 @@ class StreetNumberComponent {
3242
3274
  this.consumedNumber = this.sequenceNumber;
3243
3275
  this.clearSuggestions();
3244
3276
  if (this.suggestionLevel === SuggestionLevelType.None) {
3245
- console.log('(A) do not use suggestions for street number');
3246
3277
  this.streetNumberChanged.emit(this.searchText);
3247
3278
  if (source === SourceType.SOURCE_PREFILLED)
3248
3279
  this.prefillAnalyzeData();
@@ -3250,7 +3281,6 @@ class StreetNumberComponent {
3250
3281
  }
3251
3282
  else {
3252
3283
  if (this.suggestionLevel === SuggestionLevelType.None) {
3253
- console.log('(B) do not use suggestions for street number');
3254
3284
  this.streetNumberChanged.emit(this.searchText);
3255
3285
  if (source === SourceType.SOURCE_PREFILLED) {
3256
3286
  this.prefillData.prefillStreetNumberPerfectMatchFound = true;
@@ -3302,6 +3332,38 @@ class StreetNumberComponent {
3302
3332
  }
3303
3333
  }
3304
3334
  else {
3335
+ // If prefilling, check whether the street suggestion already carries the matching house number
3336
+ // (e.g. postal code 1031 where the street API returns data up to house-number level).
3337
+ // In that case skip the street-number API call and go straight to the box-number step.
3338
+ if (source === SourceType.SOURCE_PREFILLED
3339
+ && this.prefillData
3340
+ && this.prefillData.prefillStreetPerfectMatchSuggestion
3341
+ && this.prefillData.prefillStreetPerfectMatchSuggestion.address) {
3342
+ const streetAddr = this.prefillData.prefillStreetPerfectMatchSuggestion.address;
3343
+ const rawHouseNumber = streetAddr.houseNumber;
3344
+ const streetHouseNumber = (rawHouseNumber != null && rawHouseNumber !== undefined)
3345
+ ? this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + rawHouseNumber)
3346
+ : null;
3347
+ // Use the house number from the street suggestion when:
3348
+ // (a) it exactly matches the prefilled value, OR
3349
+ // (b) notInListAllowed=false — the prefilled value is invalid so auto-fill with
3350
+ // the valid house number that the locality/street API already returned.
3351
+ const streetHouseNumberIsValid = streetHouseNumber && streetHouseNumber !== 'null' && streetHouseNumber !== 'undefined';
3352
+ if (streetHouseNumberIsValid && this.prefillData.prefillStreetNumber
3353
+ && (streetHouseNumber === this.prefillData.prefillStreetNumber || !this.notInListAllowed)) {
3354
+ this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3355
+ this.prefillData.prefillStreetNumberPerfectMatchSuggestion = this.prefillData.prefillStreetPerfectMatchSuggestion;
3356
+ this.searchText = rawHouseNumber;
3357
+ this.isPrefillWithNoMatch = false;
3358
+ this.collapseDropdown = true;
3359
+ if (streetAddr.hasOwnProperty('isComplete') && streetAddr.isComplete === true) {
3360
+ this.clickSuggestion(null, streetAddr);
3361
+ this.addressIsComplete = true;
3362
+ }
3363
+ this.prefillAnalyzeData();
3364
+ return;
3365
+ }
3366
+ }
3305
3367
  this.getTopSuggestions(source);
3306
3368
  }
3307
3369
  }
@@ -3331,7 +3393,7 @@ class StreetNumberComponent {
3331
3393
  console.log('streetNumber::clickSuggestion - NOT-IN-LIST', event, suggestion);
3332
3394
  }
3333
3395
  }
3334
- if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.hasOwnProperty('boxNumber')) {
3396
+ if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) {
3335
3397
  this.addressIsComplete = true;
3336
3398
  // this.notifyAddressIsValidated();
3337
3399
  }
@@ -3354,6 +3416,9 @@ class StreetNumberComponent {
3354
3416
  delete combined.suffixId;
3355
3417
  delete combined.pdpId;
3356
3418
  delete combined.pdpId;
3419
+ if (combined.geoSanction) {
3420
+ combined.geoSanction = combined.geoSanction.substring(0, 25);
3421
+ }
3357
3422
  combined.houseNumber = combined.string;
3358
3423
  combined.searchBarString = combined.string;
3359
3424
  combined.isComplete = true;
@@ -3363,7 +3428,7 @@ class StreetNumberComponent {
3363
3428
  // console.log('street number - emit suggestion', suggestion);
3364
3429
  const notInList = suggestion['not-in-list'];
3365
3430
  const isNotInList = notInList !== null && notInList !== undefined && notInList === true;
3366
- this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.hasOwnProperty('boxNumber')) ? true : false;
3431
+ this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) ? true : false;
3367
3432
  this.addressChanged.emit(suggestion);
3368
3433
  }
3369
3434
  /*
@@ -3776,9 +3841,14 @@ class BoxNumberComponent {
3776
3841
  }
3777
3842
  ngOnChanges(changes) {
3778
3843
  if (changes) {
3779
- if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined) {
3780
- this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
3781
- this.setSelectedAddress(this.autofillData.selectedAddress);
3844
+ if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
3845
+ && !this.prefilling && !changes.hasOwnProperty('prefillData')) {
3846
+ const newBoxNumber = changes.autofillData.currentValue.boxNumber;
3847
+ // Only process if the box number value actually changed to avoid infinite loop
3848
+ if (newBoxNumber !== this.searchText) {
3849
+ this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
3850
+ this.setSelectedAddress(this.autofillData.selectedAddress);
3851
+ }
3782
3852
  }
3783
3853
  else {
3784
3854
  if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
@@ -3786,11 +3856,28 @@ class BoxNumberComponent {
3786
3856
  this.searchText = this.loadParams(changes.prefillData.currentValue);
3787
3857
  if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.BOX_NUMBER) {
3788
3858
  // this.onInputChange('prefilled');
3789
- // this.boxNumberSearchInput.nativeElement.focus();
3790
3859
  this.collapseDropdown = true;
3791
3860
  this.prefillData.prefillBoxNumber
3792
3861
  = this.transformBoxNumberInLowercaseAndWithoutDiacritics(this.prefillData.parameters.boxNumber);
3793
- this.onInputChange(/*'prefilled'*/ SourceType.SOURCE_PREFILLED);
3862
+ // When notInListAllowed=false, skip the API call if the selected address is
3863
+ // already complete without a box number (i.e. no box numbers exist for this
3864
+ // address in the database). In that case any prefilled box number is invalid
3865
+ // and the API would return empty results anyway.
3866
+ const selectedAddressIsCompleteWithoutBoxNumber = this.selectedAddress != null &&
3867
+ this.selectedAddress.isComplete === true &&
3868
+ !this.selectedAddress.hasOwnProperty('boxNumber');
3869
+ if (!this.notInListAllowed && selectedAddressIsCompleteWithoutBoxNumber) {
3870
+ this.isPrefillWithNoMatch = true;
3871
+ this.prefillAnalyzeData();
3872
+ }
3873
+ else {
3874
+ this.onInputChange(/*'prefilled'*/ SourceType.SOURCE_PREFILLED);
3875
+ }
3876
+ setTimeout(() => {
3877
+ if (this.boxNumberSearchInput && this.boxNumberSearchInput.nativeElement && !this.boxNumberSearchInput.nativeElement.disabled) {
3878
+ this.boxNumberSearchInput.nativeElement.focus();
3879
+ }
3880
+ }, 0);
3794
3881
  }
3795
3882
  }
3796
3883
  if (changes.hasOwnProperty('streetNumber') && !changes.streetNumber.firstChange && !changes.hasOwnProperty('prefillData')) {
@@ -3930,11 +4017,24 @@ class BoxNumberComponent {
3930
4017
  console.log('BOX-NUMBER calling service params', param);
3931
4018
  }
3932
4019
  if (this.searchText) {
4020
+ this.addressIsValidated = false;
3933
4021
  this.subscription = this.addressService.getBox(this.baseUrl, this.locality, this.postalCode, param)
3934
4022
  .subscribe(response => {
3935
4023
  this.handleGetBoxResponse(response, source);
3936
4024
  if (source === SourceType.SOURCE_PREFILLED) {
3937
4025
  this.isPrefillWithNoMatch = this.prefillData.prefillBoxNumberPerfectMatchFound === true ? false : true;
4026
+ // Ensure user's prefill value is displayed when notInListAllowed
4027
+ if (this.notInListAllowed && this.prefillData.prefillBoxNumber) {
4028
+ this.searchText = this.prefillData.parameters.boxNumber;
4029
+ this.isPrefillWithNoMatch = false;
4030
+ }
4031
+ // If notInListAllowed is false and no perfect match, keep the prefilled value
4032
+ // but show it in orangered so the user sees it was not found in the API.
4033
+ if (!this.notInListAllowed && this.prefillData.prefillBoxNumber !== ''
4034
+ && this.prefillData.prefillBoxNumberPerfectMatchFound !== true) {
4035
+ this.searchText = this.prefillData.parameters.boxNumber;
4036
+ this.isPrefillWithNoMatch = true;
4037
+ }
3938
4038
  this.prefillAnalyzeData();
3939
4039
  }
3940
4040
  else {
@@ -4128,10 +4228,12 @@ class BoxNumberComponent {
4128
4228
  && this.prefillData.prefillBoxNumber.length > 0) {
4129
4229
  // const notInListSuggestion = {string: this.searchText, 'not-in-list': true};
4130
4230
  const suggestion = this.prefillBuildNotInListSuggestion();
4131
- if (this.showDebugMessageToConsole) {
4132
- console.log('BOX NUMBER - PREFILL NOT IN LIST SUGGESTION:', suggestion);
4231
+ if (suggestion) {
4232
+ if (this.showDebugMessageToConsole) {
4233
+ console.log('BOX NUMBER - PREFILL NOT IN LIST SUGGESTION:', suggestion);
4234
+ }
4235
+ this.prefillCheckForPerfectMatch(suggestion);
4133
4236
  }
4134
- this.prefillCheckForPerfectMatch(suggestion);
4135
4237
  }
4136
4238
  }
4137
4239
  }
@@ -4142,9 +4244,25 @@ class BoxNumberComponent {
4142
4244
  prefillBuildNotInListSuggestion() {
4143
4245
  const notInListSuggestion = { string: this.searchText, 'not-in-list': true };
4144
4246
  const streetNumberSuggestion = this.prefillData.prefillStreetNumberPerfectMatchSuggestion;
4247
+ if (!streetNumberSuggestion || !streetNumberSuggestion.address) {
4248
+ return null;
4249
+ }
4250
+ // Capture whether the street-number suggestion was itself not-in-list (invalid)
4251
+ // BEFORE merging — spreading notInListSuggestion on top would mask the original flag.
4252
+ const streetNumberWasNotInList = streetNumberSuggestion.address['not-in-list'] === true;
4145
4253
  const combined = { ...streetNumberSuggestion.address, ...notInListSuggestion };
4146
- delete combined.mailBoxid;
4254
+ delete combined.mailBoxid; // mixed-case variant
4255
+ delete combined.mailBoxId; // camelCase variant (internal API field name)
4147
4256
  delete combined.suffixId;
4257
+ if (combined.geoSanction) {
4258
+ combined.geoSanction = combined.geoSanction.substring(0, 35);
4259
+ }
4260
+ if (streetNumberWasNotInList) {
4261
+ delete combined.pdpId;
4262
+ if (combined.geoSanction) {
4263
+ combined.geoSanction = combined.geoSanction.substring(0, 25);
4264
+ }
4265
+ }
4148
4266
  combined.boxNumber = combined.string;
4149
4267
  combined.searchBarString = combined.string;
4150
4268
  combined.isComplete = true;
@@ -4178,7 +4296,11 @@ class BoxNumberComponent {
4178
4296
  suggestion.address = suggestionToAdd;
4179
4297
  isPerfectMatch = this.prefillCheckForPerfectMatch(suggestion);
4180
4298
  }
4181
- if (this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
4299
+ // Skip checkForPerfectMatch when prefill already found a match to prevent a second
4300
+ // clickSuggestion call that would overwrite searchText with searchBarString.
4301
+ const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
4302
+ && this.prefillData && this.prefillData.prefillBoxNumberPerfectMatchFound === true;
4303
+ if (!skipNonPrefillCheck && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
4182
4304
  suggestion.address = suggestionToAdd;
4183
4305
  isPerfectMatch = this.checkForPerfectMatch(suggestion);
4184
4306
  if (!isPerfectMatch) {
@@ -4203,7 +4325,9 @@ class BoxNumberComponent {
4203
4325
  this.searchText = sugAddress.boxNumber;
4204
4326
  if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
4205
4327
  this.clickSuggestion(null, sugAddress);
4206
- // this.addressIsComplete = true;
4328
+ // clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
4329
+ // Restore to boxNumber so the field shows the clean box number value.
4330
+ this.searchText = sugAddress.boxNumber;
4207
4331
  if (this.showDebugMessageToConsole) {
4208
4332
  console.log('ADDRESS COMPLETE ON BOX NUMBER !');
4209
4333
  }
@@ -4230,7 +4354,9 @@ class BoxNumberComponent {
4230
4354
  this.searchText = sugAddress.boxNumber;
4231
4355
  if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
4232
4356
  this.clickSuggestion(null, sugAddress);
4233
- // this.addressIsComplete = true;
4357
+ // clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
4358
+ // Restore to boxNumber so the field shows the clean box number value.
4359
+ this.searchText = sugAddress.boxNumber;
4234
4360
  if (this.showDebugMessageToConsole) {
4235
4361
  console.log('ADDRESS COMPLETE ON BOX NUMBER !');
4236
4362
  }
@@ -4380,13 +4506,18 @@ class BoxNumberComponent {
4380
4506
  const combined = { ...this.selectedAddress, ...suggestion };
4381
4507
  delete combined.mailBoxid;
4382
4508
  delete combined.suffixId;
4509
+ if (combined.geoSanction) {
4510
+ combined.geoSanction = combined.geoSanction.substring(0, 35);
4511
+ }
4383
4512
  combined.boxNumber = combined.string;
4384
4513
  combined.searchBarString = combined.string;
4385
4514
  combined.isComplete = true;
4386
4515
  return combined;
4387
4516
  }
4388
4517
  setSelectedAddress(suggestion) {
4389
- // console.log('box number::setSelectedAddress', suggestion);
4518
+ if (this.showDebugMessageToConsole) {
4519
+ console.log('box number::setSelectedAddress', suggestion);
4520
+ }
4390
4521
  this.addressIsValidated = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true) ? true : false;
4391
4522
  this.addressChanged.emit(suggestion);
4392
4523
  }
@@ -4617,6 +4748,11 @@ class BoxNumberComponent {
4617
4748
  isDisabled() {
4618
4749
  return (this.locality === '' || this.postalCode === '' || this.minLevel > ADDRESSLEVEL.BOX_NUMBER);
4619
4750
  }
4751
+ isDisabledByPrefill() {
4752
+ return this.prefillData !== null && this.prefillData !== undefined
4753
+ && this.prefillData.parameters !== null && this.prefillData.parameters !== undefined
4754
+ && !this.isValid(this.prefillData.parameters.boxNumber);
4755
+ }
4620
4756
  onInputClick() {
4621
4757
  if (this.showDebugMessageToConsole) {
4622
4758
  console.log('box number click');
@@ -4624,10 +4760,10 @@ class BoxNumberComponent {
4624
4760
  }
4625
4761
  }
4626
4762
  BoxNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, deps: [{ token: AddressService }, { token: LocaleService }, { token: i3.TranslateService }, { token: UnicodeService }], target: i0.ɵɵFactoryTarget.Component });
4627
- BoxNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BoxNumberComponent, selector: "bp-box-number", inputs: { prefillData: "prefillData", autofillData: "autofillData", showDebugMessageToConsole: "showDebugMessageToConsole", labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", addressParams: "addressParams", postalCode: "postalCode", locality: "locality", streetName: "streetName", streetNumber: "streetNumber", selectedAddress: "selectedAddress", notInListAllowed: "notInListAllowed", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", inputLang: "inputLang", messageOption: "messageOption", isReadonly: "isReadonly", suggestionLevel: "suggestionLevel", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", emptyResponseEvent: "emptyResponseEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", boxNumberChanged: "boxNumberChanged", numberOfExceptionsEmitter: "numberOfExceptionsEmitter" }, viewQueries: [{ propertyName: "boxNumberSearchInput", first: true, predicate: ["boxNumberSearchInput"], descendants: true }, { propertyName: "boxNumberList", first: true, predicate: ["boxNumberList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleSuggestionDirective, selector: "[appVisibleSuggestion]", inputs: ["appVisibleSuggestion"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3.TranslatePipe, "highlightSuggestion": HighlightSuggestionPipe } });
4763
+ BoxNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BoxNumberComponent, selector: "bp-box-number", inputs: { prefillData: "prefillData", autofillData: "autofillData", showDebugMessageToConsole: "showDebugMessageToConsole", labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", addressParams: "addressParams", postalCode: "postalCode", locality: "locality", streetName: "streetName", streetNumber: "streetNumber", selectedAddress: "selectedAddress", notInListAllowed: "notInListAllowed", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", inputLang: "inputLang", messageOption: "messageOption", isReadonly: "isReadonly", suggestionLevel: "suggestionLevel", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", emptyResponseEvent: "emptyResponseEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", boxNumberChanged: "boxNumberChanged", numberOfExceptionsEmitter: "numberOfExceptionsEmitter" }, viewQueries: [{ propertyName: "boxNumberSearchInput", first: true, predicate: ["boxNumberSearchInput"], descendants: true }, { propertyName: "boxNumberList", first: true, predicate: ["boxNumberList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0 || isDisabledByPrefill()\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleSuggestionDirective, selector: "[appVisibleSuggestion]", inputs: ["appVisibleSuggestion"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3.TranslatePipe, "highlightSuggestion": HighlightSuggestionPipe } });
4628
4764
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, decorators: [{
4629
4765
  type: Component,
4630
- args: [{ selector: 'bp-box-number', template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""] }]
4766
+ args: [{ selector: 'bp-box-number', template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0 || isDisabledByPrefill()\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""] }]
4631
4767
  }], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { boxNumberSearchInput: [{
4632
4768
  type: ViewChild,
4633
4769
  args: ['boxNumberSearchInput', { static: false }]
@@ -5211,6 +5347,11 @@ class LibAddressAutocompleteByComponentComponent {
5211
5347
  this.boxNumberAutofillData = this.autofillData;
5212
5348
  }
5213
5349
  }
5350
+ if (this.minLevel == ADDRESSLEVEL.BOX_NUMBER) {
5351
+ if (this.selectedAddress.boxNumber) {
5352
+ this.boxNumberAutofillData = this.autofillData;
5353
+ }
5354
+ }
5214
5355
  }
5215
5356
  this.addressCompleteEventEmitter.emit(this.selectedAddress);
5216
5357
  this.emittedAddress = this.selectedAddress;
@@ -5660,9 +5801,15 @@ class LibAddressAutocompleteByComponentComponent {
5660
5801
  this.autocompleteBoxNb.clearWidget();
5661
5802
  this.autocompleteBoxNb.searchText = '';
5662
5803
  */
5663
- this.autocompleteStreetNb.searchText = '';
5664
- this.autocompleteBoxNb.searchText = '';
5665
- this.autocompleteBoxNb.streetNumber = '';
5804
+ // Guard: only clear when street-number is not already validated.
5805
+ // resetStreet() always sets addressIsComplete=false before calling setAddress(null,3),
5806
+ // so user-initiated street changes are unaffected. Without this guard the post-prefill
5807
+ // autofill CD cycle clears searchText causing a inputText mismatch -> clearWidget().
5808
+ if (!this.autocompleteStreetNb.addressIsComplete) {
5809
+ this.autocompleteStreetNb.searchText = '';
5810
+ this.autocompleteBoxNb.searchText = '';
5811
+ this.autocompleteBoxNb.streetNumber = '';
5812
+ }
5666
5813
  break;
5667
5814
  // STREET Number
5668
5815
  case 2:
@@ -5743,8 +5890,23 @@ class LibAddressAutocompleteByComponentComponent {
5743
5890
  console.log('lib::setAddressStreetNumber - streetnumber: ', streetNumber);
5744
5891
  console.log('lib::setAddressStreetNumber - streetAddress: ', this.streetAddress);
5745
5892
  }
5746
- this.streetNumberAddress = this.streetAddress;
5747
- this.selectedAddress = this.streetAddress;
5893
+ if (this.suggestionLevel === SuggestionLevelType.None && this.streetAddress.streetNumber !== streetNumber) {
5894
+ const combined = { ...this.streetAddress };
5895
+ delete combined.pdpId;
5896
+ delete combined.mailBoxid; // mixed-case variant
5897
+ delete combined.mailBoxId; // camelCase variant (internal API field name)
5898
+ delete combined.suffixId;
5899
+ delete combined.isComplete;
5900
+ if (combined.geoSanction) {
5901
+ combined.geoSanction = combined.geoSanction.substring(0, 25);
5902
+ }
5903
+ this.streetNumberAddress = combined;
5904
+ this.selectedAddress = combined;
5905
+ }
5906
+ else {
5907
+ this.streetNumberAddress = this.streetAddress;
5908
+ this.selectedAddress = this.streetAddress;
5909
+ }
5748
5910
  this.selectedAddress.houseNumber = streetNumber;
5749
5911
  this.selectedAddress.streetNumber = streetNumber;
5750
5912
  /*
@@ -5763,7 +5925,20 @@ class LibAddressAutocompleteByComponentComponent {
5763
5925
  setAddressBoxNumber(boxNumber) {
5764
5926
  console.log('set box number value:', boxNumber);
5765
5927
  //this.streetNumberAddress = this.streetAddress;
5766
- this.selectedAddress = this.streetNumberAddress;
5928
+ if ((this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) && this.streetNumberAddress.boxNumber !== boxNumber) {
5929
+ const combined = { ...this.streetNumberAddress };
5930
+ delete combined.mailBoxid; // mixed-case variant
5931
+ delete combined.mailBoxId; // camelCase variant (internal API field name)
5932
+ delete combined.suffixId;
5933
+ delete combined.isComplete;
5934
+ if (combined.geoSanction) {
5935
+ combined.geoSanction = combined.geoSanction.substring(0, 35);
5936
+ }
5937
+ this.selectedAddress = combined;
5938
+ }
5939
+ else {
5940
+ this.selectedAddress = this.streetNumberAddress;
5941
+ }
5767
5942
  this.selectedAddress.boxNumber = boxNumber;
5768
5943
  this.boxNumber = boxNumber;
5769
5944
  this.notifyAddressComplete();
@@ -5879,7 +6054,23 @@ class LibAddressAutocompleteByComponentComponent {
5879
6054
  this.minLevel = ADDRESSLEVEL.STREET;
5880
6055
  const streetNumber = this.prefillData.parameters.streetNumber;
5881
6056
  const boxNumber = this.prefillData.parameters.boxNumber;
5882
- if (boxNumber && !address.boxNumber) {
6057
+ if (streetNumber) {
6058
+ // User has a streetNumber to prefill - trigger street-number prefill flow.
6059
+ // onStreetNumberPrefillEvent will handle the box number prefill if needed.
6060
+ this.prefillData.prefillStreetPerfectMatchFound = true;
6061
+ this.prefillData.prefillStreetPerfectMatchSuggestion = { address: { ...address } };
6062
+ this.prefillData.parameters.minLevel = ADDRESSLEVEL.STREET_NUMBER;
6063
+ this.prefillData.parameters.streetName = address.streetName;
6064
+ this.prefillData.parameters.postalCode = address.postalCode;
6065
+ this.prefillData.parameters.municipalityName = address.localityName || address.municipalityName;
6066
+ this.streetNumberPrefillData = this.prefillData;
6067
+ // Do NOT set boxNumberPrefillData here: it shares the same prefillData reference,
6068
+ // which would immediately overwrite minLevel to BOX_NUMBER (1) before Angular
6069
+ // change detection runs, causing the street-number component to see minLevel=1
6070
+ // and skip its prefill. Let onStreetNumberPrefillEvent set up box number prefill.
6071
+ }
6072
+ else if (boxNumber && !address.boxNumber) {
6073
+ // No streetNumber to prefill: jump directly to box number prefill.
5883
6074
  this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
5884
6075
  this.boxNumberPrefillData = this.prefillData;
5885
6076
  }
@@ -5969,11 +6160,13 @@ class LibAddressAutocompleteByComponentComponent {
5969
6160
  if (this.showDebugMessageToConsole) {
5970
6161
  console.warn('lib::street: prefill - transmitting prefill data for streetNumber :', this.prefillData);
5971
6162
  }
5972
- if (address.houseNumber) {
6163
+ if (address.houseNumber && !streetNumber) {
6164
+ // No street number in prefill params: use the street suggestion's houseNumber via autofill
5973
6165
  this.setAddress(address, ADDRESSLEVEL.STREET);
5974
6166
  this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
5975
6167
  }
5976
6168
  else {
6169
+ // Street number given in prefill params (or no houseNumber in suggestion): trigger street-number prefill
5977
6170
  this.streetNumberPrefillData = this.prefillData;
5978
6171
  }
5979
6172
  }
@@ -6009,10 +6202,35 @@ class LibAddressAutocompleteByComponentComponent {
6009
6202
  const addressIsComplete = address && address.hasOwnProperty('isComplete') && address.isComplete === true ? true : false;
6010
6203
  const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
6011
6204
  if (addressIsComplete && !addressIsNotInList) {
6012
- // found address - perfect matchat street number level
6013
- // Nothing to do anymore
6014
- this.autocompleteStreetNb.addressIsComplete = true;
6015
- this.quitPrefillMode();
6205
+ // found address - perfect match at street number level
6206
+ const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
6207
+ if (this.notInListAllowed && boxNumber) {
6208
+ // User prefilled a box number and notInListAllowed - continue to box number prefill
6209
+ this.autocompleteStreetNb.addressIsComplete = true;
6210
+ this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
6211
+ this.prefillData = event.prefillData;
6212
+ this.prefillData.ts = new Date();
6213
+ this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
6214
+ const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
6215
+ this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
6216
+ this.prefillData.parameters.streetName = suggestionAddress.streetName;
6217
+ this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
6218
+ this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
6219
+ this.updatePostalCodeLocality(address);
6220
+ this.updateStreetName(address);
6221
+ this.updateStreetNumber(address);
6222
+ this.streetAddress = address;
6223
+ this.streetNumberAddress = address;
6224
+ this.autocompleteBoxNb.streetNumber = address.houseNumber;
6225
+ this.autocompleteBoxNb.searchText = '';
6226
+ this.boxNumberPrefillData = this.prefillData;
6227
+ }
6228
+ else {
6229
+ // Nothing to do anymore
6230
+ this.autocompleteStreetNb.addressIsComplete = true;
6231
+ this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6232
+ this.quitPrefillMode();
6233
+ }
6016
6234
  }
6017
6235
  else {
6018
6236
  this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
@@ -6106,13 +6324,52 @@ class LibAddressAutocompleteByComponentComponent {
6106
6324
  const address = suggestion.address;
6107
6325
  this.updateStreetNumber(address);
6108
6326
  this.autocompleteStreetNb.selectedAddress = address;
6327
+ // Directly set the child input field to the API-returned house number.
6328
+ // This is critical when the prefilled number was invalid (e.g. 145896 → 56):
6329
+ // it ensures searchText='56' before quitPrefillMode() clears the prefilling flag,
6330
+ // so that Angular CD's ngOnChanges(inputText:'145896'→'56') sees matching values
6331
+ // and does NOT trigger clearWidget().
6332
+ if (address.houseNumber) {
6333
+ this.autocompleteStreetNb.searchText = address.houseNumber;
6334
+ }
6109
6335
  const addressIsComplete = address && address.hasOwnProperty('isComplete') && !address.hasOwnProperty('boxNumber') && address.isComplete === true ? true : false;
6110
6336
  const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
6111
6337
  if (addressIsComplete && !addressIsNotInList) {
6112
- // found address - perfect matchat street number level
6113
- // Nothing to do anymore
6114
- this.autocompleteStreetNb.addressIsComplete = true;
6115
- this.quitPrefillMode();
6338
+ // found address - perfect match at street number level
6339
+ const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
6340
+ if (boxNumber && this.notInListAllowed) {
6341
+ // A boxNumber is present in prefill params AND notInListAllowed - continue to box number prefill.
6342
+ // When notInListAllowed=false, the address is already complete without a box number;
6343
+ // any prefilled box number is invalid and the API call must be skipped.
6344
+ this.autocompleteStreetNb.addressIsComplete = true;
6345
+ this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
6346
+ this.prefillData = event.prefillData;
6347
+ this.prefillData.ts = new Date();
6348
+ this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
6349
+ const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
6350
+ this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
6351
+ this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
6352
+ this.prefillData.parameters.streetName = suggestionAddress.streetName;
6353
+ this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
6354
+ this.updatePostalCodeLocality(address);
6355
+ this.updateStreetName(address);
6356
+ this.updateStreetNumber(address);
6357
+ this.streetAddress = address;
6358
+ this.streetNumberAddress = address;
6359
+ this.autocompleteBoxNb.streetNumber = address.houseNumber;
6360
+ this.autocompleteBoxNb.searchText = '';
6361
+ this.boxNumberPrefillData = this.prefillData;
6362
+ }
6363
+ else {
6364
+ this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6365
+ // address.isComplete===true, so setAddress() correctly sets addressIsComplete=true
6366
+ // and the check mark should be visible. Do NOT suppress it here.
6367
+ // Null out autofill data so Angular CD does not re-trigger ngOnChanges(autofillData)
6368
+ // on the street-number child, which would call setSelectedAddress and set
6369
+ // addressIsComplete=true again via the autofill chain.
6370
+ this.streetNumberAutofillData = null;
6371
+ this.quitPrefillMode();
6372
+ }
6116
6373
  }
6117
6374
  else {
6118
6375
  this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
@@ -6132,8 +6389,16 @@ class LibAddressAutocompleteByComponentComponent {
6132
6389
  // this.updatePostalCodeLocality(suggestionAddress);
6133
6390
  const boxNumber = this.prefillData.parameters.boxNumber;
6134
6391
  if (!addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '')) {
6392
+ // No box number in prefill params and the API reports isComplete=false (box number required).
6393
+ // Do NOT start box-number prefill: when boxNumber param is empty, the box-number
6394
+ // component receives searchText='' and never fires its prefill event, so
6395
+ // quitPrefillMode() would never be called, leaving prefilling=true forever.
6396
+ // Since isComplete=false the address is not complete — do NOT force addressIsComplete=true;
6397
+ // setAddress() will correctly leave the street-number checkmark unset, and the user
6398
+ // must enter the box number manually.
6135
6399
  this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6136
- // this.quitPrefillMode();
6400
+ this.quitPrefillMode();
6401
+ return;
6137
6402
  }
6138
6403
  else {
6139
6404
  this.updatePostalCodeLocality(address);
@@ -6155,33 +6420,32 @@ class LibAddressAutocompleteByComponentComponent {
6155
6420
  }
6156
6421
  this.autocompleteBoxNb.searchText = '';
6157
6422
  }
6158
- /*
6159
- const boxNumber = this.prefillData.parameters.boxNumber;
6160
- if ( ! addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '') )
6161
- {
6162
- this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6163
- this.quitPrefillMode();
6164
- }
6165
- else
6166
- {
6167
- if (this.showDebugMessageToConsole) { console.log('lib::prefill: trigger checking box number match... ', this.prefillData); }
6168
- this.boxNumberPrefillData = this.prefillData;
6169
- }
6170
- */
6171
6423
  this.boxNumberPrefillData = this.prefillData;
6172
6424
  }
6173
6425
  }
6174
6426
  else {
6175
6427
  const prefillStreetNumber = this.prefillData.parameters.streetNumber;
6176
- const address = this.prefillData.prefillStreetPerfectMatchSuggestion.address;
6428
+ const address = this.prefillData.prefillStreetPerfectMatchSuggestion
6429
+ ? this.prefillData.prefillStreetPerfectMatchSuggestion.address
6430
+ : null;
6177
6431
  this.autocompleteBoxNb.streetNumber = '';
6178
6432
  if (prefillStreetNumber === null || prefillStreetNumber === undefined || prefillStreetNumber.length === 0) {
6179
6433
  this.setAddress(address, ADDRESSLEVEL.STREET);
6180
6434
  }
6181
6435
  else {
6182
- // address.houseNumber = prefillStreetNumber;
6183
- address.searchBarString = prefillStreetNumber;
6184
- this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6436
+ // The prefilled street number doesn't exist in the API (notInListAllowed=false).
6437
+ // Show the prefilled value in the input and leave the dropdown open so the
6438
+ // user can pick the correct house number from the suggestions.
6439
+ this.autocompleteStreetNb.searchText = prefillStreetNumber;
6440
+ // Keep streetNumberInput in sync with searchText so the child's inputText
6441
+ // ngOnChanges guard (notEqualIgnoreCase) does not trigger clearWidget()
6442
+ // once prefilling becomes false after quitPrefillMode().
6443
+ this.streetNumberInput = prefillStreetNumber;
6444
+ this.autocompleteStreetNb.isPrefillWithNoMatch = false;
6445
+ this.autocompleteStreetNb.addressIsComplete = false;
6446
+ this.autocompleteBoxNb.streetNumber = '';
6447
+ // Prevent the autofill Angular-CD chain from re-setting addressIsComplete=true.
6448
+ this.streetNumberAutofillData = null;
6185
6449
  }
6186
6450
  this.quitPrefillMode();
6187
6451
  }
@@ -6194,18 +6458,48 @@ class LibAddressAutocompleteByComponentComponent {
6194
6458
  if (data.prefillBoxNumberPerfectMatchFound === true) {
6195
6459
  const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
6196
6460
  const address = suggestion.address;
6461
+ // When notInListAllowed, ensure user's prefilled values are used
6462
+ if (this.notInListAllowed) {
6463
+ if (this.prefillData.parameters.streetNumber) {
6464
+ address.houseNumber = this.prefillData.parameters.streetNumber;
6465
+ }
6466
+ if (this.prefillData.parameters.boxNumber) {
6467
+ address.boxNumber = this.prefillData.parameters.boxNumber;
6468
+ }
6469
+ }
6197
6470
  this.autocompleteBoxNb.selectedAddress = address;
6198
6471
  this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
6199
6472
  }
6200
6473
  else {
6201
6474
  const prefillBoxNumber = this.prefillData.parameters.boxNumber;
6202
- const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
6475
+ const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
6476
+ ? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
6477
+ : null;
6203
6478
  if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
6204
6479
  this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6205
6480
  }
6206
- else {
6207
- // address.boxNumber = prefillBoxNumber;
6481
+ else if (address) {
6482
+ address.boxNumber = prefillBoxNumber;
6483
+ if (this.notInListAllowed && this.prefillData.parameters.streetNumber) {
6484
+ address.houseNumber = this.prefillData.parameters.streetNumber;
6485
+ }
6208
6486
  address.searchBarString = prefillBoxNumber;
6487
+ // For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
6488
+ // - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
6489
+ // - pdpId is also cleared when street number was also not-in-list (both invalid).
6490
+ const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
6491
+ address.mailBoxId = null;
6492
+ address.mailBoxid = null;
6493
+ address.suffixId = null;
6494
+ if (address.geoSanction) {
6495
+ address.geoSanction = address.geoSanction.substring(0, 35);
6496
+ }
6497
+ if (streetNumberWasNotInList) {
6498
+ address.pdpId = null;
6499
+ if (address.geoSanction) {
6500
+ address.geoSanction = address.geoSanction.substring(0, 25);
6501
+ }
6502
+ }
6209
6503
  this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
6210
6504
  }
6211
6505
  }
@@ -6219,29 +6513,68 @@ class LibAddressAutocompleteByComponentComponent {
6219
6513
  if (data.prefillBoxNumberPerfectMatchFound === true) {
6220
6514
  const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
6221
6515
  const address = suggestion.address;
6516
+ // When notInListAllowed, ensure user's prefilled values are used
6517
+ if (this.notInListAllowed) {
6518
+ if (this.prefillData.parameters.streetNumber) {
6519
+ address.houseNumber = this.prefillData.parameters.streetNumber;
6520
+ }
6521
+ if (this.prefillData.parameters.boxNumber) {
6522
+ address.boxNumber = this.prefillData.parameters.boxNumber;
6523
+ }
6524
+ }
6222
6525
  this.autocompleteBoxNb.selectedAddress = address;
6223
6526
  this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
6224
6527
  }
6225
6528
  else {
6226
6529
  const prefillBoxNumber = this.prefillData.parameters.boxNumber;
6227
- const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
6530
+ const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
6531
+ ? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
6532
+ : null;
6228
6533
  if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
6229
6534
  this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6230
6535
  }
6231
- else {
6232
- // address.boxNumber = prefillBoxNumber;
6233
- address.searchBarString = prefillBoxNumber;
6234
- this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
6536
+ else if (address) {
6537
+ if (!this.notInListAllowed) {
6538
+ // notInListAllowed=false: the box number is invalid and must not appear in the
6539
+ // selected address or address component. Complete the address at street-number
6540
+ // level so the emitted address contains only the valid street number.
6541
+ this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
6542
+ }
6543
+ else {
6544
+ // notInListAllowed=true: include the prefilled box number as-is (not-in-list)
6545
+ address.boxNumber = prefillBoxNumber;
6546
+ if (this.prefillData.parameters.streetNumber) {
6547
+ address.houseNumber = this.prefillData.parameters.streetNumber;
6548
+ }
6549
+ address.searchBarString = prefillBoxNumber;
6550
+ // For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
6551
+ // - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
6552
+ // - pdpId is also cleared when street number was also not-in-list (both invalid).
6553
+ const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
6554
+ address.mailBoxId = null;
6555
+ address.mailBoxid = null;
6556
+ address.suffixId = null;
6557
+ if (address.geoSanction) {
6558
+ address.geoSanction = address.geoSanction.substring(0, 35);
6559
+ }
6560
+ if (streetNumberWasNotInList) {
6561
+ address.pdpId = null;
6562
+ if (address.geoSanction) {
6563
+ address.geoSanction = address.geoSanction.substring(0, 25);
6564
+ }
6565
+ }
6566
+ this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
6567
+ }
6235
6568
  }
6236
6569
  }
6237
6570
  this.quitPrefillMode();
6238
6571
  }
6239
6572
  }
6240
6573
  LibAddressAutocompleteByComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, deps: [{ token: HttpService }], target: i0.ɵɵFactoryTarget.Component });
6241
- LibAddressAutocompleteByComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: LibAddressAutocompleteByComponentComponent, selector: "bp-lib-address-autocomplete-by-component", inputs: { inputLang: "inputLang", clearInput: "clearInput", validationMessageOption: "validationMessageOption", defaultLang: "defaultLang", showDebugMessageToConsole: "showDebugMessageToConsole", minLevel: "minLevel", notInListAllowed: "notInListAllowed", addressParams: "addressParams", messageOption: "messageOption", localityUrl: "localityUrl", maxSuggestionLocality: "maxSuggestionLocality", visibleSuggestionLocalityCount: "visibleSuggestionLocalityCount", sortCriteriaLocality: "sortCriteriaLocality", streetUrl: "streetUrl", maxSuggestionStreet: "maxSuggestionStreet", visibleSuggestionStreetCount: "visibleSuggestionStreetCount", sortCriteriaStreet: "sortCriteriaStreet", streetNumberUrl: "streetNumberUrl", maxSuggestionStreetNb: "maxSuggestionStreetNb", visibleSuggestionStreetNbCount: "visibleSuggestionStreetNbCount", sortCriteriaStreetNb: "sortCriteriaStreetNb", boxNumberUrl: "boxNumberUrl", maxSuggestionBoxNb: "maxSuggestionBoxNb", visibleSuggestionBoxNbCount: "visibleSuggestionBoxNbCount", sortCriteriaBoxNb: "sortCriteriaBoxNb", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", suggestionLevel: "suggestionLevel", apiKey: "apiKey", isReadonly: "isReadonly", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse", includeListOfBoxes: "includeListOfBoxes", includeListOfBusinessNameWithBoxes: "includeListOfBusinessNameWithBoxes" }, outputs: { addressCompleteEventEmitter: "addressCompleteEventEmitter", validationMessageEventEmitter: "validationMessageEventEmitter", clearInputEventEmitter: "clearInputEventEmitter", validatedByBackendEventEmitter: "validatedByBackendEventEmitter", numberOfExceptionsEventEmitter: "numberOfExceptionsEventEmitter" }, viewQueries: [{ propertyName: "autocompleteLocality", first: true, predicate: LocalityComponent, descendants: true }, { propertyName: "autocompleteStreet", first: true, predicate: StreetComponent, descendants: true }, { propertyName: "autocompleteStreetNb", first: true, predicate: StreetNumberComponent, descendants: true }, { propertyName: "autocompleteBoxNb", first: true, predicate: BoxNumberComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\r\n [prefillData]=\"streetPrefillData\"\r\n [autofillData]=\"streetNameAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetName'\"\r\n [inputText]=\"streetNameInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\"\r\n [locality]=\"locality\"\r\n [sortCriteria]=\"sortCriteriaStreet\" \r\n [maxSuggesionCount]=\"maxSuggestionStreet\"\r\n [visibleSuggesionCount]=\"visibleSuggestionStreetCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\r\n [autofillData]=\"streetNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetNumber'\"\r\n [inputText]=\"streetNumberInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\"\r\n [sortCriteria]=\"sortCriteriaStreetNb\"\r\n [maxSuggesionCount]=\"maxSuggestionStreetNb\" \r\n [visibleSuggesionCount]=\"visibleSuggestionStreetNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [autofillData]=\"boxNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.boxNumber'\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\" \r\n [streetNumber]=\"streetNumber\"\r\n [sortCriteria]=\"sortCriteriaBoxNb\" \r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""], components: [{ type: LocalityComponent, selector: "bp-locality", inputs: ["labelResourceKey", "messageOption", "maxSuggesionCount", "visibleSuggestionCount", "sortCriteria", "baseUrl", "inputText", "prefillData", "showDebugMessageToConsole", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "nis9InResponse", "businessNameInResponse", "inputLang", "isReadonly", "allowNoValidation", "validatedByBackend", "numberOfExceptions"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetComponent, selector: "bp-street", inputs: ["labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "prefillData", "autofillData", "showDebugMessageToConsole", "postalCode", "locality", "inputText", "messageOption", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "isReadonly"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetNumberComponent, selector: "bp-street-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "notInListAllowed", "selectedAddress", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "nis9InResponse", "businessNameInResponse", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "messageOption", "inputText", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "streetNumberChanged", "numberOfExceptionsEmitter"] }, { type: BoxNumberComponent, selector: "bp-box-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "streetNumber", "selectedAddress", "notInListAllowed", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "isReadonly", "suggestionLevel", "nis9InResponse", "businessNameInResponse"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "boxNumberChanged", "numberOfExceptionsEmitter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6574
+ LibAddressAutocompleteByComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: LibAddressAutocompleteByComponentComponent, selector: "bp-lib-address-autocomplete-by-component", inputs: { inputLang: "inputLang", clearInput: "clearInput", validationMessageOption: "validationMessageOption", defaultLang: "defaultLang", showDebugMessageToConsole: "showDebugMessageToConsole", minLevel: "minLevel", notInListAllowed: "notInListAllowed", addressParams: "addressParams", messageOption: "messageOption", localityUrl: "localityUrl", maxSuggestionLocality: "maxSuggestionLocality", visibleSuggestionLocalityCount: "visibleSuggestionLocalityCount", sortCriteriaLocality: "sortCriteriaLocality", streetUrl: "streetUrl", maxSuggestionStreet: "maxSuggestionStreet", visibleSuggestionStreetCount: "visibleSuggestionStreetCount", sortCriteriaStreet: "sortCriteriaStreet", streetNumberUrl: "streetNumberUrl", maxSuggestionStreetNb: "maxSuggestionStreetNb", visibleSuggestionStreetNbCount: "visibleSuggestionStreetNbCount", sortCriteriaStreetNb: "sortCriteriaStreetNb", boxNumberUrl: "boxNumberUrl", maxSuggestionBoxNb: "maxSuggestionBoxNb", visibleSuggestionBoxNbCount: "visibleSuggestionBoxNbCount", sortCriteriaBoxNb: "sortCriteriaBoxNb", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", suggestionLevel: "suggestionLevel", apiKey: "apiKey", isReadonly: "isReadonly", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse", includeListOfBoxes: "includeListOfBoxes", includeListOfBusinessNameWithBoxes: "includeListOfBusinessNameWithBoxes" }, outputs: { addressCompleteEventEmitter: "addressCompleteEventEmitter", validationMessageEventEmitter: "validationMessageEventEmitter", clearInputEventEmitter: "clearInputEventEmitter", validatedByBackendEventEmitter: "validatedByBackendEventEmitter", numberOfExceptionsEventEmitter: "numberOfExceptionsEventEmitter" }, viewQueries: [{ propertyName: "autocompleteLocality", first: true, predicate: LocalityComponent, descendants: true }, { propertyName: "autocompleteStreet", first: true, predicate: StreetComponent, descendants: true }, { propertyName: "autocompleteStreetNb", first: true, predicate: StreetNumberComponent, descendants: true }, { propertyName: "autocompleteBoxNb", first: true, predicate: BoxNumberComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n\t\t[nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\r\n [prefillData]=\"streetPrefillData\"\r\n [autofillData]=\"streetNameAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetName'\"\r\n [inputText]=\"streetNameInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\"\r\n [locality]=\"locality\"\r\n [sortCriteria]=\"sortCriteriaStreet\" \r\n [maxSuggesionCount]=\"maxSuggestionStreet\"\r\n [visibleSuggesionCount]=\"visibleSuggestionStreetCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\r\n [autofillData]=\"streetNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetNumber'\"\r\n [inputText]=\"streetNumberInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\"\r\n [sortCriteria]=\"sortCriteriaStreetNb\"\r\n [maxSuggesionCount]=\"maxSuggestionStreetNb\" \r\n [visibleSuggesionCount]=\"visibleSuggestionStreetNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [autofillData]=\"boxNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.boxNumber'\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\" \r\n [streetNumber]=\"streetNumber\"\r\n [sortCriteria]=\"sortCriteriaBoxNb\" \r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""], components: [{ type: LocalityComponent, selector: "bp-locality", inputs: ["labelResourceKey", "messageOption", "maxSuggesionCount", "visibleSuggestionCount", "sortCriteria", "baseUrl", "inputText", "prefillData", "showDebugMessageToConsole", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "nis9InResponse", "businessNameInResponse", "inputLang", "isReadonly", "allowNoValidation", "validatedByBackend", "numberOfExceptions"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetComponent, selector: "bp-street", inputs: ["labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "prefillData", "autofillData", "showDebugMessageToConsole", "postalCode", "locality", "inputText", "messageOption", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "isReadonly"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetNumberComponent, selector: "bp-street-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "notInListAllowed", "selectedAddress", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "nis9InResponse", "businessNameInResponse", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "messageOption", "inputText", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "streetNumberChanged", "numberOfExceptionsEmitter"] }, { type: BoxNumberComponent, selector: "bp-box-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "streetNumber", "selectedAddress", "notInListAllowed", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "isReadonly", "suggestionLevel", "nis9InResponse", "businessNameInResponse"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "boxNumberChanged", "numberOfExceptionsEmitter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6242
6575
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
6243
6576
  type: Component,
6244
- args: [{ selector: 'bp-lib-address-autocomplete-by-component', template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\r\n [prefillData]=\"streetPrefillData\"\r\n [autofillData]=\"streetNameAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetName'\"\r\n [inputText]=\"streetNameInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\"\r\n [locality]=\"locality\"\r\n [sortCriteria]=\"sortCriteriaStreet\" \r\n [maxSuggesionCount]=\"maxSuggestionStreet\"\r\n [visibleSuggesionCount]=\"visibleSuggestionStreetCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\r\n [autofillData]=\"streetNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetNumber'\"\r\n [inputText]=\"streetNumberInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\"\r\n [sortCriteria]=\"sortCriteriaStreetNb\"\r\n [maxSuggesionCount]=\"maxSuggestionStreetNb\" \r\n [visibleSuggesionCount]=\"visibleSuggestionStreetNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [autofillData]=\"boxNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.boxNumber'\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\" \r\n [streetNumber]=\"streetNumber\"\r\n [sortCriteria]=\"sortCriteriaBoxNb\" \r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""] }]
6577
+ args: [{ selector: 'bp-lib-address-autocomplete-by-component', template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n\t\t[nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\r\n [prefillData]=\"streetPrefillData\"\r\n [autofillData]=\"streetNameAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetName'\"\r\n [inputText]=\"streetNameInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\"\r\n [locality]=\"locality\"\r\n [sortCriteria]=\"sortCriteriaStreet\" \r\n [maxSuggesionCount]=\"maxSuggestionStreet\"\r\n [visibleSuggesionCount]=\"visibleSuggestionStreetCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\r\n [autofillData]=\"streetNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetNumber'\"\r\n [inputText]=\"streetNumberInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\"\r\n [sortCriteria]=\"sortCriteriaStreetNb\"\r\n [maxSuggesionCount]=\"maxSuggestionStreetNb\" \r\n [visibleSuggesionCount]=\"visibleSuggestionStreetNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [autofillData]=\"boxNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.boxNumber'\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\" \r\n [streetNumber]=\"streetNumber\"\r\n [sortCriteria]=\"sortCriteriaBoxNb\" \r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""] }]
6245
6578
  }], ctorParameters: function () { return [{ type: HttpService }]; }, propDecorators: { autocompleteLocality: [{
6246
6579
  type: ViewChild,
6247
6580
  args: [LocalityComponent, { static: false }]