@bpost/bp-address-auto-complete-by-component 1.1.12 → 1.1.14

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.
@@ -934,6 +934,9 @@ class LocalityComponent {
934
934
  this.clearSelectedAddress();
935
935
  }
936
936
  */
937
+ // if (changes.hasOwnProperty('validatedByBackend') && changes.hasOwnProperty('prefillData')) {
938
+ // this.onInputChange(SourceType.SOURCE_PREFILLED)
939
+ // }
937
940
  }
938
941
  }
939
942
  transformMunicipalityInLowercaseAndWithoutDiacritics(municipalityName) {
@@ -1095,7 +1098,7 @@ class LocalityComponent {
1095
1098
  else {
1096
1099
  this.isPrefillWithNoMatch = false;
1097
1100
  }
1098
- }, () => this.handleGetLocalityError());
1101
+ }, () => this.handleGetLocalityError(source));
1099
1102
  }
1100
1103
  }
1101
1104
  getTextColor() {
@@ -1117,12 +1120,25 @@ class LocalityComponent {
1117
1120
  this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
1118
1121
  ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
1119
1122
  }
1120
- handleGetLocalityError() {
1123
+ handleGetLocalityError(source) {
1121
1124
  if (this.allowNoValidation && this.validatedByBackend) {
1122
1125
  this.numberOfExceptions += 1;
1123
1126
  this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
1127
+ this.setConnectionErrorMessage();
1128
+ }
1129
+ if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
1130
+ this.numberOfExceptions += 1;
1131
+ this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
1132
+ this.setConnectionErrorMessage();
1133
+ this.onInputChange(source);
1124
1134
  }
1125
- this.setConnectionErrorMessage();
1135
+ if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
1136
+ this.onInputChange(source);
1137
+ }
1138
+ if (!this.allowNoValidation && this.validatedByBackend) {
1139
+ this.setConnectionErrorMessage();
1140
+ }
1141
+ // this.setConnectionErrorMessage();
1126
1142
  }
1127
1143
  isBrowserIE() {
1128
1144
  return /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
@@ -1215,19 +1231,40 @@ class LocalityComponent {
1215
1231
  }
1216
1232
  else {
1217
1233
  if (!this.validatedByBackend) {
1218
- this.isPrefillWithNoMatch = false;
1219
- this.clearTypeAhead();
1220
- this.resetArrowSelectedIndex();
1221
- const municipalityName = this.searchText.replace(/\d+/g, '').trim();
1222
- const postalCode = this.searchText.match(/\d+/g)?.join("");
1223
- let suggestion = {
1224
- 'string': this.searchText,
1225
- 'municipalityName': municipalityName ? municipalityName.toUpperCase() : '',
1226
- 'localityName': municipalityName,
1227
- 'postalCode': postalCode,
1228
- 'searchBarString': this.searchText
1229
- };
1230
- this.setSelectedAddress(suggestion);
1234
+ if (source === SourceType.SOURCE_PREFILLED) {
1235
+ this.clearTypeAhead();
1236
+ this.prefillData.prefillMunicipalityPerfectMatchFound = true;
1237
+ this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound = true;
1238
+ const municipalityName = this.searchText.replace(/\d+/g, '').trim();
1239
+ const postalCode = this.searchText.match(/\d+/g)?.join("");
1240
+ let suggestion = {
1241
+ 'address': {
1242
+ 'string': this.searchText,
1243
+ 'municipalityName': municipalityName ? municipalityName.toUpperCase() : '',
1244
+ 'localityName': municipalityName,
1245
+ 'postalCode': postalCode,
1246
+ 'searchBarString': this.searchText
1247
+ }
1248
+ };
1249
+ this.prefillData.prefillMunicipalityPerfectMatchSuggestion = suggestion;
1250
+ this.isPrefillWithNoMatch = this.prefillData.prefillMunicipalityPerfectMatchFound === true ? false : true;
1251
+ this.prefillAnalyzeData();
1252
+ }
1253
+ else {
1254
+ this.isPrefillWithNoMatch = false;
1255
+ this.clearTypeAhead();
1256
+ this.resetArrowSelectedIndex();
1257
+ const municipalityName = this.searchText.replace(/\d+/g, '').trim();
1258
+ const postalCode = this.searchText.match(/\d+/g)?.join("");
1259
+ let suggestion = {
1260
+ 'string': this.searchText,
1261
+ 'municipalityName': municipalityName ? municipalityName.toUpperCase() : '',
1262
+ 'localityName': municipalityName,
1263
+ 'postalCode': postalCode,
1264
+ 'searchBarString': this.searchText
1265
+ };
1266
+ this.setSelectedAddress(suggestion);
1267
+ }
1231
1268
  }
1232
1269
  else {
1233
1270
  this.getTopSuggestions(source);
@@ -1687,12 +1724,20 @@ class StreetComponent {
1687
1724
  if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
1688
1725
  this.prefilling = true;
1689
1726
  this.searchText = this.loadParams(changes.prefillData.currentValue);
1727
+ // if(this.searchText === '')
1728
+ // {
1729
+ setTimeout(() => {
1730
+ this.searchText = this.loadParams(changes.prefillData.currentValue);
1731
+ // console.log("setrtt time");
1732
+ }, 200);
1733
+ // }
1690
1734
  if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.STREET) {
1691
1735
  /*
1692
1736
  this.onInputChange('prefilled');
1693
1737
  this.streetSearchInput.nativeElement.focus();
1694
1738
  */
1695
1739
  /*
1740
+
1696
1741
  this.prefilling = true;
1697
1742
  this.collapseDropdown = true;
1698
1743
  this.prefillMunicipalityName = this.transformMunicipalityInLowercaseAndWithoutDiacritics(this.addressParams.municipalityName);
@@ -1859,7 +1904,7 @@ class StreetComponent {
1859
1904
  else {
1860
1905
  this.isPrefillWithNoMatch = false;
1861
1906
  }
1862
- }, () => this.handleGetStreetError());
1907
+ }, () => this.handleGetStreetError(source));
1863
1908
  }
1864
1909
  }
1865
1910
  getTextColor() {
@@ -1932,12 +1977,24 @@ class StreetComponent {
1932
1977
  this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
1933
1978
  ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
1934
1979
  }
1935
- handleGetStreetError() {
1980
+ handleGetStreetError(source) {
1936
1981
  if (this.allowNoValidation && this.validatedByBackend) {
1937
1982
  this.numberOfExceptions += 1;
1938
1983
  this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
1984
+ this.setConnectionErrorMessage();
1985
+ }
1986
+ if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
1987
+ this.numberOfExceptions += 1;
1988
+ this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
1989
+ this.setConnectionErrorMessage();
1990
+ this.onInputChange(source);
1991
+ }
1992
+ if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
1993
+ this.onInputChange(source);
1994
+ }
1995
+ if (!this.allowNoValidation && this.validatedByBackend) {
1996
+ this.setConnectionErrorMessage();
1939
1997
  }
1940
- this.setConnectionErrorMessage();
1941
1998
  }
1942
1999
  setConnectionErrorMessage() {
1943
2000
  this.errorCode = /*'service-unavailable'*/ ValidationMessageType.Service_Unavailable;
@@ -2034,15 +2091,35 @@ class StreetComponent {
2034
2091
  }
2035
2092
  else {
2036
2093
  if (!this.validatedByBackend) {
2037
- let suggestion = {
2038
- 'string': this.searchText.toUpperCase(),
2039
- 'municipalityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2040
- 'localityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2041
- 'postalCode': this.postalCode,
2042
- 'searchBarString': this.searchText.toUpperCase(),
2043
- 'streetName': this.searchText.toUpperCase()
2044
- };
2045
- this.setSelectedAddress(suggestion);
2094
+ if (source === SourceType.SOURCE_PREFILLED) {
2095
+ this.prefillData.prefillStreetPerfectMatchFound = true;
2096
+ // this.clearTypeAhead();
2097
+ // this.resetArrowSelectedIndex();
2098
+ let suggestion = {
2099
+ 'address': {
2100
+ 'string': this.searchText.toUpperCase(),
2101
+ 'municipalityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2102
+ 'localityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2103
+ 'postalCode': this.postalCode,
2104
+ 'searchBarString': this.searchText.toUpperCase(),
2105
+ 'streetName': this.searchText.toUpperCase()
2106
+ }
2107
+ };
2108
+ this.prefillData.prefillStreetPerfectMatchSuggestion = suggestion;
2109
+ this.isPrefillWithNoMatch = this.prefillData.prefillStreetPerfectMatchFound === true ? false : true;
2110
+ this.prefillAnalyzeData();
2111
+ }
2112
+ else {
2113
+ let suggestion = {
2114
+ 'string': this.searchText.toUpperCase(),
2115
+ 'municipalityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2116
+ 'localityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2117
+ 'postalCode': this.postalCode,
2118
+ 'searchBarString': this.searchText.toUpperCase(),
2119
+ 'streetName': this.searchText.toUpperCase()
2120
+ };
2121
+ this.setSelectedAddress(suggestion);
2122
+ }
2046
2123
  }
2047
2124
  else {
2048
2125
  this.getTopSuggestions(source);
@@ -2282,7 +2359,7 @@ class StreetComponent {
2282
2359
  }
2283
2360
  }
2284
2361
  StreetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: StreetComponent, deps: [{ token: AddressService }, { token: LocaleService }, { token: i3.TranslateService }, { token: UnicodeService }], target: i0.ɵɵFactoryTarget.Component });
2285
- StreetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: StreetComponent, selector: "bp-street", inputs: { labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", prefillData: "prefillData", showDebugMessageToConsole: "showDebugMessageToConsole", postalCode: "postalCode", locality: "locality", inputText: "inputText", messageOption: "messageOption", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", inputLang: "inputLang", isReadonly: "isReadonly" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", numberOfExceptionsEmitter: "numberOfExceptionsEmitter" }, viewQueries: [{ propertyName: "streetSearchInput", first: true, predicate: ["streetSearchInput"], descendants: true }, { propertyName: "streetList", first: true, predicate: ["streetList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #streetSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"(validatedByBackend && (!locality || locality.trim().length === 0)) \n || (!validatedByBackend && ((!postalCode || postalCode.trim().length === 0) && (!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", styles: [""], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleSuggestionDirective, selector: "[appVisibleSuggestion]", inputs: ["appVisibleSuggestion"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3.TranslatePipe, "highlightSuggestion": HighlightSuggestionPipe } });
2362
+ StreetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: StreetComponent, selector: "bp-street", inputs: { labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", addressParams: "addressParams", prefillData: "prefillData", showDebugMessageToConsole: "showDebugMessageToConsole", postalCode: "postalCode", locality: "locality", inputText: "inputText", messageOption: "messageOption", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", inputLang: "inputLang", isReadonly: "isReadonly" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", numberOfExceptionsEmitter: "numberOfExceptionsEmitter" }, viewQueries: [{ propertyName: "streetSearchInput", first: true, predicate: ["streetSearchInput"], descendants: true }, { propertyName: "streetList", first: true, predicate: ["streetList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #streetSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"(validatedByBackend && (!locality || locality.trim().length === 0)) \n || (!validatedByBackend && ((!postalCode || postalCode.trim().length === 0) && (!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", styles: [""], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: VisibleSuggestionDirective, selector: "[appVisibleSuggestion]", inputs: ["appVisibleSuggestion"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3.TranslatePipe, "highlightSuggestion": HighlightSuggestionPipe } });
2286
2363
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: StreetComponent, decorators: [{
2287
2364
  type: Component,
2288
2365
  args: [{ selector: 'bp-street', 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]=\"(validatedByBackend && (!locality || locality.trim().length === 0)) \n || (!validatedByBackend && ((!postalCode || postalCode.trim().length === 0) && (!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", styles: [""] }]
@@ -2302,6 +2379,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
2302
2379
  type: Input
2303
2380
  }], baseUrl: [{
2304
2381
  type: Input
2382
+ }], addressParams: [{
2383
+ type: Input
2305
2384
  }], prefillData: [{
2306
2385
  type: Input
2307
2386
  }], showDebugMessageToConsole: [{
@@ -2628,7 +2707,7 @@ class StreetNumberComponent {
2628
2707
  else {
2629
2708
  this.isPrefillWithNoMatch = false;
2630
2709
  }
2631
- }, () => this.handleGetStreetError());
2710
+ }, () => this.handleGetStreetError(source));
2632
2711
  }
2633
2712
  }
2634
2713
  getTextColor() {
@@ -2709,12 +2788,24 @@ class StreetNumberComponent {
2709
2788
  this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
2710
2789
  ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
2711
2790
  }
2712
- handleGetStreetError() {
2791
+ handleGetStreetError(source) {
2713
2792
  if (this.allowNoValidation && this.validatedByBackend) {
2714
2793
  this.numberOfExceptions += 1;
2715
2794
  this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
2795
+ this.setConnectionErrorMessage();
2796
+ }
2797
+ if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
2798
+ this.numberOfExceptions += 1;
2799
+ this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
2800
+ this.setConnectionErrorMessage();
2801
+ this.onInputChange(source);
2802
+ }
2803
+ if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
2804
+ this.onInputChange(source);
2805
+ }
2806
+ if (!this.allowNoValidation && this.validatedByBackend) {
2807
+ this.setConnectionErrorMessage();
2716
2808
  }
2717
- this.setConnectionErrorMessage();
2718
2809
  }
2719
2810
  setConnectionErrorMessage() {
2720
2811
  this.errorCode = 'service-unavailable';
@@ -2969,19 +3060,65 @@ class StreetNumberComponent {
2969
3060
  this.sequenceNumber += 1;
2970
3061
  this.consumedNumber = this.sequenceNumber;
2971
3062
  this.clearSuggestions();
3063
+ if (this.suggestionLevel === SuggestionLevelType.None) {
3064
+ console.log('(A) do not use suggestions for street number');
3065
+ this.streetNumberChanged.emit(this.searchText);
3066
+ if (source === SourceType.SOURCE_PREFILLED)
3067
+ this.prefillAnalyzeData();
3068
+ }
2972
3069
  }
2973
3070
  else {
2974
- if (!this.validatedByBackend) {
2975
- let suggestion = {
2976
- 'string': this.searchText.toUpperCase(),
2977
- 'municipalityName': this.locality,
2978
- 'localityName': this.locality,
2979
- 'postalCode': this.postalCode,
2980
- 'searchBarString': this.searchText.toUpperCase(),
2981
- 'houseNumber': this.searchText.toUpperCase(),
2982
- 'streetName': this.streetName
2983
- };
2984
- this.setSelectedAddress(suggestion);
3071
+ if (this.suggestionLevel === SuggestionLevelType.None) {
3072
+ console.log('(B) do not use suggestions for street number');
3073
+ this.streetNumberChanged.emit(this.searchText);
3074
+ if (source === SourceType.SOURCE_PREFILLED) {
3075
+ this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3076
+ let suggestion = {
3077
+ 'address': {
3078
+ 'string': this.searchText.toUpperCase(),
3079
+ 'municipalityName': this.locality,
3080
+ 'localityName': this.locality,
3081
+ 'postalCode': this.postalCode,
3082
+ 'searchBarString': this.searchText.toUpperCase(),
3083
+ 'houseNumber': this.searchText.toUpperCase(),
3084
+ 'streetName': this.streetName
3085
+ }
3086
+ };
3087
+ this.prefillData.prefillStreetNumberPerfectMatchSuggestion = suggestion;
3088
+ this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
3089
+ this.prefillAnalyzeData();
3090
+ }
3091
+ }
3092
+ else if (!this.validatedByBackend) {
3093
+ if (source === SourceType.SOURCE_PREFILLED) {
3094
+ this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3095
+ let suggestion = {
3096
+ 'address': {
3097
+ 'string': this.searchText.toUpperCase(),
3098
+ 'municipalityName': this.locality,
3099
+ 'localityName': this.locality,
3100
+ 'postalCode': this.postalCode,
3101
+ 'searchBarString': this.searchText.toUpperCase(),
3102
+ 'houseNumber': this.searchText.toUpperCase(),
3103
+ 'streetName': this.streetName
3104
+ }
3105
+ };
3106
+ this.prefillData.prefillStreetNumberPerfectMatchSuggestion = suggestion;
3107
+ this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
3108
+ this.prefillAnalyzeData();
3109
+ }
3110
+ else {
3111
+ let suggestion = {
3112
+ 'string': this.searchText.toUpperCase(),
3113
+ 'municipalityName': this.locality,
3114
+ 'localityName': this.locality,
3115
+ 'postalCode': this.postalCode,
3116
+ 'searchBarString': this.searchText.toUpperCase(),
3117
+ 'houseNumber': this.searchText.toUpperCase(),
3118
+ 'streetName': this.streetName
3119
+ };
3120
+ this.setSelectedAddress(suggestion);
3121
+ }
2985
3122
  }
2986
3123
  else {
2987
3124
  this.getTopSuggestions(source);
@@ -3582,7 +3719,7 @@ class BoxNumberComponent {
3582
3719
  else {
3583
3720
  this.isPrefillWithNoMatch = false;
3584
3721
  }
3585
- }, () => this.handleGetBoxError());
3722
+ }, () => this.handleGetBoxError(source));
3586
3723
  }
3587
3724
  }
3588
3725
  getTextColor() {
@@ -3665,12 +3802,24 @@ class BoxNumberComponent {
3665
3802
  this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
3666
3803
  ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
3667
3804
  }
3668
- handleGetBoxError() {
3805
+ handleGetBoxError(source) {
3669
3806
  if (this.allowNoValidation && this.validatedByBackend) {
3670
3807
  this.numberOfExceptions += 1;
3671
3808
  this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
3809
+ this.setConnectionErrorMessage();
3810
+ }
3811
+ if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
3812
+ this.numberOfExceptions += 1;
3813
+ this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
3814
+ this.setConnectionErrorMessage();
3815
+ this.onInputChange(source);
3816
+ }
3817
+ if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
3818
+ this.onInputChange(source);
3819
+ }
3820
+ if (!this.allowNoValidation && this.validatedByBackend) {
3821
+ this.setConnectionErrorMessage();
3672
3822
  }
3673
- this.setConnectionErrorMessage();
3674
3823
  }
3675
3824
  setConnectionErrorMessage() {
3676
3825
  this.errorCode = 'service-unavailable';
@@ -3899,20 +4048,48 @@ class BoxNumberComponent {
3899
4048
  this.sequenceNumber += 1;
3900
4049
  this.consumedNumber = this.sequenceNumber;
3901
4050
  this.clearSuggestions();
4051
+ if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
4052
+ console.log('do not use suggestions for box number');
4053
+ this.boxNumberChanged.emit(this.searchText);
4054
+ }
3902
4055
  }
3903
4056
  else {
3904
- if (!this.validatedByBackend) {
3905
- let suggestion = {
3906
- 'string': this.searchText.toUpperCase(),
3907
- 'municipalityName': this.locality,
3908
- 'localityName': this.locality,
3909
- 'postalCode': this.postalCode,
3910
- 'searchBarString': this.searchText.toUpperCase(),
3911
- 'streetName': this.streetName,
3912
- 'houseNumber': this.streetNumber,
3913
- 'boxNumber': this.searchText.toUpperCase()
3914
- };
3915
- this.setSelectedAddress(suggestion);
4057
+ if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
4058
+ console.log('do not use suggestions for box number');
4059
+ this.boxNumberChanged.emit(this.searchText);
4060
+ }
4061
+ else if (!this.validatedByBackend) {
4062
+ if (source === SourceType.SOURCE_PREFILLED) {
4063
+ this.prefillData.prefillBoxNumberPerfectMatchFound = true;
4064
+ let suggestion = {
4065
+ 'address': {
4066
+ 'string': this.searchText.toUpperCase(),
4067
+ 'municipalityName': this.locality,
4068
+ 'localityName': this.locality,
4069
+ 'postalCode': this.postalCode,
4070
+ 'searchBarString': this.searchText.toUpperCase(),
4071
+ 'streetName': this.streetName,
4072
+ 'houseNumber': this.streetNumber,
4073
+ 'boxNumber': this.searchText.toUpperCase()
4074
+ }
4075
+ };
4076
+ this.prefillData.prefillBoxNumberPerfectMatchSuggestion = suggestion;
4077
+ this.isPrefillWithNoMatch = this.prefillData.prefillBoxNumberPerfectMatchFound === true ? false : true;
4078
+ this.prefillAnalyzeData();
4079
+ }
4080
+ else {
4081
+ let suggestion = {
4082
+ 'string': this.searchText.toUpperCase(),
4083
+ 'municipalityName': this.locality,
4084
+ 'localityName': this.locality,
4085
+ 'postalCode': this.postalCode,
4086
+ 'searchBarString': this.searchText.toUpperCase(),
4087
+ 'streetName': this.streetName,
4088
+ 'houseNumber': this.streetNumber,
4089
+ 'boxNumber': this.searchText.toUpperCase()
4090
+ };
4091
+ this.setSelectedAddress(suggestion);
4092
+ }
3916
4093
  }
3917
4094
  else {
3918
4095
  this.getTopSuggestions(source);
@@ -4976,7 +5153,11 @@ class LibAddressAutocompleteByComponentComponent {
4976
5153
  this.boxNumber = '';
4977
5154
  this.quitPrefillMode();
4978
5155
  this.autocompleteBoxNb.addressIsComplete = false;
5156
+ // this.autocompleteBoxNb.boxNumber = ''
4979
5157
  this.setAddress(null, 1);
5158
+ if (!event) {
5159
+ this.clearInputEventEmitter.emit('CLEAR_BOX_NUMBER');
5160
+ }
4980
5161
  // this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
4981
5162
  // $$ 7 this.setAddress(null, 1); // $$ ?????
4982
5163
  /*
@@ -5604,7 +5785,7 @@ class LibAddressAutocompleteByComponentComponent {
5604
5785
  }
5605
5786
  }
5606
5787
  LibAddressAutocompleteByComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, deps: [{ token: Nis9Service }, { token: HttpService }], target: i0.ɵɵFactoryTarget.Component });
5607
- LibAddressAutocompleteByComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: LibAddressAutocompleteByComponentComponent, selector: "bp-lib-address-autocomplete-by-component", inputs: { inputLang: "inputLang", clearInput: "clearInput", validationMessageOption: "validationMessageOption", defaultLang: "defaultLang", showDebugMessageToConsole: "showDebugMessageToConsole", minLevel: "minLevel", notInListAllowed: "notInListAllowed", addressParams: "addressParams", messageOption: "messageOption", localityUrl: "localityUrl", maxSuggestionLocality: "maxSuggestionLocality", visibleSuggestionLocalityCount: "visibleSuggestionLocalityCount", sortCriteriaLocality: "sortCriteriaLocality", streetUrl: "streetUrl", maxSuggestionStreet: "maxSuggestionStreet", visibleSuggestionStreetCount: "visibleSuggestionStreetCount", sortCriteriaStreet: "sortCriteriaStreet", streetNumberUrl: "streetNumberUrl", maxSuggestionStreetNb: "maxSuggestionStreetNb", visibleSuggestionStreetNbCount: "visibleSuggestionStreetNbCount", sortCriteriaStreetNb: "sortCriteriaStreetNb", boxNumberUrl: "boxNumberUrl", maxSuggestionBoxNb: "maxSuggestionBoxNb", visibleSuggestionBoxNbCount: "visibleSuggestionBoxNbCount", sortCriteriaBoxNb: "sortCriteriaBoxNb", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", suggestionLevel: "suggestionLevel", apiKey: "apiKey", isReadonly: "isReadonly", nis9InResponse: "nis9InResponse", nis9ServiceURL: "nis9ServiceURL" }, outputs: { addressCompleteEventEmitter: "addressCompleteEventEmitter", validationMessageEventEmitter: "validationMessageEventEmitter", clearInputEventEmitter: "clearInputEventEmitter", validatedByBackendEventEmitter: "validatedByBackendEventEmitter", numberOfExceptionsEventEmitter: "numberOfExceptionsEventEmitter" }, viewQueries: [{ propertyName: "autocompleteLocality", first: true, predicate: LocalityComponent, descendants: true }, { propertyName: "autocompleteStreet", first: true, predicate: StreetComponent, descendants: true }, { propertyName: "autocompleteStreetNb", first: true, predicate: StreetNumberComponent, descendants: true }, { propertyName: "autocompleteBoxNb", first: true, predicate: BoxNumberComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\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 [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\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 [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [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 [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""], components: [{ type: LocalityComponent, selector: "bp-locality", inputs: ["labelResourceKey", "messageOption", "maxSuggesionCount", "visibleSuggestionCount", "sortCriteria", "baseUrl", "inputText", "prefillData", "showDebugMessageToConsole", "inputLang", "isReadonly", "allowNoValidation", "validatedByBackend", "numberOfExceptions"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetComponent, selector: "bp-street", inputs: ["labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "prefillData", "showDebugMessageToConsole", "postalCode", "locality", "inputText", "messageOption", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "isReadonly"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetNumberComponent, selector: "bp-street-number", inputs: ["prefillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "notInListAllowed", "selectedAddress", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "inputText", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "streetNumberChanged", "numberOfExceptionsEmitter"] }, { type: BoxNumberComponent, selector: "bp-box-number", inputs: ["prefillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "streetNumber", "selectedAddress", "notInListAllowed", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "boxNumberChanged", "numberOfExceptionsEmitter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5788
+ LibAddressAutocompleteByComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: LibAddressAutocompleteByComponentComponent, selector: "bp-lib-address-autocomplete-by-component", inputs: { inputLang: "inputLang", clearInput: "clearInput", validationMessageOption: "validationMessageOption", defaultLang: "defaultLang", showDebugMessageToConsole: "showDebugMessageToConsole", minLevel: "minLevel", notInListAllowed: "notInListAllowed", addressParams: "addressParams", messageOption: "messageOption", localityUrl: "localityUrl", maxSuggestionLocality: "maxSuggestionLocality", visibleSuggestionLocalityCount: "visibleSuggestionLocalityCount", sortCriteriaLocality: "sortCriteriaLocality", streetUrl: "streetUrl", maxSuggestionStreet: "maxSuggestionStreet", visibleSuggestionStreetCount: "visibleSuggestionStreetCount", sortCriteriaStreet: "sortCriteriaStreet", streetNumberUrl: "streetNumberUrl", maxSuggestionStreetNb: "maxSuggestionStreetNb", visibleSuggestionStreetNbCount: "visibleSuggestionStreetNbCount", sortCriteriaStreetNb: "sortCriteriaStreetNb", boxNumberUrl: "boxNumberUrl", maxSuggestionBoxNb: "maxSuggestionBoxNb", visibleSuggestionBoxNbCount: "visibleSuggestionBoxNbCount", sortCriteriaBoxNb: "sortCriteriaBoxNb", allowNoValidation: "allowNoValidation", validatedByBackend: "validatedByBackend", numberOfExceptions: "numberOfExceptions", suggestionLevel: "suggestionLevel", apiKey: "apiKey", isReadonly: "isReadonly", nis9InResponse: "nis9InResponse", nis9ServiceURL: "nis9ServiceURL" }, outputs: { addressCompleteEventEmitter: "addressCompleteEventEmitter", validationMessageEventEmitter: "validationMessageEventEmitter", clearInputEventEmitter: "clearInputEventEmitter", validatedByBackendEventEmitter: "validatedByBackendEventEmitter", numberOfExceptionsEventEmitter: "numberOfExceptionsEventEmitter" }, viewQueries: [{ propertyName: "autocompleteLocality", first: true, predicate: LocalityComponent, descendants: true }, { propertyName: "autocompleteStreet", first: true, predicate: StreetComponent, descendants: true }, { propertyName: "autocompleteStreetNb", first: true, predicate: StreetNumberComponent, descendants: true }, { propertyName: "autocompleteBoxNb", first: true, predicate: BoxNumberComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\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 [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\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 [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [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 [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""], components: [{ type: LocalityComponent, selector: "bp-locality", inputs: ["labelResourceKey", "messageOption", "maxSuggesionCount", "visibleSuggestionCount", "sortCriteria", "baseUrl", "inputText", "prefillData", "showDebugMessageToConsole", "inputLang", "isReadonly", "allowNoValidation", "validatedByBackend", "numberOfExceptions"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetComponent, selector: "bp-street", inputs: ["labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "prefillData", "showDebugMessageToConsole", "postalCode", "locality", "inputText", "messageOption", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "isReadonly"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter", "numberOfExceptionsEmitter"] }, { type: StreetNumberComponent, selector: "bp-street-number", inputs: ["prefillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "notInListAllowed", "selectedAddress", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "inputText", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "streetNumberChanged", "numberOfExceptionsEmitter"] }, { type: BoxNumberComponent, selector: "bp-box-number", inputs: ["prefillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "streetNumber", "selectedAddress", "notInListAllowed", "allowNoValidation", "validatedByBackend", "numberOfExceptions", "inputLang", "messageOption", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "boxNumberChanged", "numberOfExceptionsEmitter"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5608
5789
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
5609
5790
  type: Component,
5610
5791
  args: [{ selector: 'bp-lib-address-autocomplete-by-component', template: "\r\n<div class=\"aacwidget-address-container\">\r\n\r\n <div class=\"bpaac-dropdown-validation\" *ngIf=\"validationMessageOptionType === 'SHOW' \">\r\n <div class=\"bpaac-validated-icon\" *ngIf=\"selectedAddress && validationMessage!==null && validationMessage.messageType!==null\"></div>\r\n <!-- {{ validationMessage | translate }} -->\r\n {{ validationMessage.translatedMessage }}\r\n </div>\r\n\r\n <!-- bp-aacwidget-autocomplete-locality -->\r\n <bp-locality class=\"aacwidget-address-locality\" *ngIf=\"isComponentReady\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedLocalityUrl\"\r\n [prefillData]=\"localityPrefillData\"\r\n [labelResourceKey]=\"'common.label.postalCode'\"\r\n [inputText]=\"postalCodeLocality\"\r\n [inputLang]=\"selectedLanguage\"\r\n [messageOption]=\"messageOption\"\r\n [sortCriteria]=\"sortCriteriaLocality\"\r\n [maxSuggesionCount]=\"maxSuggestionLocality\" \r\n [visibleSuggestionCount]=\"visibleSuggestionLocalityCount\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetUrl\"\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 [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedStreetNumberUrl\"\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 [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (addressChanged)=\"setAddress($event, 2)\"\r\n (streetNumberChanged)=\"setAddressStreetNumber($event)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"usedBoxNumberUrl\"\r\n [selectedAddress]=\"streetNumberAddress\"\r\n [prefillData]=\"boxNumberPrefillData\"\r\n [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 [suggestionLevel]=\"suggestionLevel\"\r\n [allowNoValidation]=\"allowNoValidation\"\r\n [validatedByBackend]=\"validatedByBackend\"\r\n [numberOfExceptions]=\"numberOfExceptions\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (boxNumberChanged)=\"setAddressBoxNumber($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"\r\n (numberOfExceptionsEmitter)=\"setNumberOfExceptions($event)\"></bp-box-number>\r\n</div>", styles: [""] }]