@bpost/bp-address-auto-complete-by-component 1.1.28 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION.md +6 -0
- package/esm2020/lib/box-number/box-number.component.mjs +94 -17
- package/esm2020/lib/lib-address-autocomplete-by-component.component.mjs +242 -45
- package/esm2020/lib/locality/locality.component.mjs +1 -1
- package/esm2020/lib/street-number/street-number.component.mjs +102 -31
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs +435 -90
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs +435 -90
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/lib/box-number/box-number.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2663,16 +2663,17 @@ class StreetNumberComponent {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
ngOnChanges(changes) {
|
|
2665
2665
|
if (changes) {
|
|
2666
|
-
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
2666
|
+
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
2667
|
+
&& !this.prefilling && !changes.hasOwnProperty('prefillData')) {
|
|
2667
2668
|
this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
|
|
2668
2669
|
this.setSelectedAddress(this.autofillData.selectedAddress);
|
|
2670
|
+
this.isPrefillWithNoMatch = false;
|
|
2669
2671
|
}
|
|
2670
2672
|
else {
|
|
2671
2673
|
if (changes.hasOwnProperty('streetName')
|
|
2672
2674
|
&& !changes.streetName.firstChange
|
|
2673
2675
|
&& !changes.hasOwnProperty('prefillData') && !this.prefilling) {
|
|
2674
2676
|
this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
2675
|
-
// this.addressIsComplete = false;
|
|
2676
2677
|
if (this.showDebugMessageToConsole) {
|
|
2677
2678
|
console.warn('street name - ngOnchanges - streetName changes detection');
|
|
2678
2679
|
}
|
|
@@ -2696,13 +2697,8 @@ class StreetNumberComponent {
|
|
|
2696
2697
|
if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
|
|
2697
2698
|
this.prefilling = true;
|
|
2698
2699
|
this.addressIsComplete = false;
|
|
2699
|
-
// console.log('streetNumber::ngOnChanges', this.addressIsComplete);
|
|
2700
2700
|
this.searchText = this.loadParams(changes.prefillData.currentValue);
|
|
2701
2701
|
if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.STREET_NUMBER) {
|
|
2702
|
-
/*
|
|
2703
|
-
this.onInputChange(/*'prefilled'* / SourceType.SOURCE_PREFILLED);
|
|
2704
|
-
this.streetNumberSearchInput.nativeElement.focus();
|
|
2705
|
-
*/
|
|
2706
2702
|
this.collapseDropdown = true;
|
|
2707
2703
|
this.prefillData.prefillStreetNumber
|
|
2708
2704
|
= this.transformStreetNumberInLowercaseAndWithoutDiacritics(this.prefillData.parameters.streetNumber);
|
|
@@ -2768,6 +2764,9 @@ class StreetNumberComponent {
|
|
|
2768
2764
|
}
|
|
2769
2765
|
onFocus() {
|
|
2770
2766
|
this.collapseDropdown = false;
|
|
2767
|
+
if (this.prefillData !== null && this.prefillData.prefillStreetNumberPerfectMatchFound != false && this.addressIsComplete) {
|
|
2768
|
+
this.collapseDropdown = true;
|
|
2769
|
+
}
|
|
2771
2770
|
// this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
|
|
2772
2771
|
// ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
|
|
2773
2772
|
// this.prefilling = false;
|
|
@@ -2846,6 +2845,10 @@ class StreetNumberComponent {
|
|
|
2846
2845
|
*/
|
|
2847
2846
|
// this.addressIsComplete = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? true : false;
|
|
2848
2847
|
this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
|
|
2848
|
+
// Ensure user's prefill value is displayed when notInListAllowed
|
|
2849
|
+
if (this.notInListAllowed && this.prefillData.prefillStreetNumber) {
|
|
2850
|
+
this.searchText = this.prefillData.parameters.streetNumber;
|
|
2851
|
+
}
|
|
2849
2852
|
this.prefillAnalyzeData();
|
|
2850
2853
|
}
|
|
2851
2854
|
else {
|
|
@@ -2964,7 +2967,7 @@ class StreetNumberComponent {
|
|
|
2964
2967
|
this.buildInputWordList();
|
|
2965
2968
|
}
|
|
2966
2969
|
this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
|
|
2967
|
-
?
|
|
2970
|
+
? this.prefillData.prefillStreetNumberPerfectMatchFound : false;
|
|
2968
2971
|
}
|
|
2969
2972
|
handleGetStreetError(source) {
|
|
2970
2973
|
if (this.allowNoValidation && this.validatedByBackend) {
|
|
@@ -3014,8 +3017,7 @@ class StreetNumberComponent {
|
|
|
3014
3017
|
}
|
|
3015
3018
|
}
|
|
3016
3019
|
else {
|
|
3017
|
-
//
|
|
3018
|
-
// If this is the case, simulate the selection of the 'not-in-list' suggestion
|
|
3020
|
+
// notInListAllowed=true: build a 'not-in-list' suggestion from the prefilled number
|
|
3019
3021
|
if (this.prefilling && this.notInListAllowed
|
|
3020
3022
|
&& this.prefillData.prefillStreetNumberPerfectMatchFound === false
|
|
3021
3023
|
&& this.prefillData.prefillStreetNumber !== null
|
|
@@ -3028,6 +3030,33 @@ class StreetNumberComponent {
|
|
|
3028
3030
|
}
|
|
3029
3031
|
this.prefillCheckForPerfectMatch(suggestion);
|
|
3030
3032
|
}
|
|
3033
|
+
// notInListAllowed=false and no perfect match:
|
|
3034
|
+
// Check whether any API suggestion starts with the prefilled value (prefix match).
|
|
3035
|
+
// - Prefix match exists (e.g. "1" → "10","11","18"): leave searchText as-is so the
|
|
3036
|
+
// parent's "not found" else branch shows the dropdown with the prefilled value.
|
|
3037
|
+
// - No prefix match (e.g. "145896" → "56"): auto-select the first complete suggestion
|
|
3038
|
+
// so the parent's "found" branch completes the address automatically.
|
|
3039
|
+
if (this.prefilling && !this.notInListAllowed
|
|
3040
|
+
&& this.prefillData.prefillStreetNumberPerfectMatchFound === false
|
|
3041
|
+
&& this.prefillData.prefillStreetNumber !== null
|
|
3042
|
+
&& this.prefillData.prefillStreetNumber !== undefined
|
|
3043
|
+
&& this.prefillData.prefillStreetNumber.length > 0) {
|
|
3044
|
+
const prefillLower = this.prefillData.prefillStreetNumber.toLowerCase();
|
|
3045
|
+
const hasPrefixMatch = this.suggestions.some(s => s.houseNumber && s.houseNumber.toLowerCase().startsWith(prefillLower));
|
|
3046
|
+
if (!hasPrefixMatch) {
|
|
3047
|
+
// Prefer a suggestion with isComplete=true; fall back to first suggestion that has a
|
|
3048
|
+
// house number in case language-specific sub-objects (dutch/french) lack isComplete.
|
|
3049
|
+
const autoSelect = this.suggestions.find(s => s.hasOwnProperty('isComplete') && s.isComplete === true)
|
|
3050
|
+
|| this.suggestions.find(s => s.houseNumber != null);
|
|
3051
|
+
if (autoSelect) {
|
|
3052
|
+
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
3053
|
+
this.prefillData.prefillStreetNumberPerfectMatchSuggestion = { address: autoSelect };
|
|
3054
|
+
this.searchText = autoSelect.houseNumber;
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
// If hasPrefixMatch: searchText stays as the prefilled value;
|
|
3058
|
+
// the parent's else branch will display it and keep the dropdown open.
|
|
3059
|
+
}
|
|
3031
3060
|
}
|
|
3032
3061
|
}
|
|
3033
3062
|
else {
|
|
@@ -3038,8 +3067,13 @@ class StreetNumberComponent {
|
|
|
3038
3067
|
const notInListSuggestion = { string: this.searchText, 'not-in-list': true };
|
|
3039
3068
|
const streetSuggestion = this.prefillData.prefillStreetPerfectMatchSuggestion;
|
|
3040
3069
|
const combined = { ...streetSuggestion.address, ...notInListSuggestion };
|
|
3041
|
-
delete combined.mailBoxid;
|
|
3070
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
3071
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
3072
|
+
delete combined.pdpId;
|
|
3042
3073
|
delete combined.suffixId;
|
|
3074
|
+
if (combined.geoSanction) {
|
|
3075
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
3076
|
+
}
|
|
3043
3077
|
// combined.boxNumber = combined.string;
|
|
3044
3078
|
combined.houseNumber = combined.string;
|
|
3045
3079
|
combined.searchBarString = combined.string;
|
|
@@ -3086,7 +3120,13 @@ class StreetNumberComponent {
|
|
|
3086
3120
|
suggestion.address = suggestionToAdd;
|
|
3087
3121
|
this.prefillCheckForPerfectMatch(suggestion);
|
|
3088
3122
|
}
|
|
3089
|
-
|
|
3123
|
+
// Skip checkForPerfectMatch when prefill already found a match to prevent a second
|
|
3124
|
+
// clickSuggestion call that would overwrite searchText with searchBarString.
|
|
3125
|
+
const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
|
|
3126
|
+
&& this.prefillData && this.prefillData.prefillStreetNumberPerfectMatchFound === true;
|
|
3127
|
+
if (!skipNonPrefillCheck
|
|
3128
|
+
&& this.suggestionLevel !== SuggestionLevelType.StreetNumber
|
|
3129
|
+
&& this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
3090
3130
|
suggestion.address = suggestionToAdd;
|
|
3091
3131
|
const isPerfectMatch = this.checkForPerfectMatch(suggestion);
|
|
3092
3132
|
if (!isPerfectMatch) {
|
|
@@ -3098,25 +3138,22 @@ class StreetNumberComponent {
|
|
|
3098
3138
|
}
|
|
3099
3139
|
checkForPerfectMatch(suggestion) {
|
|
3100
3140
|
if (!this.addressIsComplete) {
|
|
3101
|
-
// if (this.showDebugMessageToConsole) {
|
|
3102
|
-
console.log('streetNumber - checking suggestion for perfect match', suggestion, this.searchText);
|
|
3103
|
-
// }
|
|
3104
3141
|
const sugAddress = suggestion.address;
|
|
3105
3142
|
const suggestionStreetNumber = this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + sugAddress.houseNumber);
|
|
3106
3143
|
if (suggestionStreetNumber === ('' + this.searchText)) {
|
|
3107
3144
|
this.searchText = sugAddress.houseNumber;
|
|
3108
3145
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
3109
3146
|
this.clickSuggestion(null, sugAddress);
|
|
3147
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
3148
|
+
// Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
|
|
3149
|
+
this.searchText = sugAddress.houseNumber;
|
|
3110
3150
|
this.addressIsComplete = true;
|
|
3111
|
-
// console.log('streetNumber::prefillCheckForPerfectMatch', this.addressIsComplete);
|
|
3112
|
-
// if (this.showDebugMessageToConsole && this.addressIsComplete === true) {
|
|
3113
|
-
console.log('ADDRESS COMPLETE ON STREET NUMBER !');
|
|
3114
|
-
// }
|
|
3115
3151
|
return true;
|
|
3116
3152
|
}
|
|
3117
3153
|
else {
|
|
3118
3154
|
if (this.suggestionLevel !== SuggestionLevelType.StreetNumber && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
3119
3155
|
this.clickSuggestion(null, sugAddress); // house number found
|
|
3156
|
+
this.searchText = sugAddress.houseNumber;
|
|
3120
3157
|
}
|
|
3121
3158
|
}
|
|
3122
3159
|
}
|
|
@@ -3144,11 +3181,10 @@ class StreetNumberComponent {
|
|
|
3144
3181
|
this.searchText = sugAddress.houseNumber;
|
|
3145
3182
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
3146
3183
|
this.clickSuggestion(null, sugAddress);
|
|
3184
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
3185
|
+
// Restore to houseNumber so the inputText ngOnChanges guard won't trigger clearWidget().
|
|
3186
|
+
this.searchText = sugAddress.houseNumber;
|
|
3147
3187
|
this.addressIsComplete = true;
|
|
3148
|
-
// console.log('streetNumber::prefillCheckForPerfectMatch', this.addressIsComplete);
|
|
3149
|
-
// if (this.showDebugMessageToConsole && this.addressIsComplete === true) {
|
|
3150
|
-
console.log('ADDRESS COMPLETE ON STREET NUMBER !');
|
|
3151
|
-
// }
|
|
3152
3188
|
}
|
|
3153
3189
|
}
|
|
3154
3190
|
}
|
|
@@ -3183,7 +3219,6 @@ class StreetNumberComponent {
|
|
|
3183
3219
|
this.consumedNumber = this.sequenceNumber;
|
|
3184
3220
|
this.clearSuggestions();
|
|
3185
3221
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3186
|
-
console.log('(A) do not use suggestions for street number');
|
|
3187
3222
|
this.streetNumberChanged.emit(this.searchText);
|
|
3188
3223
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3189
3224
|
this.prefillAnalyzeData();
|
|
@@ -3191,7 +3226,6 @@ class StreetNumberComponent {
|
|
|
3191
3226
|
}
|
|
3192
3227
|
else {
|
|
3193
3228
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3194
|
-
console.log('(B) do not use suggestions for street number');
|
|
3195
3229
|
this.streetNumberChanged.emit(this.searchText);
|
|
3196
3230
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3197
3231
|
this.prefillAnalyzeData();
|
|
@@ -3228,6 +3262,7 @@ class StreetNumberComponent {
|
|
|
3228
3262
|
this.resetArrowSelectedIndex();
|
|
3229
3263
|
if (!source) {
|
|
3230
3264
|
this.prefilling = false;
|
|
3265
|
+
this.isPrefillWithNoMatch = false;
|
|
3231
3266
|
if (this.showDebugMessageToConsole) {
|
|
3232
3267
|
console.log('streetNumber::onInputChange -> calling valueChanged');
|
|
3233
3268
|
}
|
|
@@ -3239,7 +3274,6 @@ class StreetNumberComponent {
|
|
|
3239
3274
|
this.consumedNumber = this.sequenceNumber;
|
|
3240
3275
|
this.clearSuggestions();
|
|
3241
3276
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3242
|
-
console.log('(A) do not use suggestions for street number');
|
|
3243
3277
|
this.streetNumberChanged.emit(this.searchText);
|
|
3244
3278
|
if (source === SourceType.SOURCE_PREFILLED)
|
|
3245
3279
|
this.prefillAnalyzeData();
|
|
@@ -3247,7 +3281,6 @@ class StreetNumberComponent {
|
|
|
3247
3281
|
}
|
|
3248
3282
|
else {
|
|
3249
3283
|
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
3250
|
-
console.log('(B) do not use suggestions for street number');
|
|
3251
3284
|
this.streetNumberChanged.emit(this.searchText);
|
|
3252
3285
|
if (source === SourceType.SOURCE_PREFILLED) {
|
|
3253
3286
|
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
@@ -3299,6 +3332,38 @@ class StreetNumberComponent {
|
|
|
3299
3332
|
}
|
|
3300
3333
|
}
|
|
3301
3334
|
else {
|
|
3335
|
+
// If prefilling, check whether the street suggestion already carries the matching house number
|
|
3336
|
+
// (e.g. postal code 1031 where the street API returns data up to house-number level).
|
|
3337
|
+
// In that case skip the street-number API call and go straight to the box-number step.
|
|
3338
|
+
if (source === SourceType.SOURCE_PREFILLED
|
|
3339
|
+
&& this.prefillData
|
|
3340
|
+
&& this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
3341
|
+
&& this.prefillData.prefillStreetPerfectMatchSuggestion.address) {
|
|
3342
|
+
const streetAddr = this.prefillData.prefillStreetPerfectMatchSuggestion.address;
|
|
3343
|
+
const rawHouseNumber = streetAddr.houseNumber;
|
|
3344
|
+
const streetHouseNumber = (rawHouseNumber != null && rawHouseNumber !== undefined)
|
|
3345
|
+
? this.transformStreetNumberInLowercaseAndWithoutDiacritics('' + rawHouseNumber)
|
|
3346
|
+
: null;
|
|
3347
|
+
// Use the house number from the street suggestion when:
|
|
3348
|
+
// (a) it exactly matches the prefilled value, OR
|
|
3349
|
+
// (b) notInListAllowed=false — the prefilled value is invalid so auto-fill with
|
|
3350
|
+
// the valid house number that the locality/street API already returned.
|
|
3351
|
+
const streetHouseNumberIsValid = streetHouseNumber && streetHouseNumber !== 'null' && streetHouseNumber !== 'undefined';
|
|
3352
|
+
if (streetHouseNumberIsValid && this.prefillData.prefillStreetNumber
|
|
3353
|
+
&& (streetHouseNumber === this.prefillData.prefillStreetNumber || !this.notInListAllowed)) {
|
|
3354
|
+
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
3355
|
+
this.prefillData.prefillStreetNumberPerfectMatchSuggestion = this.prefillData.prefillStreetPerfectMatchSuggestion;
|
|
3356
|
+
this.searchText = rawHouseNumber;
|
|
3357
|
+
this.isPrefillWithNoMatch = false;
|
|
3358
|
+
this.collapseDropdown = true;
|
|
3359
|
+
if (streetAddr.hasOwnProperty('isComplete') && streetAddr.isComplete === true) {
|
|
3360
|
+
this.clickSuggestion(null, streetAddr);
|
|
3361
|
+
this.addressIsComplete = true;
|
|
3362
|
+
}
|
|
3363
|
+
this.prefillAnalyzeData();
|
|
3364
|
+
return;
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3302
3367
|
this.getTopSuggestions(source);
|
|
3303
3368
|
}
|
|
3304
3369
|
}
|
|
@@ -3313,9 +3378,12 @@ class StreetNumberComponent {
|
|
|
3313
3378
|
if (suggestion) {
|
|
3314
3379
|
this.clearTypeAhead();
|
|
3315
3380
|
this.resetArrowSelectedIndex();
|
|
3316
|
-
if (suggestion.
|
|
3381
|
+
if (suggestion.searchBarString) {
|
|
3317
3382
|
this.setSearchText(suggestion.searchBarString);
|
|
3318
3383
|
}
|
|
3384
|
+
else if (suggestion.string) {
|
|
3385
|
+
this.setSearchText(suggestion.string);
|
|
3386
|
+
}
|
|
3319
3387
|
this.collapseDropdown = true;
|
|
3320
3388
|
const notInList = suggestion['not-in-list'];
|
|
3321
3389
|
const isNotInList = notInList !== null && notInList !== undefined && notInList === true;
|
|
@@ -3325,7 +3393,7 @@ class StreetNumberComponent {
|
|
|
3325
3393
|
console.log('streetNumber::clickSuggestion - NOT-IN-LIST', event, suggestion);
|
|
3326
3394
|
}
|
|
3327
3395
|
}
|
|
3328
|
-
if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.
|
|
3396
|
+
if (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) {
|
|
3329
3397
|
this.addressIsComplete = true;
|
|
3330
3398
|
// this.notifyAddressIsValidated();
|
|
3331
3399
|
}
|
|
@@ -3348,6 +3416,9 @@ class StreetNumberComponent {
|
|
|
3348
3416
|
delete combined.suffixId;
|
|
3349
3417
|
delete combined.pdpId;
|
|
3350
3418
|
delete combined.pdpId;
|
|
3419
|
+
if (combined.geoSanction) {
|
|
3420
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
3421
|
+
}
|
|
3351
3422
|
combined.houseNumber = combined.string;
|
|
3352
3423
|
combined.searchBarString = combined.string;
|
|
3353
3424
|
combined.isComplete = true;
|
|
@@ -3357,7 +3428,7 @@ class StreetNumberComponent {
|
|
|
3357
3428
|
// console.log('street number - emit suggestion', suggestion);
|
|
3358
3429
|
const notInList = suggestion['not-in-list'];
|
|
3359
3430
|
const isNotInList = notInList !== null && notInList !== undefined && notInList === true;
|
|
3360
|
-
this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.
|
|
3431
|
+
this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList && !suggestion.boxNumber) ? true : false;
|
|
3361
3432
|
this.addressChanged.emit(suggestion);
|
|
3362
3433
|
}
|
|
3363
3434
|
/*
|
|
@@ -3770,9 +3841,14 @@ class BoxNumberComponent {
|
|
|
3770
3841
|
}
|
|
3771
3842
|
ngOnChanges(changes) {
|
|
3772
3843
|
if (changes) {
|
|
3773
|
-
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
3774
|
-
this.
|
|
3775
|
-
|
|
3844
|
+
if (changes.hasOwnProperty('autofillData') && changes.autofillData.currentValue !== null && changes.autofillData.currentValue !== undefined
|
|
3845
|
+
&& !this.prefilling && !changes.hasOwnProperty('prefillData')) {
|
|
3846
|
+
const newBoxNumber = changes.autofillData.currentValue.boxNumber;
|
|
3847
|
+
// Only process if the box number value actually changed to avoid infinite loop
|
|
3848
|
+
if (newBoxNumber !== this.searchText) {
|
|
3849
|
+
this.searchText = this.loadAutoFillParams(changes.autofillData.currentValue);
|
|
3850
|
+
this.setSelectedAddress(this.autofillData.selectedAddress);
|
|
3851
|
+
}
|
|
3776
3852
|
}
|
|
3777
3853
|
else {
|
|
3778
3854
|
if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
|
|
@@ -3780,11 +3856,28 @@ class BoxNumberComponent {
|
|
|
3780
3856
|
this.searchText = this.loadParams(changes.prefillData.currentValue);
|
|
3781
3857
|
if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.BOX_NUMBER) {
|
|
3782
3858
|
// this.onInputChange('prefilled');
|
|
3783
|
-
// this.boxNumberSearchInput.nativeElement.focus();
|
|
3784
3859
|
this.collapseDropdown = true;
|
|
3785
3860
|
this.prefillData.prefillBoxNumber
|
|
3786
3861
|
= this.transformBoxNumberInLowercaseAndWithoutDiacritics(this.prefillData.parameters.boxNumber);
|
|
3787
|
-
|
|
3862
|
+
// When notInListAllowed=false, skip the API call if the selected address is
|
|
3863
|
+
// already complete without a box number (i.e. no box numbers exist for this
|
|
3864
|
+
// address in the database). In that case any prefilled box number is invalid
|
|
3865
|
+
// and the API would return empty results anyway.
|
|
3866
|
+
const selectedAddressIsCompleteWithoutBoxNumber = this.selectedAddress != null &&
|
|
3867
|
+
this.selectedAddress.isComplete === true &&
|
|
3868
|
+
!this.selectedAddress.hasOwnProperty('boxNumber');
|
|
3869
|
+
if (!this.notInListAllowed && selectedAddressIsCompleteWithoutBoxNumber) {
|
|
3870
|
+
this.isPrefillWithNoMatch = true;
|
|
3871
|
+
this.prefillAnalyzeData();
|
|
3872
|
+
}
|
|
3873
|
+
else {
|
|
3874
|
+
this.onInputChange(/*'prefilled'*/ SourceType.SOURCE_PREFILLED);
|
|
3875
|
+
}
|
|
3876
|
+
setTimeout(() => {
|
|
3877
|
+
if (this.boxNumberSearchInput && this.boxNumberSearchInput.nativeElement && !this.boxNumberSearchInput.nativeElement.disabled) {
|
|
3878
|
+
this.boxNumberSearchInput.nativeElement.focus();
|
|
3879
|
+
}
|
|
3880
|
+
}, 0);
|
|
3788
3881
|
}
|
|
3789
3882
|
}
|
|
3790
3883
|
if (changes.hasOwnProperty('streetNumber') && !changes.streetNumber.firstChange && !changes.hasOwnProperty('prefillData')) {
|
|
@@ -3863,6 +3956,9 @@ class BoxNumberComponent {
|
|
|
3863
3956
|
}
|
|
3864
3957
|
onFocus() {
|
|
3865
3958
|
this.collapseDropdown = false;
|
|
3959
|
+
if (this.prefillData !== null && this.prefillData.prefillBoxNumberPerfectMatchFound != false) {
|
|
3960
|
+
this.collapseDropdown = true;
|
|
3961
|
+
}
|
|
3866
3962
|
// this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
|
|
3867
3963
|
// ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
|
|
3868
3964
|
// this.prefilling = false;
|
|
@@ -3921,11 +4017,24 @@ class BoxNumberComponent {
|
|
|
3921
4017
|
console.log('BOX-NUMBER calling service params', param);
|
|
3922
4018
|
}
|
|
3923
4019
|
if (this.searchText) {
|
|
4020
|
+
this.addressIsValidated = false;
|
|
3924
4021
|
this.subscription = this.addressService.getBox(this.baseUrl, this.locality, this.postalCode, param)
|
|
3925
4022
|
.subscribe(response => {
|
|
3926
4023
|
this.handleGetBoxResponse(response, source);
|
|
3927
4024
|
if (source === SourceType.SOURCE_PREFILLED) {
|
|
3928
4025
|
this.isPrefillWithNoMatch = this.prefillData.prefillBoxNumberPerfectMatchFound === true ? false : true;
|
|
4026
|
+
// Ensure user's prefill value is displayed when notInListAllowed
|
|
4027
|
+
if (this.notInListAllowed && this.prefillData.prefillBoxNumber) {
|
|
4028
|
+
this.searchText = this.prefillData.parameters.boxNumber;
|
|
4029
|
+
this.isPrefillWithNoMatch = false;
|
|
4030
|
+
}
|
|
4031
|
+
// If notInListAllowed is false and no perfect match, keep the prefilled value
|
|
4032
|
+
// but show it in orangered so the user sees it was not found in the API.
|
|
4033
|
+
if (!this.notInListAllowed && this.prefillData.prefillBoxNumber !== ''
|
|
4034
|
+
&& this.prefillData.prefillBoxNumberPerfectMatchFound !== true) {
|
|
4035
|
+
this.searchText = this.prefillData.parameters.boxNumber;
|
|
4036
|
+
this.isPrefillWithNoMatch = true;
|
|
4037
|
+
}
|
|
3929
4038
|
this.prefillAnalyzeData();
|
|
3930
4039
|
}
|
|
3931
4040
|
else {
|
|
@@ -4119,10 +4228,12 @@ class BoxNumberComponent {
|
|
|
4119
4228
|
&& this.prefillData.prefillBoxNumber.length > 0) {
|
|
4120
4229
|
// const notInListSuggestion = {string: this.searchText, 'not-in-list': true};
|
|
4121
4230
|
const suggestion = this.prefillBuildNotInListSuggestion();
|
|
4122
|
-
if (
|
|
4123
|
-
|
|
4231
|
+
if (suggestion) {
|
|
4232
|
+
if (this.showDebugMessageToConsole) {
|
|
4233
|
+
console.log('BOX NUMBER - PREFILL NOT IN LIST SUGGESTION:', suggestion);
|
|
4234
|
+
}
|
|
4235
|
+
this.prefillCheckForPerfectMatch(suggestion);
|
|
4124
4236
|
}
|
|
4125
|
-
this.prefillCheckForPerfectMatch(suggestion);
|
|
4126
4237
|
}
|
|
4127
4238
|
}
|
|
4128
4239
|
}
|
|
@@ -4133,9 +4244,25 @@ class BoxNumberComponent {
|
|
|
4133
4244
|
prefillBuildNotInListSuggestion() {
|
|
4134
4245
|
const notInListSuggestion = { string: this.searchText, 'not-in-list': true };
|
|
4135
4246
|
const streetNumberSuggestion = this.prefillData.prefillStreetNumberPerfectMatchSuggestion;
|
|
4247
|
+
if (!streetNumberSuggestion || !streetNumberSuggestion.address) {
|
|
4248
|
+
return null;
|
|
4249
|
+
}
|
|
4250
|
+
// Capture whether the street-number suggestion was itself not-in-list (invalid)
|
|
4251
|
+
// BEFORE merging — spreading notInListSuggestion on top would mask the original flag.
|
|
4252
|
+
const streetNumberWasNotInList = streetNumberSuggestion.address['not-in-list'] === true;
|
|
4136
4253
|
const combined = { ...streetNumberSuggestion.address, ...notInListSuggestion };
|
|
4137
|
-
delete combined.mailBoxid;
|
|
4254
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
4255
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
4138
4256
|
delete combined.suffixId;
|
|
4257
|
+
if (combined.geoSanction) {
|
|
4258
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
4259
|
+
}
|
|
4260
|
+
if (streetNumberWasNotInList) {
|
|
4261
|
+
delete combined.pdpId;
|
|
4262
|
+
if (combined.geoSanction) {
|
|
4263
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4139
4266
|
combined.boxNumber = combined.string;
|
|
4140
4267
|
combined.searchBarString = combined.string;
|
|
4141
4268
|
combined.isComplete = true;
|
|
@@ -4169,7 +4296,11 @@ class BoxNumberComponent {
|
|
|
4169
4296
|
suggestion.address = suggestionToAdd;
|
|
4170
4297
|
isPerfectMatch = this.prefillCheckForPerfectMatch(suggestion);
|
|
4171
4298
|
}
|
|
4172
|
-
|
|
4299
|
+
// Skip checkForPerfectMatch when prefill already found a match to prevent a second
|
|
4300
|
+
// clickSuggestion call that would overwrite searchText with searchBarString.
|
|
4301
|
+
const skipNonPrefillCheck = source === SourceType.SOURCE_PREFILLED
|
|
4302
|
+
&& this.prefillData && this.prefillData.prefillBoxNumberPerfectMatchFound === true;
|
|
4303
|
+
if (!skipNonPrefillCheck && this.suggestionLevel !== SuggestionLevelType.StreetAndBoxNumber) {
|
|
4173
4304
|
suggestion.address = suggestionToAdd;
|
|
4174
4305
|
isPerfectMatch = this.checkForPerfectMatch(suggestion);
|
|
4175
4306
|
if (!isPerfectMatch) {
|
|
@@ -4194,7 +4325,9 @@ class BoxNumberComponent {
|
|
|
4194
4325
|
this.searchText = sugAddress.boxNumber;
|
|
4195
4326
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
4196
4327
|
this.clickSuggestion(null, sugAddress);
|
|
4197
|
-
//
|
|
4328
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
4329
|
+
// Restore to boxNumber so the field shows the clean box number value.
|
|
4330
|
+
this.searchText = sugAddress.boxNumber;
|
|
4198
4331
|
if (this.showDebugMessageToConsole) {
|
|
4199
4332
|
console.log('ADDRESS COMPLETE ON BOX NUMBER !');
|
|
4200
4333
|
}
|
|
@@ -4221,7 +4354,9 @@ class BoxNumberComponent {
|
|
|
4221
4354
|
this.searchText = sugAddress.boxNumber;
|
|
4222
4355
|
if (sugAddress.hasOwnProperty('isComplete') && sugAddress.isComplete === true) {
|
|
4223
4356
|
this.clickSuggestion(null, sugAddress);
|
|
4224
|
-
//
|
|
4357
|
+
// clickSuggestion sets searchText = sugAddress.searchBarString (full address string).
|
|
4358
|
+
// Restore to boxNumber so the field shows the clean box number value.
|
|
4359
|
+
this.searchText = sugAddress.boxNumber;
|
|
4225
4360
|
if (this.showDebugMessageToConsole) {
|
|
4226
4361
|
console.log('ADDRESS COMPLETE ON BOX NUMBER !');
|
|
4227
4362
|
}
|
|
@@ -4349,9 +4484,12 @@ class BoxNumberComponent {
|
|
|
4349
4484
|
if (suggestion) {
|
|
4350
4485
|
this.clearTypeAhead();
|
|
4351
4486
|
this.resetArrowSelectedIndex();
|
|
4352
|
-
if (suggestion.
|
|
4487
|
+
if (suggestion.searchBarString) {
|
|
4353
4488
|
this.setSearchText(suggestion.searchBarString);
|
|
4354
4489
|
}
|
|
4490
|
+
else if (suggestion.string) {
|
|
4491
|
+
this.setSearchText(suggestion.string);
|
|
4492
|
+
}
|
|
4355
4493
|
this.collapseDropdown = true;
|
|
4356
4494
|
// if (suggestion.hasOwnProperty('isComplete')) {
|
|
4357
4495
|
// this.showAddressIsValidated();
|
|
@@ -4368,13 +4506,18 @@ class BoxNumberComponent {
|
|
|
4368
4506
|
const combined = { ...this.selectedAddress, ...suggestion };
|
|
4369
4507
|
delete combined.mailBoxid;
|
|
4370
4508
|
delete combined.suffixId;
|
|
4509
|
+
if (combined.geoSanction) {
|
|
4510
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
4511
|
+
}
|
|
4371
4512
|
combined.boxNumber = combined.string;
|
|
4372
4513
|
combined.searchBarString = combined.string;
|
|
4373
4514
|
combined.isComplete = true;
|
|
4374
4515
|
return combined;
|
|
4375
4516
|
}
|
|
4376
4517
|
setSelectedAddress(suggestion) {
|
|
4377
|
-
|
|
4518
|
+
if (this.showDebugMessageToConsole) {
|
|
4519
|
+
console.log('box number::setSelectedAddress', suggestion);
|
|
4520
|
+
}
|
|
4378
4521
|
this.addressIsValidated = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true) ? true : false;
|
|
4379
4522
|
this.addressChanged.emit(suggestion);
|
|
4380
4523
|
}
|
|
@@ -4605,6 +4748,11 @@ class BoxNumberComponent {
|
|
|
4605
4748
|
isDisabled() {
|
|
4606
4749
|
return (this.locality === '' || this.postalCode === '' || this.minLevel > ADDRESSLEVEL.BOX_NUMBER);
|
|
4607
4750
|
}
|
|
4751
|
+
isDisabledByPrefill() {
|
|
4752
|
+
return this.prefillData !== null && this.prefillData !== undefined
|
|
4753
|
+
&& this.prefillData.parameters !== null && this.prefillData.parameters !== undefined
|
|
4754
|
+
&& !this.isValid(this.prefillData.parameters.boxNumber);
|
|
4755
|
+
}
|
|
4608
4756
|
onInputClick() {
|
|
4609
4757
|
if (this.showDebugMessageToConsole) {
|
|
4610
4758
|
console.log('box number click');
|
|
@@ -4612,10 +4760,10 @@ class BoxNumberComponent {
|
|
|
4612
4760
|
}
|
|
4613
4761
|
}
|
|
4614
4762
|
BoxNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, deps: [{ token: AddressService }, { token: LocaleService }, { token: i3.TranslateService }, { token: UnicodeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4615
|
-
BoxNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BoxNumberComponent, selector: "bp-box-number", inputs: { prefillData: "prefillData", autofillData: "autofillData", showDebugMessageToConsole: "showDebugMessageToConsole", labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", addressParams: "addressParams", postalCode: "postalCode", locality: "locality", streetName: "streetName", streetNumber: "streetNumber", selectedAddress: "selectedAddress", notInListAllowed: "notInListAllowed", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", inputLang: "inputLang", messageOption: "messageOption", isReadonly: "isReadonly", suggestionLevel: "suggestionLevel", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", emptyResponseEvent: "emptyResponseEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", boxNumberChanged: "boxNumberChanged", numberOfExceptionsEmitter: "numberOfExceptionsEmitter" }, viewQueries: [{ propertyName: "boxNumberSearchInput", first: true, predicate: ["boxNumberSearchInput"], descendants: true }, { propertyName: "boxNumberList", first: true, predicate: ["boxNumberList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleSuggestionDirective, selector: "[appVisibleSuggestion]", inputs: ["appVisibleSuggestion"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3.TranslatePipe, "highlightSuggestion": HighlightSuggestionPipe } });
|
|
4763
|
+
BoxNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BoxNumberComponent, selector: "bp-box-number", inputs: { prefillData: "prefillData", autofillData: "autofillData", showDebugMessageToConsole: "showDebugMessageToConsole", labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", addressParams: "addressParams", postalCode: "postalCode", locality: "locality", streetName: "streetName", streetNumber: "streetNumber", selectedAddress: "selectedAddress", notInListAllowed: "notInListAllowed", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", inputLang: "inputLang", messageOption: "messageOption", isReadonly: "isReadonly", suggestionLevel: "suggestionLevel", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", emptyResponseEvent: "emptyResponseEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", boxNumberChanged: "boxNumberChanged", numberOfExceptionsEmitter: "numberOfExceptionsEmitter" }, viewQueries: [{ propertyName: "boxNumberSearchInput", first: true, predicate: ["boxNumberSearchInput"], descendants: true }, { propertyName: "boxNumberList", first: true, predicate: ["boxNumberList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0 || isDisabledByPrefill()\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleSuggestionDirective, selector: "[appVisibleSuggestion]", inputs: ["appVisibleSuggestion"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3.TranslatePipe, "highlightSuggestion": HighlightSuggestionPipe } });
|
|
4616
4764
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, decorators: [{
|
|
4617
4765
|
type: Component,
|
|
4618
|
-
args: [{ selector: 'bp-box-number', template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""] }]
|
|
4766
|
+
args: [{ selector: 'bp-box-number', template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keyup) = (checkKeyUP($event))\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0 || isDisabledByPrefill()\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" \n *ngIf=\"suggestionLevel===SuggestionLevelType.StreetAndBoxNumber && suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""] }]
|
|
4619
4767
|
}], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { boxNumberSearchInput: [{
|
|
4620
4768
|
type: ViewChild,
|
|
4621
4769
|
args: ['boxNumberSearchInput', { static: false }]
|
|
@@ -5199,6 +5347,11 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5199
5347
|
this.boxNumberAutofillData = this.autofillData;
|
|
5200
5348
|
}
|
|
5201
5349
|
}
|
|
5350
|
+
if (this.minLevel == ADDRESSLEVEL.BOX_NUMBER) {
|
|
5351
|
+
if (this.selectedAddress.boxNumber) {
|
|
5352
|
+
this.boxNumberAutofillData = this.autofillData;
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5202
5355
|
}
|
|
5203
5356
|
this.addressCompleteEventEmitter.emit(this.selectedAddress);
|
|
5204
5357
|
this.emittedAddress = this.selectedAddress;
|
|
@@ -5648,9 +5801,15 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5648
5801
|
this.autocompleteBoxNb.clearWidget();
|
|
5649
5802
|
this.autocompleteBoxNb.searchText = '';
|
|
5650
5803
|
*/
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5804
|
+
// Guard: only clear when street-number is not already validated.
|
|
5805
|
+
// resetStreet() always sets addressIsComplete=false before calling setAddress(null,3),
|
|
5806
|
+
// so user-initiated street changes are unaffected. Without this guard the post-prefill
|
|
5807
|
+
// autofill CD cycle clears searchText causing a inputText mismatch -> clearWidget().
|
|
5808
|
+
if (!this.autocompleteStreetNb.addressIsComplete) {
|
|
5809
|
+
this.autocompleteStreetNb.searchText = '';
|
|
5810
|
+
this.autocompleteBoxNb.searchText = '';
|
|
5811
|
+
this.autocompleteBoxNb.streetNumber = '';
|
|
5812
|
+
}
|
|
5654
5813
|
break;
|
|
5655
5814
|
// STREET Number
|
|
5656
5815
|
case 2:
|
|
@@ -5731,8 +5890,23 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5731
5890
|
console.log('lib::setAddressStreetNumber - streetnumber: ', streetNumber);
|
|
5732
5891
|
console.log('lib::setAddressStreetNumber - streetAddress: ', this.streetAddress);
|
|
5733
5892
|
}
|
|
5734
|
-
this.
|
|
5735
|
-
|
|
5893
|
+
if (this.suggestionLevel === SuggestionLevelType.None && this.streetAddress.streetNumber !== streetNumber) {
|
|
5894
|
+
const combined = { ...this.streetAddress };
|
|
5895
|
+
delete combined.pdpId;
|
|
5896
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
5897
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
5898
|
+
delete combined.suffixId;
|
|
5899
|
+
delete combined.isComplete;
|
|
5900
|
+
if (combined.geoSanction) {
|
|
5901
|
+
combined.geoSanction = combined.geoSanction.substring(0, 25);
|
|
5902
|
+
}
|
|
5903
|
+
this.streetNumberAddress = combined;
|
|
5904
|
+
this.selectedAddress = combined;
|
|
5905
|
+
}
|
|
5906
|
+
else {
|
|
5907
|
+
this.streetNumberAddress = this.streetAddress;
|
|
5908
|
+
this.selectedAddress = this.streetAddress;
|
|
5909
|
+
}
|
|
5736
5910
|
this.selectedAddress.houseNumber = streetNumber;
|
|
5737
5911
|
this.selectedAddress.streetNumber = streetNumber;
|
|
5738
5912
|
/*
|
|
@@ -5751,7 +5925,20 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5751
5925
|
setAddressBoxNumber(boxNumber) {
|
|
5752
5926
|
console.log('set box number value:', boxNumber);
|
|
5753
5927
|
//this.streetNumberAddress = this.streetAddress;
|
|
5754
|
-
this.
|
|
5928
|
+
if ((this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) && this.streetNumberAddress.boxNumber !== boxNumber) {
|
|
5929
|
+
const combined = { ...this.streetNumberAddress };
|
|
5930
|
+
delete combined.mailBoxid; // mixed-case variant
|
|
5931
|
+
delete combined.mailBoxId; // camelCase variant (internal API field name)
|
|
5932
|
+
delete combined.suffixId;
|
|
5933
|
+
delete combined.isComplete;
|
|
5934
|
+
if (combined.geoSanction) {
|
|
5935
|
+
combined.geoSanction = combined.geoSanction.substring(0, 35);
|
|
5936
|
+
}
|
|
5937
|
+
this.selectedAddress = combined;
|
|
5938
|
+
}
|
|
5939
|
+
else {
|
|
5940
|
+
this.selectedAddress = this.streetNumberAddress;
|
|
5941
|
+
}
|
|
5755
5942
|
this.selectedAddress.boxNumber = boxNumber;
|
|
5756
5943
|
this.boxNumber = boxNumber;
|
|
5757
5944
|
this.notifyAddressComplete();
|
|
@@ -5867,7 +6054,23 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5867
6054
|
this.minLevel = ADDRESSLEVEL.STREET;
|
|
5868
6055
|
const streetNumber = this.prefillData.parameters.streetNumber;
|
|
5869
6056
|
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
5870
|
-
if (
|
|
6057
|
+
if (streetNumber) {
|
|
6058
|
+
// User has a streetNumber to prefill - trigger street-number prefill flow.
|
|
6059
|
+
// onStreetNumberPrefillEvent will handle the box number prefill if needed.
|
|
6060
|
+
this.prefillData.prefillStreetPerfectMatchFound = true;
|
|
6061
|
+
this.prefillData.prefillStreetPerfectMatchSuggestion = { address: { ...address } };
|
|
6062
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
6063
|
+
this.prefillData.parameters.streetName = address.streetName;
|
|
6064
|
+
this.prefillData.parameters.postalCode = address.postalCode;
|
|
6065
|
+
this.prefillData.parameters.municipalityName = address.localityName || address.municipalityName;
|
|
6066
|
+
this.streetNumberPrefillData = this.prefillData;
|
|
6067
|
+
// Do NOT set boxNumberPrefillData here: it shares the same prefillData reference,
|
|
6068
|
+
// which would immediately overwrite minLevel to BOX_NUMBER (1) before Angular
|
|
6069
|
+
// change detection runs, causing the street-number component to see minLevel=1
|
|
6070
|
+
// and skip its prefill. Let onStreetNumberPrefillEvent set up box number prefill.
|
|
6071
|
+
}
|
|
6072
|
+
else if (boxNumber && !address.boxNumber) {
|
|
6073
|
+
// No streetNumber to prefill: jump directly to box number prefill.
|
|
5871
6074
|
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
5872
6075
|
this.boxNumberPrefillData = this.prefillData;
|
|
5873
6076
|
}
|
|
@@ -5957,11 +6160,13 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5957
6160
|
if (this.showDebugMessageToConsole) {
|
|
5958
6161
|
console.warn('lib::street: prefill - transmitting prefill data for streetNumber :', this.prefillData);
|
|
5959
6162
|
}
|
|
5960
|
-
if (address.houseNumber) {
|
|
6163
|
+
if (address.houseNumber && !streetNumber) {
|
|
6164
|
+
// No street number in prefill params: use the street suggestion's houseNumber via autofill
|
|
5961
6165
|
this.setAddress(address, ADDRESSLEVEL.STREET);
|
|
5962
6166
|
this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
5963
6167
|
}
|
|
5964
6168
|
else {
|
|
6169
|
+
// Street number given in prefill params (or no houseNumber in suggestion): trigger street-number prefill
|
|
5965
6170
|
this.streetNumberPrefillData = this.prefillData;
|
|
5966
6171
|
}
|
|
5967
6172
|
}
|
|
@@ -5997,10 +6202,35 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5997
6202
|
const addressIsComplete = address && address.hasOwnProperty('isComplete') && address.isComplete === true ? true : false;
|
|
5998
6203
|
const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
|
|
5999
6204
|
if (addressIsComplete && !addressIsNotInList) {
|
|
6000
|
-
// found address - perfect
|
|
6001
|
-
|
|
6002
|
-
this.
|
|
6003
|
-
|
|
6205
|
+
// found address - perfect match at street number level
|
|
6206
|
+
const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
|
|
6207
|
+
if (this.notInListAllowed && boxNumber) {
|
|
6208
|
+
// User prefilled a box number and notInListAllowed - continue to box number prefill
|
|
6209
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6210
|
+
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6211
|
+
this.prefillData = event.prefillData;
|
|
6212
|
+
this.prefillData.ts = new Date();
|
|
6213
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6214
|
+
const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
|
|
6215
|
+
this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
|
|
6216
|
+
this.prefillData.parameters.streetName = suggestionAddress.streetName;
|
|
6217
|
+
this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
|
|
6218
|
+
this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
|
|
6219
|
+
this.updatePostalCodeLocality(address);
|
|
6220
|
+
this.updateStreetName(address);
|
|
6221
|
+
this.updateStreetNumber(address);
|
|
6222
|
+
this.streetAddress = address;
|
|
6223
|
+
this.streetNumberAddress = address;
|
|
6224
|
+
this.autocompleteBoxNb.streetNumber = address.houseNumber;
|
|
6225
|
+
this.autocompleteBoxNb.searchText = '';
|
|
6226
|
+
this.boxNumberPrefillData = this.prefillData;
|
|
6227
|
+
}
|
|
6228
|
+
else {
|
|
6229
|
+
// Nothing to do anymore
|
|
6230
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6231
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6232
|
+
this.quitPrefillMode();
|
|
6233
|
+
}
|
|
6004
6234
|
}
|
|
6005
6235
|
else {
|
|
6006
6236
|
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
@@ -6094,13 +6324,52 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6094
6324
|
const address = suggestion.address;
|
|
6095
6325
|
this.updateStreetNumber(address);
|
|
6096
6326
|
this.autocompleteStreetNb.selectedAddress = address;
|
|
6327
|
+
// Directly set the child input field to the API-returned house number.
|
|
6328
|
+
// This is critical when the prefilled number was invalid (e.g. 145896 → 56):
|
|
6329
|
+
// it ensures searchText='56' before quitPrefillMode() clears the prefilling flag,
|
|
6330
|
+
// so that Angular CD's ngOnChanges(inputText:'145896'→'56') sees matching values
|
|
6331
|
+
// and does NOT trigger clearWidget().
|
|
6332
|
+
if (address.houseNumber) {
|
|
6333
|
+
this.autocompleteStreetNb.searchText = address.houseNumber;
|
|
6334
|
+
}
|
|
6097
6335
|
const addressIsComplete = address && address.hasOwnProperty('isComplete') && !address.hasOwnProperty('boxNumber') && address.isComplete === true ? true : false;
|
|
6098
6336
|
const addressIsNotInList = address && address.hasOwnProperty('not-in-list') && address['not-in-list'] === true ? true : false;
|
|
6099
6337
|
if (addressIsComplete && !addressIsNotInList) {
|
|
6100
|
-
// found address - perfect
|
|
6101
|
-
|
|
6102
|
-
this.
|
|
6103
|
-
|
|
6338
|
+
// found address - perfect match at street number level
|
|
6339
|
+
const boxNumber = this.prefillData ? this.prefillData.parameters.boxNumber : null;
|
|
6340
|
+
if (boxNumber && this.notInListAllowed) {
|
|
6341
|
+
// A boxNumber is present in prefill params AND notInListAllowed - continue to box number prefill.
|
|
6342
|
+
// When notInListAllowed=false, the address is already complete without a box number;
|
|
6343
|
+
// any prefilled box number is invalid and the API call must be skipped.
|
|
6344
|
+
this.autocompleteStreetNb.addressIsComplete = true;
|
|
6345
|
+
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6346
|
+
this.prefillData = event.prefillData;
|
|
6347
|
+
this.prefillData.ts = new Date();
|
|
6348
|
+
this.prefillData.parameters.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
6349
|
+
const suggestionAddress = this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address;
|
|
6350
|
+
this.prefillData.parameters.municipalityName = suggestionAddress.localityName;
|
|
6351
|
+
this.prefillData.parameters.postalCode = suggestionAddress.postalCode;
|
|
6352
|
+
this.prefillData.parameters.streetName = suggestionAddress.streetName;
|
|
6353
|
+
this.prefillData.parameters.streetNumber = suggestionAddress.houseNumber;
|
|
6354
|
+
this.updatePostalCodeLocality(address);
|
|
6355
|
+
this.updateStreetName(address);
|
|
6356
|
+
this.updateStreetNumber(address);
|
|
6357
|
+
this.streetAddress = address;
|
|
6358
|
+
this.streetNumberAddress = address;
|
|
6359
|
+
this.autocompleteBoxNb.streetNumber = address.houseNumber;
|
|
6360
|
+
this.autocompleteBoxNb.searchText = '';
|
|
6361
|
+
this.boxNumberPrefillData = this.prefillData;
|
|
6362
|
+
}
|
|
6363
|
+
else {
|
|
6364
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6365
|
+
// address.isComplete===true, so setAddress() correctly sets addressIsComplete=true
|
|
6366
|
+
// and the check mark should be visible. Do NOT suppress it here.
|
|
6367
|
+
// Null out autofill data so Angular CD does not re-trigger ngOnChanges(autofillData)
|
|
6368
|
+
// on the street-number child, which would call setSelectedAddress and set
|
|
6369
|
+
// addressIsComplete=true again via the autofill chain.
|
|
6370
|
+
this.streetNumberAutofillData = null;
|
|
6371
|
+
this.quitPrefillMode();
|
|
6372
|
+
}
|
|
6104
6373
|
}
|
|
6105
6374
|
else {
|
|
6106
6375
|
this.addressParams.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
@@ -6120,8 +6389,16 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6120
6389
|
// this.updatePostalCodeLocality(suggestionAddress);
|
|
6121
6390
|
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
6122
6391
|
if (!addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '')) {
|
|
6392
|
+
// No box number in prefill params and the API reports isComplete=false (box number required).
|
|
6393
|
+
// Do NOT start box-number prefill: when boxNumber param is empty, the box-number
|
|
6394
|
+
// component receives searchText='' and never fires its prefill event, so
|
|
6395
|
+
// quitPrefillMode() would never be called, leaving prefilling=true forever.
|
|
6396
|
+
// Since isComplete=false the address is not complete — do NOT force addressIsComplete=true;
|
|
6397
|
+
// setAddress() will correctly leave the street-number checkmark unset, and the user
|
|
6398
|
+
// must enter the box number manually.
|
|
6123
6399
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6124
|
-
|
|
6400
|
+
this.quitPrefillMode();
|
|
6401
|
+
return;
|
|
6125
6402
|
}
|
|
6126
6403
|
else {
|
|
6127
6404
|
this.updatePostalCodeLocality(address);
|
|
@@ -6143,33 +6420,32 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6143
6420
|
}
|
|
6144
6421
|
this.autocompleteBoxNb.searchText = '';
|
|
6145
6422
|
}
|
|
6146
|
-
/*
|
|
6147
|
-
const boxNumber = this.prefillData.parameters.boxNumber;
|
|
6148
|
-
if ( ! addressIsNotInList && (boxNumber === null || boxNumber === undefined || boxNumber === '') )
|
|
6149
|
-
{
|
|
6150
|
-
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6151
|
-
this.quitPrefillMode();
|
|
6152
|
-
}
|
|
6153
|
-
else
|
|
6154
|
-
{
|
|
6155
|
-
if (this.showDebugMessageToConsole) { console.log('lib::prefill: trigger checking box number match... ', this.prefillData); }
|
|
6156
|
-
this.boxNumberPrefillData = this.prefillData;
|
|
6157
|
-
}
|
|
6158
|
-
*/
|
|
6159
6423
|
this.boxNumberPrefillData = this.prefillData;
|
|
6160
6424
|
}
|
|
6161
6425
|
}
|
|
6162
6426
|
else {
|
|
6163
6427
|
const prefillStreetNumber = this.prefillData.parameters.streetNumber;
|
|
6164
|
-
const address = this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
6428
|
+
const address = this.prefillData.prefillStreetPerfectMatchSuggestion
|
|
6429
|
+
? this.prefillData.prefillStreetPerfectMatchSuggestion.address
|
|
6430
|
+
: null;
|
|
6165
6431
|
this.autocompleteBoxNb.streetNumber = '';
|
|
6166
6432
|
if (prefillStreetNumber === null || prefillStreetNumber === undefined || prefillStreetNumber.length === 0) {
|
|
6167
6433
|
this.setAddress(address, ADDRESSLEVEL.STREET);
|
|
6168
6434
|
}
|
|
6169
6435
|
else {
|
|
6170
|
-
//
|
|
6171
|
-
|
|
6172
|
-
|
|
6436
|
+
// The prefilled street number doesn't exist in the API (notInListAllowed=false).
|
|
6437
|
+
// Show the prefilled value in the input and leave the dropdown open so the
|
|
6438
|
+
// user can pick the correct house number from the suggestions.
|
|
6439
|
+
this.autocompleteStreetNb.searchText = prefillStreetNumber;
|
|
6440
|
+
// Keep streetNumberInput in sync with searchText so the child's inputText
|
|
6441
|
+
// ngOnChanges guard (notEqualIgnoreCase) does not trigger clearWidget()
|
|
6442
|
+
// once prefilling becomes false after quitPrefillMode().
|
|
6443
|
+
this.streetNumberInput = prefillStreetNumber;
|
|
6444
|
+
this.autocompleteStreetNb.isPrefillWithNoMatch = false;
|
|
6445
|
+
this.autocompleteStreetNb.addressIsComplete = false;
|
|
6446
|
+
this.autocompleteBoxNb.streetNumber = '';
|
|
6447
|
+
// Prevent the autofill Angular-CD chain from re-setting addressIsComplete=true.
|
|
6448
|
+
this.streetNumberAutofillData = null;
|
|
6173
6449
|
}
|
|
6174
6450
|
this.quitPrefillMode();
|
|
6175
6451
|
}
|
|
@@ -6182,18 +6458,48 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6182
6458
|
if (data.prefillBoxNumberPerfectMatchFound === true) {
|
|
6183
6459
|
const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
|
|
6184
6460
|
const address = suggestion.address;
|
|
6461
|
+
// When notInListAllowed, ensure user's prefilled values are used
|
|
6462
|
+
if (this.notInListAllowed) {
|
|
6463
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6464
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6465
|
+
}
|
|
6466
|
+
if (this.prefillData.parameters.boxNumber) {
|
|
6467
|
+
address.boxNumber = this.prefillData.parameters.boxNumber;
|
|
6468
|
+
}
|
|
6469
|
+
}
|
|
6185
6470
|
this.autocompleteBoxNb.selectedAddress = address;
|
|
6186
6471
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6187
6472
|
}
|
|
6188
6473
|
else {
|
|
6189
6474
|
const prefillBoxNumber = this.prefillData.parameters.boxNumber;
|
|
6190
|
-
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6475
|
+
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6476
|
+
? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
|
|
6477
|
+
: null;
|
|
6191
6478
|
if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
|
|
6192
6479
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6193
6480
|
}
|
|
6194
|
-
else {
|
|
6195
|
-
|
|
6481
|
+
else if (address) {
|
|
6482
|
+
address.boxNumber = prefillBoxNumber;
|
|
6483
|
+
if (this.notInListAllowed && this.prefillData.parameters.streetNumber) {
|
|
6484
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6485
|
+
}
|
|
6196
6486
|
address.searchBarString = prefillBoxNumber;
|
|
6487
|
+
// For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
|
|
6488
|
+
// - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
|
|
6489
|
+
// - pdpId is also cleared when street number was also not-in-list (both invalid).
|
|
6490
|
+
const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
|
|
6491
|
+
address.mailBoxId = null;
|
|
6492
|
+
address.mailBoxid = null;
|
|
6493
|
+
address.suffixId = null;
|
|
6494
|
+
if (address.geoSanction) {
|
|
6495
|
+
address.geoSanction = address.geoSanction.substring(0, 35);
|
|
6496
|
+
}
|
|
6497
|
+
if (streetNumberWasNotInList) {
|
|
6498
|
+
address.pdpId = null;
|
|
6499
|
+
if (address.geoSanction) {
|
|
6500
|
+
address.geoSanction = address.geoSanction.substring(0, 25);
|
|
6501
|
+
}
|
|
6502
|
+
}
|
|
6197
6503
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6198
6504
|
}
|
|
6199
6505
|
}
|
|
@@ -6207,29 +6513,68 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
6207
6513
|
if (data.prefillBoxNumberPerfectMatchFound === true) {
|
|
6208
6514
|
const suggestion = data.prefillBoxNumberPerfectMatchSuggestion;
|
|
6209
6515
|
const address = suggestion.address;
|
|
6516
|
+
// When notInListAllowed, ensure user's prefilled values are used
|
|
6517
|
+
if (this.notInListAllowed) {
|
|
6518
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6519
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6520
|
+
}
|
|
6521
|
+
if (this.prefillData.parameters.boxNumber) {
|
|
6522
|
+
address.boxNumber = this.prefillData.parameters.boxNumber;
|
|
6523
|
+
}
|
|
6524
|
+
}
|
|
6210
6525
|
this.autocompleteBoxNb.selectedAddress = address;
|
|
6211
6526
|
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6212
6527
|
}
|
|
6213
6528
|
else {
|
|
6214
6529
|
const prefillBoxNumber = this.prefillData.parameters.boxNumber;
|
|
6215
|
-
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6530
|
+
const address = this.prefillData.prefillStreetNumberPerfectMatchSuggestion
|
|
6531
|
+
? this.prefillData.prefillStreetNumberPerfectMatchSuggestion.address
|
|
6532
|
+
: null;
|
|
6216
6533
|
if (prefillBoxNumber === null || prefillBoxNumber === undefined || prefillBoxNumber.length === 0) {
|
|
6217
6534
|
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6218
6535
|
}
|
|
6219
|
-
else {
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6536
|
+
else if (address) {
|
|
6537
|
+
if (!this.notInListAllowed) {
|
|
6538
|
+
// notInListAllowed=false: the box number is invalid and must not appear in the
|
|
6539
|
+
// selected address or address component. Complete the address at street-number
|
|
6540
|
+
// level so the emitted address contains only the valid street number.
|
|
6541
|
+
this.setAddress(address, ADDRESSLEVEL.STREET_NUMBER);
|
|
6542
|
+
}
|
|
6543
|
+
else {
|
|
6544
|
+
// notInListAllowed=true: include the prefilled box number as-is (not-in-list)
|
|
6545
|
+
address.boxNumber = prefillBoxNumber;
|
|
6546
|
+
if (this.prefillData.parameters.streetNumber) {
|
|
6547
|
+
address.houseNumber = this.prefillData.parameters.streetNumber;
|
|
6548
|
+
}
|
|
6549
|
+
address.searchBarString = prefillBoxNumber;
|
|
6550
|
+
// For internal endpoint: clear IDs that are no longer valid when box number is not in the list.
|
|
6551
|
+
// - mailBoxId and suffixId are always cleared (valid street number + invalid box number).
|
|
6552
|
+
// - pdpId is also cleared when street number was also not-in-list (both invalid).
|
|
6553
|
+
const streetNumberWasNotInList = address.hasOwnProperty('not-in-list') && address['not-in-list'] === true;
|
|
6554
|
+
address.mailBoxId = null;
|
|
6555
|
+
address.mailBoxid = null;
|
|
6556
|
+
address.suffixId = null;
|
|
6557
|
+
if (address.geoSanction) {
|
|
6558
|
+
address.geoSanction = address.geoSanction.substring(0, 35);
|
|
6559
|
+
}
|
|
6560
|
+
if (streetNumberWasNotInList) {
|
|
6561
|
+
address.pdpId = null;
|
|
6562
|
+
if (address.geoSanction) {
|
|
6563
|
+
address.geoSanction = address.geoSanction.substring(0, 25);
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
this.setAddress(address, ADDRESSLEVEL.BOX_NUMBER);
|
|
6567
|
+
}
|
|
6223
6568
|
}
|
|
6224
6569
|
}
|
|
6225
6570
|
this.quitPrefillMode();
|
|
6226
6571
|
}
|
|
6227
6572
|
}
|
|
6228
6573
|
LibAddressAutocompleteByComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, deps: [{ token: HttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6229
|
-
LibAddressAutocompleteByComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: LibAddressAutocompleteByComponentComponent, selector: "bp-lib-address-autocomplete-by-component", inputs: { inputLang: "inputLang", clearInput: "clearInput", validationMessageOption: "validationMessageOption", defaultLang: "defaultLang", showDebugMessageToConsole: "showDebugMessageToConsole", minLevel: "minLevel", notInListAllowed: "notInListAllowed", addressParams: "addressParams", messageOption: "messageOption", localityUrl: "localityUrl", maxSuggestionLocality: "maxSuggestionLocality", visibleSuggestionLocalityCount: "visibleSuggestionLocalityCount", sortCriteriaLocality: "sortCriteriaLocality", streetUrl: "streetUrl", maxSuggestionStreet: "maxSuggestionStreet", visibleSuggestionStreetCount: "visibleSuggestionStreetCount", sortCriteriaStreet: "sortCriteriaStreet", streetNumberUrl: "streetNumberUrl", maxSuggestionStreetNb: "maxSuggestionStreetNb", visibleSuggestionStreetNbCount: "visibleSuggestionStreetNbCount", sortCriteriaStreetNb: "sortCriteriaStreetNb", boxNumberUrl: "boxNumberUrl", maxSuggestionBoxNb: "maxSuggestionBoxNb", visibleSuggestionBoxNbCount: "visibleSuggestionBoxNbCount", sortCriteriaBoxNb: "sortCriteriaBoxNb", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", suggestionLevel: "suggestionLevel", apiKey: "apiKey", isReadonly: "isReadonly", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse", includeListOfBoxes: "includeListOfBoxes", includeListOfBusinessNameWithBoxes: "includeListOfBusinessNameWithBoxes" }, outputs: { addressCompleteEventEmitter: "addressCompleteEventEmitter", validationMessageEventEmitter: "validationMessageEventEmitter", clearInputEventEmitter: "clearInputEventEmitter", validatedByBackendEventEmitter: "validatedByBackendEventEmitter", numberOfExceptionsEventEmitter: "numberOfExceptionsEventEmitter" }, viewQueries: [{ propertyName: "autocompleteLocality", first: true, predicate: LocalityComponent, descendants: true }, { propertyName: "autocompleteStreet", first: true, predicate: StreetComponent, descendants: true }, { propertyName: "autocompleteStreetNb", first: true, predicate: StreetNumberComponent, descendants: true }, { propertyName: "autocompleteBoxNb", first: true, predicate: BoxNumberComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\r\n [prefillData]=\"streetPrefillData\"\r\n [autofillData]=\"streetNameAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetName'\"\r\n [inputText]=\"streetNameInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\"\r\n [locality]=\"locality\"\r\n [sortCriteria]=\"sortCriteriaStreet\" \r\n [maxSuggesionCount]=\"maxSuggestionStreet\"\r\n [visibleSuggesionCount]=\"visibleSuggestionStreetCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\r\n [autofillData]=\"streetNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetNumber'\"\r\n [inputText]=\"streetNumberInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\"\r\n [sortCriteria]=\"sortCriteriaStreetNb\"\r\n [maxSuggesionCount]=\"maxSuggestionStreetNb\" \r\n [visibleSuggesionCount]=\"visibleSuggestionStreetNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [autofillData]=\"boxNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.boxNumber'\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\" \r\n [streetNumber]=\"streetNumber\"\r\n [sortCriteria]=\"sortCriteriaBoxNb\" \r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""], components: [{ type: LocalityComponent, selector: "bp-locality", inputs: ["labelResourceKey", "messageOption", "maxSuggesionCount", "visibleSuggestionCount", "sortCriteria", "baseUrl", "inputText", "prefillData", "showDebugMessageToConsole", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "nis9InResponse", "businessNameInResponse", "inputLang", "isReadonly", "allowNoValidation", "validatedByBackend", "numberOfExceptions"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetComponent, selector: "bp-street", inputs: ["labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "prefillData", "autofillData", "showDebugMessageToConsole", "postalCode", "locality", "inputText", "messageOption", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "isReadonly"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetNumberComponent, selector: "bp-street-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "notInListAllowed", "selectedAddress", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "nis9InResponse", "businessNameInResponse", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "messageOption", "inputText", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "streetNumberChanged", "numberOfExceptionsEmitter"] }, { type: BoxNumberComponent, selector: "bp-box-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "streetNumber", "selectedAddress", "notInListAllowed", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "isReadonly", "suggestionLevel", "nis9InResponse", "businessNameInResponse"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "boxNumberChanged", "numberOfExceptionsEmitter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
6574
|
+
LibAddressAutocompleteByComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: LibAddressAutocompleteByComponentComponent, selector: "bp-lib-address-autocomplete-by-component", inputs: { inputLang: "inputLang", clearInput: "clearInput", validationMessageOption: "validationMessageOption", defaultLang: "defaultLang", showDebugMessageToConsole: "showDebugMessageToConsole", minLevel: "minLevel", notInListAllowed: "notInListAllowed", addressParams: "addressParams", messageOption: "messageOption", localityUrl: "localityUrl", maxSuggestionLocality: "maxSuggestionLocality", visibleSuggestionLocalityCount: "visibleSuggestionLocalityCount", sortCriteriaLocality: "sortCriteriaLocality", streetUrl: "streetUrl", maxSuggestionStreet: "maxSuggestionStreet", visibleSuggestionStreetCount: "visibleSuggestionStreetCount", sortCriteriaStreet: "sortCriteriaStreet", streetNumberUrl: "streetNumberUrl", maxSuggestionStreetNb: "maxSuggestionStreetNb", visibleSuggestionStreetNbCount: "visibleSuggestionStreetNbCount", sortCriteriaStreetNb: "sortCriteriaStreetNb", boxNumberUrl: "boxNumberUrl", maxSuggestionBoxNb: "maxSuggestionBoxNb", visibleSuggestionBoxNbCount: "visibleSuggestionBoxNbCount", sortCriteriaBoxNb: "sortCriteriaBoxNb", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", suggestionLevel: "suggestionLevel", apiKey: "apiKey", isReadonly: "isReadonly", nis9InResponse: "nis9InResponse", businessNameInResponse: "businessNameInResponse", includeListOfBoxes: "includeListOfBoxes", includeListOfBusinessNameWithBoxes: "includeListOfBusinessNameWithBoxes" }, outputs: { addressCompleteEventEmitter: "addressCompleteEventEmitter", validationMessageEventEmitter: "validationMessageEventEmitter", clearInputEventEmitter: "clearInputEventEmitter", validatedByBackendEventEmitter: "validatedByBackendEventEmitter", numberOfExceptionsEventEmitter: "numberOfExceptionsEventEmitter" }, viewQueries: [{ propertyName: "autocompleteLocality", first: true, predicate: LocalityComponent, descendants: true }, { propertyName: "autocompleteStreet", first: true, predicate: StreetComponent, descendants: true }, { propertyName: "autocompleteStreetNb", first: true, predicate: StreetNumberComponent, descendants: true }, { propertyName: "autocompleteBoxNb", first: true, predicate: BoxNumberComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n\t\t[nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\r\n [prefillData]=\"streetPrefillData\"\r\n [autofillData]=\"streetNameAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetName'\"\r\n [inputText]=\"streetNameInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\"\r\n [locality]=\"locality\"\r\n [sortCriteria]=\"sortCriteriaStreet\" \r\n [maxSuggesionCount]=\"maxSuggestionStreet\"\r\n [visibleSuggesionCount]=\"visibleSuggestionStreetCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\r\n [autofillData]=\"streetNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetNumber'\"\r\n [inputText]=\"streetNumberInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\"\r\n [sortCriteria]=\"sortCriteriaStreetNb\"\r\n [maxSuggesionCount]=\"maxSuggestionStreetNb\" \r\n [visibleSuggesionCount]=\"visibleSuggestionStreetNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [autofillData]=\"boxNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.boxNumber'\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\" \r\n [streetNumber]=\"streetNumber\"\r\n [sortCriteria]=\"sortCriteriaBoxNb\" \r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""], components: [{ type: LocalityComponent, selector: "bp-locality", inputs: ["labelResourceKey", "messageOption", "maxSuggesionCount", "visibleSuggestionCount", "sortCriteria", "baseUrl", "inputText", "prefillData", "showDebugMessageToConsole", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "nis9InResponse", "businessNameInResponse", "inputLang", "isReadonly", "allowNoValidation", "validatedByBackend", "numberOfExceptions"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetComponent, selector: "bp-street", inputs: ["labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "prefillData", "autofillData", "showDebugMessageToConsole", "postalCode", "locality", "inputText", "messageOption", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "isReadonly"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetNumberComponent, selector: "bp-street-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "notInListAllowed", "selectedAddress", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "nis9InResponse", "businessNameInResponse", "includeListOfBoxes", "includeListOfBusinessNameWithBoxes", "inputLang", "messageOption", "inputText", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "streetNumberChanged", "numberOfExceptionsEmitter"] }, { type: BoxNumberComponent, selector: "bp-box-number", inputs: ["prefillData", "autofillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "streetNumber", "selectedAddress", "notInListAllowed", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "isReadonly", "suggestionLevel", "nis9InResponse", "businessNameInResponse"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "boxNumberChanged", "numberOfExceptionsEmitter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
6230
6575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
|
|
6231
6576
|
type: Component,
|
|
6232
|
-
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
|
|
6577
|
+
args: [{ selector: 'bp-lib-address-autocomplete-by-component', template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n\t\t[nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\r\n [prefillData]=\"streetPrefillData\"\r\n [autofillData]=\"streetNameAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetName'\"\r\n [inputText]=\"streetNameInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\"\r\n [locality]=\"locality\"\r\n [sortCriteria]=\"sortCriteriaStreet\" \r\n [maxSuggesionCount]=\"maxSuggestionStreet\"\r\n [visibleSuggesionCount]=\"visibleSuggestionStreetCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [includeListOfBoxes]=\"includeListOfBoxes\"\r\n [includeListOfBusinessNameWithBoxes]=\"includeListOfBusinessNameWithBoxes\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\r\n [autofillData]=\"streetNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.streetNumber'\"\r\n [inputText]=\"streetNumberInput\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\"\r\n [sortCriteria]=\"sortCriteriaStreetNb\"\r\n [maxSuggesionCount]=\"maxSuggestionStreetNb\" \r\n [visibleSuggesionCount]=\"visibleSuggestionStreetNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [autofillData]=\"boxNumberAutofillData\"\r\n [labelResourceKey]=\"'common.label.boxNumber'\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [postalCode]=\"postalCode\" \r\n [locality]=\"locality\" \r\n [streetName]=\"street\" \r\n [streetNumber]=\"streetNumber\"\r\n [sortCriteria]=\"sortCriteriaBoxNb\" \r\n [nis9InResponse]=\"nis9InResponse\"\r\n [businessNameInResponse]=\"businessNameInResponse\"\r\n [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""] }]
|
|
6233
6578
|
}], ctorParameters: function () { return [{ type: HttpService }]; }, propDecorators: { autocompleteLocality: [{
|
|
6234
6579
|
type: ViewChild,
|
|
6235
6580
|
args: [LocalityComponent, { static: false }]
|