@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);
@@ -1201,7 +1217,7 @@ class LocalityComponent {
1201
1217
  }
1202
1218
  }
1203
1219
  onInputChange(source) {
1204
- var _a;
1220
+ var _a, _b;
1205
1221
  this.collapseDropdown = false;
1206
1222
  this.resetArrowSelectedIndex();
1207
1223
  if (!source) {
@@ -1216,19 +1232,40 @@ class LocalityComponent {
1216
1232
  }
1217
1233
  else {
1218
1234
  if (!this.validatedByBackend) {
1219
- this.isPrefillWithNoMatch = false;
1220
- this.clearTypeAhead();
1221
- this.resetArrowSelectedIndex();
1222
- const municipalityName = this.searchText.replace(/\d+/g, '').trim();
1223
- const postalCode = (_a = this.searchText.match(/\d+/g)) === null || _a === void 0 ? void 0 : _a.join("");
1224
- let suggestion = {
1225
- 'string': this.searchText,
1226
- 'municipalityName': municipalityName ? municipalityName.toUpperCase() : '',
1227
- 'localityName': municipalityName,
1228
- 'postalCode': postalCode,
1229
- 'searchBarString': this.searchText
1230
- };
1231
- this.setSelectedAddress(suggestion);
1235
+ if (source === SourceType.SOURCE_PREFILLED) {
1236
+ this.clearTypeAhead();
1237
+ this.prefillData.prefillMunicipalityPerfectMatchFound = true;
1238
+ this.prefillData.prefillMunicipalityAndLocalityPerfectMatchFound = true;
1239
+ const municipalityName = this.searchText.replace(/\d+/g, '').trim();
1240
+ const postalCode = (_a = this.searchText.match(/\d+/g)) === null || _a === void 0 ? void 0 : _a.join("");
1241
+ let suggestion = {
1242
+ 'address': {
1243
+ 'string': this.searchText,
1244
+ 'municipalityName': municipalityName ? municipalityName.toUpperCase() : '',
1245
+ 'localityName': municipalityName,
1246
+ 'postalCode': postalCode,
1247
+ 'searchBarString': this.searchText
1248
+ }
1249
+ };
1250
+ this.prefillData.prefillMunicipalityPerfectMatchSuggestion = suggestion;
1251
+ this.isPrefillWithNoMatch = this.prefillData.prefillMunicipalityPerfectMatchFound === true ? false : true;
1252
+ this.prefillAnalyzeData();
1253
+ }
1254
+ else {
1255
+ this.isPrefillWithNoMatch = false;
1256
+ this.clearTypeAhead();
1257
+ this.resetArrowSelectedIndex();
1258
+ const municipalityName = this.searchText.replace(/\d+/g, '').trim();
1259
+ const postalCode = (_b = this.searchText.match(/\d+/g)) === null || _b === void 0 ? void 0 : _b.join("");
1260
+ let suggestion = {
1261
+ 'string': this.searchText,
1262
+ 'municipalityName': municipalityName ? municipalityName.toUpperCase() : '',
1263
+ 'localityName': municipalityName,
1264
+ 'postalCode': postalCode,
1265
+ 'searchBarString': this.searchText
1266
+ };
1267
+ this.setSelectedAddress(suggestion);
1268
+ }
1232
1269
  }
1233
1270
  else {
1234
1271
  this.getTopSuggestions(source);
@@ -1688,12 +1725,20 @@ class StreetComponent {
1688
1725
  if (changes.hasOwnProperty('prefillData') && !changes.prefillData.firstChange) {
1689
1726
  this.prefilling = true;
1690
1727
  this.searchText = this.loadParams(changes.prefillData.currentValue);
1728
+ // if(this.searchText === '')
1729
+ // {
1730
+ setTimeout(() => {
1731
+ this.searchText = this.loadParams(changes.prefillData.currentValue);
1732
+ // console.log("setrtt time");
1733
+ }, 200);
1734
+ // }
1691
1735
  if (this.searchText !== '' && this.minLevel === ADDRESSLEVEL.STREET) {
1692
1736
  /*
1693
1737
  this.onInputChange('prefilled');
1694
1738
  this.streetSearchInput.nativeElement.focus();
1695
1739
  */
1696
1740
  /*
1741
+
1697
1742
  this.prefilling = true;
1698
1743
  this.collapseDropdown = true;
1699
1744
  this.prefillMunicipalityName = this.transformMunicipalityInLowercaseAndWithoutDiacritics(this.addressParams.municipalityName);
@@ -1860,7 +1905,7 @@ class StreetComponent {
1860
1905
  else {
1861
1906
  this.isPrefillWithNoMatch = false;
1862
1907
  }
1863
- }, () => this.handleGetStreetError());
1908
+ }, () => this.handleGetStreetError(source));
1864
1909
  }
1865
1910
  }
1866
1911
  getTextColor() {
@@ -1933,12 +1978,24 @@ class StreetComponent {
1933
1978
  this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
1934
1979
  ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
1935
1980
  }
1936
- handleGetStreetError() {
1981
+ handleGetStreetError(source) {
1937
1982
  if (this.allowNoValidation && this.validatedByBackend) {
1938
1983
  this.numberOfExceptions += 1;
1939
1984
  this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
1985
+ this.setConnectionErrorMessage();
1986
+ }
1987
+ if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
1988
+ this.numberOfExceptions += 1;
1989
+ this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
1990
+ this.setConnectionErrorMessage();
1991
+ this.onInputChange(source);
1992
+ }
1993
+ if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
1994
+ this.onInputChange(source);
1995
+ }
1996
+ if (!this.allowNoValidation && this.validatedByBackend) {
1997
+ this.setConnectionErrorMessage();
1940
1998
  }
1941
- this.setConnectionErrorMessage();
1942
1999
  }
1943
2000
  setConnectionErrorMessage() {
1944
2001
  this.errorCode = /*'service-unavailable'*/ ValidationMessageType.Service_Unavailable;
@@ -2035,15 +2092,35 @@ class StreetComponent {
2035
2092
  }
2036
2093
  else {
2037
2094
  if (!this.validatedByBackend) {
2038
- let suggestion = {
2039
- 'string': this.searchText.toUpperCase(),
2040
- 'municipalityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2041
- 'localityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2042
- 'postalCode': this.postalCode,
2043
- 'searchBarString': this.searchText.toUpperCase(),
2044
- 'streetName': this.searchText.toUpperCase()
2045
- };
2046
- this.setSelectedAddress(suggestion);
2095
+ if (source === SourceType.SOURCE_PREFILLED) {
2096
+ this.prefillData.prefillStreetPerfectMatchFound = true;
2097
+ // this.clearTypeAhead();
2098
+ // this.resetArrowSelectedIndex();
2099
+ let suggestion = {
2100
+ 'address': {
2101
+ 'string': this.searchText.toUpperCase(),
2102
+ 'municipalityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2103
+ 'localityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2104
+ 'postalCode': this.postalCode,
2105
+ 'searchBarString': this.searchText.toUpperCase(),
2106
+ 'streetName': this.searchText.toUpperCase()
2107
+ }
2108
+ };
2109
+ this.prefillData.prefillStreetPerfectMatchSuggestion = suggestion;
2110
+ this.isPrefillWithNoMatch = this.prefillData.prefillStreetPerfectMatchFound === true ? false : true;
2111
+ this.prefillAnalyzeData();
2112
+ }
2113
+ else {
2114
+ let suggestion = {
2115
+ 'string': this.searchText.toUpperCase(),
2116
+ 'municipalityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2117
+ 'localityName': this.locality ? this.locality.toLocaleUpperCase() : '',
2118
+ 'postalCode': this.postalCode,
2119
+ 'searchBarString': this.searchText.toUpperCase(),
2120
+ 'streetName': this.searchText.toUpperCase()
2121
+ };
2122
+ this.setSelectedAddress(suggestion);
2123
+ }
2047
2124
  }
2048
2125
  else {
2049
2126
  this.getTopSuggestions(source);
@@ -2283,7 +2360,7 @@ class StreetComponent {
2283
2360
  }
2284
2361
  }
2285
2362
  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 });
2286
- 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 } });
2363
+ 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 } });
2287
2364
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: StreetComponent, decorators: [{
2288
2365
  type: Component,
2289
2366
  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: [""] }]
@@ -2303,6 +2380,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
2303
2380
  type: Input
2304
2381
  }], baseUrl: [{
2305
2382
  type: Input
2383
+ }], addressParams: [{
2384
+ type: Input
2306
2385
  }], prefillData: [{
2307
2386
  type: Input
2308
2387
  }], showDebugMessageToConsole: [{
@@ -2629,7 +2708,7 @@ class StreetNumberComponent {
2629
2708
  else {
2630
2709
  this.isPrefillWithNoMatch = false;
2631
2710
  }
2632
- }, () => this.handleGetStreetError());
2711
+ }, () => this.handleGetStreetError(source));
2633
2712
  }
2634
2713
  }
2635
2714
  getTextColor() {
@@ -2710,12 +2789,24 @@ class StreetNumberComponent {
2710
2789
  this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
2711
2790
  ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
2712
2791
  }
2713
- handleGetStreetError() {
2792
+ handleGetStreetError(source) {
2714
2793
  if (this.allowNoValidation && this.validatedByBackend) {
2715
2794
  this.numberOfExceptions += 1;
2716
2795
  this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
2796
+ this.setConnectionErrorMessage();
2797
+ }
2798
+ if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
2799
+ this.numberOfExceptions += 1;
2800
+ this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
2801
+ this.setConnectionErrorMessage();
2802
+ this.onInputChange(source);
2803
+ }
2804
+ if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
2805
+ this.onInputChange(source);
2806
+ }
2807
+ if (!this.allowNoValidation && this.validatedByBackend) {
2808
+ this.setConnectionErrorMessage();
2717
2809
  }
2718
- this.setConnectionErrorMessage();
2719
2810
  }
2720
2811
  setConnectionErrorMessage() {
2721
2812
  this.errorCode = 'service-unavailable';
@@ -2970,19 +3061,65 @@ class StreetNumberComponent {
2970
3061
  this.sequenceNumber += 1;
2971
3062
  this.consumedNumber = this.sequenceNumber;
2972
3063
  this.clearSuggestions();
3064
+ if (this.suggestionLevel === SuggestionLevelType.None) {
3065
+ console.log('(A) do not use suggestions for street number');
3066
+ this.streetNumberChanged.emit(this.searchText);
3067
+ if (source === SourceType.SOURCE_PREFILLED)
3068
+ this.prefillAnalyzeData();
3069
+ }
2973
3070
  }
2974
3071
  else {
2975
- if (!this.validatedByBackend) {
2976
- let suggestion = {
2977
- 'string': this.searchText.toUpperCase(),
2978
- 'municipalityName': this.locality,
2979
- 'localityName': this.locality,
2980
- 'postalCode': this.postalCode,
2981
- 'searchBarString': this.searchText.toUpperCase(),
2982
- 'houseNumber': this.searchText.toUpperCase(),
2983
- 'streetName': this.streetName
2984
- };
2985
- this.setSelectedAddress(suggestion);
3072
+ if (this.suggestionLevel === SuggestionLevelType.None) {
3073
+ console.log('(B) do not use suggestions for street number');
3074
+ this.streetNumberChanged.emit(this.searchText);
3075
+ if (source === SourceType.SOURCE_PREFILLED) {
3076
+ this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3077
+ let suggestion = {
3078
+ 'address': {
3079
+ 'string': this.searchText.toUpperCase(),
3080
+ 'municipalityName': this.locality,
3081
+ 'localityName': this.locality,
3082
+ 'postalCode': this.postalCode,
3083
+ 'searchBarString': this.searchText.toUpperCase(),
3084
+ 'houseNumber': this.searchText.toUpperCase(),
3085
+ 'streetName': this.streetName
3086
+ }
3087
+ };
3088
+ this.prefillData.prefillStreetNumberPerfectMatchSuggestion = suggestion;
3089
+ this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
3090
+ this.prefillAnalyzeData();
3091
+ }
3092
+ }
3093
+ else if (!this.validatedByBackend) {
3094
+ if (source === SourceType.SOURCE_PREFILLED) {
3095
+ this.prefillData.prefillStreetNumberPerfectMatchFound = true;
3096
+ let suggestion = {
3097
+ 'address': {
3098
+ 'string': this.searchText.toUpperCase(),
3099
+ 'municipalityName': this.locality,
3100
+ 'localityName': this.locality,
3101
+ 'postalCode': this.postalCode,
3102
+ 'searchBarString': this.searchText.toUpperCase(),
3103
+ 'houseNumber': this.searchText.toUpperCase(),
3104
+ 'streetName': this.streetName
3105
+ }
3106
+ };
3107
+ this.prefillData.prefillStreetNumberPerfectMatchSuggestion = suggestion;
3108
+ this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
3109
+ this.prefillAnalyzeData();
3110
+ }
3111
+ else {
3112
+ let suggestion = {
3113
+ 'string': this.searchText.toUpperCase(),
3114
+ 'municipalityName': this.locality,
3115
+ 'localityName': this.locality,
3116
+ 'postalCode': this.postalCode,
3117
+ 'searchBarString': this.searchText.toUpperCase(),
3118
+ 'houseNumber': this.searchText.toUpperCase(),
3119
+ 'streetName': this.streetName
3120
+ };
3121
+ this.setSelectedAddress(suggestion);
3122
+ }
2986
3123
  }
2987
3124
  else {
2988
3125
  this.getTopSuggestions(source);
@@ -3583,7 +3720,7 @@ class BoxNumberComponent {
3583
3720
  else {
3584
3721
  this.isPrefillWithNoMatch = false;
3585
3722
  }
3586
- }, () => this.handleGetBoxError());
3723
+ }, () => this.handleGetBoxError(source));
3587
3724
  }
3588
3725
  }
3589
3726
  getTextColor() {
@@ -3666,12 +3803,24 @@ class BoxNumberComponent {
3666
3803
  this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
3667
3804
  ? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
3668
3805
  }
3669
- handleGetBoxError() {
3806
+ handleGetBoxError(source) {
3670
3807
  if (this.allowNoValidation && this.validatedByBackend) {
3671
3808
  this.numberOfExceptions += 1;
3672
3809
  this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
3810
+ this.setConnectionErrorMessage();
3811
+ }
3812
+ if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
3813
+ this.numberOfExceptions += 1;
3814
+ this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
3815
+ this.setConnectionErrorMessage();
3816
+ this.onInputChange(source);
3817
+ }
3818
+ if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
3819
+ this.onInputChange(source);
3820
+ }
3821
+ if (!this.allowNoValidation && this.validatedByBackend) {
3822
+ this.setConnectionErrorMessage();
3673
3823
  }
3674
- this.setConnectionErrorMessage();
3675
3824
  }
3676
3825
  setConnectionErrorMessage() {
3677
3826
  this.errorCode = 'service-unavailable';
@@ -3900,20 +4049,48 @@ class BoxNumberComponent {
3900
4049
  this.sequenceNumber += 1;
3901
4050
  this.consumedNumber = this.sequenceNumber;
3902
4051
  this.clearSuggestions();
4052
+ if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
4053
+ console.log('do not use suggestions for box number');
4054
+ this.boxNumberChanged.emit(this.searchText);
4055
+ }
3903
4056
  }
3904
4057
  else {
3905
- if (!this.validatedByBackend) {
3906
- let suggestion = {
3907
- 'string': this.searchText.toUpperCase(),
3908
- 'municipalityName': this.locality,
3909
- 'localityName': this.locality,
3910
- 'postalCode': this.postalCode,
3911
- 'searchBarString': this.searchText.toUpperCase(),
3912
- 'streetName': this.streetName,
3913
- 'houseNumber': this.streetNumber,
3914
- 'boxNumber': this.searchText.toUpperCase()
3915
- };
3916
- this.setSelectedAddress(suggestion);
4058
+ if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
4059
+ console.log('do not use suggestions for box number');
4060
+ this.boxNumberChanged.emit(this.searchText);
4061
+ }
4062
+ else if (!this.validatedByBackend) {
4063
+ if (source === SourceType.SOURCE_PREFILLED) {
4064
+ this.prefillData.prefillBoxNumberPerfectMatchFound = true;
4065
+ let suggestion = {
4066
+ 'address': {
4067
+ 'string': this.searchText.toUpperCase(),
4068
+ 'municipalityName': this.locality,
4069
+ 'localityName': this.locality,
4070
+ 'postalCode': this.postalCode,
4071
+ 'searchBarString': this.searchText.toUpperCase(),
4072
+ 'streetName': this.streetName,
4073
+ 'houseNumber': this.streetNumber,
4074
+ 'boxNumber': this.searchText.toUpperCase()
4075
+ }
4076
+ };
4077
+ this.prefillData.prefillBoxNumberPerfectMatchSuggestion = suggestion;
4078
+ this.isPrefillWithNoMatch = this.prefillData.prefillBoxNumberPerfectMatchFound === true ? false : true;
4079
+ this.prefillAnalyzeData();
4080
+ }
4081
+ else {
4082
+ let suggestion = {
4083
+ 'string': this.searchText.toUpperCase(),
4084
+ 'municipalityName': this.locality,
4085
+ 'localityName': this.locality,
4086
+ 'postalCode': this.postalCode,
4087
+ 'searchBarString': this.searchText.toUpperCase(),
4088
+ 'streetName': this.streetName,
4089
+ 'houseNumber': this.streetNumber,
4090
+ 'boxNumber': this.searchText.toUpperCase()
4091
+ };
4092
+ this.setSelectedAddress(suggestion);
4093
+ }
3917
4094
  }
3918
4095
  else {
3919
4096
  this.getTopSuggestions(source);
@@ -4977,7 +5154,11 @@ class LibAddressAutocompleteByComponentComponent {
4977
5154
  this.boxNumber = '';
4978
5155
  this.quitPrefillMode();
4979
5156
  this.autocompleteBoxNb.addressIsComplete = false;
5157
+ // this.autocompleteBoxNb.boxNumber = ''
4980
5158
  this.setAddress(null, 1);
5159
+ if (!event) {
5160
+ this.clearInputEventEmitter.emit('CLEAR_BOX_NUMBER');
5161
+ }
4981
5162
  // this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
4982
5163
  // $$ 7 this.setAddress(null, 1); // $$ ?????
4983
5164
  /*
@@ -5605,7 +5786,7 @@ class LibAddressAutocompleteByComponentComponent {
5605
5786
  }
5606
5787
  }
5607
5788
  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 });
5608
- 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"] }] });
5789
+ 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"] }] });
5609
5790
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
5610
5791
  type: Component,
5611
5792
  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: [""] }]