@bpost/bp-address-auto-complete-by-component 1.1.29 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION.md +6 -0
- package/esm2020/lib/box-number/box-number.component.mjs +98 -16
- package/esm2020/lib/lib-address-autocomplete-by-component.component.mjs +252 -45
- package/esm2020/lib/locality/locality.component.mjs +1 -1
- package/esm2020/lib/street-number/street-number.component.mjs +109 -32
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs +456 -90
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs +456 -90
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/lib/box-number/box-number.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
//
|
|
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,21 @@ 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
|
+
delete combined.latitude;
|
|
3075
|
+
delete combined.longitude;
|
|
3076
|
+
delete combined.perspectiveCode;
|
|
3077
|
+
delete combined.coordinateSystem;
|
|
3078
|
+
delete combined.reliability;
|
|
3079
|
+
delete combined.businessName;
|
|
3080
|
+
delete combined.listOfBoxes;
|
|
3081
|
+
delete combined.nis9;
|
|
3082
|
+
if (combined.geoSanction) {
|
|
3083
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
3084
|
+
}
|
|
3046
3085
|
// combined.boxNumber = combined.string;
|
|
3047
3086
|
combined.houseNumber = combined.string;
|
|
3048
3087
|
combined.searchBarString = combined.string;
|
|
@@ -3089,7 +3128,13 @@ class StreetNumberComponent {
|
|
|
3089
3128
|
suggestion.address = suggestionToAdd;
|
|
3090
3129
|
this.prefillCheckForPerfectMatch(suggestion);
|
|
3091
3130
|
}
|
|
3092
|
-
|
|
3131
|
+
// Skip checkForPerfectMatch when prefill already found a match to prevent a second
|
|
3132
|
+
// clickSuggestion call that would overwrite searchText with searchBarString.
|
|
3133
|
+
const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
|
|
3134
|
+
&& this.prefillData && this.prefillData.prefillStreetNumberPerfectMatchFound === true;
|
|
3135
|
+
if (!skipNonPrefillCheck
|
|
3136
|
+
&& this.suggestionLevel !== SuggestionLevelType.StreetNumber
|
|
3137
|
+
&& this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
3093
3138
|
suggestion.address = suggestionToAdd;
|
|
3094
3139
|
const isPerfectMatch = this.checkForPerfectMatch(suggestion);
|
|
3095
3140
|
if (!isPerfectMatch) {
|
|
@@ -3101,25 +3146,22 @@ class StreetNumberComponent {
|
|
|
3101
3146
|
}
|
|
3102
3147
|
checkForPerfectMatch(suggestion) {
|
|
3103
3148
|
if (!this.addressIsComplete) {
|
|
3104
|
-
// if (this.showDebugMessageToConsole) {
|
|
3105
|
-
console.log('streetNumber - checking suggestion for perfect match', suggestion, this.searchText);
|
|
3106
|
-
// }
|
|
3107
3149
|
const sugAddress = suggestion.address;
|
|
3108
3150
|
const suggestionStreetNumber = this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + sugAddress.houseNumber);
|
|
3109
3151
|
if (suggestionStreetNumber === ('' + this.searchText)) {
|
|
3110
3152
|
this.searchText = sugAddress.houseNumber;
|
|
3111
3153
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
3112
3154
|
this.clickSuggestion(null, sugAddress);
|
|
3155
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
3156
|
+
// Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
|
|
3157
|
+
this.searchText = sugAddress.houseNumber;
|
|
3113
3158
|
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
3159
|
return true;
|
|
3119
3160
|
}
|
|
3120
3161
|
else {
|
|
3121
3162
|
if (this.suggestionLevel !== SuggestionLevelType.StreetNumber && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
3122
3163
|
this.clickSuggestion(null, sugAddress); // house number found
|
|
3164
|
+
this.searchText = sugAddress.houseNumber;
|
|
3123
3165
|
}
|
|
3124
3166
|
}
|
|
3125
3167
|
}
|
|
@@ -3147,11 +3189,10 @@ class StreetNumberComponent {
|
|
|
3147
3189
|
this.searchText = sugAddress.houseNumber;
|
|
3148
3190
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
3149
3191
|
this.clickSuggestion(null, sugAddress);
|
|
3192
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
3193
|
+
// Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
|
|
3194
|
+
this.searchText = sugAddress.houseNumber;
|
|
3150
3195
|
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
3196
|
}
|
|
3156
3197
|
}
|
|
3157
3198
|
}
|
|
@@ -3186,7 +3227,6 @@ class StreetNumberComponent {
|
|
|
3186
3227
|
this.consumedNumber = this.sequenceNumber;
|
|
3187
3228
|
this.clearSuggestions();
|
|
3188
3229
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3189
|
-
console.log('(A) do not use suggestions for street number');
|
|
3190
3230
|
this.streetNumberChanged.emit(this.searchText);
|
|
3191
3231
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3192
3232
|
this.prefillAnalyzeData();
|
|
@@ -3194,7 +3234,6 @@ class StreetNumberComponent {
|
|
|
3194
3234
|
}
|
|
3195
3235
|
else {
|
|
3196
3236
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3197
|
-
console.log('(B) do not use suggestions for street number');
|
|
3198
3237
|
this.streetNumberChanged.emit(this.searchText);
|
|
3199
3238
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3200
3239
|
this.prefillAnalyzeData();
|
|
@@ -3231,6 +3270,7 @@ class StreetNumberComponent {
|
|
|
3231
3270
|
this.resetArrowSelectedIndex();
|
|
3232
3271
|
if (!source) {
|
|
3233
3272
|
this.prefilling = false;
|
|
3273
|
+
this.isPrefillWithNoMatch = false;
|
|
3234
3274
|
if (this.showDebugMessageToConsole) {
|
|
3235
3275
|
console.log('streetNumber::onInputChange -> calling valueChanged');
|
|
3236
3276
|
}
|
|
@@ -3242,7 +3282,6 @@ class StreetNumberComponent {
|
|
|
3242
3282
|
this.consumedNumber = this.sequenceNumber;
|
|
3243
3283
|
this.clearSuggestions();
|
|
3244
3284
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3245
|
-
console.log('(A) do not use suggestions for street number');
|
|
3246
3285
|
this.streetNumberChanged.emit(this.searchText);
|
|
3247
3286
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3248
3287
|
this.prefillAnalyzeData();
|
|
@@ -3250,7 +3289,6 @@ class StreetNumberComponent {
|
|
|
3250
3289
|
}
|
|
3251
3290
|
else {
|
|
3252
3291
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3253
|
-
console.log('(B) do not use suggestions for street number');
|
|
3254
3292
|
this.streetNumberChanged.emit(this.searchText);
|
|
3255
3293
|
if (source === SourceType.SOURCE_PREFILLED) {
|
|
3256
3294
|
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
@@ -3302,6 +3340,38 @@ class StreetNumberComponent {
|
|
|
3302
3340
|
}
|
|
3303
3341
|
}
|
|
3304
3342
|
else {
|
|
3343
|
+
// If prefilling, check whether the street suggestion already carries the matching house number
|
|
3344
|
+
// (e.g. postal code 1031 where the street API returns data up to house-number level).
|
|
3345
|
+
// In that case skip the street-number API call and go straight to the box-number step.
|
|
3346
|
+
if (source === SourceType.SOURCE_PREFILLED
|
|
3347
|
+
&& this.prefillData
|
|
3348
|
+
&& this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
3349
|
+
&& this.prefillData.prefillStreetPerfectMatchSuggestion.address) {
|
|
3350
|
+
const streetAddr = this.prefillData.prefillStreetPerfectMatchSuggestion.address;
|
|
3351
|
+
const rawHouseNumber = streetAddr.houseNumber;
|
|
3352
|
+
const streetHouseNumber = (rawHouseNumber != null && rawHouseNumber !== undefined)
|
|
3353
|
+
? this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + rawHouseNumber)
|
|
3354
|
+
: null;
|
|
3355
|
+
// Use the house number from the street suggestion when:
|
|
3356
|
+
// (a) it exactly matches the prefilled value, OR
|
|
3357
|
+
// (b) notInListAllowed=false — the prefilled value is invalid so auto-fill with
|
|
3358
|
+
// the valid house number that the locality/street API already returned.
|
|
3359
|
+
const streetHouseNumberIsValid = streetHouseNumber && streetHouseNumber !== 'null' && streetHouseNumber !== 'undefined';
|
|
3360
|
+
if (streetHouseNumberIsValid && this.prefillData.prefillStreetNumber
|
|
3361
|
+
&& (streetHouseNumber === this.prefillData.prefillStreetNumber || !this.notInListAllowed)) {
|
|
3362
|
+
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
3363
|
+
this.prefillData.prefillStreetNumberPerfectMatchSuggestion = this.prefillData.prefillStreetPerfectMatchSuggestion;
|
|
3364
|
+
this.searchText = rawHouseNumber;
|
|
3365
|
+
this.isPrefillWithNoMatch = false;
|
|
3366
|
+
this.collapseDropdown = true;
|
|
3367
|
+
if (streetAddr.hasOwnProperty('isComplete') && streetAddr.isComplete === true) {
|
|
3368
|
+
this.clickSuggestion(null, streetAddr);
|
|
3369
|
+
this.addressIsComplete = true;
|
|
3370
|
+
}
|
|
3371
|
+
this.prefillAnalyzeData();
|
|
3372
|
+
return;
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3305
3375
|
this.getTopSuggestions(source);
|
|
3306
3376
|
}
|
|
3307
3377
|
}
|
|
@@ -3331,7 +3401,7 @@ class StreetNumberComponent {
|
|
|
3331
3401
|
console.log('streetNumber::clickSuggestion - NOT-IN-LIST', event, suggestion);
|
|
3332
3402
|
}
|
|
3333
3403
|
}
|
|
3334
|
-
if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.
|
|
3404
|
+
if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) {
|
|
3335
3405
|
this.addressIsComplete = true;
|
|
3336
3406
|
// this.notifyAddressIsValidated();
|
|
3337
3407
|
}
|
|
@@ -3349,11 +3419,18 @@ class StreetNumberComponent {
|
|
|
3349
3419
|
const combined = { ...this.selectedAddress, ...suggestion };
|
|
3350
3420
|
delete combined.latitude;
|
|
3351
3421
|
delete combined.longitude;
|
|
3422
|
+
delete combined.perspectiveCode;
|
|
3423
|
+
delete combined.coordinateSystem;
|
|
3424
|
+
delete combined.reliability;
|
|
3425
|
+
delete combined.businessName;
|
|
3426
|
+
delete combined.listOfBoxes;
|
|
3427
|
+
delete combined.nis9;
|
|
3352
3428
|
delete combined.mailboxId;
|
|
3353
3429
|
delete combined.pdpId;
|
|
3354
3430
|
delete combined.suffixId;
|
|
3355
|
-
|
|
3356
|
-
|
|
3431
|
+
if (combined.geoSanction) {
|
|
3432
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
3433
|
+
}
|
|
3357
3434
|
combined.houseNumber = combined.string;
|
|
3358
3435
|
combined.searchBarString = combined.string;
|
|
3359
3436
|
combined.isComplete = true;
|
|
@@ -3363,7 +3440,7 @@ class StreetNumberComponent {
|
|
|
3363
3440
|
// console.log('street number - emit suggestion', suggestion);
|
|
3364
3441
|
const notInList = suggestion['not-in-list'];
|
|
3365
3442
|
const isNotInList = notInList !== null && notInList !== undefined && notInList === true;
|
|
3366
|
-
this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.
|
|
3443
|
+
this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) ? true : false;
|
|
3367
3444
|
this.addressChanged.emit(suggestion);
|
|
3368
3445
|
}
|
|
3369
3446
|
/*
|
|
@@ -3776,9 +3853,14 @@ class BoxNumberComponent {
|
|
|
3776
3853
|
}
|
|
3777
3854
|
ngOnChanges(changes) {
|
|
3778
3855
|
if (changes) {
|
|
3779
|
-
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
3780
|
-
this.
|
|
3781
|
-
|
|
3856
|
+
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
3857
|
+
&& !this.prefilling && !changes.hasOwnProperty('prefillData')) {
|
|
3858
|
+
const newBoxNumber = changes.autofillData.currentValue.boxNumber;
|
|
3859
|
+
// Only process if the box number value actually changed to avoid infinite loop
|
|
3860
|
+
if (newBoxNumber !== this.searchText) {
|
|
3861
|
+
this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
|
|
3862
|
+
this.setSelectedAddress(this.autofillData.selectedAddress);
|
|
3863
|
+
}
|
|
3782
3864
|
}
|
|
3783
3865
|
else {
|
|
3784
3866
|
if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
|
|
@@ -3786,11 +3868,28 @@ class BoxNumberComponent {
|
|
|
3786
3868
|
this.searchText = this.loadParams(changes.prefillData.currentValue);
|
|
3787
3869
|
if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.BOX_NUMBER) {
|
|
3788
3870
|
// this.onInputChange('prefilled');
|
|
3789
|
-
// this.boxNumberSearchInput.nativeElement.focus();
|
|
3790
3871
|
this.collapseDropdown = true;
|
|
3791
3872
|
this.prefillData.prefillBoxNumber
|
|
3792
3873
|
= this.transformBoxNumberInLowercaseAndWithoutDiacritics(this.prefillData.parameters.boxNumber);
|
|
3793
|
-
|
|
3874
|
+
// When notInListAllowed=false, skip the API call if the selected address is
|
|
3875
|
+
// already complete without a box number (i.e. no box numbers exist for this
|
|
3876
|
+
// address in the database). In that case any prefilled box number is invalid
|
|
3877
|
+
// and the API would return empty results anyway.
|
|
3878
|
+
const selectedAddressIsCompleteWithoutBoxNumber = this.selectedAddress != null &&
|
|
3879
|
+
this.selectedAddress.isComplete === true &&
|
|
3880
|
+
!this.selectedAddress.hasOwnProperty('boxNumber');
|
|
3881
|
+
if (!this.notInListAllowed && selectedAddressIsCompleteWithoutBoxNumber) {
|
|
3882
|
+
this.isPrefillWithNoMatch = true;
|
|
3883
|
+
this.prefillAnalyzeData();
|
|
3884
|
+
}
|
|
3885
|
+
else {
|
|
3886
|
+
this.onInputChange(/*'prefilled'*/ SourceType.SOURCE_PREFILLED);
|
|
3887
|
+
}
|
|
3888
|
+
setTimeout(() => {
|
|
3889
|
+
if (this.boxNumberSearchInput && this.boxNumberSearchInput.nativeElement && !this.boxNumberSearchInput.nativeElement.disabled) {
|
|
3890
|
+
this.boxNumberSearchInput.nativeElement.focus();
|
|
3891
|
+
}
|
|
3892
|
+
}, 0);
|
|
3794
3893
|
}
|
|
3795
3894
|
}
|
|
3796
3895
|
if (changes.hasOwnProperty('streetNumber') && !changes.streetNumber.firstChange && !changes.hasOwnProperty('prefillData')) {
|
|
@@ -3930,11 +4029,24 @@ class BoxNumberComponent {
|
|
|
3930
4029
|
console.log('BOX-NUMBER calling service params', param);
|
|
3931
4030
|
}
|
|
3932
4031
|
if (this.searchText) {
|
|
4032
|
+
this.addressIsValidated = false;
|
|
3933
4033
|
this.subscription = this.addressService.getBox(this.baseUrl, this.locality, this.postalCode, param)
|
|
3934
4034
|
.subscribe(response => {
|
|
3935
4035
|
this.handleGetBoxResponse(response, source);
|
|
3936
4036
|
if (source === SourceType.SOURCE_PREFILLED) {
|
|
3937
4037
|
this.isPrefillWithNoMatch = this.prefillData.prefillBoxNumberPerfectMatchFound === true ? false : true;
|
|
4038
|
+
// Ensure user's prefill value is displayed when notInListAllowed
|
|
4039
|
+
if (this.notInListAllowed && this.prefillData.prefillBoxNumber) {
|
|
4040
|
+
this.searchText = this.prefillData.parameters.boxNumber;
|
|
4041
|
+
this.isPrefillWithNoMatch = false;
|
|
4042
|
+
}
|
|
4043
|
+
// If notInListAllowed is false and no perfect match, keep the prefilled value
|
|
4044
|
+
// but show it in orangered so the user sees it was not found in the API.
|
|
4045
|
+
if (!this.notInListAllowed && this.prefillData.prefillBoxNumber !== ''
|
|
4046
|
+
&& this.prefillData.prefillBoxNumberPerfectMatchFound !== true) {
|
|
4047
|
+
this.searchText = this.prefillData.parameters.boxNumber;
|
|
4048
|
+
this.isPrefillWithNoMatch = true;
|
|
4049
|
+
}
|
|
3938
4050
|
this.prefillAnalyzeData();
|
|
3939
4051
|
}
|
|
3940
4052
|
else {
|
|
@@ -4128,10 +4240,12 @@ class BoxNumberComponent {
|
|
|
4128
4240
|
&& this.prefillData.prefillBoxNumber.length > 0) {
|
|
4129
4241
|
// const notInListSuggestion = {string: this.searchText, 'not-in-list': true};
|
|
4130
4242
|
const suggestion = this.prefillBuildNotInListSuggestion();
|
|
4131
|
-
if (
|
|
4132
|
-
|
|
4243
|
+
if (suggestion) {
|
|
4244
|
+
if (this.showDebugMessageToConsole) {
|
|
4245
|
+
console.log('BOX NUMBER - PREFILL NOT IN LIST SUGGESTION:', suggestion);
|
|
4246
|
+
}
|
|
4247
|
+
this.prefillCheckForPerfectMatch(suggestion);
|
|
4133
4248
|
}
|
|
4134
|
-
this.prefillCheckForPerfectMatch(suggestion);
|
|
4135
4249
|
}
|
|
4136
4250
|
}
|
|
4137
4251
|
}
|
|
@@ -4142,9 +4256,33 @@ class BoxNumberComponent {
|
|
|
4142
4256
|
prefillBuildNotInListSuggestion() {
|
|
4143
4257
|
const notInListSuggestion = { string: this.searchText, 'not-in-list': true };
|
|
4144
4258
|
const streetNumberSuggestion = this.prefillData.prefillStreetNumberPerfectMatchSuggestion;
|
|
4259
|
+
if (!streetNumberSuggestion || !streetNumberSuggestion.address) {
|
|
4260
|
+
return null;
|
|
4261
|
+
}
|
|
4262
|
+
// Capture whether the street-number suggestion was itself not-in-list (invalid)
|
|
4263
|
+
// BEFORE merging — spreading notInListSuggestion on top would mask the original flag.
|
|
4264
|
+
const streetNumberWasNotInList = streetNumberSuggestion.address['not-in-list'] === true;
|
|
4145
4265
|
const combined = { ...streetNumberSuggestion.address, ...notInListSuggestion };
|
|
4146
|
-
delete combined.mailBoxid;
|
|
4266
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
4267
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
4147
4268
|
delete combined.suffixId;
|
|
4269
|
+
delete combined.businessName;
|
|
4270
|
+
delete combined.listOfBoxes;
|
|
4271
|
+
if (combined.geoSanction) {
|
|
4272
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
4273
|
+
}
|
|
4274
|
+
if (streetNumberWasNotInList) {
|
|
4275
|
+
delete combined.pdpId;
|
|
4276
|
+
if (combined.geoSanction) {
|
|
4277
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
4278
|
+
}
|
|
4279
|
+
delete combined.latitude;
|
|
4280
|
+
delete combined.longitude;
|
|
4281
|
+
delete combined.perspectiveCode;
|
|
4282
|
+
delete combined.coordinateSystem;
|
|
4283
|
+
delete combined.reliability;
|
|
4284
|
+
delete combined.nis9;
|
|
4285
|
+
}
|
|
4148
4286
|
combined.boxNumber = combined.string;
|
|
4149
4287
|
combined.searchBarString = combined.string;
|
|
4150
4288
|
combined.isComplete = true;
|
|
@@ -4178,7 +4316,11 @@ class BoxNumberComponent {
|
|
|
4178
4316
|
suggestion.address = suggestionToAdd;
|
|
4179
4317
|
isPerfectMatch = this.prefillCheckForPerfectMatch(suggestion);
|
|
4180
4318
|
}
|
|
4181
|
-
|
|
4319
|
+
// Skip checkForPerfectMatch when prefill already found a match to prevent a second
|
|
4320
|
+
// clickSuggestion call that would overwrite searchText with searchBarString.
|
|
4321
|
+
const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
|
|
4322
|
+
&& this.prefillData && this.prefillData.prefillBoxNumberPerfectMatchFound === true;
|
|
4323
|
+
if (!skipNonPrefillCheck && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
4182
4324
|
suggestion.address = suggestionToAdd;
|
|
4183
4325
|
isPerfectMatch = this.checkForPerfectMatch(suggestion);
|
|
4184
4326
|
if (!isPerfectMatch) {
|
|
@@ -4203,7 +4345,9 @@ class BoxNumberComponent {
|
|
|
4203
4345
|
this.searchText = sugAddress.boxNumber;
|
|
4204
4346
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
4205
4347
|
this.clickSuggestion(null, sugAddress);
|
|
4206
|
-
//
|
|
4348
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
4349
|
+
// Restore to boxNumber so the field shows the clean box number value.
|
|
4350
|
+
this.searchText = sugAddress.boxNumber;
|
|
4207
4351
|
if (this.showDebugMessageToConsole) {
|
|
4208
4352
|
console.log('ADDRESS COMPLETE ON BOX NUMBER !');
|
|
4209
4353
|
}
|
|
@@ -4230,7 +4374,9 @@ class BoxNumberComponent {
|
|
|
4230
4374
|
this.searchText = sugAddress.boxNumber;
|
|
4231
4375
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
4232
4376
|
this.clickSuggestion(null, sugAddress);
|
|
4233
|
-
//
|
|
4377
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
4378
|
+
// Restore to boxNumber so the field shows the clean box number value.
|
|
4379
|
+
this.searchText = sugAddress.boxNumber;
|
|
4234
4380
|
if (this.showDebugMessageToConsole) {
|
|
4235
4381
|
console.log('ADDRESS COMPLETE ON BOX NUMBER !');
|
|
4236
4382
|
}
|
|
@@ -4379,14 +4525,22 @@ class BoxNumberComponent {
|
|
|
4379
4525
|
modifySelectedAddress(suggestion) {
|
|
4380
4526
|
const combined = { ...this.selectedAddress, ...suggestion };
|
|
4381
4527
|
delete combined.mailBoxid;
|
|
4528
|
+
delete combined.mailBoxId;
|
|
4382
4529
|
delete combined.suffixId;
|
|
4530
|
+
delete combined.businessName;
|
|
4531
|
+
delete combined.listOfBoxes;
|
|
4532
|
+
if (combined.geoSanction) {
|
|
4533
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
4534
|
+
}
|
|
4383
4535
|
combined.boxNumber = combined.string;
|
|
4384
4536
|
combined.searchBarString = combined.string;
|
|
4385
4537
|
combined.isComplete = true;
|
|
4386
4538
|
return combined;
|
|
4387
4539
|
}
|
|
4388
4540
|
setSelectedAddress(suggestion) {
|
|
4389
|
-
|
|
4541
|
+
if (this.showDebugMessageToConsole) {
|
|
4542
|
+
console.log('box number::setSelectedAddress', suggestion);
|
|
4543
|
+
}
|
|
4390
4544
|
this.addressIsValidated = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true) ? true : false;
|
|
4391
4545
|
this.addressChanged.emit(suggestion);
|
|
4392
4546
|
}
|
|
@@ -4617,6 +4771,11 @@ class BoxNumberComponent {
|
|
|
4617
4771
|
isDisabled() {
|
|
4618
4772
|
return (this.locality === '' || this.postalCode === '' || this.minLevel > ADDRESSLEVEL.BOX_NUMBER);
|
|
4619
4773
|
}
|
|
4774
|
+
isDisabledByPrefill() {
|
|
4775
|
+
return this.prefillData !== null && this.prefillData !== undefined
|
|
4776
|
+
&& this.prefillData.parameters !== null && this.prefillData.parameters !== undefined
|
|
4777
|
+
&& !this.isValid(this.prefillData.parameters.boxNumber);
|
|
4778
|
+
}
|
|
4620
4779
|
onInputClick() {
|
|
4621
4780
|
if (this.showDebugMessageToConsole) {
|
|
4622
4781
|
console.log('box number click');
|
|
@@ -4624,10 +4783,10 @@ class BoxNumberComponent {
|
|
|
4624
4783
|
}
|
|
4625
4784
|
}
|
|
4626
4785
|
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 } });
|
|
4786
|
+
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
4787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, decorators: [{
|
|
4629
4788
|
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: [""] }]
|
|
4789
|
+
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
4790
|
}], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { boxNumberSearchInput: [{
|
|
4632
4791
|
type: ViewChild,
|
|
4633
4792
|
args: ['boxNumberSearchInput', { static: false }]
|
|
@@ -5211,6 +5370,11 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5211
5370
|
this.boxNumberAutofillData = this.autofillData;
|
|
5212
5371
|
}
|
|
5213
5372
|
}
|
|
5373
|
+
if (this.minLevel == ADDRESSLEVEL.BOX_NUMBER) {
|
|
5374
|
+
if (this.selectedAddress.boxNumber) {
|
|
5375
|
+
this.boxNumberAutofillData = this.autofillData;
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5214
5378
|
}
|
|
5215
5379
|
this.addressCompleteEventEmitter.emit(this.selectedAddress);
|
|
5216
5380
|
this.emittedAddress = this.selectedAddress;
|
|
@@ -5660,9 +5824,15 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5660
5824
|
this.autocompleteBoxNb.clearWidget();
|
|
5661
5825
|
this.autocompleteBoxNb.searchText = '';
|
|
5662
5826
|
*/
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5827
|
+
// Guard: only clear when street-number is not already validated.
|
|
5828
|
+
// resetStreet() always sets addressIsComplete=false before calling setAddress(null,3),
|
|
5829
|
+
// so user-initiated street changes are unaffected. Without this guard the post-prefill
|
|
5830
|
+
// autofill CD cycle clears searchText causing a inputText mismatch -> clearWidget().
|
|
5831
|
+
if (!this.autocompleteStreetNb.addressIsComplete) {
|
|
5832
|
+
this.autocompleteStreetNb.searchText = '';
|
|
5833
|
+
this.autocompleteBoxNb.searchText = '';
|
|
5834
|
+
this.autocompleteBoxNb.streetNumber = '';
|
|
5835
|
+
}
|
|
5666
5836
|
break;
|
|
5667
5837
|
// STREET Number
|
|
5668
5838
|
case 2:
|
|
@@ -5743,8 +5913,31 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5743
5913
|
console.log('lib::setAddressStreetNumber - streetnumber: ', streetNumber);
|
|
5744
5914
|
console.log('lib::setAddressStreetNumber - streetAddress: ', this.streetAddress);
|
|
5745
5915
|
}
|
|
5746
|
-
this.
|
|
5747
|
-
|
|
5916
|
+
if (this.suggestionLevel === SuggestionLevelType.None && this.streetAddress.streetNumber !== streetNumber) {
|
|
5917
|
+
const combined = { ...this.streetAddress };
|
|
5918
|
+
delete combined.pdpId;
|
|
5919
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
5920
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
5921
|
+
delete combined.suffixId;
|
|
5922
|
+
delete combined.isComplete;
|
|
5923
|
+
delete combined.latitude;
|
|
5924
|
+
delete combined.longitude;
|
|
5925
|
+
delete combined.perspectiveCode;
|
|
5926
|
+
delete combined.coordinateSystem;
|
|
5927
|
+
delete combined.reliability;
|
|
5928
|
+
delete combined.businessName;
|
|
5929
|
+
delete combined.listOfBoxes;
|
|
5930
|
+
delete combined.nis9;
|
|
5931
|
+
if (combined.geoSanction) {
|
|
5932
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
5933
|
+
}
|
|
5934
|
+
this.streetNumberAddress = combined;
|
|
5935
|
+
this.selectedAddress = combined;
|
|
5936
|
+
}
|
|
5937
|
+
else {
|
|
5938
|
+
this.streetNumberAddress = this.streetAddress;
|
|
5939
|
+
this.selectedAddress = this.streetAddress;
|
|
5940
|
+
}
|
|
5748
5941
|
this.selectedAddress.houseNumber = streetNumber;
|
|
5749
5942
|
this.selectedAddress.streetNumber = streetNumber;
|
|
5750
5943
|
/*
|
|
@@ -5763,7 +5956,22 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5763
5956
|
setAddressBoxNumber(boxNumber) {
|
|
5764
5957
|
console.log('set box number value:', boxNumber);
|
|
5765
5958
|
//this.streetNumberAddress = this.streetAddress;
|
|
5766
|
-
this.
|
|
5959
|
+
if ((this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) && this.streetNumberAddress.boxNumber !== boxNumber) {
|
|
5960
|
+
const combined = { ...this.streetNumberAddress };
|
|
5961
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
5962
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
5963
|
+
delete combined.suffixId;
|
|
5964
|
+
delete combined.isComplete;
|
|
5965
|
+
delete combined.businessName;
|
|
5966
|
+
delete combined.listOfBoxes;
|
|
5967
|
+
if (combined.geoSanction) {
|
|
5968
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
5969
|
+
}
|
|
5970
|
+
this.selectedAddress = combined;
|
|
5971
|
+
}
|
|
5972
|
+
else {
|
|
5973
|
+
this.selectedAddress = this.streetNumberAddress;
|
|
5974
|
+
}
|
|
5767
5975
|
this.selectedAddress.boxNumber = boxNumber;
|
|
5768
5976
|
this.boxNumber = boxNumber;
|
|
5769
5977
|
this.notifyAddressComplete();
|
|
@@ -5879,7 +6087,23 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5879
6087
|
this.minLevel = ADDRESSLEVEL.STREET;
|
|
5880
6088
|
const streetNumber = this.prefillData.parameters.streetNumber;
|
|
5881
6089
|
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
5882
|
-
if (
|
|
6090
|
+
if (streetNumber) {
|
|
6091
|
+
// User has a streetNumber to prefill - trigger street-number prefill flow.
|
|
6092
|
+
// onStreetNumberPrefillEvent will handle the box number prefill if needed.
|
|
6093
|
+
this.prefillData.prefillStreetPerfectMatchFound = true;
|
|
6094
|
+
this.prefillData.prefillStreetPerfectMatchSuggestion = { address: { ...address } };
|
|
6095
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
6096
|
+
this.prefillData.parameters.streetName = address.streetName;
|
|
6097
|
+
this.prefillData.parameters.postalCode = address.postalCode;
|
|
6098
|
+
this.prefillData.parameters.municipalityName = address.localityName || address.municipalityName;
|
|
6099
|
+
this.streetNumberPrefillData = this.prefillData;
|
|
6100
|
+
// Do NOT set boxNumberPrefillData here: it shares the same prefillData reference,
|
|
6101
|
+
// which would immediately overwrite minLevel to BOX_NUMBER (1) before Angular
|
|
6102
|
+
// change detection runs, causing the street-number component to see minLevel=1
|
|
6103
|
+
// and skip its prefill. Let onStreetNumberPrefillEvent set up box number prefill.
|
|
6104
|
+
}
|
|
6105
|
+
else if (boxNumber && !address.boxNumber) {
|
|
6106
|
+
// No streetNumber to prefill: jump directly to box number prefill.
|
|
5883
6107
|
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
5884
6108
|
this.boxNumberPrefillData = this.prefillData;
|
|
5885
6109
|
}
|
|
@@ -5969,11 +6193,13 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5969
6193
|
if (this.showDebugMessageToConsole) {
|
|
5970
6194
|
console.warn('lib::street: prefill - transmitting prefill data for streetNumber :', this.prefillData);
|
|
5971
6195
|
}
|
|
5972
|
-
if (address.houseNumber) {
|
|
6196
|
+
if (address.houseNumber && !streetNumber) {
|
|
6197
|
+
// No street number in prefill params: use the street suggestion's houseNumber via autofill
|
|
5973
6198
|
this.setAddress(address, ADDRESSLEVEL.STREET);
|
|
5974
6199
|
this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
5975
6200
|
}
|
|
5976
6201
|
else {
|
|
6202
|
+
// Street number given in prefill params (or no houseNumber in suggestion): trigger street-number prefill
|
|
5977
6203
|
this.streetNumberPrefillData = this.prefillData;
|
|
5978
6204
|
}
|
|
5979
6205
|
}
|
|
@@ -6009,10 +6235,35 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6009
6235
|
const addressIsComplete = address && address.hasOwnProperty('isComplete') && address.isComplete === true ? true : false;
|
|
6010
6236
|
const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
|
|
6011
6237
|
if (addressIsComplete && !addressIsNotInList) {
|
|
6012
|
-
// found address - perfect
|
|
6013
|
-
|
|
6014
|
-
this.
|
|
6015
|
-
|
|
6238
|
+
// found address - perfect match at street number level
|
|
6239
|
+
const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
|
|
6240
|
+
if (this.notInListAllowed && boxNumber) {
|
|
6241
|
+
// User prefilled a box number and notInListAllowed - continue to box number prefill
|
|
6242
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6243
|
+
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6244
|
+
this.prefillData = event.prefillData;
|
|
6245
|
+
this.prefillData.ts = new Date();
|
|
6246
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6247
|
+
const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
|
|
6248
|
+
this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
|
|
6249
|
+
this.prefillData.parameters.streetName = suggestionAddress.streetName;
|
|
6250
|
+
this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
|
|
6251
|
+
this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
|
|
6252
|
+
this.updatePostalCodeLocality(address);
|
|
6253
|
+
this.updateStreetName(address);
|
|
6254
|
+
this.updateStreetNumber(address);
|
|
6255
|
+
this.streetAddress = address;
|
|
6256
|
+
this.streetNumberAddress = address;
|
|
6257
|
+
this.autocompleteBoxNb.streetNumber = address.houseNumber;
|
|
6258
|
+
this.autocompleteBoxNb.searchText = '';
|
|
6259
|
+
this.boxNumberPrefillData = this.prefillData;
|
|
6260
|
+
}
|
|
6261
|
+
else {
|
|
6262
|
+
// Nothing to do anymore
|
|
6263
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6264
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6265
|
+
this.quitPrefillMode();
|
|
6266
|
+
}
|
|
6016
6267
|
}
|
|
6017
6268
|
else {
|
|
6018
6269
|
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
@@ -6106,13 +6357,52 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6106
6357
|
const address = suggestion.address;
|
|
6107
6358
|
this.updateStreetNumber(address);
|
|
6108
6359
|
this.autocompleteStreetNb.selectedAddress = address;
|
|
6360
|
+
// Directly set the child input field to the API-returned house number.
|
|
6361
|
+
// This is critical when the prefilled number was invalid (e.g. 145896 → 56):
|
|
6362
|
+
// it ensures searchText='56' before quitPrefillMode() clears the prefilling flag,
|
|
6363
|
+
// so that Angular CD's ngOnChanges(inputText:'145896'→'56') sees matching values
|
|
6364
|
+
// and does NOT trigger clearWidget().
|
|
6365
|
+
if (address.houseNumber) {
|
|
6366
|
+
this.autocompleteStreetNb.searchText = address.houseNumber;
|
|
6367
|
+
}
|
|
6109
6368
|
const addressIsComplete = address && address.hasOwnProperty('isComplete') && !address.hasOwnProperty('boxNumber') && address.isComplete === true ? true : false;
|
|
6110
6369
|
const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
|
|
6111
6370
|
if (addressIsComplete && !addressIsNotInList) {
|
|
6112
|
-
// found address - perfect
|
|
6113
|
-
|
|
6114
|
-
this.
|
|
6115
|
-
|
|
6371
|
+
// found address - perfect match at street number level
|
|
6372
|
+
const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
|
|
6373
|
+
if (boxNumber && this.notInListAllowed) {
|
|
6374
|
+
// A boxNumber is present in prefill params AND notInListAllowed - continue to box number prefill.
|
|
6375
|
+
// When notInListAllowed=false, the address is already complete without a box number;
|
|
6376
|
+
// any prefilled box number is invalid and the API call must be skipped.
|
|
6377
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6378
|
+
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6379
|
+
this.prefillData = event.prefillData;
|
|
6380
|
+
this.prefillData.ts = new Date();
|
|
6381
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6382
|
+
const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
|
|
6383
|
+
this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
|
|
6384
|
+
this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
|
|
6385
|
+
this.prefillData.parameters.streetName = suggestionAddress.streetName;
|
|
6386
|
+
this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
|
|
6387
|
+
this.updatePostalCodeLocality(address);
|
|
6388
|
+
this.updateStreetName(address);
|
|
6389
|
+
this.updateStreetNumber(address);
|
|
6390
|
+
this.streetAddress = address;
|
|
6391
|
+
this.streetNumberAddress = address;
|
|
6392
|
+
this.autocompleteBoxNb.streetNumber = address.houseNumber;
|
|
6393
|
+
this.autocompleteBoxNb.searchText = '';
|
|
6394
|
+
this.boxNumberPrefillData = this.prefillData;
|
|
6395
|
+
}
|
|
6396
|
+
else {
|
|
6397
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6398
|
+
// address.isComplete===true, so setAddress() correctly sets addressIsComplete=true
|
|
6399
|
+
// and the check mark should be visible. Do NOT suppress it here.
|
|
6400
|
+
// Null out autofill data so Angular CD does not re-trigger ngOnChanges(autofillData)
|
|
6401
|
+
// on the street-number child, which would call setSelectedAddress and set
|
|
6402
|
+
// addressIsComplete=true again via the autofill chain.
|
|
6403
|
+
this.streetNumberAutofillData = null;
|
|
6404
|
+
this.quitPrefillMode();
|
|
6405
|
+
}
|
|
6116
6406
|
}
|
|
6117
6407
|
else {
|
|
6118
6408
|
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
@@ -6132,8 +6422,16 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6132
6422
|
// this.updatePostalCodeLocality(suggestionAddress);
|
|
6133
6423
|
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
6134
6424
|
if (!addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '')) {
|
|
6425
|
+
// No box number in prefill params and the API reports isComplete=false (box number required).
|
|
6426
|
+
// Do NOT start box-number prefill: when boxNumber param is empty, the box-number
|
|
6427
|
+
// component receives searchText='' and never fires its prefill event, so
|
|
6428
|
+
// quitPrefillMode() would never be called, leaving prefilling=true forever.
|
|
6429
|
+
// Since isComplete=false the address is not complete — do NOT force addressIsComplete=true;
|
|
6430
|
+
// setAddress() will correctly leave the street-number checkmark unset, and the user
|
|
6431
|
+
// must enter the box number manually.
|
|
6135
6432
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6136
|
-
|
|
6433
|
+
this.quitPrefillMode();
|
|
6434
|
+
return;
|
|
6137
6435
|
}
|
|
6138
6436
|
else {
|
|
6139
6437
|
this.updatePostalCodeLocality(address);
|
|
@@ -6155,33 +6453,32 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6155
6453
|
}
|
|
6156
6454
|
this.autocompleteBoxNb.searchText = '';
|
|
6157
6455
|
}
|
|
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
6456
|
this.boxNumberPrefillData = this.prefillData;
|
|
6172
6457
|
}
|
|
6173
6458
|
}
|
|
6174
6459
|
else {
|
|
6175
6460
|
const prefillStreetNumber = this.prefillData.parameters.streetNumber;
|
|
6176
|
-
const address = this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
6461
|
+
const address = this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
6462
|
+
? this.prefillData.prefillStreetPerfectMatchSuggestion.address
|
|
6463
|
+
: null;
|
|
6177
6464
|
this.autocompleteBoxNb.streetNumber = '';
|
|
6178
6465
|
if (prefillStreetNumber === null || prefillStreetNumber === undefined || prefillStreetNumber.length === 0) {
|
|
6179
6466
|
this.setAddress(address, ADDRESSLEVEL.STREET);
|
|
6180
6467
|
}
|
|
6181
6468
|
else {
|
|
6182
|
-
//
|
|
6183
|
-
|
|
6184
|
-
|
|
6469
|
+
// The prefilled street number doesn't exist in the API (notInListAllowed=false).
|
|
6470
|
+
// Show the prefilled value in the input and leave the dropdown open so the
|
|
6471
|
+
// user can pick the correct house number from the suggestions.
|
|
6472
|
+
this.autocompleteStreetNb.searchText = prefillStreetNumber;
|
|
6473
|
+
// Keep streetNumberInput in sync with searchText so the child's inputText
|
|
6474
|
+
// ngOnChanges guard (notEqualIgnoreCase) does not trigger clearWidget()
|
|
6475
|
+
// once prefilling becomes false after quitPrefillMode().
|
|
6476
|
+
this.streetNumberInput = prefillStreetNumber;
|
|
6477
|
+
this.autocompleteStreetNb.isPrefillWithNoMatch = false;
|
|
6478
|
+
this.autocompleteStreetNb.addressIsComplete = false;
|
|
6479
|
+
this.autocompleteBoxNb.streetNumber = '';
|
|
6480
|
+
// Prevent the autofill Angular-CD chain from re-setting addressIsComplete=true.
|
|
6481
|
+
this.streetNumberAutofillData = null;
|
|
6185
6482
|
}
|
|
6186
6483
|
this.quitPrefillMode();
|
|
6187
6484
|
}
|
|
@@ -6194,18 +6491,48 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6194
6491
|
if (data.prefillBoxNumberPerfectMatchFound === true) {
|
|
6195
6492
|
const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
|
|
6196
6493
|
const address = suggestion.address;
|
|
6494
|
+
// When notInListAllowed, ensure user's prefilled values are used
|
|
6495
|
+
if (this.notInListAllowed) {
|
|
6496
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6497
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6498
|
+
}
|
|
6499
|
+
if (this.prefillData.parameters.boxNumber) {
|
|
6500
|
+
address.boxNumber = this.prefillData.parameters.boxNumber;
|
|
6501
|
+
}
|
|
6502
|
+
}
|
|
6197
6503
|
this.autocompleteBoxNb.selectedAddress = address;
|
|
6198
6504
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6199
6505
|
}
|
|
6200
6506
|
else {
|
|
6201
6507
|
const prefillBoxNumber = this.prefillData.parameters.boxNumber;
|
|
6202
|
-
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6508
|
+
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6509
|
+
? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
|
|
6510
|
+
: null;
|
|
6203
6511
|
if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
|
|
6204
6512
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6205
6513
|
}
|
|
6206
|
-
else {
|
|
6207
|
-
|
|
6514
|
+
else if (address) {
|
|
6515
|
+
address.boxNumber = prefillBoxNumber;
|
|
6516
|
+
if (this.notInListAllowed && this.prefillData.parameters.streetNumber) {
|
|
6517
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6518
|
+
}
|
|
6208
6519
|
address.searchBarString = prefillBoxNumber;
|
|
6520
|
+
// For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
|
|
6521
|
+
// - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
|
|
6522
|
+
// - pdpId is also cleared when street number was also not-in-list (both invalid).
|
|
6523
|
+
const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
|
|
6524
|
+
address.mailBoxId = null;
|
|
6525
|
+
address.mailBoxid = null;
|
|
6526
|
+
address.suffixId = null;
|
|
6527
|
+
if (address.geoSanction) {
|
|
6528
|
+
address.geoSanction = address.geoSanction.substring(0, 35);
|
|
6529
|
+
}
|
|
6530
|
+
if (streetNumberWasNotInList) {
|
|
6531
|
+
address.pdpId = null;
|
|
6532
|
+
if (address.geoSanction) {
|
|
6533
|
+
address.geoSanction = address.geoSanction.substring(0, 25);
|
|
6534
|
+
}
|
|
6535
|
+
}
|
|
6209
6536
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6210
6537
|
}
|
|
6211
6538
|
}
|
|
@@ -6219,29 +6546,68 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6219
6546
|
if (data.prefillBoxNumberPerfectMatchFound === true) {
|
|
6220
6547
|
const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
|
|
6221
6548
|
const address = suggestion.address;
|
|
6549
|
+
// When notInListAllowed, ensure user's prefilled values are used
|
|
6550
|
+
if (this.notInListAllowed) {
|
|
6551
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6552
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6553
|
+
}
|
|
6554
|
+
if (this.prefillData.parameters.boxNumber) {
|
|
6555
|
+
address.boxNumber = this.prefillData.parameters.boxNumber;
|
|
6556
|
+
}
|
|
6557
|
+
}
|
|
6222
6558
|
this.autocompleteBoxNb.selectedAddress = address;
|
|
6223
6559
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6224
6560
|
}
|
|
6225
6561
|
else {
|
|
6226
6562
|
const prefillBoxNumber = this.prefillData.parameters.boxNumber;
|
|
6227
|
-
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6563
|
+
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6564
|
+
? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
|
|
6565
|
+
: null;
|
|
6228
6566
|
if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
|
|
6229
6567
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6230
6568
|
}
|
|
6231
|
-
else {
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6569
|
+
else if (address) {
|
|
6570
|
+
if (!this.notInListAllowed) {
|
|
6571
|
+
// notInListAllowed=false: the box number is invalid and must not appear in the
|
|
6572
|
+
// selected address or address component. Complete the address at street-number
|
|
6573
|
+
// level so the emitted address contains only the valid street number.
|
|
6574
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6575
|
+
}
|
|
6576
|
+
else {
|
|
6577
|
+
// notInListAllowed=true: include the prefilled box number as-is (not-in-list)
|
|
6578
|
+
address.boxNumber = prefillBoxNumber;
|
|
6579
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6580
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6581
|
+
}
|
|
6582
|
+
address.searchBarString = prefillBoxNumber;
|
|
6583
|
+
// For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
|
|
6584
|
+
// - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
|
|
6585
|
+
// - pdpId is also cleared when street number was also not-in-list (both invalid).
|
|
6586
|
+
const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
|
|
6587
|
+
address.mailBoxId = null;
|
|
6588
|
+
address.mailBoxid = null;
|
|
6589
|
+
address.suffixId = null;
|
|
6590
|
+
if (address.geoSanction) {
|
|
6591
|
+
address.geoSanction = address.geoSanction.substring(0, 35);
|
|
6592
|
+
}
|
|
6593
|
+
if (streetNumberWasNotInList) {
|
|
6594
|
+
address.pdpId = null;
|
|
6595
|
+
if (address.geoSanction) {
|
|
6596
|
+
address.geoSanction = address.geoSanction.substring(0, 25);
|
|
6597
|
+
}
|
|
6598
|
+
}
|
|
6599
|
+
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6600
|
+
}
|
|
6235
6601
|
}
|
|
6236
6602
|
}
|
|
6237
6603
|
this.quitPrefillMode();
|
|
6238
6604
|
}
|
|
6239
6605
|
}
|
|
6240
6606
|
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"] }] });
|
|
6607
|
+
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
6608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
|
|
6243
6609
|
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
|
|
6610
|
+
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
6611
|
}], ctorParameters: function () { return [{ type: HttpService }]; }, propDecorators: { autocompleteLocality: [{
|
|
6246
6612
|
type: ViewChild,
|
|
6247
6613
|
args: [LocalityComponent, { static: false }]
|