@bpost/bp-address-auto-complete-by-component 1.1.12 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION.md +3 -0
- package/esm2020/lib/box-number/box-number.component.mjs +47 -15
- package/esm2020/lib/lib-address-autocomplete-by-component.component.mjs +6 -2
- package/esm2020/lib/locality/locality.component.mjs +54 -17
- package/esm2020/lib/street/street.component.mjs +56 -14
- package/esm2020/lib/street-number/street-number.component.mjs +45 -14
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs +204 -58
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs +203 -57
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
- package/lib/box-number/box-number.component.d.ts +1 -1
- package/lib/locality/locality.component.d.ts +2 -1
- package/lib/street/street.component.d.ts +4 -2
- package/lib/street-number/street-number.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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);
|
|
1134
|
+
}
|
|
1135
|
+
if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
|
|
1136
|
+
this.onInputChange(source);
|
|
1137
|
+
}
|
|
1138
|
+
if (!this.allowNoValidation && this.validatedByBackend) {
|
|
1139
|
+
this.setConnectionErrorMessage();
|
|
1124
1140
|
}
|
|
1125
|
-
this.setConnectionErrorMessage();
|
|
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
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
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
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
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';
|
|
@@ -2972,16 +3063,35 @@ class StreetNumberComponent {
|
|
|
2972
3063
|
}
|
|
2973
3064
|
else {
|
|
2974
3065
|
if (!this.validatedByBackend) {
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
3066
|
+
if (source === SourceType.SOURCE_PREFILLED) {
|
|
3067
|
+
this.prefillData.prefillStreetNumberPerfectMatchFound = true;
|
|
3068
|
+
let suggestion = {
|
|
3069
|
+
'address': {
|
|
3070
|
+
'string': this.searchText.toUpperCase(),
|
|
3071
|
+
'municipalityName': this.locality,
|
|
3072
|
+
'localityName': this.locality,
|
|
3073
|
+
'postalCode': this.postalCode,
|
|
3074
|
+
'searchBarString': this.searchText.toUpperCase(),
|
|
3075
|
+
'houseNumber': this.searchText.toUpperCase(),
|
|
3076
|
+
'streetName': this.streetName
|
|
3077
|
+
}
|
|
3078
|
+
};
|
|
3079
|
+
this.prefillData.prefillStreetNumberPerfectMatchSuggestion = suggestion;
|
|
3080
|
+
this.isPrefillWithNoMatch = this.prefillData.prefillStreetNumberPerfectMatchFound === true ? false : true;
|
|
3081
|
+
this.prefillAnalyzeData();
|
|
3082
|
+
}
|
|
3083
|
+
else {
|
|
3084
|
+
let suggestion = {
|
|
3085
|
+
'string': this.searchText.toUpperCase(),
|
|
3086
|
+
'municipalityName': this.locality,
|
|
3087
|
+
'localityName': this.locality,
|
|
3088
|
+
'postalCode': this.postalCode,
|
|
3089
|
+
'searchBarString': this.searchText.toUpperCase(),
|
|
3090
|
+
'houseNumber': this.searchText.toUpperCase(),
|
|
3091
|
+
'streetName': this.streetName
|
|
3092
|
+
};
|
|
3093
|
+
this.setSelectedAddress(suggestion);
|
|
3094
|
+
}
|
|
2985
3095
|
}
|
|
2986
3096
|
else {
|
|
2987
3097
|
this.getTopSuggestions(source);
|
|
@@ -3582,7 +3692,7 @@ class BoxNumberComponent {
|
|
|
3582
3692
|
else {
|
|
3583
3693
|
this.isPrefillWithNoMatch = false;
|
|
3584
3694
|
}
|
|
3585
|
-
}, () => this.handleGetBoxError());
|
|
3695
|
+
}, () => this.handleGetBoxError(source));
|
|
3586
3696
|
}
|
|
3587
3697
|
}
|
|
3588
3698
|
getTextColor() {
|
|
@@ -3665,12 +3775,24 @@ class BoxNumberComponent {
|
|
|
3665
3775
|
this.collapseDropdown = (this.prefilling === true && this.prefillData !== null)
|
|
3666
3776
|
? !this.prefillData.parameters.onFocusShowSuggestionsAfterPrefill : false;
|
|
3667
3777
|
}
|
|
3668
|
-
handleGetBoxError() {
|
|
3778
|
+
handleGetBoxError(source) {
|
|
3669
3779
|
if (this.allowNoValidation && this.validatedByBackend) {
|
|
3670
3780
|
this.numberOfExceptions += 1;
|
|
3671
3781
|
this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
|
|
3782
|
+
this.setConnectionErrorMessage();
|
|
3783
|
+
}
|
|
3784
|
+
if (this.allowNoValidation && this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
|
|
3785
|
+
this.numberOfExceptions += 1;
|
|
3786
|
+
this.numberOfExceptionsEmitter.emit(this.numberOfExceptions);
|
|
3787
|
+
this.setConnectionErrorMessage();
|
|
3788
|
+
this.onInputChange(source);
|
|
3789
|
+
}
|
|
3790
|
+
if (this.allowNoValidation && !this.validatedByBackend && source === SourceType.SOURCE_PREFILLED) {
|
|
3791
|
+
this.onInputChange(source);
|
|
3792
|
+
}
|
|
3793
|
+
if (!this.allowNoValidation && this.validatedByBackend) {
|
|
3794
|
+
this.setConnectionErrorMessage();
|
|
3672
3795
|
}
|
|
3673
|
-
this.setConnectionErrorMessage();
|
|
3674
3796
|
}
|
|
3675
3797
|
setConnectionErrorMessage() {
|
|
3676
3798
|
this.errorCode = 'service-unavailable';
|
|
@@ -3902,17 +4024,37 @@ class BoxNumberComponent {
|
|
|
3902
4024
|
}
|
|
3903
4025
|
else {
|
|
3904
4026
|
if (!this.validatedByBackend) {
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
4027
|
+
if (source === SourceType.SOURCE_PREFILLED) {
|
|
4028
|
+
this.prefillData.prefillBoxNumberPerfectMatchFound = true;
|
|
4029
|
+
let suggestion = {
|
|
4030
|
+
'address': {
|
|
4031
|
+
'string': this.searchText.toUpperCase(),
|
|
4032
|
+
'municipalityName': this.locality,
|
|
4033
|
+
'localityName': this.locality,
|
|
4034
|
+
'postalCode': this.postalCode,
|
|
4035
|
+
'searchBarString': this.searchText.toUpperCase(),
|
|
4036
|
+
'streetName': this.streetName,
|
|
4037
|
+
'houseNumber': this.streetNumber,
|
|
4038
|
+
'boxNumber': this.searchText.toUpperCase()
|
|
4039
|
+
}
|
|
4040
|
+
};
|
|
4041
|
+
this.prefillData.prefillBoxNumberPerfectMatchSuggestion = suggestion;
|
|
4042
|
+
this.isPrefillWithNoMatch = this.prefillData.prefillBoxNumberPerfectMatchFound === true ? false : true;
|
|
4043
|
+
this.prefillAnalyzeData();
|
|
4044
|
+
}
|
|
4045
|
+
else {
|
|
4046
|
+
let suggestion = {
|
|
4047
|
+
'string': this.searchText.toUpperCase(),
|
|
4048
|
+
'municipalityName': this.locality,
|
|
4049
|
+
'localityName': this.locality,
|
|
4050
|
+
'postalCode': this.postalCode,
|
|
4051
|
+
'searchBarString': this.searchText.toUpperCase(),
|
|
4052
|
+
'streetName': this.streetName,
|
|
4053
|
+
'houseNumber': this.streetNumber,
|
|
4054
|
+
'boxNumber': this.searchText.toUpperCase()
|
|
4055
|
+
};
|
|
4056
|
+
this.setSelectedAddress(suggestion);
|
|
4057
|
+
}
|
|
3916
4058
|
}
|
|
3917
4059
|
else {
|
|
3918
4060
|
this.getTopSuggestions(source);
|
|
@@ -4976,7 +5118,11 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
4976
5118
|
this.boxNumber = '';
|
|
4977
5119
|
this.quitPrefillMode();
|
|
4978
5120
|
this.autocompleteBoxNb.addressIsComplete = false;
|
|
5121
|
+
// this.autocompleteBoxNb.boxNumber = ''
|
|
4979
5122
|
this.setAddress(null, 1);
|
|
5123
|
+
if (!event) {
|
|
5124
|
+
this.clearInputEventEmitter.emit('CLEAR_BOX_NUMBER');
|
|
5125
|
+
}
|
|
4980
5126
|
// this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
|
|
4981
5127
|
// $$ 7 this.setAddress(null, 1); // $$ ?????
|
|
4982
5128
|
/*
|
|
@@ -5604,7 +5750,7 @@ class LibAddressAutocompleteByComponentComponent {
|
|
|
5604
5750
|
}
|
|
5605
5751
|
}
|
|
5606
5752
|
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"] }] });
|
|
5753
|
+
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
5754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
|
|
5609
5755
|
type: Component,
|
|
5610
5756
|
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: [""] }]
|