@bpost/bp-address-auto-complete-by-component 1.0.26 → 1.0.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.
Files changed (41) hide show
  1. package/VERSION.md +65 -0
  2. package/bpost-bp-address-auto-complete-by-component.d.ts +3 -2
  3. package/bpost-bp-address-auto-complete-by-component.metadata.json +1 -1
  4. package/bundles/bpost-bp-address-auto-complete-by-component.umd.js +167 -17
  5. package/bundles/bpost-bp-address-auto-complete-by-component.umd.js.map +1 -1
  6. package/bundles/bpost-bp-address-auto-complete-by-component.umd.min.js +1 -1
  7. package/bundles/bpost-bp-address-auto-complete-by-component.umd.min.js.map +1 -1
  8. package/esm2015/bpost-bp-address-auto-complete-by-component.js +4 -3
  9. package/esm2015/lib/box-number/box-number.component.js +6 -2
  10. package/esm2015/lib/lib-address-autocomplete-by-component.component.js +82 -10
  11. package/esm2015/lib/locality/locality.component.js +26 -4
  12. package/esm2015/lib/services/adress.service.js +5 -1
  13. package/esm2015/lib/services/http.service.js +15 -2
  14. package/esm2015/lib/services/nis9.service.js +30 -0
  15. package/esm2015/lib/street/street.component.js +6 -2
  16. package/esm2015/lib/street-number/street-number.component.js +6 -2
  17. package/esm2015/lib/utils/prefill-data.js +3 -1
  18. package/esm5/bpost-bp-address-auto-complete-by-component.js +4 -3
  19. package/esm5/lib/box-number/box-number.component.js +6 -2
  20. package/esm5/lib/lib-address-autocomplete-by-component.component.js +83 -10
  21. package/esm5/lib/locality/locality.component.js +26 -4
  22. package/esm5/lib/services/adress.service.js +5 -1
  23. package/esm5/lib/services/http.service.js +16 -3
  24. package/esm5/lib/services/nis9.service.js +31 -0
  25. package/esm5/lib/street/street.component.js +6 -2
  26. package/esm5/lib/street-number/street-number.component.js +6 -2
  27. package/esm5/lib/utils/prefill-data.js +3 -1
  28. package/fesm2015/bpost-bp-address-auto-complete-by-component.js +164 -17
  29. package/fesm2015/bpost-bp-address-auto-complete-by-component.js.map +1 -1
  30. package/fesm5/bpost-bp-address-auto-complete-by-component.js +167 -18
  31. package/fesm5/bpost-bp-address-auto-complete-by-component.js.map +1 -1
  32. package/lib/box-number/box-number.component.d.ts +2 -0
  33. package/lib/lib-address-autocomplete-by-component.component.d.ts +10 -1
  34. package/lib/locality/locality.component.d.ts +1 -0
  35. package/lib/services/adress.service.d.ts +3 -0
  36. package/lib/services/http.service.d.ts +4 -1
  37. package/lib/services/nis9.service.d.ts +9 -0
  38. package/lib/street/street.component.d.ts +1 -0
  39. package/lib/street-number/street-number.component.d.ts +1 -0
  40. package/lib/utils/prefill-data.d.ts +1 -0
  41. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { __decorate } from 'tslib';
2
2
  import { ɵɵdefineInjectable, Injectable, ɵɵinject, EventEmitter, ViewChild, Input, Output, Component, Pipe, ElementRef, Renderer2, Directive, NgModule } from '@angular/core';
3
3
  import { map, catchError, tap } from 'rxjs/operators';
4
4
  import { throwError, BehaviorSubject } from 'rxjs';
5
- import { HttpClient, HttpClientModule } from '@angular/common/http';
5
+ import { HttpHeaders, HttpClient, HttpClientModule } from '@angular/common/http';
6
6
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
7
7
  import { CommonModule } from '@angular/common';
8
8
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -64,12 +64,25 @@ let HttpService = class HttpService {
64
64
  constructor(httpClient) {
65
65
  this.httpClient = httpClient;
66
66
  this.openConnections = 0;
67
+ this.apiKey = 'no-value';
68
+ }
69
+ setApiKey(apiKey) {
70
+ this.apiKey = apiKey;
71
+ }
72
+ getHttpHeaders() {
73
+ let headers = new HttpHeaders();
74
+ // Attention !
75
+ // Need to reassign as the 'set' is returning a clone of the headera object !!!
76
+ headers = headers.set('x-api-key', /*'bBkvimXYnAaEEKMyGqoWO2XiaZCQyqUi7VReYzPJ'*/ this.apiKey);
77
+ return headers;
67
78
  }
68
79
  get(url, options) {
69
80
  return this.request('GET', url, options);
70
81
  }
71
82
  request(method, url, options) {
72
83
  options = !!options ? options : {};
84
+ options = Object.assign(Object.assign({}, options), { headers: this.getHttpHeaders() });
85
+ console.log('options:', JSON.stringify(options));
73
86
  this.openConnections++;
74
87
  return this.httpClient.request(method, url, options).pipe(map((response) => this.handleResponse(response)), catchError((error) => this.handleError(error)));
75
88
  }
@@ -187,6 +200,10 @@ let AddressService = class AddressService {
187
200
  this.httpService = httpService;
188
201
  this.domain = 'http://10.194.73.9:8080';
189
202
  this.localityURL = this.domain + '/AddressAutoComplete/autocomplete/locality?IncludeGeographicalSanction=true';
203
+ this.log = true;
204
+ this.nis9InResponse = false;
205
+ // https://bgs.bpost.be/set-selection-circle?lng=4.360537572541948&lat=50.84063582806037&radius=0.001
206
+ this.nis9ServiceURL = '';
190
207
  }
191
208
  getLocality(baseUrl, params) {
192
209
  const url = baseUrl !== '' ? baseUrl : this.localityURL;
@@ -723,6 +740,7 @@ let LocalityComponent = class LocalityComponent {
723
740
  this.visibleSuggestionCount = 5;
724
741
  this.sortCriteria = '';
725
742
  this.showDebugMessageToConsole = true;
743
+ this.isReadonly = false;
726
744
  this.messageChanged = new EventEmitter();
727
745
  this.addressChanged = new EventEmitter();
728
746
  this.focusEvent = new EventEmitter();
@@ -1132,11 +1150,29 @@ let LocalityComponent = class LocalityComponent {
1132
1150
  const suggestionMunicipality = this.transformMunicipalityInLowercaseAndWithoutDiacritics(sugAddress.municipalityName);
1133
1151
  if (suggestionLocality === this.prefillData.prefillMunicipalityName
1134
1152
  || suggestionMunicipality === this.prefillData.prefillMunicipalityName) {
1153
+ if (this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound === true) {
1154
+ if (this.showDebugMessageToConsole) {
1155
+ console.log('LOCALITY - PREFILL - skipping suggestion:', suggestion);
1156
+ }
1157
+ if (this.showDebugMessageToConsole) {
1158
+ console.log('LOCALITY - PREFILL - keeping suggestion:', this.prefillData.prefillMunicipalityPerfectMatchSuggestion);
1159
+ }
1160
+ return;
1161
+ }
1135
1162
  this.prefillData.prefillMunicipalityPerfectMatchFound = true;
1136
1163
  this.prefillData.prefillMunicipalityPerfectMatchSuggestion = suggestion;
1137
1164
  this.searchText = sugAddress.postalCode + ' ' + sugAddress.localityName;
1138
- if (this.showDebugMessageToConsole) {
1139
- console.log('LOCALITY - PREFILL - Perfect match:', suggestion);
1165
+ this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound = (suggestionLocality === this.prefillData.prefillMunicipalityName
1166
+ && suggestionMunicipality === this.prefillData.prefillMunicipalityName) ? true : false;
1167
+ if (this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound === true) {
1168
+ if (this.showDebugMessageToConsole) {
1169
+ console.log('LOCALITY - PREFILL - Perfect match - Municipality & location:', suggestion);
1170
+ }
1171
+ }
1172
+ else {
1173
+ if (this.showDebugMessageToConsole) {
1174
+ console.log('LOCALITY - PREFILL - Perfect match:', suggestion);
1175
+ }
1140
1176
  }
1141
1177
  }
1142
1178
  }
@@ -1412,6 +1448,9 @@ __decorate([
1412
1448
  __decorate([
1413
1449
  Input()
1414
1450
  ], LocalityComponent.prototype, "inputLang", null);
1451
+ __decorate([
1452
+ Input()
1453
+ ], LocalityComponent.prototype, "isReadonly", void 0);
1415
1454
  __decorate([
1416
1455
  Output()
1417
1456
  ], LocalityComponent.prototype, "messageChanged", void 0);
@@ -1436,7 +1475,7 @@ __decorate([
1436
1475
  LocalityComponent = __decorate([
1437
1476
  Component({
1438
1477
  selector: 'bp-locality',
1439
- 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 \n <input type=\"text\" #localitySearchInput class=\"bpaac-input\" \n (keydown)=\"checkKeyDown($event)\" (input)=\"onInputChange()\"\n [style.color]=\" getTextColor() \"\n [(ngModel)]=\"searchText\" id=\"localityInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" (click)=\"onInputClick()\"/>\n <div id=\"bpaac-clear-locality-button\" \n *ngIf=\"mayShowClearButton()\"\n (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-locality-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #localityList [appVisibleSuggestion]=\"visibleSuggestionCount\" id=\"bpaac-locality-dropdown\" \n class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-locality-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" \n *ngFor=\"let option of suggestions; let idx = index\" \n [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span> \n <span *ngIf=\"messageOption === 'P' && option.messages\"> ({{option.municipalityName}})</span><br />\n <ng-container *ngIf=\"messageOption === 'Y'\">\n <span *ngFor=\"let message of option.messages\" \n class=\"bpaac-suggestion-message\"\n [innerHtml]=\"message.translatedMessage\"></span> \n </ng-container>\n </li>\n </ul>\n </div>\n </div>\n</div>",
1478
+ 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 \n <input type=\"text\" #localitySearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keydown)=\"checkKeyDown($event)\" (input)=\"onInputChange()\"\n [style.color]=\" getTextColor() \"\n [(ngModel)]=\"searchText\" id=\"localityInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" (click)=\"onInputClick()\"/>\n <div id=\"bpaac-clear-locality-button\" \n *ngIf=\"mayShowClearButton()\"\n (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-locality-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #localityList [appVisibleSuggestion]=\"visibleSuggestionCount\" id=\"bpaac-locality-dropdown\" \n class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-locality-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" \n *ngFor=\"let option of suggestions; let idx = index\" \n [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span> \n <span *ngIf=\"messageOption === 'P' && option.messages\"> ({{option.municipalityName}})</span><br />\n <ng-container *ngIf=\"messageOption === 'Y'\">\n <span *ngFor=\"let message of option.messages\" \n class=\"bpaac-suggestion-message\"\n [innerHtml]=\"message.translatedMessage\"></span> \n </ng-container>\n </li>\n </ul>\n </div>\n </div>\n</div>",
1440
1479
  styles: [""]
1441
1480
  })
1442
1481
  ], LocalityComponent);
@@ -1457,6 +1496,7 @@ let StreetComponent = class StreetComponent {
1457
1496
  this.sortCriteria = '';
1458
1497
  this.showDebugMessageToConsole = true;
1459
1498
  this.messageOption = 'Y';
1499
+ this.isReadonly = false;
1460
1500
  this.messageChanged = new EventEmitter();
1461
1501
  this.addressChanged = new EventEmitter();
1462
1502
  this.focusEvent = new EventEmitter();
@@ -2143,6 +2183,9 @@ __decorate([
2143
2183
  __decorate([
2144
2184
  Input()
2145
2185
  ], StreetComponent.prototype, "inputLang", null);
2186
+ __decorate([
2187
+ Input()
2188
+ ], StreetComponent.prototype, "isReadonly", void 0);
2146
2189
  __decorate([
2147
2190
  Output()
2148
2191
  ], StreetComponent.prototype, "messageChanged", void 0);
@@ -2167,7 +2210,7 @@ __decorate([
2167
2210
  StreetComponent = __decorate([
2168
2211
  Component({
2169
2212
  selector: 'bp-street',
2170
- 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\" #streetSearchInput class=\"bpaac-input\" \n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!locality || locality.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-street-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-street-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-street-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-street-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n",
2213
+ 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\" #streetSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!locality || locality.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-street-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-street-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-street-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-street-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n",
2171
2214
  styles: [""]
2172
2215
  })
2173
2216
  ], StreetComponent);
@@ -2184,6 +2227,7 @@ let StreetNumberComponent = class StreetNumberComponent {
2184
2227
  this.visibleSuggesionCount = 5;
2185
2228
  this.sortCriteria = '';
2186
2229
  this.messageOption = 'Y';
2230
+ this.isReadonly = false;
2187
2231
  this.messageChanged = new EventEmitter();
2188
2232
  this.addressChanged = new EventEmitter();
2189
2233
  this.focusEvent = new EventEmitter();
@@ -3022,6 +3066,9 @@ __decorate([
3022
3066
  __decorate([
3023
3067
  Input()
3024
3068
  ], StreetNumberComponent.prototype, "inputText", void 0);
3069
+ __decorate([
3070
+ Input()
3071
+ ], StreetNumberComponent.prototype, "isReadonly", void 0);
3025
3072
  __decorate([
3026
3073
  Output()
3027
3074
  ], StreetNumberComponent.prototype, "messageChanged", void 0);
@@ -3049,7 +3096,7 @@ __decorate([
3049
3096
  StreetNumberComponent = __decorate([
3050
3097
  Component({
3051
3098
  selector: 'bp-street-number',
3052
- 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\" #streetNumberSearchInput class=\"bpaac-input\" \n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetName || streetName.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetNumberInputField\" \n [attr.title]=\"placeHolderText\" \n [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-streetNb-button\" *ngIf=\"mayShowClearButton()\" \n (click)=\"onClearStreetNumberInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-streetNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <!-- <span>addressIsComplete: {{ addressIsComplete }}. </span>\n <span>addressIsValidated: {{ addressIsValidated }}. </span> -->\n <span *ngIf=\"addressIsComplete\" class=\"streetNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" \n id=\"bpaac-streetnumber-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-streetNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (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>",
3099
+ 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\" #streetNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetName || streetName.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetNumberInputField\" \n [attr.title]=\"placeHolderText\" \n [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-streetNb-button\" *ngIf=\"mayShowClearButton()\" \n (click)=\"onClearStreetNumberInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-streetNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <!-- <span>addressIsComplete: {{ addressIsComplete }}. </span>\n <span>addressIsValidated: {{ addressIsValidated }}. </span> -->\n <span *ngIf=\"addressIsComplete\" class=\"streetNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" \n id=\"bpaac-streetnumber-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-streetNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (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>",
3053
3100
  styles: [""]
3054
3101
  })
3055
3102
  ], StreetNumberComponent);
@@ -3066,6 +3113,7 @@ let BoxNumberComponent = class BoxNumberComponent {
3066
3113
  this.visibleSuggesionCount = 5;
3067
3114
  this.sortCriteria = '';
3068
3115
  this.messageOption = 'Y';
3116
+ this.isReadonly = false;
3069
3117
  this.messageChanged = new EventEmitter();
3070
3118
  this.addressChanged = new EventEmitter();
3071
3119
  this.focusEvent = new EventEmitter();
@@ -3815,6 +3863,9 @@ __decorate([
3815
3863
  __decorate([
3816
3864
  Input()
3817
3865
  ], BoxNumberComponent.prototype, "messageOption", void 0);
3866
+ __decorate([
3867
+ Input()
3868
+ ], BoxNumberComponent.prototype, "isReadonly", void 0);
3818
3869
  __decorate([
3819
3870
  Output()
3820
3871
  ], BoxNumberComponent.prototype, "messageChanged", void 0);
@@ -3842,7 +3893,7 @@ __decorate([
3842
3893
  BoxNumberComponent = __decorate([
3843
3894
  Component({
3844
3895
  selector: 'bp-box-number',
3845
- 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 [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\" *ngIf=\"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",
3896
+ 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 [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\" *ngIf=\"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",
3846
3897
  styles: [""]
3847
3898
  })
3848
3899
  ], BoxNumberComponent);
@@ -3855,6 +3906,8 @@ class PrefillData // extends PrefilledParameters
3855
3906
  this.prefillMunicipalityName = null;
3856
3907
  this.prefillMunicipalityPerfectMatchFound = false;
3857
3908
  this.prefillMunicipalityPerfectMatchSuggestion = null;
3909
+ // This is a working field, do not document
3910
+ this.prefillMunicipalityAndLocalityPerfectMatchFound = false;
3858
3911
  this.prefillStreetName = null;
3859
3912
  this.prefillStreetPerfectMatchFound = false;
3860
3913
  this.prefillStreetPerfectMatchSuggestion = null;
@@ -3869,33 +3922,60 @@ class PrefillData // extends PrefilledParameters
3869
3922
  }
3870
3923
  }
3871
3924
 
3925
+ let Nis9Service = class Nis9Service {
3926
+ constructor(httpClient) {
3927
+ this.httpClient = httpClient;
3928
+ // https://bgs.bpost.be/set-selection-circle?lng=4.360537572541948&lat=50.84063582806037&radius=0.001
3929
+ this.nis9ServiceURL = '';
3930
+ }
3931
+ setNis9ServiceURL(nis9ServiceURL) {
3932
+ this.nis9ServiceURL = nis9ServiceURL;
3933
+ }
3934
+ determineNis9Data(longitude, latitude) {
3935
+ const apiUrl = `https://bgs.bpost.be/set-selection-circle?lng=${longitude}&lat=${latitude}&radius=0.001`;
3936
+ return this.httpClient.get(apiUrl);
3937
+ }
3938
+ };
3939
+ Nis9Service.ctorParameters = () => [
3940
+ { type: HttpClient }
3941
+ ];
3942
+ Nis9Service.ɵprov = ɵɵdefineInjectable({ factory: function Nis9Service_Factory() { return new Nis9Service(ɵɵinject(HttpClient)); }, token: Nis9Service, providedIn: "root" });
3943
+ Nis9Service = __decorate([
3944
+ Injectable({
3945
+ providedIn: 'root'
3946
+ })
3947
+ ], Nis9Service);
3948
+
3872
3949
  let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByComponentComponent {
3873
- constructor() {
3950
+ constructor(nis9Service, httpService) {
3951
+ this.nis9Service = nis9Service;
3952
+ this.httpService = httpService;
3874
3953
  this.selectedLanguage = null;
3954
+ this.baseUrl = "https://api.mailops.bpost.cloud/roa-info/externalMailingAddressProofingRest/autocomplete/";
3875
3955
  this.showDebugMessageToConsole = false;
3876
3956
  this.notInListAllowed = true;
3877
3957
  this.messageOption = 'Y';
3878
3958
  // LOCALITY
3879
- this.localityUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/locality';
3959
+ this.localityUrl = this.baseUrl + 'locality';
3880
3960
  this.maxSuggestionLocality = 5;
3881
3961
  this.visibleSuggestionLocalityCount = 5;
3882
3962
  // localityParams: PrefilledParameters;
3883
3963
  this.localityPrefillData = null;
3884
3964
  // STREET
3885
- this.streetUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/street';
3965
+ this.streetUrl = this.baseUrl + 'street';
3886
3966
  this.maxSuggestionStreet = 5;
3887
3967
  this.visibleSuggestionStreetCount = 5;
3888
3968
  // streetParams: PrefilledParameters;
3889
3969
  this.streetPrefillData = null;
3890
3970
  // STREET NUMBER
3891
3971
  // tslint:disable-next-line:max-line-length
3892
- this.streetNumberUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/streetNumber';
3972
+ this.streetNumberUrl = this.baseUrl + 'streetNumber';
3893
3973
  this.maxSuggestionStreetNb = 5;
3894
3974
  this.visibleSuggestionStreetNbCount = 5;
3895
3975
  // streetNumberParams: PrefilledParameters;
3896
3976
  this.streetNumberPrefillData = null;
3897
3977
  // BOX NUMBER
3898
- this.boxNumberUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/boxNumber';
3978
+ this.boxNumberUrl = this.baseUrl + 'boxNumber';
3899
3979
  this.maxSuggestionBoxNb = 5;
3900
3980
  this.visibleSuggestionBoxNbCount = 5;
3901
3981
  // boxParams: PrefilledParameters;
@@ -3906,6 +3986,13 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
3906
3986
  this.validationMessageEventEmitter = new EventEmitter();
3907
3987
  this.clearInputEventEmitter = new EventEmitter();
3908
3988
  this.processingPrefillData = false;
3989
+ // Pass the API key as a property of the library !
3990
+ this.apiKey = 'cyRkKOD73O1DOdgcDLLnsaOiDh6OyOkt3BBT5JU1';
3991
+ // set the widget as readonly and add NIS9 query parameter
3992
+ this.isReadonly = false;
3993
+ this.nis9InResponse = false;
3994
+ // https://bgs.bpost.be/set-selection-circle?lng=4.360537572541948&lat=50.84063582806037&radius=0.001
3995
+ this.nis9ServiceURL = '';
3909
3996
  }
3910
3997
  // @ts-ignore
3911
3998
  set inputLang(val) {
@@ -3920,6 +4007,8 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
3920
4007
  this.setValidationMessageOptionFromInput(option);
3921
4008
  }
3922
4009
  ngOnInit() {
4010
+ this.nis9Service.setNis9ServiceURL(this.nis9ServiceURL);
4011
+ this.httpService.setApiKey(this.apiKey);
3923
4012
  if (this.addressParams) {
3924
4013
  this.prefillData = this.addressParams;
3925
4014
  }
@@ -3936,6 +4025,9 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
3936
4025
  if (this.showDebugMessageToConsole) {
3937
4026
  this.displayParametersChangesToConsole(changes);
3938
4027
  }
4028
+ if (changes.hasOwnProperty('apiKey') && !changes.apiKey.firstChange) {
4029
+ this.httpService.setApiKey(this.apiKey);
4030
+ }
3939
4031
  if (changes.hasOwnProperty('addressParams') && !changes.addressParams.firstChange) {
3940
4032
  // if (changes.hasOwnProperty('addressParams')) {
3941
4033
  this.processingPrefillData = true;
@@ -4129,9 +4221,38 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
4129
4221
  }
4130
4222
  notifyAddressComplete() {
4131
4223
  // console.log('notify for address complete');
4132
- this.addressCompleteEventEmitter.emit(this.selectedAddress);
4133
- this.emittedAddress = this.selectedAddress;
4134
- this.updatePostalCodeLocality(this.emittedAddress);
4224
+ if (this.nis9InResponse === true && this.selectedAddress.hasOwnProperty('latitude') && this.selectedAddress.hasOwnProperty('longitude')) {
4225
+ const latitude = this.selectedAddress.latitude;
4226
+ const longitude = this.selectedAddress.longitude;
4227
+ if (this.showDebugMessageToConsole)
4228
+ console.log('calling nis9 service to get nis9 data (1):', longitude, latitude);
4229
+ this.nis9Service.determineNis9Data(longitude, latitude)
4230
+ .subscribe(data => {
4231
+ console.log('nis DATA:', data);
4232
+ /*
4233
+ nis DATA:
4234
+ {Status: 'success', data: Array(1)}
4235
+ Status: "success"
4236
+ data: ['25112A21-']
4237
+ */
4238
+ if (data !== undefined && data !== null && data.hasOwnProperty('Status') && data.Status === 'success') {
4239
+ const nis9Data = data.data;
4240
+ if (Array.isArray(nis9Data) && nis9Data.length === 1) {
4241
+ this.selectedAddress.nis9 = nis9Data[0];
4242
+ }
4243
+ }
4244
+ this.addressCompleteEventEmitter.emit(this.selectedAddress);
4245
+ this.emittedAddress = this.selectedAddress;
4246
+ this.updatePostalCodeLocality(this.emittedAddress);
4247
+ });
4248
+ }
4249
+ else {
4250
+ if (this.showDebugMessageToConsole)
4251
+ console.log('NOT calling nis9 service to get nis9 data (1)');
4252
+ this.addressCompleteEventEmitter.emit(this.selectedAddress);
4253
+ this.emittedAddress = this.selectedAddress;
4254
+ this.updatePostalCodeLocality(this.emittedAddress);
4255
+ }
4135
4256
  }
4136
4257
  onClearInputEventEmitter(event) {
4137
4258
  if (this.showDebugMessageToConsole) {
@@ -4248,6 +4369,16 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
4248
4369
  }
4249
4370
  this.clearInputEventEmitter.emit(event);
4250
4371
  if (this.emittedAddress !== null) {
4372
+ if (nextAddress !== undefined && nextAddress !== null && nextAddress.hasOwnProperty('latitude') && nextAddress.hasOwnProperty('longitude')) {
4373
+ const latitude = nextAddress.latitude;
4374
+ const longitude = nextAddress.longitude;
4375
+ if (this.showDebugMessageToConsole)
4376
+ console.log('calling nis9 service to get nis9 data (2)', longitude, latitude);
4377
+ }
4378
+ else {
4379
+ if (this.showDebugMessageToConsole)
4380
+ console.log('NOT calling nis9 service to get nis9 data (2)');
4381
+ }
4251
4382
  this.addressCompleteEventEmitter.emit(nextAddress);
4252
4383
  this.emittedAddress = nextAddress;
4253
4384
  }
@@ -4795,6 +4926,10 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
4795
4926
  this.quitPrefillMode();
4796
4927
  }
4797
4928
  };
4929
+ LibAddressAutocompleteByComponentComponent.ctorParameters = () => [
4930
+ { type: Nis9Service },
4931
+ { type: HttpService }
4932
+ ];
4798
4933
  __decorate([
4799
4934
  ViewChild(LocalityComponent, { static: false })
4800
4935
  ], LibAddressAutocompleteByComponentComponent.prototype, "autocompleteLocality", void 0);
@@ -4891,10 +5026,22 @@ __decorate([
4891
5026
  __decorate([
4892
5027
  Output()
4893
5028
  ], LibAddressAutocompleteByComponentComponent.prototype, "clearInputEventEmitter", void 0);
5029
+ __decorate([
5030
+ Input()
5031
+ ], LibAddressAutocompleteByComponentComponent.prototype, "apiKey", void 0);
5032
+ __decorate([
5033
+ Input()
5034
+ ], LibAddressAutocompleteByComponentComponent.prototype, "isReadonly", void 0);
5035
+ __decorate([
5036
+ Input()
5037
+ ], LibAddressAutocompleteByComponentComponent.prototype, "nis9InResponse", void 0);
5038
+ __decorate([
5039
+ Input()
5040
+ ], LibAddressAutocompleteByComponentComponent.prototype, "nis9ServiceURL", void 0);
4894
5041
  LibAddressAutocompleteByComponentComponent = __decorate([
4895
5042
  Component({
4896
5043
  selector: 'bp-lib-address-autocomplete-by-component',
4897
- 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\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"localityUrl\"\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 (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)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"streetUrl\"\r\n [prefillData]=\"streetPrefillData\"\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 (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)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"streetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\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 (addressChanged)=\"setAddress($event, 2)\"\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)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"boxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\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 [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"></bp-box-number>\r\n</div>",
5044
+ 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\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"localityUrl\"\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 (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)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"streetUrl\"\r\n [prefillData]=\"streetPrefillData\"\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 (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)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"streetNumberUrl\"\r\n [selectedAddress]=\"streetAddress\"\r\n [prefillData]=\"streetNumberPrefillData\"\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 (addressChanged)=\"setAddress($event, 2)\"\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)\"></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]=\"boxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\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 [maxSuggesionCount]=\"maxSuggestionBoxNb\"\r\n [visibleSuggesionCount]=\"visibleSuggestionBoxNbCount\"\r\n [notInListAllowed]=\"notInListAllowed\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"></bp-box-number>\r\n</div>",
4898
5045
  styles: [""]
4899
5046
  })
4900
5047
  ], LibAddressAutocompleteByComponentComponent);
@@ -5054,5 +5201,5 @@ class PrefilledParameters {
5054
5201
  * Generated bundle index. Do not edit.
5055
5202
  */
5056
5203
 
5057
- export { ADDRESSLEVEL, LibAddressAutocompleteByComponentComponent, LibAddressAutocompleteByComponentModule, LibAddressAutocompleteByComponentService, PrefilledParameters, ValidationMessageOptionType, ValidationMessageType, LocalityComponent as ɵa, AddressService as ɵb, HttpService as ɵc, LocaleService as ɵd, UnicodeService as ɵe, StreetComponent as ɵf, StreetNumberComponent as ɵg, BoxNumberComponent as ɵh, HighlightSuggestionPipe as ɵi, VisibleSuggestionDirective as ɵj };
5204
+ export { ADDRESSLEVEL, LibAddressAutocompleteByComponentComponent, LibAddressAutocompleteByComponentModule, LibAddressAutocompleteByComponentService, PrefilledParameters, ValidationMessageOptionType, ValidationMessageType, LocalityComponent as ɵa, AddressService as ɵb, HttpService as ɵc, LocaleService as ɵd, UnicodeService as ɵe, StreetComponent as ɵf, StreetNumberComponent as ɵg, BoxNumberComponent as ɵh, Nis9Service as ɵi, HighlightSuggestionPipe as ɵj, VisibleSuggestionDirective as ɵk };
5058
5205
  //# sourceMappingURL=bpost-bp-address-auto-complete-by-component.js.map