@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
|
@@ -2664,16 +2664,17 @@ class StreetNumberComponent {
|
|
|
2664
2664
|
}
|
|
2665
2665
|
ngOnChanges(changes) {
|
|
2666
2666
|
if (changes) {
|
|
2667
|
-
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
2667
|
+
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
2668
|
+
&& !this.prefilling && !changes.hasOwnProperty('prefillData')) {
|
|
2668
2669
|
this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
|
|
2669
2670
|
this.setSelectedAddress(this.autofillData.selectedAddress);
|
|
2671
|
+
this.isPrefillWithNoMatch = false;
|
|
2670
2672
|
}
|
|
2671
2673
|
else {
|
|
2672
2674
|
if (changes.hasOwnProperty('streetName')
|
|
2673
2675
|
&& !changes.streetName.firstChange
|
|
2674
2676
|
&& !changes.hasOwnProperty('prefillData') && !this.prefilling) {
|
|
2675
2677
|
this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
2676
|
-
// this.addressIsComplete = false;
|
|
2677
2678
|
if (this.showDebugMessageToConsole) {
|
|
2678
2679
|
console.warn('street name - ngOnchanges - streetName changes detection');
|
|
2679
2680
|
}
|
|
@@ -2697,13 +2698,8 @@ class StreetNumberComponent {
|
|
|
2697
2698
|
if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
|
|
2698
2699
|
this.prefilling = true;
|
|
2699
2700
|
this.addressIsComplete = false;
|
|
2700
|
-
// console.log('streetNumber::ngOnChanges', this.addressIsComplete);
|
|
2701
2701
|
this.searchText = this.loadParams(changes.prefillData.currentValue);
|
|
2702
2702
|
if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.STREET_NUMBER) {
|
|
2703
|
-
/*
|
|
2704
|
-
this.onInputChange(/*'prefilled'* / SourceType.SOURCE_PREFILLED);
|
|
2705
|
-
this.streetNumberSearchInput.nativeElement.focus();
|
|
2706
|
-
*/
|
|
2707
2703
|
this.collapseDropdown = true;
|
|
2708
2704
|
this.prefillData.prefillStreetNumber
|
|
2709
2705
|
= this.transformStreetNumberInLowercaseAndWithoutDiacritics(this.prefillData.parameters.streetNumber);
|
|
@@ -2769,7 +2765,7 @@ class StreetNumberComponent {
|
|
|
2769
2765
|
}
|
|
2770
2766
|
onFocus() {
|
|
2771
2767
|
this.collapseDropdown = false;
|
|
2772
|
-
if (this.prefillData !== null && this.prefillData.prefillStreetNumberPerfectMatchFound != false) {
|
|
2768
|
+
if (this.prefillData !== null && this.prefillData.prefillStreetNumberPerfectMatchFound != false && this.addressIsComplete) {
|
|
2773
2769
|
this.collapseDropdown = true;
|
|
2774
2770
|
}
|
|
2775
2771
|
// this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
|
|
@@ -2850,6 +2846,10 @@ class StreetNumberComponent {
|
|
|
2850
2846
|
*/
|
|
2851
2847
|
// this.addressIsComplete = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? true : false;
|
|
2852
2848
|
this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
|
|
2849
|
+
// Ensure user's prefill value is displayed when notInListAllowed
|
|
2850
|
+
if (this.notInListAllowed && this.prefillData.prefillStreetNumber) {
|
|
2851
|
+
this.searchText = this.prefillData.parameters.streetNumber;
|
|
2852
|
+
}
|
|
2853
2853
|
this.prefillAnalyzeData();
|
|
2854
2854
|
}
|
|
2855
2855
|
else {
|
|
@@ -3018,8 +3018,7 @@ class StreetNumberComponent {
|
|
|
3018
3018
|
}
|
|
3019
3019
|
}
|
|
3020
3020
|
else {
|
|
3021
|
-
//
|
|
3022
|
-
// If this is the case, simulate the selection of the 'not-in-list' suggestion
|
|
3021
|
+
// notInListAllowed=true: build a 'not-in-list' suggestion from the prefilled number
|
|
3023
3022
|
if (this.prefilling && this.notInListAllowed
|
|
3024
3023
|
&& this.prefillData.prefillStreetNumberPerfectMatchFound === false
|
|
3025
3024
|
&& this.prefillData.prefillStreetNumber !== null
|
|
@@ -3032,6 +3031,33 @@ class StreetNumberComponent {
|
|
|
3032
3031
|
}
|
|
3033
3032
|
this.prefillCheckForPerfectMatch(suggestion);
|
|
3034
3033
|
}
|
|
3034
|
+
// notInListAllowed=false and no perfect match:
|
|
3035
|
+
// Check whether any API suggestion starts with the prefilled value (prefix match).
|
|
3036
|
+
// - Prefix match exists (e.g. "1" → "10","11","18"): leave searchText as-is so the
|
|
3037
|
+
// parent's "not found" else branch shows the dropdown with the prefilled value.
|
|
3038
|
+
// - No prefix match (e.g. "145896" → "56"): auto-select the first complete suggestion
|
|
3039
|
+
// so the parent's "found" branch completes the address automatically.
|
|
3040
|
+
if (this.prefilling && !this.notInListAllowed
|
|
3041
|
+
&& this.prefillData.prefillStreetNumberPerfectMatchFound === false
|
|
3042
|
+
&& this.prefillData.prefillStreetNumber !== null
|
|
3043
|
+
&& this.prefillData.prefillStreetNumber !== undefined
|
|
3044
|
+
&& this.prefillData.prefillStreetNumber.length > 0) {
|
|
3045
|
+
const prefillLower = this.prefillData.prefillStreetNumber.toLowerCase();
|
|
3046
|
+
const hasPrefixMatch = this.suggestions.some(s => s.houseNumber && s.houseNumber.toLowerCase().startsWith(prefillLower));
|
|
3047
|
+
if (!hasPrefixMatch) {
|
|
3048
|
+
// Prefer a suggestion with isComplete=true; fall back to first suggestion that has a
|
|
3049
|
+
// house number in case language-specific sub-objects (dutch/french) lack isComplete.
|
|
3050
|
+
const autoSelect = this.suggestions.find(s => s.hasOwnProperty('isComplete') && s.isComplete === true)
|
|
3051
|
+
|| this.suggestions.find(s => s.houseNumber != null);
|
|
3052
|
+
if (autoSelect) {
|
|
3053
|
+
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
3054
|
+
this.prefillData.prefillStreetNumberPerfectMatchSuggestion = { address: autoSelect };
|
|
3055
|
+
this.searchText = autoSelect.houseNumber;
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
// If hasPrefixMatch: searchText stays as the prefilled value;
|
|
3059
|
+
// the parent's else branch will display it and keep the dropdown open.
|
|
3060
|
+
}
|
|
3035
3061
|
}
|
|
3036
3062
|
}
|
|
3037
3063
|
else {
|
|
@@ -3042,8 +3068,21 @@ class StreetNumberComponent {
|
|
|
3042
3068
|
const notInListSuggestion = { string: this.searchText, 'not-in-list': true };
|
|
3043
3069
|
const streetSuggestion = this.prefillData.prefillStreetPerfectMatchSuggestion;
|
|
3044
3070
|
const combined = Object.assign(Object.assign({}, streetSuggestion.address), notInListSuggestion);
|
|
3045
|
-
delete combined.mailBoxid;
|
|
3071
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
3072
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
3073
|
+
delete combined.pdpId;
|
|
3046
3074
|
delete combined.suffixId;
|
|
3075
|
+
delete combined.latitude;
|
|
3076
|
+
delete combined.longitude;
|
|
3077
|
+
delete combined.perspectiveCode;
|
|
3078
|
+
delete combined.coordinateSystem;
|
|
3079
|
+
delete combined.reliability;
|
|
3080
|
+
delete combined.businessName;
|
|
3081
|
+
delete combined.listOfBoxes;
|
|
3082
|
+
delete combined.nis9;
|
|
3083
|
+
if (combined.geoSanction) {
|
|
3084
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
3085
|
+
}
|
|
3047
3086
|
// combined.boxNumber = combined.string;
|
|
3048
3087
|
combined.houseNumber = combined.string;
|
|
3049
3088
|
combined.searchBarString = combined.string;
|
|
@@ -3090,7 +3129,13 @@ class StreetNumberComponent {
|
|
|
3090
3129
|
suggestion.address = suggestionToAdd;
|
|
3091
3130
|
this.prefillCheckForPerfectMatch(suggestion);
|
|
3092
3131
|
}
|
|
3093
|
-
|
|
3132
|
+
// Skip checkForPerfectMatch when prefill already found a match to prevent a second
|
|
3133
|
+
// clickSuggestion call that would overwrite searchText with searchBarString.
|
|
3134
|
+
const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
|
|
3135
|
+
&& this.prefillData && this.prefillData.prefillStreetNumberPerfectMatchFound === true;
|
|
3136
|
+
if (!skipNonPrefillCheck
|
|
3137
|
+
&& this.suggestionLevel !== SuggestionLevelType.StreetNumber
|
|
3138
|
+
&& this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
3094
3139
|
suggestion.address = suggestionToAdd;
|
|
3095
3140
|
const isPerfectMatch = this.checkForPerfectMatch(suggestion);
|
|
3096
3141
|
if (!isPerfectMatch) {
|
|
@@ -3102,25 +3147,22 @@ class StreetNumberComponent {
|
|
|
3102
3147
|
}
|
|
3103
3148
|
checkForPerfectMatch(suggestion) {
|
|
3104
3149
|
if (!this.addressIsComplete) {
|
|
3105
|
-
// if (this.showDebugMessageToConsole) {
|
|
3106
|
-
console.log('streetNumber - checking suggestion for perfect match', suggestion, this.searchText);
|
|
3107
|
-
// }
|
|
3108
3150
|
const sugAddress = suggestion.address;
|
|
3109
3151
|
const suggestionStreetNumber = this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + sugAddress.houseNumber);
|
|
3110
3152
|
if (suggestionStreetNumber === ('' + this.searchText)) {
|
|
3111
3153
|
this.searchText = sugAddress.houseNumber;
|
|
3112
3154
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
3113
3155
|
this.clickSuggestion(null, sugAddress);
|
|
3156
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
3157
|
+
// Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
|
|
3158
|
+
this.searchText = sugAddress.houseNumber;
|
|
3114
3159
|
this.addressIsComplete = true;
|
|
3115
|
-
// console.log('streetNumber::prefillCheckForPerfectMatch', this.addressIsComplete);
|
|
3116
|
-
// if (this.showDebugMessageToConsole && this.addressIsComplete === true) {
|
|
3117
|
-
console.log('ADDRESS COMPLETE ON STREET NUMBER !');
|
|
3118
|
-
// }
|
|
3119
3160
|
return true;
|
|
3120
3161
|
}
|
|
3121
3162
|
else {
|
|
3122
3163
|
if (this.suggestionLevel !== SuggestionLevelType.StreetNumber && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
3123
3164
|
this.clickSuggestion(null, sugAddress); // house number found
|
|
3165
|
+
this.searchText = sugAddress.houseNumber;
|
|
3124
3166
|
}
|
|
3125
3167
|
}
|
|
3126
3168
|
}
|
|
@@ -3148,11 +3190,10 @@ class StreetNumberComponent {
|
|
|
3148
3190
|
this.searchText = sugAddress.houseNumber;
|
|
3149
3191
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
3150
3192
|
this.clickSuggestion(null, sugAddress);
|
|
3193
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
3194
|
+
// Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
|
|
3195
|
+
this.searchText = sugAddress.houseNumber;
|
|
3151
3196
|
this.addressIsComplete = true;
|
|
3152
|
-
// console.log('streetNumber::prefillCheckForPerfectMatch', this.addressIsComplete);
|
|
3153
|
-
// if (this.showDebugMessageToConsole && this.addressIsComplete === true) {
|
|
3154
|
-
console.log('ADDRESS COMPLETE ON STREET NUMBER !');
|
|
3155
|
-
// }
|
|
3156
3197
|
}
|
|
3157
3198
|
}
|
|
3158
3199
|
}
|
|
@@ -3187,7 +3228,6 @@ class StreetNumberComponent {
|
|
|
3187
3228
|
this.consumedNumber = this.sequenceNumber;
|
|
3188
3229
|
this.clearSuggestions();
|
|
3189
3230
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3190
|
-
console.log('(A) do not use suggestions for street number');
|
|
3191
3231
|
this.streetNumberChanged.emit(this.searchText);
|
|
3192
3232
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3193
3233
|
this.prefillAnalyzeData();
|
|
@@ -3195,7 +3235,6 @@ class StreetNumberComponent {
|
|
|
3195
3235
|
}
|
|
3196
3236
|
else {
|
|
3197
3237
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3198
|
-
console.log('(B) do not use suggestions for street number');
|
|
3199
3238
|
this.streetNumberChanged.emit(this.searchText);
|
|
3200
3239
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3201
3240
|
this.prefillAnalyzeData();
|
|
@@ -3232,6 +3271,7 @@ class StreetNumberComponent {
|
|
|
3232
3271
|
this.resetArrowSelectedIndex();
|
|
3233
3272
|
if (!source) {
|
|
3234
3273
|
this.prefilling = false;
|
|
3274
|
+
this.isPrefillWithNoMatch = false;
|
|
3235
3275
|
if (this.showDebugMessageToConsole) {
|
|
3236
3276
|
console.log('streetNumber::onInputChange -> calling valueChanged');
|
|
3237
3277
|
}
|
|
@@ -3243,7 +3283,6 @@ class StreetNumberComponent {
|
|
|
3243
3283
|
this.consumedNumber = this.sequenceNumber;
|
|
3244
3284
|
this.clearSuggestions();
|
|
3245
3285
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3246
|
-
console.log('(A) do not use suggestions for street number');
|
|
3247
3286
|
this.streetNumberChanged.emit(this.searchText);
|
|
3248
3287
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3249
3288
|
this.prefillAnalyzeData();
|
|
@@ -3251,7 +3290,6 @@ class StreetNumberComponent {
|
|
|
3251
3290
|
}
|
|
3252
3291
|
else {
|
|
3253
3292
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3254
|
-
console.log('(B) do not use suggestions for street number');
|
|
3255
3293
|
this.streetNumberChanged.emit(this.searchText);
|
|
3256
3294
|
if (source === SourceType.SOURCE_PREFILLED) {
|
|
3257
3295
|
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
@@ -3303,6 +3341,38 @@ class StreetNumberComponent {
|
|
|
3303
3341
|
}
|
|
3304
3342
|
}
|
|
3305
3343
|
else {
|
|
3344
|
+
// If prefilling, check whether the street suggestion already carries the matching house number
|
|
3345
|
+
// (e.g. postal code 1031 where the street API returns data up to house-number level).
|
|
3346
|
+
// In that case skip the street-number API call and go straight to the box-number step.
|
|
3347
|
+
if (source === SourceType.SOURCE_PREFILLED
|
|
3348
|
+
&& this.prefillData
|
|
3349
|
+
&& this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
3350
|
+
&& this.prefillData.prefillStreetPerfectMatchSuggestion.address) {
|
|
3351
|
+
const streetAddr = this.prefillData.prefillStreetPerfectMatchSuggestion.address;
|
|
3352
|
+
const rawHouseNumber = streetAddr.houseNumber;
|
|
3353
|
+
const streetHouseNumber = (rawHouseNumber != null && rawHouseNumber !== undefined)
|
|
3354
|
+
? this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + rawHouseNumber)
|
|
3355
|
+
: null;
|
|
3356
|
+
// Use the house number from the street suggestion when:
|
|
3357
|
+
// (a) it exactly matches the prefilled value, OR
|
|
3358
|
+
// (b) notInListAllowed=false — the prefilled value is invalid so auto-fill with
|
|
3359
|
+
// the valid house number that the locality/street API already returned.
|
|
3360
|
+
const streetHouseNumberIsValid = streetHouseNumber && streetHouseNumber !== 'null' && streetHouseNumber !== 'undefined';
|
|
3361
|
+
if (streetHouseNumberIsValid && this.prefillData.prefillStreetNumber
|
|
3362
|
+
&& (streetHouseNumber === this.prefillData.prefillStreetNumber || !this.notInListAllowed)) {
|
|
3363
|
+
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
3364
|
+
this.prefillData.prefillStreetNumberPerfectMatchSuggestion = this.prefillData.prefillStreetPerfectMatchSuggestion;
|
|
3365
|
+
this.searchText = rawHouseNumber;
|
|
3366
|
+
this.isPrefillWithNoMatch = false;
|
|
3367
|
+
this.collapseDropdown = true;
|
|
3368
|
+
if (streetAddr.hasOwnProperty('isComplete') && streetAddr.isComplete === true) {
|
|
3369
|
+
this.clickSuggestion(null, streetAddr);
|
|
3370
|
+
this.addressIsComplete = true;
|
|
3371
|
+
}
|
|
3372
|
+
this.prefillAnalyzeData();
|
|
3373
|
+
return;
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3306
3376
|
this.getTopSuggestions(source);
|
|
3307
3377
|
}
|
|
3308
3378
|
}
|
|
@@ -3332,7 +3402,7 @@ class StreetNumberComponent {
|
|
|
3332
3402
|
console.log('streetNumber::clickSuggestion - NOT-IN-LIST', event, suggestion);
|
|
3333
3403
|
}
|
|
3334
3404
|
}
|
|
3335
|
-
if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.
|
|
3405
|
+
if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) {
|
|
3336
3406
|
this.addressIsComplete = true;
|
|
3337
3407
|
// this.notifyAddressIsValidated();
|
|
3338
3408
|
}
|
|
@@ -3350,11 +3420,18 @@ class StreetNumberComponent {
|
|
|
3350
3420
|
const combined = Object.assign(Object.assign({}, this.selectedAddress), suggestion);
|
|
3351
3421
|
delete combined.latitude;
|
|
3352
3422
|
delete combined.longitude;
|
|
3423
|
+
delete combined.perspectiveCode;
|
|
3424
|
+
delete combined.coordinateSystem;
|
|
3425
|
+
delete combined.reliability;
|
|
3426
|
+
delete combined.businessName;
|
|
3427
|
+
delete combined.listOfBoxes;
|
|
3428
|
+
delete combined.nis9;
|
|
3353
3429
|
delete combined.mailboxId;
|
|
3354
3430
|
delete combined.pdpId;
|
|
3355
3431
|
delete combined.suffixId;
|
|
3356
|
-
|
|
3357
|
-
|
|
3432
|
+
if (combined.geoSanction) {
|
|
3433
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
3434
|
+
}
|
|
3358
3435
|
combined.houseNumber = combined.string;
|
|
3359
3436
|
combined.searchBarString = combined.string;
|
|
3360
3437
|
combined.isComplete = true;
|
|
@@ -3364,7 +3441,7 @@ class StreetNumberComponent {
|
|
|
3364
3441
|
// console.log('street number - emit suggestion', suggestion);
|
|
3365
3442
|
const notInList = suggestion['not-in-list'];
|
|
3366
3443
|
const isNotInList = notInList !== null && notInList !== undefined && notInList === true;
|
|
3367
|
-
this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.
|
|
3444
|
+
this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) ? true : false;
|
|
3368
3445
|
this.addressChanged.emit(suggestion);
|
|
3369
3446
|
}
|
|
3370
3447
|
/*
|
|
@@ -3777,9 +3854,14 @@ class BoxNumberComponent {
|
|
|
3777
3854
|
}
|
|
3778
3855
|
ngOnChanges(changes) {
|
|
3779
3856
|
if (changes) {
|
|
3780
|
-
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
3781
|
-
this.
|
|
3782
|
-
|
|
3857
|
+
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
3858
|
+
&& !this.prefilling && !changes.hasOwnProperty('prefillData')) {
|
|
3859
|
+
const newBoxNumber = changes.autofillData.currentValue.boxNumber;
|
|
3860
|
+
// Only process if the box number value actually changed to avoid infinite loop
|
|
3861
|
+
if (newBoxNumber !== this.searchText) {
|
|
3862
|
+
this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
|
|
3863
|
+
this.setSelectedAddress(this.autofillData.selectedAddress);
|
|
3864
|
+
}
|
|
3783
3865
|
}
|
|
3784
3866
|
else {
|
|
3785
3867
|
if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
|
|
@@ -3787,11 +3869,28 @@ class BoxNumberComponent {
|
|
|
3787
3869
|
this.searchText = this.loadParams(changes.prefillData.currentValue);
|
|
3788
3870
|
if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.BOX_NUMBER) {
|
|
3789
3871
|
// this.onInputChange('prefilled');
|
|
3790
|
-
// this.boxNumberSearchInput.nativeElement.focus();
|
|
3791
3872
|
this.collapseDropdown = true;
|
|
3792
3873
|
this.prefillData.prefillBoxNumber
|
|
3793
3874
|
= this.transformBoxNumberInLowercaseAndWithoutDiacritics(this.prefillData.parameters.boxNumber);
|
|
3794
|
-
|
|
3875
|
+
// When notInListAllowed=false, skip the API call if the selected address is
|
|
3876
|
+
// already complete without a box number (i.e. no box numbers exist for this
|
|
3877
|
+
// address in the database). In that case any prefilled box number is invalid
|
|
3878
|
+
// and the API would return empty results anyway.
|
|
3879
|
+
const selectedAddressIsCompleteWithoutBoxNumber = this.selectedAddress != null &&
|
|
3880
|
+
this.selectedAddress.isComplete === true &&
|
|
3881
|
+
!this.selectedAddress.hasOwnProperty('boxNumber');
|
|
3882
|
+
if (!this.notInListAllowed && selectedAddressIsCompleteWithoutBoxNumber) {
|
|
3883
|
+
this.isPrefillWithNoMatch = true;
|
|
3884
|
+
this.prefillAnalyzeData();
|
|
3885
|
+
}
|
|
3886
|
+
else {
|
|
3887
|
+
this.onInputChange(/*'prefilled'*/ SourceType.SOURCE_PREFILLED);
|
|
3888
|
+
}
|
|
3889
|
+
setTimeout(() => {
|
|
3890
|
+
if (this.boxNumberSearchInput && this.boxNumberSearchInput.nativeElement && !this.boxNumberSearchInput.nativeElement.disabled) {
|
|
3891
|
+
this.boxNumberSearchInput.nativeElement.focus();
|
|
3892
|
+
}
|
|
3893
|
+
}, 0);
|
|
3795
3894
|
}
|
|
3796
3895
|
}
|
|
3797
3896
|
if (changes.hasOwnProperty('streetNumber') && !changes.streetNumber.firstChange && !changes.hasOwnProperty('prefillData')) {
|
|
@@ -3931,11 +4030,24 @@ class BoxNumberComponent {
|
|
|
3931
4030
|
console.log('BOX-NUMBER calling service params', param);
|
|
3932
4031
|
}
|
|
3933
4032
|
if (this.searchText) {
|
|
4033
|
+
this.addressIsValidated = false;
|
|
3934
4034
|
this.subscription = this.addressService.getBox(this.baseUrl, this.locality, this.postalCode, param)
|
|
3935
4035
|
.subscribe(response => {
|
|
3936
4036
|
this.handleGetBoxResponse(response, source);
|
|
3937
4037
|
if (source === SourceType.SOURCE_PREFILLED) {
|
|
3938
4038
|
this.isPrefillWithNoMatch = this.prefillData.prefillBoxNumberPerfectMatchFound === true ? false : true;
|
|
4039
|
+
// Ensure user's prefill value is displayed when notInListAllowed
|
|
4040
|
+
if (this.notInListAllowed && this.prefillData.prefillBoxNumber) {
|
|
4041
|
+
this.searchText = this.prefillData.parameters.boxNumber;
|
|
4042
|
+
this.isPrefillWithNoMatch = false;
|
|
4043
|
+
}
|
|
4044
|
+
// If notInListAllowed is false and no perfect match, keep the prefilled value
|
|
4045
|
+
// but show it in orangered so the user sees it was not found in the API.
|
|
4046
|
+
if (!this.notInListAllowed && this.prefillData.prefillBoxNumber !== ''
|
|
4047
|
+
&& this.prefillData.prefillBoxNumberPerfectMatchFound !== true) {
|
|
4048
|
+
this.searchText = this.prefillData.parameters.boxNumber;
|
|
4049
|
+
this.isPrefillWithNoMatch = true;
|
|
4050
|
+
}
|
|
3939
4051
|
this.prefillAnalyzeData();
|
|
3940
4052
|
}
|
|
3941
4053
|
else {
|
|
@@ -4129,10 +4241,12 @@ class BoxNumberComponent {
|
|
|
4129
4241
|
&& this.prefillData.prefillBoxNumber.length > 0) {
|
|
4130
4242
|
// const notInListSuggestion = {string: this.searchText, 'not-in-list': true};
|
|
4131
4243
|
const suggestion = this.prefillBuildNotInListSuggestion();
|
|
4132
|
-
if (
|
|
4133
|
-
|
|
4244
|
+
if (suggestion) {
|
|
4245
|
+
if (this.showDebugMessageToConsole) {
|
|
4246
|
+
console.log('BOX NUMBER - PREFILL NOT IN LIST SUGGESTION:', suggestion);
|
|
4247
|
+
}
|
|
4248
|
+
this.prefillCheckForPerfectMatch(suggestion);
|
|
4134
4249
|
}
|
|
4135
|
-
this.prefillCheckForPerfectMatch(suggestion);
|
|
4136
4250
|
}
|
|
4137
4251
|
}
|
|
4138
4252
|
}
|
|
@@ -4143,9 +4257,33 @@ class BoxNumberComponent {
|
|
|
4143
4257
|
prefillBuildNotInListSuggestion() {
|
|
4144
4258
|
const notInListSuggestion = { string: this.searchText, 'not-in-list': true };
|
|
4145
4259
|
const streetNumberSuggestion = this.prefillData.prefillStreetNumberPerfectMatchSuggestion;
|
|
4260
|
+
if (!streetNumberSuggestion || !streetNumberSuggestion.address) {
|
|
4261
|
+
return null;
|
|
4262
|
+
}
|
|
4263
|
+
// Capture whether the street-number suggestion was itself not-in-list (invalid)
|
|
4264
|
+
// BEFORE merging — spreading notInListSuggestion on top would mask the original flag.
|
|
4265
|
+
const streetNumberWasNotInList = streetNumberSuggestion.address['not-in-list'] === true;
|
|
4146
4266
|
const combined = Object.assign(Object.assign({}, streetNumberSuggestion.address), notInListSuggestion);
|
|
4147
|
-
delete combined.mailBoxid;
|
|
4267
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
4268
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
4148
4269
|
delete combined.suffixId;
|
|
4270
|
+
delete combined.businessName;
|
|
4271
|
+
delete combined.listOfBoxes;
|
|
4272
|
+
if (combined.geoSanction) {
|
|
4273
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
4274
|
+
}
|
|
4275
|
+
if (streetNumberWasNotInList) {
|
|
4276
|
+
delete combined.pdpId;
|
|
4277
|
+
if (combined.geoSanction) {
|
|
4278
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
4279
|
+
}
|
|
4280
|
+
delete combined.latitude;
|
|
4281
|
+
delete combined.longitude;
|
|
4282
|
+
delete combined.perspectiveCode;
|
|
4283
|
+
delete combined.coordinateSystem;
|
|
4284
|
+
delete combined.reliability;
|
|
4285
|
+
delete combined.nis9;
|
|
4286
|
+
}
|
|
4149
4287
|
combined.boxNumber = combined.string;
|
|
4150
4288
|
combined.searchBarString = combined.string;
|
|
4151
4289
|
combined.isComplete = true;
|
|
@@ -4179,7 +4317,11 @@ class BoxNumberComponent {
|
|
|
4179
4317
|
suggestion.address = suggestionToAdd;
|
|
4180
4318
|
isPerfectMatch = this.prefillCheckForPerfectMatch(suggestion);
|
|
4181
4319
|
}
|
|
4182
|
-
|
|
4320
|
+
// Skip checkForPerfectMatch when prefill already found a match to prevent a second
|
|
4321
|
+
// clickSuggestion call that would overwrite searchText with searchBarString.
|
|
4322
|
+
const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
|
|
4323
|
+
&& this.prefillData && this.prefillData.prefillBoxNumberPerfectMatchFound === true;
|
|
4324
|
+
if (!skipNonPrefillCheck && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
4183
4325
|
suggestion.address = suggestionToAdd;
|
|
4184
4326
|
isPerfectMatch = this.checkForPerfectMatch(suggestion);
|
|
4185
4327
|
if (!isPerfectMatch) {
|
|
@@ -4204,7 +4346,9 @@ class BoxNumberComponent {
|
|
|
4204
4346
|
this.searchText = sugAddress.boxNumber;
|
|
4205
4347
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
4206
4348
|
this.clickSuggestion(null, sugAddress);
|
|
4207
|
-
//
|
|
4349
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
4350
|
+
// Restore to boxNumber so the field shows the clean box number value.
|
|
4351
|
+
this.searchText = sugAddress.boxNumber;
|
|
4208
4352
|
if (this.showDebugMessageToConsole) {
|
|
4209
4353
|
console.log('ADDRESS COMPLETE ON BOX NUMBER !');
|
|
4210
4354
|
}
|
|
@@ -4231,7 +4375,9 @@ class BoxNumberComponent {
|
|
|
4231
4375
|
this.searchText = sugAddress.boxNumber;
|
|
4232
4376
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
4233
4377
|
this.clickSuggestion(null, sugAddress);
|
|
4234
|
-
//
|
|
4378
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
4379
|
+
// Restore to boxNumber so the field shows the clean box number value.
|
|
4380
|
+
this.searchText = sugAddress.boxNumber;
|
|
4235
4381
|
if (this.showDebugMessageToConsole) {
|
|
4236
4382
|
console.log('ADDRESS COMPLETE ON BOX NUMBER !');
|
|
4237
4383
|
}
|
|
@@ -4380,14 +4526,22 @@ class BoxNumberComponent {
|
|
|
4380
4526
|
modifySelectedAddress(suggestion) {
|
|
4381
4527
|
const combined = Object.assign(Object.assign({}, this.selectedAddress), suggestion);
|
|
4382
4528
|
delete combined.mailBoxid;
|
|
4529
|
+
delete combined.mailBoxId;
|
|
4383
4530
|
delete combined.suffixId;
|
|
4531
|
+
delete combined.businessName;
|
|
4532
|
+
delete combined.listOfBoxes;
|
|
4533
|
+
if (combined.geoSanction) {
|
|
4534
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
4535
|
+
}
|
|
4384
4536
|
combined.boxNumber = combined.string;
|
|
4385
4537
|
combined.searchBarString = combined.string;
|
|
4386
4538
|
combined.isComplete = true;
|
|
4387
4539
|
return combined;
|
|
4388
4540
|
}
|
|
4389
4541
|
setSelectedAddress(suggestion) {
|
|
4390
|
-
|
|
4542
|
+
if (this.showDebugMessageToConsole) {
|
|
4543
|
+
console.log('box number::setSelectedAddress', suggestion);
|
|
4544
|
+
}
|
|
4391
4545
|
this.addressIsValidated = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true) ? true : false;
|
|
4392
4546
|
this.addressChanged.emit(suggestion);
|
|
4393
4547
|
}
|
|
@@ -4618,6 +4772,11 @@ class BoxNumberComponent {
|
|
|
4618
4772
|
isDisabled() {
|
|
4619
4773
|
return (this.locality === '' || this.postalCode === '' || this.minLevel > ADDRESSLEVEL.BOX_NUMBER);
|
|
4620
4774
|
}
|
|
4775
|
+
isDisabledByPrefill() {
|
|
4776
|
+
return this.prefillData !== null && this.prefillData !== undefined
|
|
4777
|
+
&& this.prefillData.parameters !== null && this.prefillData.parameters !== undefined
|
|
4778
|
+
&& !this.isValid(this.prefillData.parameters.boxNumber);
|
|
4779
|
+
}
|
|
4621
4780
|
onInputClick() {
|
|
4622
4781
|
if (this.showDebugMessageToConsole) {
|
|
4623
4782
|
console.log('box number click');
|
|
@@ -4625,10 +4784,10 @@ class BoxNumberComponent {
|
|
|
4625
4784
|
}
|
|
4626
4785
|
}
|
|
4627
4786
|
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 });
|
|
4628
|
-
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 } });
|
|
4787
|
+
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 } });
|
|
4629
4788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, decorators: [{
|
|
4630
4789
|
type: Component,
|
|
4631
|
-
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: [""] }]
|
|
4790
|
+
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: [""] }]
|
|
4632
4791
|
}], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { boxNumberSearchInput: [{
|
|
4633
4792
|
type: ViewChild,
|
|
4634
4793
|
args: ['boxNumberSearchInput', { static: false }]
|
|
@@ -5212,6 +5371,11 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5212
5371
|
this.boxNumberAutofillData = this.autofillData;
|
|
5213
5372
|
}
|
|
5214
5373
|
}
|
|
5374
|
+
if (this.minLevel == ADDRESSLEVEL.BOX_NUMBER) {
|
|
5375
|
+
if (this.selectedAddress.boxNumber) {
|
|
5376
|
+
this.boxNumberAutofillData = this.autofillData;
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5215
5379
|
}
|
|
5216
5380
|
this.addressCompleteEventEmitter.emit(this.selectedAddress);
|
|
5217
5381
|
this.emittedAddress = this.selectedAddress;
|
|
@@ -5664,9 +5828,15 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5664
5828
|
this.autocompleteBoxNb.clearWidget();
|
|
5665
5829
|
this.autocompleteBoxNb.searchText = '';
|
|
5666
5830
|
*/
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5831
|
+
// Guard: only clear when street-number is not already validated.
|
|
5832
|
+
// resetStreet() always sets addressIsComplete=false before calling setAddress(null,3),
|
|
5833
|
+
// so user-initiated street changes are unaffected. Without this guard the post-prefill
|
|
5834
|
+
// autofill CD cycle clears searchText causing a inputText mismatch -> clearWidget().
|
|
5835
|
+
if (!this.autocompleteStreetNb.addressIsComplete) {
|
|
5836
|
+
this.autocompleteStreetNb.searchText = '';
|
|
5837
|
+
this.autocompleteBoxNb.searchText = '';
|
|
5838
|
+
this.autocompleteBoxNb.streetNumber = '';
|
|
5839
|
+
}
|
|
5670
5840
|
break;
|
|
5671
5841
|
// STREET Number
|
|
5672
5842
|
case 2:
|
|
@@ -5747,8 +5917,31 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5747
5917
|
console.log('lib::setAddressStreetNumber - streetnumber: ', streetNumber);
|
|
5748
5918
|
console.log('lib::setAddressStreetNumber - streetAddress: ', this.streetAddress);
|
|
5749
5919
|
}
|
|
5750
|
-
this.
|
|
5751
|
-
|
|
5920
|
+
if (this.suggestionLevel === SuggestionLevelType.None && this.streetAddress.streetNumber !== streetNumber) {
|
|
5921
|
+
const combined = Object.assign({}, this.streetAddress);
|
|
5922
|
+
delete combined.pdpId;
|
|
5923
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
5924
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
5925
|
+
delete combined.suffixId;
|
|
5926
|
+
delete combined.isComplete;
|
|
5927
|
+
delete combined.latitude;
|
|
5928
|
+
delete combined.longitude;
|
|
5929
|
+
delete combined.perspectiveCode;
|
|
5930
|
+
delete combined.coordinateSystem;
|
|
5931
|
+
delete combined.reliability;
|
|
5932
|
+
delete combined.businessName;
|
|
5933
|
+
delete combined.listOfBoxes;
|
|
5934
|
+
delete combined.nis9;
|
|
5935
|
+
if (combined.geoSanction) {
|
|
5936
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
5937
|
+
}
|
|
5938
|
+
this.streetNumberAddress = combined;
|
|
5939
|
+
this.selectedAddress = combined;
|
|
5940
|
+
}
|
|
5941
|
+
else {
|
|
5942
|
+
this.streetNumberAddress = this.streetAddress;
|
|
5943
|
+
this.selectedAddress = this.streetAddress;
|
|
5944
|
+
}
|
|
5752
5945
|
this.selectedAddress.houseNumber = streetNumber;
|
|
5753
5946
|
this.selectedAddress.streetNumber = streetNumber;
|
|
5754
5947
|
/*
|
|
@@ -5767,7 +5960,22 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5767
5960
|
setAddressBoxNumber(boxNumber) {
|
|
5768
5961
|
console.log('set box number value:', boxNumber);
|
|
5769
5962
|
//this.streetNumberAddress = this.streetAddress;
|
|
5770
|
-
this.
|
|
5963
|
+
if ((this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) && this.streetNumberAddress.boxNumber !== boxNumber) {
|
|
5964
|
+
const combined = Object.assign({}, this.streetNumberAddress);
|
|
5965
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
5966
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
5967
|
+
delete combined.suffixId;
|
|
5968
|
+
delete combined.isComplete;
|
|
5969
|
+
delete combined.businessName;
|
|
5970
|
+
delete combined.listOfBoxes;
|
|
5971
|
+
if (combined.geoSanction) {
|
|
5972
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
5973
|
+
}
|
|
5974
|
+
this.selectedAddress = combined;
|
|
5975
|
+
}
|
|
5976
|
+
else {
|
|
5977
|
+
this.selectedAddress = this.streetNumberAddress;
|
|
5978
|
+
}
|
|
5771
5979
|
this.selectedAddress.boxNumber = boxNumber;
|
|
5772
5980
|
this.boxNumber = boxNumber;
|
|
5773
5981
|
this.notifyAddressComplete();
|
|
@@ -5883,7 +6091,23 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5883
6091
|
this.minLevel = ADDRESSLEVEL.STREET;
|
|
5884
6092
|
const streetNumber = this.prefillData.parameters.streetNumber;
|
|
5885
6093
|
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
5886
|
-
if (
|
|
6094
|
+
if (streetNumber) {
|
|
6095
|
+
// User has a streetNumber to prefill - trigger street-number prefill flow.
|
|
6096
|
+
// onStreetNumberPrefillEvent will handle the box number prefill if needed.
|
|
6097
|
+
this.prefillData.prefillStreetPerfectMatchFound = true;
|
|
6098
|
+
this.prefillData.prefillStreetPerfectMatchSuggestion = { address: Object.assign({}, address) };
|
|
6099
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
6100
|
+
this.prefillData.parameters.streetName = address.streetName;
|
|
6101
|
+
this.prefillData.parameters.postalCode = address.postalCode;
|
|
6102
|
+
this.prefillData.parameters.municipalityName = address.localityName || address.municipalityName;
|
|
6103
|
+
this.streetNumberPrefillData = this.prefillData;
|
|
6104
|
+
// Do NOT set boxNumberPrefillData here: it shares the same prefillData reference,
|
|
6105
|
+
// which would immediately overwrite minLevel to BOX_NUMBER (1) before Angular
|
|
6106
|
+
// change detection runs, causing the street-number component to see minLevel=1
|
|
6107
|
+
// and skip its prefill. Let onStreetNumberPrefillEvent set up box number prefill.
|
|
6108
|
+
}
|
|
6109
|
+
else if (boxNumber && !address.boxNumber) {
|
|
6110
|
+
// No streetNumber to prefill: jump directly to box number prefill.
|
|
5887
6111
|
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
5888
6112
|
this.boxNumberPrefillData = this.prefillData;
|
|
5889
6113
|
}
|
|
@@ -5973,11 +6197,13 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5973
6197
|
if (this.showDebugMessageToConsole) {
|
|
5974
6198
|
console.warn('lib::street: prefill - transmitting prefill data for streetNumber :', this.prefillData);
|
|
5975
6199
|
}
|
|
5976
|
-
if (address.houseNumber) {
|
|
6200
|
+
if (address.houseNumber && !streetNumber) {
|
|
6201
|
+
// No street number in prefill params: use the street suggestion's houseNumber via autofill
|
|
5977
6202
|
this.setAddress(address, ADDRESSLEVEL.STREET);
|
|
5978
6203
|
this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
5979
6204
|
}
|
|
5980
6205
|
else {
|
|
6206
|
+
// Street number given in prefill params (or no houseNumber in suggestion): trigger street-number prefill
|
|
5981
6207
|
this.streetNumberPrefillData = this.prefillData;
|
|
5982
6208
|
}
|
|
5983
6209
|
}
|
|
@@ -6013,10 +6239,35 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6013
6239
|
const addressIsComplete = address && address.hasOwnProperty('isComplete') && address.isComplete === true ? true : false;
|
|
6014
6240
|
const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
|
|
6015
6241
|
if (addressIsComplete && !addressIsNotInList) {
|
|
6016
|
-
// found address - perfect
|
|
6017
|
-
|
|
6018
|
-
this.
|
|
6019
|
-
|
|
6242
|
+
// found address - perfect match at street number level
|
|
6243
|
+
const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
|
|
6244
|
+
if (this.notInListAllowed && boxNumber) {
|
|
6245
|
+
// User prefilled a box number and notInListAllowed - continue to box number prefill
|
|
6246
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6247
|
+
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6248
|
+
this.prefillData = event.prefillData;
|
|
6249
|
+
this.prefillData.ts = new Date();
|
|
6250
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6251
|
+
const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
|
|
6252
|
+
this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
|
|
6253
|
+
this.prefillData.parameters.streetName = suggestionAddress.streetName;
|
|
6254
|
+
this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
|
|
6255
|
+
this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
|
|
6256
|
+
this.updatePostalCodeLocality(address);
|
|
6257
|
+
this.updateStreetName(address);
|
|
6258
|
+
this.updateStreetNumber(address);
|
|
6259
|
+
this.streetAddress = address;
|
|
6260
|
+
this.streetNumberAddress = address;
|
|
6261
|
+
this.autocompleteBoxNb.streetNumber = address.houseNumber;
|
|
6262
|
+
this.autocompleteBoxNb.searchText = '';
|
|
6263
|
+
this.boxNumberPrefillData = this.prefillData;
|
|
6264
|
+
}
|
|
6265
|
+
else {
|
|
6266
|
+
// Nothing to do anymore
|
|
6267
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6268
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6269
|
+
this.quitPrefillMode();
|
|
6270
|
+
}
|
|
6020
6271
|
}
|
|
6021
6272
|
else {
|
|
6022
6273
|
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
@@ -6110,13 +6361,52 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6110
6361
|
const address = suggestion.address;
|
|
6111
6362
|
this.updateStreetNumber(address);
|
|
6112
6363
|
this.autocompleteStreetNb.selectedAddress = address;
|
|
6364
|
+
// Directly set the child input field to the API-returned house number.
|
|
6365
|
+
// This is critical when the prefilled number was invalid (e.g. 145896 → 56):
|
|
6366
|
+
// it ensures searchText='56' before quitPrefillMode() clears the prefilling flag,
|
|
6367
|
+
// so that Angular CD's ngOnChanges(inputText:'145896'→'56') sees matching values
|
|
6368
|
+
// and does NOT trigger clearWidget().
|
|
6369
|
+
if (address.houseNumber) {
|
|
6370
|
+
this.autocompleteStreetNb.searchText = address.houseNumber;
|
|
6371
|
+
}
|
|
6113
6372
|
const addressIsComplete = address && address.hasOwnProperty('isComplete') && !address.hasOwnProperty('boxNumber') && address.isComplete === true ? true : false;
|
|
6114
6373
|
const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
|
|
6115
6374
|
if (addressIsComplete && !addressIsNotInList) {
|
|
6116
|
-
// found address - perfect
|
|
6117
|
-
|
|
6118
|
-
this.
|
|
6119
|
-
|
|
6375
|
+
// found address - perfect match at street number level
|
|
6376
|
+
const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
|
|
6377
|
+
if (boxNumber && this.notInListAllowed) {
|
|
6378
|
+
// A boxNumber is present in prefill params AND notInListAllowed - continue to box number prefill.
|
|
6379
|
+
// When notInListAllowed=false, the address is already complete without a box number;
|
|
6380
|
+
// any prefilled box number is invalid and the API call must be skipped.
|
|
6381
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6382
|
+
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6383
|
+
this.prefillData = event.prefillData;
|
|
6384
|
+
this.prefillData.ts = new Date();
|
|
6385
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6386
|
+
const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
|
|
6387
|
+
this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
|
|
6388
|
+
this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
|
|
6389
|
+
this.prefillData.parameters.streetName = suggestionAddress.streetName;
|
|
6390
|
+
this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
|
|
6391
|
+
this.updatePostalCodeLocality(address);
|
|
6392
|
+
this.updateStreetName(address);
|
|
6393
|
+
this.updateStreetNumber(address);
|
|
6394
|
+
this.streetAddress = address;
|
|
6395
|
+
this.streetNumberAddress = address;
|
|
6396
|
+
this.autocompleteBoxNb.streetNumber = address.houseNumber;
|
|
6397
|
+
this.autocompleteBoxNb.searchText = '';
|
|
6398
|
+
this.boxNumberPrefillData = this.prefillData;
|
|
6399
|
+
}
|
|
6400
|
+
else {
|
|
6401
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6402
|
+
// address.isComplete===true, so setAddress() correctly sets addressIsComplete=true
|
|
6403
|
+
// and the check mark should be visible. Do NOT suppress it here.
|
|
6404
|
+
// Null out autofill data so Angular CD does not re-trigger ngOnChanges(autofillData)
|
|
6405
|
+
// on the street-number child, which would call setSelectedAddress and set
|
|
6406
|
+
// addressIsComplete=true again via the autofill chain.
|
|
6407
|
+
this.streetNumberAutofillData = null;
|
|
6408
|
+
this.quitPrefillMode();
|
|
6409
|
+
}
|
|
6120
6410
|
}
|
|
6121
6411
|
else {
|
|
6122
6412
|
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
@@ -6136,8 +6426,16 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6136
6426
|
// this.updatePostalCodeLocality(suggestionAddress);
|
|
6137
6427
|
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
6138
6428
|
if (!addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '')) {
|
|
6429
|
+
// No box number in prefill params and the API reports isComplete=false (box number required).
|
|
6430
|
+
// Do NOT start box-number prefill: when boxNumber param is empty, the box-number
|
|
6431
|
+
// component receives searchText='' and never fires its prefill event, so
|
|
6432
|
+
// quitPrefillMode() would never be called, leaving prefilling=true forever.
|
|
6433
|
+
// Since isComplete=false the address is not complete — do NOT force addressIsComplete=true;
|
|
6434
|
+
// setAddress() will correctly leave the street-number checkmark unset, and the user
|
|
6435
|
+
// must enter the box number manually.
|
|
6139
6436
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6140
|
-
|
|
6437
|
+
this.quitPrefillMode();
|
|
6438
|
+
return;
|
|
6141
6439
|
}
|
|
6142
6440
|
else {
|
|
6143
6441
|
this.updatePostalCodeLocality(address);
|
|
@@ -6159,33 +6457,32 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6159
6457
|
}
|
|
6160
6458
|
this.autocompleteBoxNb.searchText = '';
|
|
6161
6459
|
}
|
|
6162
|
-
/*
|
|
6163
|
-
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
6164
|
-
if ( ! addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '') )
|
|
6165
|
-
{
|
|
6166
|
-
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6167
|
-
this.quitPrefillMode();
|
|
6168
|
-
}
|
|
6169
|
-
else
|
|
6170
|
-
{
|
|
6171
|
-
if (this.showDebugMessageToConsole) { console.log('lib::prefill: trigger checking box number match... ', this.prefillData); }
|
|
6172
|
-
this.boxNumberPrefillData = this.prefillData;
|
|
6173
|
-
}
|
|
6174
|
-
*/
|
|
6175
6460
|
this.boxNumberPrefillData = this.prefillData;
|
|
6176
6461
|
}
|
|
6177
6462
|
}
|
|
6178
6463
|
else {
|
|
6179
6464
|
const prefillStreetNumber = this.prefillData.parameters.streetNumber;
|
|
6180
|
-
const address = this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
6465
|
+
const address = this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
6466
|
+
? this.prefillData.prefillStreetPerfectMatchSuggestion.address
|
|
6467
|
+
: null;
|
|
6181
6468
|
this.autocompleteBoxNb.streetNumber = '';
|
|
6182
6469
|
if (prefillStreetNumber === null || prefillStreetNumber === undefined || prefillStreetNumber.length === 0) {
|
|
6183
6470
|
this.setAddress(address, ADDRESSLEVEL.STREET);
|
|
6184
6471
|
}
|
|
6185
6472
|
else {
|
|
6186
|
-
//
|
|
6187
|
-
|
|
6188
|
-
|
|
6473
|
+
// The prefilled street number doesn't exist in the API (notInListAllowed=false).
|
|
6474
|
+
// Show the prefilled value in the input and leave the dropdown open so the
|
|
6475
|
+
// user can pick the correct house number from the suggestions.
|
|
6476
|
+
this.autocompleteStreetNb.searchText = prefillStreetNumber;
|
|
6477
|
+
// Keep streetNumberInput in sync with searchText so the child's inputText
|
|
6478
|
+
// ngOnChanges guard (notEqualIgnoreCase) does not trigger clearWidget()
|
|
6479
|
+
// once prefilling becomes false after quitPrefillMode().
|
|
6480
|
+
this.streetNumberInput = prefillStreetNumber;
|
|
6481
|
+
this.autocompleteStreetNb.isPrefillWithNoMatch = false;
|
|
6482
|
+
this.autocompleteStreetNb.addressIsComplete = false;
|
|
6483
|
+
this.autocompleteBoxNb.streetNumber = '';
|
|
6484
|
+
// Prevent the autofill Angular-CD chain from re-setting addressIsComplete=true.
|
|
6485
|
+
this.streetNumberAutofillData = null;
|
|
6189
6486
|
}
|
|
6190
6487
|
this.quitPrefillMode();
|
|
6191
6488
|
}
|
|
@@ -6198,18 +6495,48 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6198
6495
|
if (data.prefillBoxNumberPerfectMatchFound === true) {
|
|
6199
6496
|
const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
|
|
6200
6497
|
const address = suggestion.address;
|
|
6498
|
+
// When notInListAllowed, ensure user's prefilled values are used
|
|
6499
|
+
if (this.notInListAllowed) {
|
|
6500
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6501
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6502
|
+
}
|
|
6503
|
+
if (this.prefillData.parameters.boxNumber) {
|
|
6504
|
+
address.boxNumber = this.prefillData.parameters.boxNumber;
|
|
6505
|
+
}
|
|
6506
|
+
}
|
|
6201
6507
|
this.autocompleteBoxNb.selectedAddress = address;
|
|
6202
6508
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6203
6509
|
}
|
|
6204
6510
|
else {
|
|
6205
6511
|
const prefillBoxNumber = this.prefillData.parameters.boxNumber;
|
|
6206
|
-
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6512
|
+
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6513
|
+
? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
|
|
6514
|
+
: null;
|
|
6207
6515
|
if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
|
|
6208
6516
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6209
6517
|
}
|
|
6210
|
-
else {
|
|
6211
|
-
|
|
6518
|
+
else if (address) {
|
|
6519
|
+
address.boxNumber = prefillBoxNumber;
|
|
6520
|
+
if (this.notInListAllowed && this.prefillData.parameters.streetNumber) {
|
|
6521
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6522
|
+
}
|
|
6212
6523
|
address.searchBarString = prefillBoxNumber;
|
|
6524
|
+
// For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
|
|
6525
|
+
// - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
|
|
6526
|
+
// - pdpId is also cleared when street number was also not-in-list (both invalid).
|
|
6527
|
+
const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
|
|
6528
|
+
address.mailBoxId = null;
|
|
6529
|
+
address.mailBoxid = null;
|
|
6530
|
+
address.suffixId = null;
|
|
6531
|
+
if (address.geoSanction) {
|
|
6532
|
+
address.geoSanction = address.geoSanction.substring(0, 35);
|
|
6533
|
+
}
|
|
6534
|
+
if (streetNumberWasNotInList) {
|
|
6535
|
+
address.pdpId = null;
|
|
6536
|
+
if (address.geoSanction) {
|
|
6537
|
+
address.geoSanction = address.geoSanction.substring(0, 25);
|
|
6538
|
+
}
|
|
6539
|
+
}
|
|
6213
6540
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6214
6541
|
}
|
|
6215
6542
|
}
|
|
@@ -6223,29 +6550,68 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6223
6550
|
if (data.prefillBoxNumberPerfectMatchFound === true) {
|
|
6224
6551
|
const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
|
|
6225
6552
|
const address = suggestion.address;
|
|
6553
|
+
// When notInListAllowed, ensure user's prefilled values are used
|
|
6554
|
+
if (this.notInListAllowed) {
|
|
6555
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6556
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6557
|
+
}
|
|
6558
|
+
if (this.prefillData.parameters.boxNumber) {
|
|
6559
|
+
address.boxNumber = this.prefillData.parameters.boxNumber;
|
|
6560
|
+
}
|
|
6561
|
+
}
|
|
6226
6562
|
this.autocompleteBoxNb.selectedAddress = address;
|
|
6227
6563
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6228
6564
|
}
|
|
6229
6565
|
else {
|
|
6230
6566
|
const prefillBoxNumber = this.prefillData.parameters.boxNumber;
|
|
6231
|
-
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6567
|
+
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6568
|
+
? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
|
|
6569
|
+
: null;
|
|
6232
6570
|
if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
|
|
6233
6571
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6234
6572
|
}
|
|
6235
|
-
else {
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6573
|
+
else if (address) {
|
|
6574
|
+
if (!this.notInListAllowed) {
|
|
6575
|
+
// notInListAllowed=false: the box number is invalid and must not appear in the
|
|
6576
|
+
// selected address or address component. Complete the address at street-number
|
|
6577
|
+
// level so the emitted address contains only the valid street number.
|
|
6578
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6579
|
+
}
|
|
6580
|
+
else {
|
|
6581
|
+
// notInListAllowed=true: include the prefilled box number as-is (not-in-list)
|
|
6582
|
+
address.boxNumber = prefillBoxNumber;
|
|
6583
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6584
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6585
|
+
}
|
|
6586
|
+
address.searchBarString = prefillBoxNumber;
|
|
6587
|
+
// For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
|
|
6588
|
+
// - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
|
|
6589
|
+
// - pdpId is also cleared when street number was also not-in-list (both invalid).
|
|
6590
|
+
const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
|
|
6591
|
+
address.mailBoxId = null;
|
|
6592
|
+
address.mailBoxid = null;
|
|
6593
|
+
address.suffixId = null;
|
|
6594
|
+
if (address.geoSanction) {
|
|
6595
|
+
address.geoSanction = address.geoSanction.substring(0, 35);
|
|
6596
|
+
}
|
|
6597
|
+
if (streetNumberWasNotInList) {
|
|
6598
|
+
address.pdpId = null;
|
|
6599
|
+
if (address.geoSanction) {
|
|
6600
|
+
address.geoSanction = address.geoSanction.substring(0, 25);
|
|
6601
|
+
}
|
|
6602
|
+
}
|
|
6603
|
+
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6604
|
+
}
|
|
6239
6605
|
}
|
|
6240
6606
|
}
|
|
6241
6607
|
this.quitPrefillMode();
|
|
6242
6608
|
}
|
|
6243
6609
|
}
|
|
6244
6610
|
LibAddressAutocompleteByComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, deps: [{ token: HttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6245
|
-
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"] }] });
|
|
6611
|
+
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"] }] });
|
|
6246
6612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
|
|
6247
6613
|
type: Component,
|
|
6248
|
-
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
|
|
6614
|
+
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: [""] }]
|
|
6249
6615
|
}], ctorParameters: function () { return [{ type: HttpService }]; }, propDecorators: { autocompleteLocality: [{
|
|
6250
6616
|
type: ViewChild,
|
|
6251
6617
|
args: [LocalityComponent, { static: false }]
|