@bpost/bp-address-auto-complete-by-component 1.0.27 → 1.1.0

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 +61 -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 +170 -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 +2 -2
  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 +85 -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 +86 -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 +167 -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 +170 -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
@@ -1,8 +1,8 @@
1
- import { __decorate, __values, __assign } from 'tslib';
1
+ import { __decorate, __assign, __values } 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';
@@ -67,13 +67,26 @@ var HttpService = /** @class */ (function () {
67
67
  function HttpService(httpClient) {
68
68
  this.httpClient = httpClient;
69
69
  this.openConnections = 0;
70
+ this.apiKey = 'no-value';
70
71
  }
72
+ HttpService.prototype.setApiKey = function (apiKey) {
73
+ this.apiKey = apiKey;
74
+ };
75
+ HttpService.prototype.getHttpHeaders = function () {
76
+ var headers = new HttpHeaders();
77
+ // Attention !
78
+ // Need to reassign as the 'set' is returning a clone of the headera object !!!
79
+ headers = headers.set('x-api-key', /*'bBkvimXYnAaEEKMyGqoWO2XiaZCQyqUi7VReYzPJ'*/ this.apiKey);
80
+ return headers;
81
+ };
71
82
  HttpService.prototype.get = function (url, options) {
72
83
  return this.request('GET', url, options);
73
84
  };
74
85
  HttpService.prototype.request = function (method, url, options) {
75
86
  var _this = this;
76
87
  options = !!options ? options : {};
88
+ options = __assign(__assign({}, options), { headers: this.getHttpHeaders() });
89
+ console.log('options:', JSON.stringify(options));
77
90
  this.openConnections++;
78
91
  return this.httpClient.request(method, url, options).pipe(map(function (response) { return _this.handleResponse(response); }), catchError(function (error) { return _this.handleError(error); }));
79
92
  };
@@ -204,6 +217,10 @@ var AddressService = /** @class */ (function () {
204
217
  this.httpService = httpService;
205
218
  this.domain = 'http://10.194.73.9:8080';
206
219
  this.localityURL = this.domain + '/AddressAutoComplete/autocomplete/locality?IncludeGeographicalSanction=true';
220
+ this.log = true;
221
+ this.nis9InResponse = false;
222
+ // https://bgs.bpost.be/set-selection-circle?lng=4.360537572541948&lat=50.84063582806037&radius=0.001
223
+ this.nis9ServiceURL = '';
207
224
  }
208
225
  AddressService.prototype.getLocality = function (baseUrl, params) {
209
226
  var _this = this;
@@ -752,6 +769,7 @@ var LocalityComponent = /** @class */ (function () {
752
769
  this.visibleSuggestionCount = 5;
753
770
  this.sortCriteria = '';
754
771
  this.showDebugMessageToConsole = true;
772
+ this.isReadonly = false;
755
773
  this.messageChanged = new EventEmitter();
756
774
  this.addressChanged = new EventEmitter();
757
775
  this.focusEvent = new EventEmitter();
@@ -1203,11 +1221,29 @@ var LocalityComponent = /** @class */ (function () {
1203
1221
  var suggestionMunicipality = this.transformMunicipalityInLowercaseAndWithoutDiacritics(sugAddress.municipalityName);
1204
1222
  if (suggestionLocality === this.prefillData.prefillMunicipalityName
1205
1223
  || suggestionMunicipality === this.prefillData.prefillMunicipalityName) {
1224
+ if (this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound === true) {
1225
+ if (this.showDebugMessageToConsole) {
1226
+ console.log('LOCALITY - PREFILL - skipping suggestion:', suggestion);
1227
+ }
1228
+ if (this.showDebugMessageToConsole) {
1229
+ console.log('LOCALITY - PREFILL - keeping suggestion:', this.prefillData.prefillMunicipalityPerfectMatchSuggestion);
1230
+ }
1231
+ return;
1232
+ }
1206
1233
  this.prefillData.prefillMunicipalityPerfectMatchFound = true;
1207
1234
  this.prefillData.prefillMunicipalityPerfectMatchSuggestion = suggestion;
1208
1235
  this.searchText = sugAddress.postalCode + ' ' + sugAddress.localityName;
1209
- if (this.showDebugMessageToConsole) {
1210
- console.log('LOCALITY - PREFILL - Perfect match:', suggestion);
1236
+ this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound = (suggestionLocality === this.prefillData.prefillMunicipalityName
1237
+ && suggestionMunicipality === this.prefillData.prefillMunicipalityName) ? true : false;
1238
+ if (this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound === true) {
1239
+ if (this.showDebugMessageToConsole) {
1240
+ console.log('LOCALITY - PREFILL - Perfect match - Municipality & location:', suggestion);
1241
+ }
1242
+ }
1243
+ else {
1244
+ if (this.showDebugMessageToConsole) {
1245
+ console.log('LOCALITY - PREFILL - Perfect match:', suggestion);
1246
+ }
1211
1247
  }
1212
1248
  }
1213
1249
  }
@@ -1495,6 +1531,9 @@ var LocalityComponent = /** @class */ (function () {
1495
1531
  __decorate([
1496
1532
  Input()
1497
1533
  ], LocalityComponent.prototype, "inputLang", null);
1534
+ __decorate([
1535
+ Input()
1536
+ ], LocalityComponent.prototype, "isReadonly", void 0);
1498
1537
  __decorate([
1499
1538
  Output()
1500
1539
  ], LocalityComponent.prototype, "messageChanged", void 0);
@@ -1519,7 +1558,7 @@ var LocalityComponent = /** @class */ (function () {
1519
1558
  LocalityComponent = __decorate([
1520
1559
  Component({
1521
1560
  selector: 'bp-locality',
1522
- 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>",
1561
+ 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>",
1523
1562
  styles: [""]
1524
1563
  })
1525
1564
  ], LocalityComponent);
@@ -1542,6 +1581,7 @@ var StreetComponent = /** @class */ (function () {
1542
1581
  this.sortCriteria = '';
1543
1582
  this.showDebugMessageToConsole = true;
1544
1583
  this.messageOption = 'Y';
1584
+ this.isReadonly = false;
1545
1585
  this.messageChanged = new EventEmitter();
1546
1586
  this.addressChanged = new EventEmitter();
1547
1587
  this.focusEvent = new EventEmitter();
@@ -2271,6 +2311,9 @@ var StreetComponent = /** @class */ (function () {
2271
2311
  __decorate([
2272
2312
  Input()
2273
2313
  ], StreetComponent.prototype, "inputLang", null);
2314
+ __decorate([
2315
+ Input()
2316
+ ], StreetComponent.prototype, "isReadonly", void 0);
2274
2317
  __decorate([
2275
2318
  Output()
2276
2319
  ], StreetComponent.prototype, "messageChanged", void 0);
@@ -2295,7 +2338,7 @@ var StreetComponent = /** @class */ (function () {
2295
2338
  StreetComponent = __decorate([
2296
2339
  Component({
2297
2340
  selector: 'bp-street',
2298
- 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",
2341
+ 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",
2299
2342
  styles: [""]
2300
2343
  })
2301
2344
  ], StreetComponent);
@@ -2314,6 +2357,7 @@ var StreetNumberComponent = /** @class */ (function () {
2314
2357
  this.visibleSuggesionCount = 5;
2315
2358
  this.sortCriteria = '';
2316
2359
  this.messageOption = 'Y';
2360
+ this.isReadonly = false;
2317
2361
  this.messageChanged = new EventEmitter();
2318
2362
  this.addressChanged = new EventEmitter();
2319
2363
  this.focusEvent = new EventEmitter();
@@ -3170,6 +3214,9 @@ var StreetNumberComponent = /** @class */ (function () {
3170
3214
  __decorate([
3171
3215
  Input()
3172
3216
  ], StreetNumberComponent.prototype, "inputText", void 0);
3217
+ __decorate([
3218
+ Input()
3219
+ ], StreetNumberComponent.prototype, "isReadonly", void 0);
3173
3220
  __decorate([
3174
3221
  Output()
3175
3222
  ], StreetNumberComponent.prototype, "messageChanged", void 0);
@@ -3197,7 +3244,7 @@ var StreetNumberComponent = /** @class */ (function () {
3197
3244
  StreetNumberComponent = __decorate([
3198
3245
  Component({
3199
3246
  selector: 'bp-street-number',
3200
- 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>",
3247
+ 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>",
3201
3248
  styles: [""]
3202
3249
  })
3203
3250
  ], StreetNumberComponent);
@@ -3216,6 +3263,7 @@ var BoxNumberComponent = /** @class */ (function () {
3216
3263
  this.visibleSuggesionCount = 5;
3217
3264
  this.sortCriteria = '';
3218
3265
  this.messageOption = 'Y';
3266
+ this.isReadonly = false;
3219
3267
  this.messageChanged = new EventEmitter();
3220
3268
  this.addressChanged = new EventEmitter();
3221
3269
  this.focusEvent = new EventEmitter();
@@ -3983,6 +4031,9 @@ var BoxNumberComponent = /** @class */ (function () {
3983
4031
  __decorate([
3984
4032
  Input()
3985
4033
  ], BoxNumberComponent.prototype, "messageOption", void 0);
4034
+ __decorate([
4035
+ Input()
4036
+ ], BoxNumberComponent.prototype, "isReadonly", void 0);
3986
4037
  __decorate([
3987
4038
  Output()
3988
4039
  ], BoxNumberComponent.prototype, "messageChanged", void 0);
@@ -4010,7 +4061,7 @@ var BoxNumberComponent = /** @class */ (function () {
4010
4061
  BoxNumberComponent = __decorate([
4011
4062
  Component({
4012
4063
  selector: 'bp-box-number',
4013
- 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",
4064
+ 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",
4014
4065
  styles: [""]
4015
4066
  })
4016
4067
  ], BoxNumberComponent);
@@ -4025,6 +4076,8 @@ var PrefillData // extends PrefilledParameters
4025
4076
  this.prefillMunicipalityName = null;
4026
4077
  this.prefillMunicipalityPerfectMatchFound = false;
4027
4078
  this.prefillMunicipalityPerfectMatchSuggestion = null;
4079
+ // This is a working field, do not document
4080
+ this.prefillMunicipalityAndLocalityPerfectMatchFound = false;
4028
4081
  this.prefillStreetName = null;
4029
4082
  this.prefillStreetPerfectMatchFound = false;
4030
4083
  this.prefillStreetPerfectMatchSuggestion = null;
@@ -4040,33 +4093,61 @@ var PrefillData // extends PrefilledParameters
4040
4093
  return PrefillData;
4041
4094
  }());
4042
4095
 
4096
+ var Nis9Service = /** @class */ (function () {
4097
+ function Nis9Service(httpClient) {
4098
+ this.httpClient = httpClient;
4099
+ // https://bgs.bpost.be/set-selection-circle?lng=4.360537572541948&lat=50.84063582806037&radius=0.001
4100
+ this.nis9ServiceURL = '';
4101
+ }
4102
+ Nis9Service.prototype.setNis9ServiceURL = function (nis9ServiceURL) {
4103
+ this.nis9ServiceURL = nis9ServiceURL;
4104
+ };
4105
+ Nis9Service.prototype.determineNis9Data = function (longitude, latitude) {
4106
+ var apiUrl = "https://bgs.bpost.be/set-selection-circle?lng=" + longitude + "&lat=" + latitude + "&radius=0.001";
4107
+ return this.httpClient.get(apiUrl);
4108
+ };
4109
+ Nis9Service.ctorParameters = function () { return [
4110
+ { type: HttpClient }
4111
+ ]; };
4112
+ Nis9Service.ɵprov = ɵɵdefineInjectable({ factory: function Nis9Service_Factory() { return new Nis9Service(ɵɵinject(HttpClient)); }, token: Nis9Service, providedIn: "root" });
4113
+ Nis9Service = __decorate([
4114
+ Injectable({
4115
+ providedIn: 'root'
4116
+ })
4117
+ ], Nis9Service);
4118
+ return Nis9Service;
4119
+ }());
4120
+
4043
4121
  var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
4044
- function LibAddressAutocompleteByComponentComponent() {
4122
+ function LibAddressAutocompleteByComponentComponent(nis9Service, httpService) {
4123
+ this.nis9Service = nis9Service;
4124
+ this.httpService = httpService;
4045
4125
  this.selectedLanguage = null;
4126
+ this.baseUrl = "https://api.mailops.bpost.cloud/roa-info/externalMailingAddressProofingRest/autocomplete/";
4046
4127
  this.showDebugMessageToConsole = false;
4047
4128
  this.notInListAllowed = true;
4048
4129
  this.messageOption = 'Y';
4049
4130
  // LOCALITY
4050
- this.localityUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/locality';
4131
+ this.localityUrl = this.baseUrl + 'locality';
4051
4132
  this.maxSuggestionLocality = 5;
4052
4133
  this.visibleSuggestionLocalityCount = 5;
4053
4134
  // localityParams: PrefilledParameters;
4054
4135
  this.localityPrefillData = null;
4055
4136
  // STREET
4056
- this.streetUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/street';
4137
+ this.streetUrl = this.baseUrl + 'street';
4057
4138
  this.maxSuggestionStreet = 5;
4058
4139
  this.visibleSuggestionStreetCount = 5;
4059
4140
  // streetParams: PrefilledParameters;
4060
4141
  this.streetPrefillData = null;
4061
4142
  // STREET NUMBER
4062
4143
  // tslint:disable-next-line:max-line-length
4063
- this.streetNumberUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/streetNumber';
4144
+ this.streetNumberUrl = this.baseUrl + 'streetNumber';
4064
4145
  this.maxSuggestionStreetNb = 5;
4065
4146
  this.visibleSuggestionStreetNbCount = 5;
4066
4147
  // streetNumberParams: PrefilledParameters;
4067
4148
  this.streetNumberPrefillData = null;
4068
4149
  // BOX NUMBER
4069
- this.boxNumberUrl = 'https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCSREST_v1/address/autocomplete/boxNumber';
4150
+ this.boxNumberUrl = this.baseUrl + 'boxNumber';
4070
4151
  this.maxSuggestionBoxNb = 5;
4071
4152
  this.visibleSuggestionBoxNbCount = 5;
4072
4153
  // boxParams: PrefilledParameters;
@@ -4077,6 +4158,13 @@ var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
4077
4158
  this.validationMessageEventEmitter = new EventEmitter();
4078
4159
  this.clearInputEventEmitter = new EventEmitter();
4079
4160
  this.processingPrefillData = false;
4161
+ // Pass the API key as a property of the library !
4162
+ this.apiKey = 'cyRkKOD73O1DOdgcDLLnsaOiDh6OyOkt3BBT5JU1';
4163
+ // set the widget as readonly and add NIS9 query parameter
4164
+ this.isReadonly = false;
4165
+ this.nis9InResponse = false;
4166
+ // https://bgs.bpost.be/set-selection-circle?lng=4.360537572541948&lat=50.84063582806037&radius=0.001
4167
+ this.nis9ServiceURL = '';
4080
4168
  }
4081
4169
  Object.defineProperty(LibAddressAutocompleteByComponentComponent.prototype, "inputLang", {
4082
4170
  // @ts-ignore
@@ -4103,6 +4191,8 @@ var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
4103
4191
  configurable: true
4104
4192
  });
4105
4193
  LibAddressAutocompleteByComponentComponent.prototype.ngOnInit = function () {
4194
+ this.nis9Service.setNis9ServiceURL(this.nis9ServiceURL);
4195
+ this.httpService.setApiKey(this.apiKey);
4106
4196
  if (this.addressParams) {
4107
4197
  this.prefillData = this.addressParams;
4108
4198
  }
@@ -4119,6 +4209,9 @@ var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
4119
4209
  if (this.showDebugMessageToConsole) {
4120
4210
  this.displayParametersChangesToConsole(changes);
4121
4211
  }
4212
+ if (changes.hasOwnProperty('apiKey') && !changes.apiKey.firstChange) {
4213
+ this.httpService.setApiKey(this.apiKey);
4214
+ }
4122
4215
  if (changes.hasOwnProperty('addressParams') && !changes.addressParams.firstChange) {
4123
4216
  // if (changes.hasOwnProperty('addressParams')) {
4124
4217
  this.processingPrefillData = true;
@@ -4311,10 +4404,43 @@ var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
4311
4404
  return prefix;
4312
4405
  };
4313
4406
  LibAddressAutocompleteByComponentComponent.prototype.notifyAddressComplete = function () {
4407
+ var _this = this;
4314
4408
  // console.log('notify for address complete');
4315
- this.addressCompleteEventEmitter.emit(this.selectedAddress);
4316
- this.emittedAddress = this.selectedAddress;
4317
- this.updatePostalCodeLocality(this.emittedAddress);
4409
+ if (this.showDebugMessageToConsole) {
4410
+ console.log('notifyAddressComplete', this.selectedAddress, 'nis9InResponse:' + this.nis9InResponse, typeof this.nis9InResponse);
4411
+ }
4412
+ if ((this.nis9InResponse === true || '' + this.nis9InResponse === 'true') && this.selectedAddress.hasOwnProperty('latitude') && this.selectedAddress.hasOwnProperty('longitude')) {
4413
+ var latitude = this.selectedAddress.latitude;
4414
+ var longitude = this.selectedAddress.longitude;
4415
+ if (this.showDebugMessageToConsole)
4416
+ console.log('calling nis9 service to get nis9 data (1):', longitude, latitude);
4417
+ this.nis9Service.determineNis9Data(longitude, latitude)
4418
+ .subscribe(function (data) {
4419
+ console.log('nis DATA:', data);
4420
+ /*
4421
+ nis DATA:
4422
+ {Status: 'success', data: Array(1)}
4423
+ Status: "success"
4424
+ data: ['25112A21-']
4425
+ */
4426
+ if (data !== undefined && data !== null && data.hasOwnProperty('Status') && data.Status === 'success') {
4427
+ var nis9Data = data.data;
4428
+ if (Array.isArray(nis9Data) && nis9Data.length === 1) {
4429
+ _this.selectedAddress.nis9 = nis9Data[0];
4430
+ }
4431
+ }
4432
+ _this.addressCompleteEventEmitter.emit(_this.selectedAddress);
4433
+ _this.emittedAddress = _this.selectedAddress;
4434
+ _this.updatePostalCodeLocality(_this.emittedAddress);
4435
+ });
4436
+ }
4437
+ else {
4438
+ if (this.showDebugMessageToConsole)
4439
+ console.log('NOT calling nis9 service to get nis9 data (1)');
4440
+ this.addressCompleteEventEmitter.emit(this.selectedAddress);
4441
+ this.emittedAddress = this.selectedAddress;
4442
+ this.updatePostalCodeLocality(this.emittedAddress);
4443
+ }
4318
4444
  };
4319
4445
  LibAddressAutocompleteByComponentComponent.prototype.onClearInputEventEmitter = function (event) {
4320
4446
  if (this.showDebugMessageToConsole) {
@@ -4431,6 +4557,16 @@ var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
4431
4557
  }
4432
4558
  this.clearInputEventEmitter.emit(event);
4433
4559
  if (this.emittedAddress !== null) {
4560
+ if (nextAddress !== undefined && nextAddress !== null && nextAddress.hasOwnProperty('latitude') && nextAddress.hasOwnProperty('longitude')) {
4561
+ var latitude = nextAddress.latitude;
4562
+ var longitude = nextAddress.longitude;
4563
+ if (this.showDebugMessageToConsole)
4564
+ console.log('calling nis9 service to get nis9 data (2)', longitude, latitude);
4565
+ }
4566
+ else {
4567
+ if (this.showDebugMessageToConsole)
4568
+ console.log('NOT calling nis9 service to get nis9 data (2)');
4569
+ }
4434
4570
  this.addressCompleteEventEmitter.emit(nextAddress);
4435
4571
  this.emittedAddress = nextAddress;
4436
4572
  }
@@ -4979,6 +5115,10 @@ var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
4979
5115
  }
4980
5116
  this.quitPrefillMode();
4981
5117
  };
5118
+ LibAddressAutocompleteByComponentComponent.ctorParameters = function () { return [
5119
+ { type: Nis9Service },
5120
+ { type: HttpService }
5121
+ ]; };
4982
5122
  __decorate([
4983
5123
  ViewChild(LocalityComponent, { static: false })
4984
5124
  ], LibAddressAutocompleteByComponentComponent.prototype, "autocompleteLocality", void 0);
@@ -5075,10 +5215,22 @@ var LibAddressAutocompleteByComponentComponent = /** @class */ (function () {
5075
5215
  __decorate([
5076
5216
  Output()
5077
5217
  ], LibAddressAutocompleteByComponentComponent.prototype, "clearInputEventEmitter", void 0);
5218
+ __decorate([
5219
+ Input()
5220
+ ], LibAddressAutocompleteByComponentComponent.prototype, "apiKey", void 0);
5221
+ __decorate([
5222
+ Input()
5223
+ ], LibAddressAutocompleteByComponentComponent.prototype, "isReadonly", void 0);
5224
+ __decorate([
5225
+ Input()
5226
+ ], LibAddressAutocompleteByComponentComponent.prototype, "nis9InResponse", void 0);
5227
+ __decorate([
5228
+ Input()
5229
+ ], LibAddressAutocompleteByComponentComponent.prototype, "nis9ServiceURL", void 0);
5078
5230
  LibAddressAutocompleteByComponentComponent = __decorate([
5079
5231
  Component({
5080
5232
  selector: 'bp-lib-address-autocomplete-by-component',
5081
- 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>",
5233
+ 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>",
5082
5234
  styles: [""]
5083
5235
  })
5084
5236
  ], LibAddressAutocompleteByComponentComponent);
@@ -5257,5 +5409,5 @@ var PrefilledParameters = /** @class */ (function () {
5257
5409
  * Generated bundle index. Do not edit.
5258
5410
  */
5259
5411
 
5260
- 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 };
5412
+ 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 };
5261
5413
  //# sourceMappingURL=bpost-bp-address-auto-complete-by-component.js.map