@bpost/bp-address-auto-complete-by-component 1.1.2 → 1.1.3
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 +30 -0
- package/bpost-bp-address-auto-complete-by-component.d.ts +1 -11
- package/esm2020/bpost-bp-address-auto-complete-by-component.mjs +5 -0
- package/esm2020/lib/box-number/box-number.component.mjs +800 -0
- package/esm2020/lib/enum/address-level.enum.mjs +8 -0
- package/esm2020/lib/enum/index.mjs +7 -0
- package/esm2020/lib/enum/input-name.enum.mjs +8 -0
- package/esm2020/lib/enum/source-type.enum.mjs +5 -0
- package/esm2020/lib/enum/suggestion-level-type.enum.mjs +8 -0
- package/esm2020/lib/enum/validation-message-option-type.enum.mjs +6 -0
- package/esm2020/lib/enum/validation-message-type.enum.mjs +7 -0
- package/esm2020/lib/lib-address-autocomplete-by-component.component.mjs +1233 -0
- package/esm2020/lib/lib-address-autocomplete-by-component.module.mjs +65 -0
- package/esm2020/lib/lib-address-autocomplete-by-component.service.mjs +14 -0
- package/esm2020/lib/locality/locality.component.mjs +747 -0
- package/{esm2015/lib/model/Locality.js → esm2020/lib/model/Box.mjs} +2 -2
- package/esm2020/lib/model/Locality.mjs +30 -0
- package/esm2020/lib/model/Street.mjs +30 -0
- package/esm2020/lib/model/query-parameters.model.mjs +21 -0
- package/esm2020/lib/services/adress.service.mjs +64 -0
- package/esm2020/lib/services/http.service.mjs +57 -0
- package/esm2020/lib/services/locale.service.mjs +37 -0
- package/esm2020/lib/services/nis9.service.mjs +26 -0
- package/esm2020/lib/services/unicode.service.mjs +376 -0
- package/esm2020/lib/street/street.component.mjs +725 -0
- package/esm2020/lib/street-number/street-number.component.mjs +891 -0
- package/esm2020/lib/utils/constants.mjs +2 -0
- package/esm2020/lib/utils/domhandler.mjs +47 -0
- package/esm2020/lib/utils/highlight-suggestion.pipe.mjs +62 -0
- package/{esm5/lib/utils/prefill-data.js → esm2020/lib/utils/prefill-data.mjs} +5 -7
- package/esm2020/lib/utils/prefilled-parameters.mjs +23 -0
- package/esm2020/lib/utils/preflll.event.mjs +7 -0
- package/esm2020/lib/utils/visible-suggestion.directive.mjs +39 -0
- package/esm2020/public-api.mjs +9 -0
- package/fesm2015/{bpost-bp-address-auto-complete-by-component.js → bpost-bp-address-auto-complete-by-component.mjs} +833 -811
- package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs.map +1 -0
- package/{fesm5/bpost-bp-address-auto-complete-by-component.js → fesm2020/bpost-bp-address-auto-complete-by-component.mjs} +1768 -1951
- package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs.map +1 -0
- package/lib/box-number/box-number.component.d.ts +6 -0
- package/lib/enum/index.d.ts +3 -0
- package/lib/enum/suggestion-level-type.enum.d.ts +5 -0
- package/lib/lib-address-autocomplete-by-component.component.d.ts +7 -0
- package/lib/lib-address-autocomplete-by-component.module.d.ts +15 -0
- package/lib/lib-address-autocomplete-by-component.service.d.ts +3 -0
- package/lib/locality/locality.component.d.ts +3 -0
- package/lib/services/adress.service.d.ts +3 -0
- package/lib/services/http.service.d.ts +5 -0
- package/lib/services/locale.service.d.ts +3 -0
- package/lib/services/nis9.service.d.ts +3 -0
- package/lib/services/unicode.service.d.ts +3 -0
- package/lib/street/street.component.d.ts +3 -0
- package/lib/street-number/street-number.component.d.ts +6 -1
- package/lib/utils/constants.d.ts +1 -0
- package/lib/utils/highlight-suggestion.pipe.d.ts +3 -0
- package/lib/utils/visible-suggestion.directive.d.ts +3 -0
- package/package.json +23 -13
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/.editorconfig +0 -0
- package/tutorial/tutorial/aacwidget-tutorial/README.md +27 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/angular.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/browserslist +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/e2e/protractor.conf.js +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/e2e/src/app.e2e-spec.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/e2e/src/app.po.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/e2e/tsconfig.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/karma.conf.js +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/package-lock.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/package.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/app-routing.module.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/app.component.html +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/app.component.scss +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/app.component.spec.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/app.component.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/app.module.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/widget-full/widget-full.component.html +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/widget-full/widget-full.component.scss +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/widget-full/widget-full.component.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/widget-simple/widget-simple.component.html +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/widget-simple/widget-simple.component.scss +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/widget-simple/widget-simple.component.spec.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/app/widget-simple/widget-simple.component.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/assets/.gitkeep +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/assets/aacwidget/i18n/de.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/assets/aacwidget/i18n/en.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/assets/aacwidget/i18n/fr.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/assets/aacwidget/i18n/nl.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/assets/aacwidget/scss/aacwidget-custom.scss +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/assets/aacwidget/scss/aacwidget-default.scss +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/environments/environment.prod.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/environments/environment.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/favicon.ico +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/index.html +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/main.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/polyfills.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/styles.scss +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/src/test.ts +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/tsconfig.app.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/tsconfig.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/tsconfig.spec.json +0 -0
- package/tutorial/{aacwidget-tutorial → tutorial/aacwidget-tutorial}/tslint.json +0 -0
- package/tutorial/{tutorial-videos.txt → tutorial/tutorial-videos.txt} +0 -0
- package/bpost-bp-address-auto-complete-by-component.metadata.json +0 -1
- package/bundles/bpost-bp-address-auto-complete-by-component.umd.js +0 -5691
- package/bundles/bpost-bp-address-auto-complete-by-component.umd.js.map +0 -1
- package/bundles/bpost-bp-address-auto-complete-by-component.umd.min.js +0 -16
- package/bundles/bpost-bp-address-auto-complete-by-component.umd.min.js.map +0 -1
- package/esm2015/bpost-bp-address-auto-complete-by-component.js +0 -16
- package/esm2015/lib/box-number/box-number.component.js +0 -811
- package/esm2015/lib/enum/address-level.enum.js +0 -8
- package/esm2015/lib/enum/index.js +0 -4
- package/esm2015/lib/enum/input-name.enum.js +0 -8
- package/esm2015/lib/enum/source-type.enum.js +0 -5
- package/esm2015/lib/enum/validation-message-option-type.enum.js +0 -6
- package/esm2015/lib/enum/validation-message-type.enum.js +0 -7
- package/esm2015/lib/lib-address-autocomplete-by-component.component.js +0 -1169
- package/esm2015/lib/lib-address-autocomplete-by-component.module.js +0 -42
- package/esm2015/lib/lib-address-autocomplete-by-component.service.js +0 -14
- package/esm2015/lib/locality/locality.component.js +0 -769
- package/esm2015/lib/model/Box.js +0 -30
- package/esm2015/lib/model/Street.js +0 -30
- package/esm2015/lib/model/query-parameters.model.js +0 -21
- package/esm2015/lib/services/adress.service.js +0 -68
- package/esm2015/lib/services/http.service.js +0 -53
- package/esm2015/lib/services/locale.service.js +0 -39
- package/esm2015/lib/services/nis9.service.js +0 -30
- package/esm2015/lib/services/unicode.service.js +0 -376
- package/esm2015/lib/street/street.component.js +0 -749
- package/esm2015/lib/street-number/street-number.component.js +0 -900
- package/esm2015/lib/utils/domhandler.js +0 -47
- package/esm2015/lib/utils/highlight-suggestion.pipe.js +0 -63
- package/esm2015/lib/utils/prefill-data.js +0 -24
- package/esm2015/lib/utils/prefilled-parameters.js +0 -23
- package/esm2015/lib/utils/preflll.event.js +0 -7
- package/esm2015/lib/utils/visible-suggestion.directive.js +0 -42
- package/esm2015/public-api.js +0 -9
- package/esm5/bpost-bp-address-auto-complete-by-component.js +0 -16
- package/esm5/lib/box-number/box-number.component.js +0 -831
- package/esm5/lib/enum/address-level.enum.js +0 -8
- package/esm5/lib/enum/index.js +0 -4
- package/esm5/lib/enum/input-name.enum.js +0 -8
- package/esm5/lib/enum/source-type.enum.js +0 -5
- package/esm5/lib/enum/validation-message-option-type.enum.js +0 -6
- package/esm5/lib/enum/validation-message-type.enum.js +0 -7
- package/esm5/lib/lib-address-autocomplete-by-component.component.js +0 -1185
- package/esm5/lib/lib-address-autocomplete-by-component.module.js +0 -45
- package/esm5/lib/lib-address-autocomplete-by-component.service.js +0 -16
- package/esm5/lib/locality/locality.component.js +0 -825
- package/esm5/lib/model/Box.js +0 -35
- package/esm5/lib/model/Locality.js +0 -35
- package/esm5/lib/model/Street.js +0 -35
- package/esm5/lib/model/query-parameters.model.js +0 -23
- package/esm5/lib/services/adress.service.js +0 -72
- package/esm5/lib/services/http.service.js +0 -55
- package/esm5/lib/services/locale.service.js +0 -40
- package/esm5/lib/services/nis9.service.js +0 -31
- package/esm5/lib/services/unicode.service.js +0 -379
- package/esm5/lib/street/street.component.js +0 -794
- package/esm5/lib/street-number/street-number.component.js +0 -920
- package/esm5/lib/utils/domhandler.js +0 -51
- package/esm5/lib/utils/highlight-suggestion.pipe.js +0 -75
- package/esm5/lib/utils/prefilled-parameters.js +0 -25
- package/esm5/lib/utils/preflll.event.js +0 -9
- package/esm5/lib/utils/visible-suggestion.directive.js +0 -43
- package/esm5/public-api.js +0 -9
- package/fesm2015/bpost-bp-address-auto-complete-by-component.js.map +0 -1
- package/fesm5/bpost-bp-address-auto-complete-by-component.js.map +0 -1
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, Input, Pipe, EventEmitter, Component, ViewChild, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { map, catchError, tap } from 'rxjs/operators';
|
|
4
4
|
import { throwError, BehaviorSubject } from 'rxjs';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import * as i1 from '@angular/common/http';
|
|
6
|
+
import { HttpHeaders, HttpClientModule } from '@angular/common/http';
|
|
7
|
+
import * as i3 from '@ngx-translate/core';
|
|
8
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
9
|
+
import * as i5 from '@angular/common';
|
|
7
10
|
import { CommonModule } from '@angular/common';
|
|
11
|
+
import * as i6 from '@angular/forms';
|
|
8
12
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import
|
|
13
|
+
import * as i1$1 from '@angular/platform-browser';
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
class LibAddressAutocompleteByComponentService {
|
|
12
16
|
constructor() { }
|
|
13
|
-
}
|
|
14
|
-
LibAddressAutocompleteByComponentService.ɵ
|
|
15
|
-
LibAddressAutocompleteByComponentService =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
}
|
|
18
|
+
LibAddressAutocompleteByComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
LibAddressAutocompleteByComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentService, providedIn: 'root' });
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentService, decorators: [{
|
|
21
|
+
type: Injectable,
|
|
22
|
+
args: [{
|
|
23
|
+
providedIn: 'root'
|
|
24
|
+
}]
|
|
25
|
+
}], ctorParameters: function () { return []; } });
|
|
20
26
|
|
|
21
27
|
var ValidationMessageOptionType;
|
|
22
28
|
(function (ValidationMessageOptionType) {
|
|
@@ -60,50 +66,72 @@ class QueryParameters {
|
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
setApiKey(apiKey) {
|
|
70
|
-
this.apiKey = apiKey;
|
|
69
|
+
class DomHandler {
|
|
70
|
+
static findSingle(element, selector) {
|
|
71
|
+
if (element) {
|
|
72
|
+
return element.querySelector(selector);
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
71
75
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
static scrollInView(container, item) {
|
|
77
|
+
const borderTopValue = getComputedStyle(container).getPropertyValue('borderTopWidth');
|
|
78
|
+
const borderTop = borderTopValue ? parseFloat(borderTopValue) : 0;
|
|
79
|
+
const paddingTopValue = getComputedStyle(container).getPropertyValue('paddingTop');
|
|
80
|
+
const paddingTop = paddingTopValue ? parseFloat(paddingTopValue) : 0;
|
|
81
|
+
const containerRect = container.getBoundingClientRect();
|
|
82
|
+
const itemRect = item.getBoundingClientRect();
|
|
83
|
+
const offset = (itemRect.top + document.body.scrollTop) - (containerRect.top + document.body.scrollTop) - borderTop - paddingTop;
|
|
84
|
+
const scroll = container.scrollTop;
|
|
85
|
+
const elementHeight = container.clientHeight;
|
|
86
|
+
const itemHeight = this.getOuterHeight(item);
|
|
87
|
+
if (offset < 0) {
|
|
88
|
+
container.scrollTop = scroll + offset;
|
|
89
|
+
}
|
|
90
|
+
else if ((offset + itemHeight) > elementHeight) {
|
|
91
|
+
container.scrollTop = scroll + offset - elementHeight + itemHeight;
|
|
92
|
+
}
|
|
78
93
|
}
|
|
79
|
-
|
|
80
|
-
|
|
94
|
+
static getInnerHeight(el) {
|
|
95
|
+
let height = el.offsetHeight;
|
|
96
|
+
let style = getComputedStyle(el);
|
|
97
|
+
height += parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
|
|
98
|
+
return height;
|
|
81
99
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
100
|
+
static getOuterHeight(el, margin) {
|
|
101
|
+
let height = el.offsetHeight;
|
|
102
|
+
if (margin) {
|
|
103
|
+
let style = getComputedStyle(el);
|
|
104
|
+
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
105
|
+
}
|
|
106
|
+
return height;
|
|
88
107
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
108
|
+
static getHeight(el) {
|
|
109
|
+
let height = el.offsetHeight;
|
|
110
|
+
let style = getComputedStyle(el);
|
|
111
|
+
height -= parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
112
|
+
return height;
|
|
92
113
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
var SourceType;
|
|
117
|
+
(function (SourceType) {
|
|
118
|
+
SourceType["SOURCE_PREFILLED"] = "Prefilled";
|
|
119
|
+
})(SourceType || (SourceType = {}));
|
|
120
|
+
|
|
121
|
+
class PrefillEvent {
|
|
122
|
+
constructor(addressLevel, prefillData) {
|
|
123
|
+
this.addressLevel = addressLevel;
|
|
124
|
+
this.prefillData = prefillData;
|
|
96
125
|
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
], HttpService);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
var InputNameType;
|
|
129
|
+
(function (InputNameType) {
|
|
130
|
+
InputNameType["LOCALITY"] = "LOCALITY";
|
|
131
|
+
InputNameType["STREET"] = "STREET";
|
|
132
|
+
InputNameType["STREET_NUMBER"] = "STREET_NUMBER";
|
|
133
|
+
InputNameType["BOX_NUMBER"] = "BOX_NUMBER";
|
|
134
|
+
})(InputNameType || (InputNameType = {}));
|
|
107
135
|
|
|
108
136
|
class Locality {
|
|
109
137
|
constructor(json) {
|
|
@@ -111,17 +139,17 @@ class Locality {
|
|
|
111
139
|
if (json.topSuggestions && json.topSuggestions.length > 0) {
|
|
112
140
|
this.topSuggestions = [];
|
|
113
141
|
json.topSuggestions.forEach(element => {
|
|
114
|
-
this.topSuggestions.push(new AddressSuggestion(element));
|
|
142
|
+
this.topSuggestions.push(new AddressSuggestion$2(element));
|
|
115
143
|
});
|
|
116
144
|
}
|
|
117
145
|
}
|
|
118
146
|
}
|
|
119
|
-
class AddressSuggestion {
|
|
147
|
+
class AddressSuggestion$2 {
|
|
120
148
|
constructor(json) {
|
|
121
|
-
this.address = json.address ? new Address(json.address) : null;
|
|
149
|
+
this.address = json.address ? new Address$2(json.address) : null;
|
|
122
150
|
}
|
|
123
151
|
}
|
|
124
|
-
class Address {
|
|
152
|
+
class Address$2 {
|
|
125
153
|
constructor(json) {
|
|
126
154
|
this.municipalityId = json.municipalityId;
|
|
127
155
|
this.subMunicipalityId = json.subMunicipalityId;
|
|
@@ -171,17 +199,17 @@ class Box {
|
|
|
171
199
|
if (json.topSuggestions && json.topSuggestions.length > 0) {
|
|
172
200
|
this.topSuggestions = [];
|
|
173
201
|
json.topSuggestions.forEach(element => {
|
|
174
|
-
this.topSuggestions.push(new AddressSuggestion
|
|
202
|
+
this.topSuggestions.push(new AddressSuggestion(element));
|
|
175
203
|
});
|
|
176
204
|
}
|
|
177
205
|
}
|
|
178
206
|
}
|
|
179
|
-
class AddressSuggestion
|
|
207
|
+
class AddressSuggestion {
|
|
180
208
|
constructor(json) {
|
|
181
|
-
this.address = json.address ? new Address
|
|
209
|
+
this.address = json.address ? new Address(json.address) : null;
|
|
182
210
|
}
|
|
183
211
|
}
|
|
184
|
-
class Address
|
|
212
|
+
class Address {
|
|
185
213
|
constructor(json) {
|
|
186
214
|
this.municipalityId = json.municipalityId;
|
|
187
215
|
this.subMunicipalityId = json.subMunicipalityId;
|
|
@@ -195,7 +223,58 @@ class Address$2 {
|
|
|
195
223
|
}
|
|
196
224
|
}
|
|
197
225
|
|
|
198
|
-
|
|
226
|
+
class HttpService {
|
|
227
|
+
constructor(httpClient) {
|
|
228
|
+
this.httpClient = httpClient;
|
|
229
|
+
this.openConnections = 0;
|
|
230
|
+
this.showDebugMessageToConsole = false;
|
|
231
|
+
this.apiKey = 'no-value';
|
|
232
|
+
}
|
|
233
|
+
setApiKey(apiKey) {
|
|
234
|
+
this.apiKey = apiKey;
|
|
235
|
+
}
|
|
236
|
+
setShowDebugMessageToConsole(showDebugMessageToConsole) {
|
|
237
|
+
this.showDebugMessageToConsole = showDebugMessageToConsole;
|
|
238
|
+
}
|
|
239
|
+
getHttpHeaders() {
|
|
240
|
+
let headers = new HttpHeaders();
|
|
241
|
+
// Attention !
|
|
242
|
+
// Need to reassign as the 'set' is returning a clone of the headera object !!!
|
|
243
|
+
headers = headers.set('x-api-key', /*'bBkvimXYnAaEEKMyGqoWO2XiaZCQyqUi7VReYzPJ'*/ this.apiKey);
|
|
244
|
+
return headers;
|
|
245
|
+
}
|
|
246
|
+
get(url, options) {
|
|
247
|
+
return this.request('GET', url, options);
|
|
248
|
+
}
|
|
249
|
+
request(method, url, options) {
|
|
250
|
+
options = !!options ? options : {};
|
|
251
|
+
options = Object.assign(Object.assign({}, options), { headers: this.getHttpHeaders() });
|
|
252
|
+
if (this.showDebugMessageToConsole) {
|
|
253
|
+
console.log('url:', url);
|
|
254
|
+
console.log('options:', JSON.stringify(options));
|
|
255
|
+
}
|
|
256
|
+
this.openConnections++;
|
|
257
|
+
return this.httpClient.request(method, url, options).pipe(map((response) => this.handleResponse(response)), catchError((error) => this.handleError(error)));
|
|
258
|
+
}
|
|
259
|
+
handleResponse(response) {
|
|
260
|
+
this.openConnections--;
|
|
261
|
+
return response;
|
|
262
|
+
}
|
|
263
|
+
handleError(error) {
|
|
264
|
+
this.openConnections--;
|
|
265
|
+
return throwError(error);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
HttpService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HttpService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
269
|
+
HttpService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HttpService, providedIn: 'root' });
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HttpService, decorators: [{
|
|
271
|
+
type: Injectable,
|
|
272
|
+
args: [{
|
|
273
|
+
providedIn: 'root'
|
|
274
|
+
}]
|
|
275
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
276
|
+
|
|
277
|
+
class AddressService {
|
|
199
278
|
constructor(httpService) {
|
|
200
279
|
this.httpService = httpService;
|
|
201
280
|
this.domain = 'http://10.194.73.9:8080';
|
|
@@ -241,21 +320,18 @@ let AddressService = class AddressService {
|
|
|
241
320
|
handleError(error) {
|
|
242
321
|
return throwError(error);
|
|
243
322
|
}
|
|
244
|
-
}
|
|
245
|
-
AddressService
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
], AddressService);
|
|
323
|
+
}
|
|
324
|
+
AddressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AddressService, deps: [{ token: HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
325
|
+
AddressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AddressService, providedIn: 'root' });
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: AddressService, decorators: [{
|
|
327
|
+
type: Injectable,
|
|
328
|
+
args: [{
|
|
329
|
+
providedIn: 'root'
|
|
330
|
+
}]
|
|
331
|
+
}], ctorParameters: function () { return [{ type: HttpService }]; } });
|
|
254
332
|
|
|
255
|
-
|
|
256
|
-
constructor(
|
|
257
|
-
// private translateService: TranslateService
|
|
258
|
-
) {
|
|
333
|
+
class LocaleService {
|
|
334
|
+
constructor() {
|
|
259
335
|
this.inputLanguageEvent = new BehaviorSubject(undefined);
|
|
260
336
|
this.currentLang = this.inputLanguageEvent.asObservable();
|
|
261
337
|
}
|
|
@@ -278,13 +354,15 @@ let LocaleService = class LocaleService {
|
|
|
278
354
|
|| window.navigator['userLanguage']
|
|
279
355
|
|| window.navigator.language).indexOf(locale) === 0;
|
|
280
356
|
}
|
|
281
|
-
}
|
|
282
|
-
LocaleService.ɵ
|
|
283
|
-
LocaleService =
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
357
|
+
}
|
|
358
|
+
LocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
359
|
+
LocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LocaleService, providedIn: 'root' });
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LocaleService, decorators: [{
|
|
361
|
+
type: Injectable,
|
|
362
|
+
args: [{
|
|
363
|
+
providedIn: 'root'
|
|
364
|
+
}]
|
|
365
|
+
}], ctorParameters: function () { return []; } });
|
|
288
366
|
|
|
289
367
|
// const diacriticsRemovalMap = require('../../assets/diacriticsRemovalMap.json');
|
|
290
368
|
const diacriticsRemovalMap = {
|
|
@@ -635,7 +713,7 @@ const diacriticsRemovalMap = {
|
|
|
635
713
|
}
|
|
636
714
|
]
|
|
637
715
|
};
|
|
638
|
-
|
|
716
|
+
class UnicodeService {
|
|
639
717
|
constructor() {
|
|
640
718
|
this.defaultDiacriticsRemovalMap = diacriticsRemovalMap.default;
|
|
641
719
|
this.diacriticsMap = {};
|
|
@@ -650,82 +728,112 @@ let UnicodeService = class UnicodeService {
|
|
|
650
728
|
ngOnDestroy() {
|
|
651
729
|
this.diacriticsMap = {};
|
|
652
730
|
}
|
|
653
|
-
}
|
|
654
|
-
UnicodeService.ɵ
|
|
655
|
-
UnicodeService =
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
731
|
+
}
|
|
732
|
+
UnicodeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: UnicodeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
733
|
+
UnicodeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: UnicodeService, providedIn: 'root' });
|
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: UnicodeService, decorators: [{
|
|
735
|
+
type: Injectable,
|
|
736
|
+
args: [{
|
|
737
|
+
providedIn: 'root'
|
|
738
|
+
}]
|
|
739
|
+
}], ctorParameters: function () { return []; } });
|
|
660
740
|
|
|
661
|
-
class
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
return null;
|
|
741
|
+
class VisibleSuggestionDirective {
|
|
742
|
+
constructor(el, renderer) {
|
|
743
|
+
this.el = el;
|
|
744
|
+
this.renderer = renderer;
|
|
667
745
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
const itemRect = item.getBoundingClientRect();
|
|
675
|
-
const offset = (itemRect.top + document.body.scrollTop) - (containerRect.top + document.body.scrollTop) - borderTop - paddingTop;
|
|
676
|
-
const scroll = container.scrollTop;
|
|
677
|
-
const elementHeight = container.clientHeight;
|
|
678
|
-
const itemHeight = this.getOuterHeight(item);
|
|
679
|
-
if (offset < 0) {
|
|
680
|
-
container.scrollTop = scroll + offset;
|
|
746
|
+
ngAfterViewChecked() {
|
|
747
|
+
this.showHeight(this.el.nativeElement, this.appVisibleSuggestion);
|
|
748
|
+
}
|
|
749
|
+
showHeight(parent, count) {
|
|
750
|
+
if (!parent) {
|
|
751
|
+
return;
|
|
681
752
|
}
|
|
682
|
-
|
|
683
|
-
|
|
753
|
+
// const children = parent.getElementsByClassName('list-option');
|
|
754
|
+
// const children = parent.querySelectorAll('li');
|
|
755
|
+
const children = parent.firstElementChild.children;
|
|
756
|
+
if (!children || children.length === 0) {
|
|
757
|
+
return;
|
|
684
758
|
}
|
|
759
|
+
const sum = Array.from(children).slice(0, count).reduce((acc, ele) => {
|
|
760
|
+
return acc + DomHandler.getOuterHeight(ele);
|
|
761
|
+
}, 7);
|
|
762
|
+
this.renderer.setStyle(this.el.nativeElement, 'maxHeight', `${sum}px`);
|
|
763
|
+
// this.el.nativeElement.style.maxHeight = `${sum}px`;
|
|
685
764
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
765
|
+
}
|
|
766
|
+
VisibleSuggestionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: VisibleSuggestionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
767
|
+
VisibleSuggestionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: VisibleSuggestionDirective, selector: "[appVisibleSuggestion]", inputs: { appVisibleSuggestion: "appVisibleSuggestion" }, ngImport: i0 });
|
|
768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: VisibleSuggestionDirective, decorators: [{
|
|
769
|
+
type: Directive,
|
|
770
|
+
args: [{
|
|
771
|
+
selector: '[appVisibleSuggestion]'
|
|
772
|
+
}]
|
|
773
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { appVisibleSuggestion: [{
|
|
774
|
+
type: Input
|
|
775
|
+
}] } });
|
|
776
|
+
|
|
777
|
+
class HighlightSuggestionPipe {
|
|
778
|
+
constructor(sanitizer) {
|
|
779
|
+
this.sanitizer = sanitizer;
|
|
691
780
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
let style = getComputedStyle(el);
|
|
696
|
-
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
781
|
+
transform(value, args) {
|
|
782
|
+
if (!args) {
|
|
783
|
+
return value;
|
|
697
784
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
785
|
+
if (Array.isArray(args) && args.length > 1) {
|
|
786
|
+
return this.transformForArray(value, args);
|
|
787
|
+
}
|
|
788
|
+
if (args === '.') {
|
|
789
|
+
args = '\\.';
|
|
790
|
+
}
|
|
791
|
+
else if (Array.isArray(args) && args.length === 1) {
|
|
792
|
+
if (args[0] === '.') {
|
|
793
|
+
args[0] = '\\.';
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
// Match in a case insensitive manner
|
|
797
|
+
const re = new RegExp(args, 'gi');
|
|
798
|
+
const match = value.match(re);
|
|
799
|
+
// If there's no match, just return the original value.
|
|
800
|
+
if (!match) {
|
|
801
|
+
return value;
|
|
802
|
+
}
|
|
803
|
+
/* console.warn('HighlightSuggestionPipe::transform: value=' + value);
|
|
804
|
+
console.warn('HighlightSuggestionPipe::transform: args=' + args);
|
|
805
|
+
console.warn('HighlightSuggestionPipe::transform: match=' + match); */
|
|
806
|
+
const replacedValue = value.replace(re, '<span style=\'font-weight: bold;\'>' + match[0] + '</span>');
|
|
807
|
+
// console.warn('HighlightSuggestionPipe::transform: replacedValue=' + replacedValue);
|
|
808
|
+
return this.sanitizer.bypassSecurityTrustHtml(replacedValue);
|
|
705
809
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
(
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
810
|
+
transformForArray(value, args) {
|
|
811
|
+
let query = '';
|
|
812
|
+
let ix = 0;
|
|
813
|
+
for (const word of args) {
|
|
814
|
+
ix++;
|
|
815
|
+
if (ix < args.length) {
|
|
816
|
+
query = query.concat(word + '|');
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
query = query.concat(word);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
// console.warn('HighlightSuggestionPipe::transformForArray', value, args, query);
|
|
823
|
+
const replacedValue = value.replace(new RegExp('(' + query + ')', 'gi'), '<span style="font-weight: bold;">$1</span>');
|
|
824
|
+
return this.sanitizer.bypassSecurityTrustHtml(replacedValue);
|
|
717
825
|
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
(
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}
|
|
826
|
+
}
|
|
827
|
+
HighlightSuggestionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HighlightSuggestionPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
828
|
+
HighlightSuggestionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HighlightSuggestionPipe, name: "highlightSuggestion" });
|
|
829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HighlightSuggestionPipe, decorators: [{
|
|
830
|
+
type: Pipe,
|
|
831
|
+
args: [{
|
|
832
|
+
name: 'highlightSuggestion'
|
|
833
|
+
}]
|
|
834
|
+
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
|
|
727
835
|
|
|
728
|
-
|
|
836
|
+
class LocalityComponent {
|
|
729
837
|
constructor(addressService, localeService, translateService, unicodeService) {
|
|
730
838
|
this.addressService = addressService;
|
|
731
839
|
this.localeService = localeService;
|
|
@@ -1405,82 +1513,57 @@ let LocalityComponent = class LocalityComponent {
|
|
|
1405
1513
|
this.setSearchText(this.lastSearchValue);
|
|
1406
1514
|
}
|
|
1407
1515
|
}
|
|
1408
|
-
}
|
|
1409
|
-
LocalityComponent
|
|
1410
|
-
{ type:
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
];
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
],
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
],
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
],
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
],
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
],
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
],
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
],
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
]
|
|
1457
|
-
__decorate([
|
|
1458
|
-
Output()
|
|
1459
|
-
], LocalityComponent.prototype, "addressChanged", void 0);
|
|
1460
|
-
__decorate([
|
|
1461
|
-
Output()
|
|
1462
|
-
], LocalityComponent.prototype, "focusEvent", void 0);
|
|
1463
|
-
__decorate([
|
|
1464
|
-
Output()
|
|
1465
|
-
], LocalityComponent.prototype, "blurEvent", void 0);
|
|
1466
|
-
__decorate([
|
|
1467
|
-
Output()
|
|
1468
|
-
], LocalityComponent.prototype, "textChangeEvent", void 0);
|
|
1469
|
-
__decorate([
|
|
1470
|
-
Output()
|
|
1471
|
-
], LocalityComponent.prototype, "clearInputEventEmitter", void 0);
|
|
1472
|
-
__decorate([
|
|
1473
|
-
Output()
|
|
1474
|
-
], LocalityComponent.prototype, "prefillEventEmitter", void 0);
|
|
1475
|
-
LocalityComponent = __decorate([
|
|
1476
|
-
Component({
|
|
1477
|
-
selector: 'bp-locality',
|
|
1478
|
-
template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n \n <input type=\"text\" #localitySearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keydown)=\"checkKeyDown($event)\" (input)=\"onInputChange()\"\n [style.color]=\" getTextColor() \"\n [(ngModel)]=\"searchText\" id=\"localityInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" (click)=\"onInputClick()\"/>\n <div id=\"bpaac-clear-locality-button\" \n *ngIf=\"mayShowClearButton()\"\n (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-locality-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #localityList [appVisibleSuggestion]=\"visibleSuggestionCount\" id=\"bpaac-locality-dropdown\" \n class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-locality-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" \n *ngFor=\"let option of suggestions; let idx = index\" \n [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span> \n <span *ngIf=\"messageOption === 'P' && option.messages\"> ({{option.municipalityName}})</span><br />\n <ng-container *ngIf=\"messageOption === 'Y'\">\n <span *ngFor=\"let message of option.messages\" \n class=\"bpaac-suggestion-message\"\n [innerHtml]=\"message.translatedMessage\"></span> \n </ng-container>\n </li>\n </ul>\n </div>\n </div>\n</div>",
|
|
1479
|
-
styles: [""]
|
|
1480
|
-
})
|
|
1481
|
-
], LocalityComponent);
|
|
1516
|
+
}
|
|
1517
|
+
LocalityComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LocalityComponent, deps: [{ token: AddressService }, { token: LocaleService }, { token: i3.TranslateService }, { token: UnicodeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1518
|
+
LocalityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: LocalityComponent, selector: "bp-locality", inputs: { labelResourceKey: "labelResourceKey", messageOption: "messageOption", maxSuggesionCount: "maxSuggesionCount", visibleSuggestionCount: "visibleSuggestionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", inputText: "inputText", prefillData: "prefillData", showDebugMessageToConsole: "showDebugMessageToConsole", inputLang: "inputLang", isReadonly: "isReadonly" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter" }, viewQueries: [{ propertyName: "localitySearchInput", first: true, predicate: ["localitySearchInput"], descendants: true }, { propertyName: "localityList", first: true, predicate: ["localityList"], 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 \n <input type=\"text\" #localitySearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keydown)=\"checkKeyDown($event)\" (input)=\"onInputChange()\"\n [style.color]=\" getTextColor() \"\n [(ngModel)]=\"searchText\" id=\"localityInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" (click)=\"onInputClick()\"/>\n <div id=\"bpaac-clear-locality-button\" \n *ngIf=\"mayShowClearButton()\"\n (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-locality-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #localityList [appVisibleSuggestion]=\"visibleSuggestionCount\" id=\"bpaac-locality-dropdown\" \n class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-locality-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" \n *ngFor=\"let option of suggestions; let idx = index\" \n [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span> \n <span *ngIf=\"messageOption === 'P' && option.messages\"> ({{option.municipalityName}})</span><br />\n <ng-container *ngIf=\"messageOption === 'Y'\">\n <span *ngFor=\"let message of option.messages\" \n class=\"bpaac-suggestion-message\"\n [innerHtml]=\"message.translatedMessage\"></span> \n </ng-container>\n </li>\n </ul>\n </div>\n </div>\n</div>", 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 } });
|
|
1519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LocalityComponent, decorators: [{
|
|
1520
|
+
type: Component,
|
|
1521
|
+
args: [{ selector: 'bp-locality', template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n \n <input type=\"text\" #localitySearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n (keydown)=\"checkKeyDown($event)\" (input)=\"onInputChange()\"\n [style.color]=\" getTextColor() \"\n [(ngModel)]=\"searchText\" id=\"localityInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" (click)=\"onInputClick()\"/>\n <div id=\"bpaac-clear-locality-button\" \n *ngIf=\"mayShowClearButton()\"\n (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-locality-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #localityList [appVisibleSuggestion]=\"visibleSuggestionCount\" id=\"bpaac-locality-dropdown\" \n class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-locality-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" \n *ngFor=\"let option of suggestions; let idx = index\" \n [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span> \n <span *ngIf=\"messageOption === 'P' && option.messages\"> ({{option.municipalityName}})</span><br />\n <ng-container *ngIf=\"messageOption === 'Y'\">\n <span *ngFor=\"let message of option.messages\" \n class=\"bpaac-suggestion-message\"\n [innerHtml]=\"message.translatedMessage\"></span> \n </ng-container>\n </li>\n </ul>\n </div>\n </div>\n</div>", styles: [""] }]
|
|
1522
|
+
}], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { localitySearchInput: [{
|
|
1523
|
+
type: ViewChild,
|
|
1524
|
+
args: ['localitySearchInput', { static: false }]
|
|
1525
|
+
}], localityList: [{
|
|
1526
|
+
type: ViewChild,
|
|
1527
|
+
args: ['localityList', { static: false }]
|
|
1528
|
+
}], labelResourceKey: [{
|
|
1529
|
+
type: Input
|
|
1530
|
+
}], messageOption: [{
|
|
1531
|
+
type: Input
|
|
1532
|
+
}], maxSuggesionCount: [{
|
|
1533
|
+
type: Input
|
|
1534
|
+
}], visibleSuggestionCount: [{
|
|
1535
|
+
type: Input
|
|
1536
|
+
}], sortCriteria: [{
|
|
1537
|
+
type: Input
|
|
1538
|
+
}], baseUrl: [{
|
|
1539
|
+
type: Input
|
|
1540
|
+
}], inputText: [{
|
|
1541
|
+
type: Input
|
|
1542
|
+
}], prefillData: [{
|
|
1543
|
+
type: Input
|
|
1544
|
+
}], showDebugMessageToConsole: [{
|
|
1545
|
+
type: Input
|
|
1546
|
+
}], inputLang: [{
|
|
1547
|
+
type: Input
|
|
1548
|
+
}], isReadonly: [{
|
|
1549
|
+
type: Input
|
|
1550
|
+
}], messageChanged: [{
|
|
1551
|
+
type: Output
|
|
1552
|
+
}], addressChanged: [{
|
|
1553
|
+
type: Output
|
|
1554
|
+
}], focusEvent: [{
|
|
1555
|
+
type: Output
|
|
1556
|
+
}], blurEvent: [{
|
|
1557
|
+
type: Output
|
|
1558
|
+
}], textChangeEvent: [{
|
|
1559
|
+
type: Output
|
|
1560
|
+
}], clearInputEventEmitter: [{
|
|
1561
|
+
type: Output
|
|
1562
|
+
}], prefillEventEmitter: [{
|
|
1563
|
+
type: Output
|
|
1564
|
+
}] } });
|
|
1482
1565
|
|
|
1483
|
-
|
|
1566
|
+
class StreetComponent {
|
|
1484
1567
|
constructor(addressService, localeService, translateService, unicodeService) {
|
|
1485
1568
|
this.addressService = addressService;
|
|
1486
1569
|
this.localeService = localeService;
|
|
@@ -2134,88 +2217,69 @@ let StreetComponent = class StreetComponent {
|
|
|
2134
2217
|
this.prefilling = false;
|
|
2135
2218
|
this.collapseDropdown = false;
|
|
2136
2219
|
}
|
|
2137
|
-
}
|
|
2138
|
-
StreetComponent
|
|
2139
|
-
{ type:
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
];
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
],
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
],
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
],
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
],
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
],
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
],
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
],
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
],
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
]
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
__decorate([
|
|
2199
|
-
Output()
|
|
2200
|
-
], StreetComponent.prototype, "blurEvent", void 0);
|
|
2201
|
-
__decorate([
|
|
2202
|
-
Output()
|
|
2203
|
-
], StreetComponent.prototype, "textChangeEvent", void 0);
|
|
2204
|
-
__decorate([
|
|
2205
|
-
Output()
|
|
2206
|
-
], StreetComponent.prototype, "clearInputEventEmitter", void 0);
|
|
2207
|
-
__decorate([
|
|
2208
|
-
Output()
|
|
2209
|
-
], StreetComponent.prototype, "prefillEventEmitter", void 0);
|
|
2210
|
-
StreetComponent = __decorate([
|
|
2211
|
-
Component({
|
|
2212
|
-
selector: 'bp-street',
|
|
2213
|
-
template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #streetSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!locality || locality.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetInputField\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-street-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-street-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-street-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-street-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n",
|
|
2214
|
-
styles: [""]
|
|
2215
|
-
})
|
|
2216
|
-
], StreetComponent);
|
|
2220
|
+
}
|
|
2221
|
+
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 });
|
|
2222
|
+
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", inputLang: "inputLang", isReadonly: "isReadonly" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter" }, 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]=\"!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 } });
|
|
2223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: StreetComponent, decorators: [{
|
|
2224
|
+
type: Component,
|
|
2225
|
+
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]=\"!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: [""] }]
|
|
2226
|
+
}], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { streetSearchInput: [{
|
|
2227
|
+
type: ViewChild,
|
|
2228
|
+
args: ['streetSearchInput', { static: false }]
|
|
2229
|
+
}], streetList: [{
|
|
2230
|
+
type: ViewChild,
|
|
2231
|
+
args: ['streetList', { static: false }]
|
|
2232
|
+
}], labelResourceKey: [{
|
|
2233
|
+
type: Input
|
|
2234
|
+
}], maxSuggesionCount: [{
|
|
2235
|
+
type: Input
|
|
2236
|
+
}], visibleSuggesionCount: [{
|
|
2237
|
+
type: Input
|
|
2238
|
+
}], sortCriteria: [{
|
|
2239
|
+
type: Input
|
|
2240
|
+
}], baseUrl: [{
|
|
2241
|
+
type: Input
|
|
2242
|
+
}], prefillData: [{
|
|
2243
|
+
type: Input
|
|
2244
|
+
}], showDebugMessageToConsole: [{
|
|
2245
|
+
type: Input
|
|
2246
|
+
}], postalCode: [{
|
|
2247
|
+
type: Input
|
|
2248
|
+
}], locality: [{
|
|
2249
|
+
type: Input
|
|
2250
|
+
}], inputText: [{
|
|
2251
|
+
type: Input
|
|
2252
|
+
}], messageOption: [{
|
|
2253
|
+
type: Input
|
|
2254
|
+
}], inputLang: [{
|
|
2255
|
+
type: Input
|
|
2256
|
+
}], isReadonly: [{
|
|
2257
|
+
type: Input
|
|
2258
|
+
}], messageChanged: [{
|
|
2259
|
+
type: Output
|
|
2260
|
+
}], addressChanged: [{
|
|
2261
|
+
type: Output
|
|
2262
|
+
}], focusEvent: [{
|
|
2263
|
+
type: Output
|
|
2264
|
+
}], blurEvent: [{
|
|
2265
|
+
type: Output
|
|
2266
|
+
}], textChangeEvent: [{
|
|
2267
|
+
type: Output
|
|
2268
|
+
}], clearInputEventEmitter: [{
|
|
2269
|
+
type: Output
|
|
2270
|
+
}], prefillEventEmitter: [{
|
|
2271
|
+
type: Output
|
|
2272
|
+
}] } });
|
|
2273
|
+
|
|
2274
|
+
var SuggestionLevelType;
|
|
2275
|
+
(function (SuggestionLevelType) {
|
|
2276
|
+
// this only applies for streetNumber and boxNumber
|
|
2277
|
+
SuggestionLevelType[SuggestionLevelType["None"] = 0] = "None";
|
|
2278
|
+
SuggestionLevelType[SuggestionLevelType["StreetNumber"] = 1] = "StreetNumber";
|
|
2279
|
+
SuggestionLevelType[SuggestionLevelType["StreetAndBoxNumber"] = 2] = "StreetAndBoxNumber";
|
|
2280
|
+
})(SuggestionLevelType || (SuggestionLevelType = {}));
|
|
2217
2281
|
|
|
2218
|
-
|
|
2282
|
+
class StreetNumberComponent {
|
|
2219
2283
|
constructor(addressService, localeService, translateService, unicodeService) {
|
|
2220
2284
|
this.addressService = addressService;
|
|
2221
2285
|
this.localeService = localeService;
|
|
@@ -2236,6 +2300,7 @@ let StreetNumberComponent = class StreetNumberComponent {
|
|
|
2236
2300
|
this.emptyResponseEvent = new EventEmitter();
|
|
2237
2301
|
this.clearInputEventEmitter = new EventEmitter();
|
|
2238
2302
|
this.prefillEventEmitter = new EventEmitter();
|
|
2303
|
+
this.streetNumberChanged = new EventEmitter();
|
|
2239
2304
|
this.addressIsValidated = false;
|
|
2240
2305
|
this.addressIsComplete = false;
|
|
2241
2306
|
this.validationMessageCode = null;
|
|
@@ -2314,7 +2379,7 @@ let StreetNumberComponent = class StreetNumberComponent {
|
|
|
2314
2379
|
this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
2315
2380
|
// this.addressIsComplete = false;
|
|
2316
2381
|
if (this.showDebugMessageToConsole) {
|
|
2317
|
-
console.warn('street
|
|
2382
|
+
console.warn('street name - ngOnchanges - streetName changes detection');
|
|
2318
2383
|
}
|
|
2319
2384
|
if (changes.streetName.currentValue === '') {
|
|
2320
2385
|
this.clearWidget();
|
|
@@ -2714,16 +2779,28 @@ let StreetNumberComponent = class StreetNumberComponent {
|
|
|
2714
2779
|
if (this.showDebugMessageToConsole) {
|
|
2715
2780
|
console.log('streetNumber::onInputChange -> calling valueChanged');
|
|
2716
2781
|
}
|
|
2717
|
-
this.
|
|
2782
|
+
if (this.suggestionLevel !== SuggestionLevelType.None) {
|
|
2783
|
+
this.valueChanged();
|
|
2784
|
+
}
|
|
2718
2785
|
}
|
|
2719
2786
|
this.clearSuggestionValidationMessage();
|
|
2720
2787
|
if (this.searchText === '') {
|
|
2721
2788
|
this.sequenceNumber += 1;
|
|
2722
2789
|
this.consumedNumber = this.sequenceNumber;
|
|
2723
2790
|
this.clearSuggestions();
|
|
2791
|
+
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
2792
|
+
console.log('do not use suggestions for street number');
|
|
2793
|
+
this.streetNumberChanged.emit(this.searchText);
|
|
2794
|
+
}
|
|
2724
2795
|
}
|
|
2725
2796
|
else {
|
|
2726
|
-
this.
|
|
2797
|
+
if (this.suggestionLevel === SuggestionLevelType.None) {
|
|
2798
|
+
console.log('do not use suggestions for street number');
|
|
2799
|
+
this.streetNumberChanged.emit(this.searchText);
|
|
2800
|
+
}
|
|
2801
|
+
else {
|
|
2802
|
+
this.getTopSuggestions(source);
|
|
2803
|
+
}
|
|
2727
2804
|
}
|
|
2728
2805
|
this.buildInputWordList();
|
|
2729
2806
|
}
|
|
@@ -2783,12 +2860,14 @@ let StreetNumberComponent = class StreetNumberComponent {
|
|
|
2783
2860
|
this.addressIsComplete = (suggestion.hasOwnProperty('isComplete') && suggestion.isComplete === true && !isNotInList) ? true : false;
|
|
2784
2861
|
this.addressChanged.emit(suggestion);
|
|
2785
2862
|
}
|
|
2863
|
+
/*
|
|
2786
2864
|
clearSelectedAddress() {
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2865
|
+
this.addressChanged.emit(null);
|
|
2866
|
+
this.addressIsValidated = false;
|
|
2867
|
+
this.addressIsComplete = false;
|
|
2868
|
+
// console.log('streetNumber::clearSelectedAddress', this.addressIsComplete);
|
|
2791
2869
|
}
|
|
2870
|
+
*/
|
|
2792
2871
|
emitTranslatedValidationMessage(validationMessageType, options) {
|
|
2793
2872
|
// Momently, options are NOT used; so data type of these options will be reviewed once needed.
|
|
2794
2873
|
if (validationMessageType === null || validationMessageType === undefined) {
|
|
@@ -3005,103 +3084,75 @@ let StreetNumberComponent = class StreetNumberComponent {
|
|
|
3005
3084
|
console.log('street number click');
|
|
3006
3085
|
}
|
|
3007
3086
|
}
|
|
3008
|
-
}
|
|
3009
|
-
StreetNumberComponent
|
|
3010
|
-
{ type:
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
];
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
],
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
],
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
],
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
],
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
],
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
],
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
],
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
],
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
],
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
],
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
]
|
|
3075
|
-
__decorate([
|
|
3076
|
-
Output()
|
|
3077
|
-
], StreetNumberComponent.prototype, "addressChanged", void 0);
|
|
3078
|
-
__decorate([
|
|
3079
|
-
Output()
|
|
3080
|
-
], StreetNumberComponent.prototype, "focusEvent", void 0);
|
|
3081
|
-
__decorate([
|
|
3082
|
-
Output()
|
|
3083
|
-
], StreetNumberComponent.prototype, "blurEvent", void 0);
|
|
3084
|
-
__decorate([
|
|
3085
|
-
Output()
|
|
3086
|
-
], StreetNumberComponent.prototype, "textChangeEvent", void 0);
|
|
3087
|
-
__decorate([
|
|
3088
|
-
Output()
|
|
3089
|
-
], StreetNumberComponent.prototype, "emptyResponseEvent", void 0);
|
|
3090
|
-
__decorate([
|
|
3091
|
-
Output()
|
|
3092
|
-
], StreetNumberComponent.prototype, "clearInputEventEmitter", void 0);
|
|
3093
|
-
__decorate([
|
|
3094
|
-
Output()
|
|
3095
|
-
], StreetNumberComponent.prototype, "prefillEventEmitter", void 0);
|
|
3096
|
-
StreetNumberComponent = __decorate([
|
|
3097
|
-
Component({
|
|
3098
|
-
selector: 'bp-street-number',
|
|
3099
|
-
template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #streetNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetName || streetName.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetNumberInputField\" \n [attr.title]=\"placeHolderText\" \n [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-streetNb-button\" *ngIf=\"mayShowClearButton()\" \n (click)=\"onClearStreetNumberInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-streetNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <!-- <span>addressIsComplete: {{ addressIsComplete }}. </span>\n <span>addressIsValidated: {{ addressIsValidated }}. </span> -->\n <span *ngIf=\"addressIsComplete\" class=\"streetNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" \n id=\"bpaac-streetnumber-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-streetNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>",
|
|
3100
|
-
styles: [""]
|
|
3101
|
-
})
|
|
3102
|
-
], StreetNumberComponent);
|
|
3087
|
+
}
|
|
3088
|
+
StreetNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: StreetNumberComponent, deps: [{ token: AddressService }, { token: LocaleService }, { token: i3.TranslateService }, { token: UnicodeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3089
|
+
StreetNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: StreetNumberComponent, selector: "bp-street-number", inputs: { prefillData: "prefillData", showDebugMessageToConsole: "showDebugMessageToConsole", labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", addressParams: "addressParams", postalCode: "postalCode", locality: "locality", streetName: "streetName", notInListAllowed: "notInListAllowed", selectedAddress: "selectedAddress", inputLang: "inputLang", messageOption: "messageOption", inputText: "inputText", isReadonly: "isReadonly", suggestionLevel: "suggestionLevel" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", emptyResponseEvent: "emptyResponseEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", streetNumberChanged: "streetNumberChanged" }, viewQueries: [{ propertyName: "streetNumberSearchInput", first: true, predicate: ["streetNumberSearchInput"], descendants: true }, { propertyName: "streetNumberList", first: true, predicate: ["streetNumberList"], 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\" #streetNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetName || streetName.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetNumberInputField\" \n [attr.title]=\"placeHolderText\" \n [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-streetNb-button\" *ngIf=\"mayShowClearButton()\" \n (click)=\"onClearStreetNumberInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-streetNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <!-- <span>addressIsComplete: {{ addressIsComplete }}. </span>\n <span>addressIsValidated: {{ addressIsValidated }}. </span> -->\n <span *ngIf=\"addressIsComplete\" class=\"streetNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" \n id=\"bpaac-streetnumber-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-streetNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>", 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 } });
|
|
3090
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: StreetNumberComponent, decorators: [{
|
|
3091
|
+
type: Component,
|
|
3092
|
+
args: [{ selector: 'bp-street-number', template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #streetNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetName || streetName.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"streetNumberInputField\" \n [attr.title]=\"placeHolderText\" \n [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-streetNb-button\" *ngIf=\"mayShowClearButton()\" \n (click)=\"onClearStreetNumberInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-streetNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <!-- <span>addressIsComplete: {{ addressIsComplete }}. </span>\n <span>addressIsValidated: {{ addressIsValidated }}. </span> -->\n <span *ngIf=\"addressIsComplete\" class=\"streetNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #streetNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" \n id=\"bpaac-streetnumber-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-streetNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>", styles: [""] }]
|
|
3093
|
+
}], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { streetNumberSearchInput: [{
|
|
3094
|
+
type: ViewChild,
|
|
3095
|
+
args: ['streetNumberSearchInput', { static: false }]
|
|
3096
|
+
}], streetNumberList: [{
|
|
3097
|
+
type: ViewChild,
|
|
3098
|
+
args: ['streetNumberList', { static: false }]
|
|
3099
|
+
}], prefillData: [{
|
|
3100
|
+
type: Input
|
|
3101
|
+
}], showDebugMessageToConsole: [{
|
|
3102
|
+
type: Input
|
|
3103
|
+
}], labelResourceKey: [{
|
|
3104
|
+
type: Input
|
|
3105
|
+
}], maxSuggesionCount: [{
|
|
3106
|
+
type: Input
|
|
3107
|
+
}], visibleSuggesionCount: [{
|
|
3108
|
+
type: Input
|
|
3109
|
+
}], sortCriteria: [{
|
|
3110
|
+
type: Input
|
|
3111
|
+
}], baseUrl: [{
|
|
3112
|
+
type: Input
|
|
3113
|
+
}], addressParams: [{
|
|
3114
|
+
type: Input
|
|
3115
|
+
}], postalCode: [{
|
|
3116
|
+
type: Input
|
|
3117
|
+
}], locality: [{
|
|
3118
|
+
type: Input
|
|
3119
|
+
}], streetName: [{
|
|
3120
|
+
type: Input
|
|
3121
|
+
}], notInListAllowed: [{
|
|
3122
|
+
type: Input
|
|
3123
|
+
}], selectedAddress: [{
|
|
3124
|
+
type: Input
|
|
3125
|
+
}], inputLang: [{
|
|
3126
|
+
type: Input
|
|
3127
|
+
}], messageOption: [{
|
|
3128
|
+
type: Input
|
|
3129
|
+
}], inputText: [{
|
|
3130
|
+
type: Input
|
|
3131
|
+
}], isReadonly: [{
|
|
3132
|
+
type: Input
|
|
3133
|
+
}], suggestionLevel: [{
|
|
3134
|
+
type: Input
|
|
3135
|
+
}], messageChanged: [{
|
|
3136
|
+
type: Output
|
|
3137
|
+
}], addressChanged: [{
|
|
3138
|
+
type: Output
|
|
3139
|
+
}], focusEvent: [{
|
|
3140
|
+
type: Output
|
|
3141
|
+
}], blurEvent: [{
|
|
3142
|
+
type: Output
|
|
3143
|
+
}], textChangeEvent: [{
|
|
3144
|
+
type: Output
|
|
3145
|
+
}], emptyResponseEvent: [{
|
|
3146
|
+
type: Output
|
|
3147
|
+
}], clearInputEventEmitter: [{
|
|
3148
|
+
type: Output
|
|
3149
|
+
}], prefillEventEmitter: [{
|
|
3150
|
+
type: Output
|
|
3151
|
+
}], streetNumberChanged: [{
|
|
3152
|
+
type: Output
|
|
3153
|
+
}] } });
|
|
3103
3154
|
|
|
3104
|
-
|
|
3155
|
+
class BoxNumberComponent {
|
|
3105
3156
|
constructor(addressService, localeService, translateService, unicodeService) {
|
|
3106
3157
|
this.addressService = addressService;
|
|
3107
3158
|
this.localeService = localeService;
|
|
@@ -3122,6 +3173,7 @@ let BoxNumberComponent = class BoxNumberComponent {
|
|
|
3122
3173
|
this.emptyResponseEvent = new EventEmitter();
|
|
3123
3174
|
this.clearInputEventEmitter = new EventEmitter();
|
|
3124
3175
|
this.prefillEventEmitter = new EventEmitter();
|
|
3176
|
+
this.boxNumberChanged = new EventEmitter();
|
|
3125
3177
|
this.validationMessageCode = null;
|
|
3126
3178
|
this.validationMessageOptions = null;
|
|
3127
3179
|
this.prefilling = false;
|
|
@@ -3195,7 +3247,9 @@ let BoxNumberComponent = class BoxNumberComponent {
|
|
|
3195
3247
|
if (changes.hasOwnProperty('streetNumber') && !changes.streetNumber.firstChange && !changes.hasOwnProperty('prefillData')) {
|
|
3196
3248
|
this.minLevel = ADDRESSLEVEL.BOX_NUMBER;
|
|
3197
3249
|
this.clearWidget();
|
|
3198
|
-
this.
|
|
3250
|
+
if (this.suggestionLevel !== SuggestionLevelType.None) {
|
|
3251
|
+
this.valueChanged();
|
|
3252
|
+
}
|
|
3199
3253
|
}
|
|
3200
3254
|
/*
|
|
3201
3255
|
if (changes.hasOwnProperty('inputLang') / *&& !changes.addressParams.firstChange* /) {
|
|
@@ -3544,9 +3598,19 @@ let BoxNumberComponent = class BoxNumberComponent {
|
|
|
3544
3598
|
this.sequenceNumber += 1;
|
|
3545
3599
|
this.consumedNumber = this.sequenceNumber;
|
|
3546
3600
|
this.clearSuggestions();
|
|
3601
|
+
if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
|
|
3602
|
+
console.log('do not use suggestions for box number');
|
|
3603
|
+
this.boxNumberChanged.emit(this.searchText);
|
|
3604
|
+
}
|
|
3547
3605
|
}
|
|
3548
3606
|
else {
|
|
3549
|
-
this.
|
|
3607
|
+
if (this.suggestionLevel === SuggestionLevelType.None || this.suggestionLevel === SuggestionLevelType.StreetNumber) {
|
|
3608
|
+
console.log('do not use suggestions for box number');
|
|
3609
|
+
this.boxNumberChanged.emit(this.searchText);
|
|
3610
|
+
}
|
|
3611
|
+
else {
|
|
3612
|
+
this.getTopSuggestions(source);
|
|
3613
|
+
}
|
|
3550
3614
|
}
|
|
3551
3615
|
this.buildInputWordList();
|
|
3552
3616
|
}
|
|
@@ -3802,101 +3866,73 @@ let BoxNumberComponent = class BoxNumberComponent {
|
|
|
3802
3866
|
console.log('box number click');
|
|
3803
3867
|
}
|
|
3804
3868
|
}
|
|
3805
|
-
}
|
|
3806
|
-
BoxNumberComponent
|
|
3807
|
-
{ type:
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
];
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
],
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
],
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
],
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
],
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
],
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
],
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
],
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
],
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
],
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
],
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
]
|
|
3872
|
-
__decorate([
|
|
3873
|
-
Output()
|
|
3874
|
-
], BoxNumberComponent.prototype, "addressChanged", void 0);
|
|
3875
|
-
__decorate([
|
|
3876
|
-
Output()
|
|
3877
|
-
], BoxNumberComponent.prototype, "focusEvent", void 0);
|
|
3878
|
-
__decorate([
|
|
3879
|
-
Output()
|
|
3880
|
-
], BoxNumberComponent.prototype, "blurEvent", void 0);
|
|
3881
|
-
__decorate([
|
|
3882
|
-
Output()
|
|
3883
|
-
], BoxNumberComponent.prototype, "textChangeEvent", void 0);
|
|
3884
|
-
__decorate([
|
|
3885
|
-
Output()
|
|
3886
|
-
], BoxNumberComponent.prototype, "emptyResponseEvent", void 0);
|
|
3887
|
-
__decorate([
|
|
3888
|
-
Output()
|
|
3889
|
-
], BoxNumberComponent.prototype, "clearInputEventEmitter", void 0);
|
|
3890
|
-
__decorate([
|
|
3891
|
-
Output()
|
|
3892
|
-
], BoxNumberComponent.prototype, "prefillEventEmitter", void 0);
|
|
3893
|
-
BoxNumberComponent = __decorate([
|
|
3894
|
-
Component({
|
|
3895
|
-
selector: 'bp-box-number',
|
|
3896
|
-
template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n",
|
|
3897
|
-
styles: [""]
|
|
3898
|
-
})
|
|
3899
|
-
], BoxNumberComponent);
|
|
3869
|
+
}
|
|
3870
|
+
BoxNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, deps: [{ token: AddressService }, { token: LocaleService }, { token: i3.TranslateService }, { token: UnicodeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3871
|
+
BoxNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BoxNumberComponent, selector: "bp-box-number", inputs: { prefillData: "prefillData", showDebugMessageToConsole: "showDebugMessageToConsole", labelResourceKey: "labelResourceKey", maxSuggesionCount: "maxSuggesionCount", visibleSuggesionCount: "visibleSuggesionCount", sortCriteria: "sortCriteria", baseUrl: "baseUrl", addressParams: "addressParams", postalCode: "postalCode", locality: "locality", streetName: "streetName", streetNumber: "streetNumber", selectedAddress: "selectedAddress", notInListAllowed: "notInListAllowed", inputLang: "inputLang", messageOption: "messageOption", isReadonly: "isReadonly", suggestionLevel: "suggestionLevel" }, outputs: { messageChanged: "messageChanged", addressChanged: "addressChanged", focusEvent: "focusEvent", blurEvent: "blurEvent", textChangeEvent: "textChangeEvent", emptyResponseEvent: "emptyResponseEvent", clearInputEventEmitter: "clearInputEventEmitter", prefillEventEmitter: "prefillEventEmitter", boxNumberChanged: "boxNumberChanged" }, viewQueries: [{ propertyName: "boxNumberSearchInput", first: true, predicate: ["boxNumberSearchInput"], descendants: true }, { propertyName: "boxNumberList", first: true, predicate: ["boxNumberList"], 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\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", 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 } });
|
|
3872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BoxNumberComponent, decorators: [{
|
|
3873
|
+
type: Component,
|
|
3874
|
+
args: [{ selector: 'bp-box-number', template: "<span *ngIf=\"labelResourceKey\">{{ labelResourceKey | translate}}</span>\n<div class=\"bpaac-dropdown\">\n <div class=\"bpaac-search-bar\">\n <div class=\"bpaac-input-width\">\n <!-- [disabled]=\"isDisabled()\" -->\n <input type=\"text\" #boxNumberSearchInput class=\"bpaac-input\" \n [readonly]=\"isReadonly\"\n [style.background-color]=\"!isParamsComplete() ? 'lightgrey' : ''\" \n [style.color]=\" getTextColor() \"\n [disabled]=\"!streetNumber || streetNumber.trim().length === 0\" (keydown)=\"checkKeyDown($event)\" \n (input)=\"onInputChange()\" (click)=\"onInputClick()\"\n [(ngModel)]=\"searchText\" id=\"boxNumberInputField\" [attr.title]=\"placeHolderText\" [attr.placeholder]=\"placeHolderText\" autocomplete=\"off\"\n (blur)=\"onBlur($event)\" (focus)=\"onFocus()\" />\n <div id=\"bpaac-clear-boxNb-button\" *ngIf=\"mayShowClearButton()\" (click)=\"clearInput(true)\" class=\"bpaac-clear\">\n </div>\n </div>\n <!--<div ng-transclude></div>-->\n <input id=\"bpaac-boxNb-typeahead\" type=\"text\" disabled autocomplete=\"off\" [(ngModel)]=\"bpTypeAhead\" />\n <span *ngIf=\"addressIsValidated\" class=\"boxNbChekmark\"><span class=\"checkmark\"></span></span>\n </div>\n <div [hidden]=\"collapseDropdown\" class=\"bpaac-dropdown-menu-container\" *ngIf=\"suggestions && suggestions.length>0\">\n <div #boxNumberList [appVisibleSuggestion]=\"visibleSuggesionCount\" id=\"bpaac-box-dropdown\" class=\"bpaac-dropdown-menu\">\n <ul role=\"listbox\" id=\"bpaac-boxNb-suggestionsList\" class=\"list-unstyled\">\n <li role=\"option\" *ngFor=\"let option of suggestions; let idx = index\" [ngClass]=\"{'active':(selectedIndex==idx)}\" \n (mousedown)=\"clickSuggestion($event, option)\"\n (mouseenter)=\"selectedIndex=idx\" (mouseleave)=\"selectedIndex=-1\">\n <span *ngIf=\"option\" [innerHtml]=\"option['not-in-list'] ? emptyResponseText : option.string | highlightSuggestion : wordList\"></span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n", styles: [""] }]
|
|
3875
|
+
}], ctorParameters: function () { return [{ type: AddressService }, { type: LocaleService }, { type: i3.TranslateService }, { type: UnicodeService }]; }, propDecorators: { boxNumberSearchInput: [{
|
|
3876
|
+
type: ViewChild,
|
|
3877
|
+
args: ['boxNumberSearchInput', { static: false }]
|
|
3878
|
+
}], boxNumberList: [{
|
|
3879
|
+
type: ViewChild,
|
|
3880
|
+
args: ['boxNumberList', { static: false }]
|
|
3881
|
+
}], prefillData: [{
|
|
3882
|
+
type: Input
|
|
3883
|
+
}], showDebugMessageToConsole: [{
|
|
3884
|
+
type: Input
|
|
3885
|
+
}], labelResourceKey: [{
|
|
3886
|
+
type: Input
|
|
3887
|
+
}], maxSuggesionCount: [{
|
|
3888
|
+
type: Input
|
|
3889
|
+
}], visibleSuggesionCount: [{
|
|
3890
|
+
type: Input
|
|
3891
|
+
}], sortCriteria: [{
|
|
3892
|
+
type: Input
|
|
3893
|
+
}], baseUrl: [{
|
|
3894
|
+
type: Input
|
|
3895
|
+
}], addressParams: [{
|
|
3896
|
+
type: Input
|
|
3897
|
+
}], postalCode: [{
|
|
3898
|
+
type: Input
|
|
3899
|
+
}], locality: [{
|
|
3900
|
+
type: Input
|
|
3901
|
+
}], streetName: [{
|
|
3902
|
+
type: Input
|
|
3903
|
+
}], streetNumber: [{
|
|
3904
|
+
type: Input
|
|
3905
|
+
}], selectedAddress: [{
|
|
3906
|
+
type: Input
|
|
3907
|
+
}], notInListAllowed: [{
|
|
3908
|
+
type: Input
|
|
3909
|
+
}], inputLang: [{
|
|
3910
|
+
type: Input
|
|
3911
|
+
}], messageOption: [{
|
|
3912
|
+
type: Input
|
|
3913
|
+
}], isReadonly: [{
|
|
3914
|
+
type: Input
|
|
3915
|
+
}], suggestionLevel: [{
|
|
3916
|
+
type: Input
|
|
3917
|
+
}], messageChanged: [{
|
|
3918
|
+
type: Output
|
|
3919
|
+
}], addressChanged: [{
|
|
3920
|
+
type: Output
|
|
3921
|
+
}], focusEvent: [{
|
|
3922
|
+
type: Output
|
|
3923
|
+
}], blurEvent: [{
|
|
3924
|
+
type: Output
|
|
3925
|
+
}], textChangeEvent: [{
|
|
3926
|
+
type: Output
|
|
3927
|
+
}], emptyResponseEvent: [{
|
|
3928
|
+
type: Output
|
|
3929
|
+
}], clearInputEventEmitter: [{
|
|
3930
|
+
type: Output
|
|
3931
|
+
}], prefillEventEmitter: [{
|
|
3932
|
+
type: Output
|
|
3933
|
+
}], boxNumberChanged: [{
|
|
3934
|
+
type: Output
|
|
3935
|
+
}] } });
|
|
3900
3936
|
|
|
3901
3937
|
class PrefillData // extends PrefilledParameters
|
|
3902
3938
|
{
|
|
@@ -3922,7 +3958,9 @@ class PrefillData // extends PrefilledParameters
|
|
|
3922
3958
|
}
|
|
3923
3959
|
}
|
|
3924
3960
|
|
|
3925
|
-
|
|
3961
|
+
const LIB_VERSION = "1.1.3";
|
|
3962
|
+
|
|
3963
|
+
class Nis9Service {
|
|
3926
3964
|
constructor(httpClient) {
|
|
3927
3965
|
this.httpClient = httpClient;
|
|
3928
3966
|
// https://bgs.bpost.be/set-selection-circle?lng=4.360537572541948&lat=50.84063582806037&radius=0.001
|
|
@@ -3935,18 +3973,17 @@ let Nis9Service = class Nis9Service {
|
|
|
3935
3973
|
const apiUrl = `https://bgs.bpost.be/set-selection-circle?lng=${longitude}&lat=${latitude}&radius=0.001`;
|
|
3936
3974
|
return this.httpClient.get(apiUrl);
|
|
3937
3975
|
}
|
|
3938
|
-
}
|
|
3939
|
-
Nis9Service
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
], Nis9Service);
|
|
3976
|
+
}
|
|
3977
|
+
Nis9Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: Nis9Service, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3978
|
+
Nis9Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: Nis9Service, providedIn: 'root' });
|
|
3979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: Nis9Service, decorators: [{
|
|
3980
|
+
type: Injectable,
|
|
3981
|
+
args: [{
|
|
3982
|
+
providedIn: 'root'
|
|
3983
|
+
}]
|
|
3984
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
3948
3985
|
|
|
3949
|
-
|
|
3986
|
+
class LibAddressAutocompleteByComponentComponent {
|
|
3950
3987
|
constructor(nis9Service, httpService) {
|
|
3951
3988
|
this.nis9Service = nis9Service;
|
|
3952
3989
|
this.httpService = httpService;
|
|
@@ -3985,6 +4022,7 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
|
|
|
3985
4022
|
this.visibleSuggestionBoxNbCount = 5;
|
|
3986
4023
|
// boxParams: PrefilledParameters;
|
|
3987
4024
|
this.boxNumberPrefillData = null;
|
|
4025
|
+
this.suggestionLevel = SuggestionLevelType.StreetAndBoxNumber;
|
|
3988
4026
|
this.emittedAddress = null;
|
|
3989
4027
|
this.validationMessage = { messageType: null, translatedMessage: '' };
|
|
3990
4028
|
this.addressCompleteEventEmitter = new EventEmitter();
|
|
@@ -4013,10 +4051,12 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
|
|
|
4013
4051
|
this.setValidationMessageOptionFromInput(option);
|
|
4014
4052
|
}
|
|
4015
4053
|
ngOnInit() {
|
|
4054
|
+
console.info('lib version is:', LIB_VERSION);
|
|
4016
4055
|
//console.warn('lib - ngOnInit');
|
|
4017
4056
|
this.nis9Service.setNis9ServiceURL(this.nis9ServiceURL);
|
|
4018
4057
|
const apiKey = this.isValidData(this.apiKey) ? this.apiKey : this.defaultApiKey;
|
|
4019
4058
|
this.httpService.setApiKey(apiKey);
|
|
4059
|
+
this.httpService.setShowDebugMessageToConsole(this.showDebugMessageToConsole);
|
|
4020
4060
|
if (this.isValidData(this.localityUrl))
|
|
4021
4061
|
this.usedLocalityUrl = this.localityUrl;
|
|
4022
4062
|
if (this.isValidData(this.streetUrl))
|
|
@@ -4045,41 +4085,38 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
|
|
|
4045
4085
|
if (this.showDebugMessageToConsole) {
|
|
4046
4086
|
this.displayParametersChangesToConsole(changes);
|
|
4047
4087
|
}
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
: this.baseUrl + 'street';
|
|
4067
|
-
this.streetUrl=streetUrl;
|
|
4088
|
+
if (changes.hasOwnProperty('apiKey') && !changes['apiKey'].firstChange) {
|
|
4089
|
+
const apiKey = this.apiKey !== null && this.apiKey !== undefined && this.apiKey.length > 0
|
|
4090
|
+
? this.apiKey
|
|
4091
|
+
: this.defaultApiKey;
|
|
4092
|
+
this.httpService.setApiKey(apiKey);
|
|
4093
|
+
}
|
|
4094
|
+
if (changes.hasOwnProperty('localityUrl') && !changes['localityUrl'].firstChange) {
|
|
4095
|
+
const localityUrl = this.localityUrl !== null && this.localityUrl !== undefined && this.localityUrl.length > 0
|
|
4096
|
+
? this.localityUrl
|
|
4097
|
+
: this.baseUrl + 'locality';
|
|
4098
|
+
this.usedLocalityUrl = localityUrl;
|
|
4099
|
+
console.log('ngOnChanges - localityUrl: ', localityUrl);
|
|
4100
|
+
}
|
|
4101
|
+
if (changes.hasOwnProperty('streetUrl') && !changes['streetUrl'].firstChange) {
|
|
4102
|
+
const streetUrl = this.streetUrl !== null && this.streetUrl !== undefined && this.streetUrl.length > 0
|
|
4103
|
+
? this.streetUrl
|
|
4104
|
+
: this.baseUrl + 'street';
|
|
4105
|
+
this.usedStreetUrl = streetUrl;
|
|
4068
4106
|
}
|
|
4069
4107
|
if (changes.hasOwnProperty('streetNumberUrl') && !changes.streetNumberUrl.firstChange) {
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4108
|
+
const streetNumberUrl = this.streetNumberUrl !== null && this.streetNumberUrl !== undefined && this.streetNumberUrl.length > 0
|
|
4109
|
+
? this.streetNumberUrl
|
|
4110
|
+
: this.baseUrl + 'streetNumber';
|
|
4111
|
+
this.usedStreetNumberUrl = streetNumberUrl;
|
|
4074
4112
|
}
|
|
4075
4113
|
if (changes.hasOwnProperty('boxNumberUrl') && !changes.boxNumberUrl.firstChange) {
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4114
|
+
const boxNumberUrl = this.boxNumberUrl !== null && this.boxNumberUrl !== undefined && this.boxNumberUrl.length > 0
|
|
4115
|
+
? this.boxNumberUrl
|
|
4116
|
+
: this.baseUrl + 'boxNumber';
|
|
4117
|
+
this.usedBoxNumberUrl = boxNumberUrl;
|
|
4080
4118
|
}
|
|
4081
|
-
|
|
4082
|
-
if (changes.hasOwnProperty('addressParams') && !changes.addressParams.firstChange) {
|
|
4119
|
+
if (changes.hasOwnProperty('addressParams') && !changes['addressParams'].firstChange) {
|
|
4083
4120
|
// if (changes.hasOwnProperty('addressParams')) {
|
|
4084
4121
|
this.processingPrefillData = true;
|
|
4085
4122
|
this.enterPrefillMode();
|
|
@@ -4106,74 +4143,141 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
|
|
|
4106
4143
|
console.log('lib::checking locality match... ', this.localityPrefillData);
|
|
4107
4144
|
}
|
|
4108
4145
|
}
|
|
4146
|
+
// suggestion level
|
|
4147
|
+
if (changes.hasOwnProperty('suggestionLevel')
|
|
4148
|
+
/*&& !changes.suggestionLevel.firstChange
|
|
4149
|
+
&& !changes.hasOwnProperty('prefillData') && ! this.prefilling*/ ) {
|
|
4150
|
+
/*
|
|
4151
|
+
this.minLevel = ADDRESSLEVEL.STREET_NUMBER;
|
|
4152
|
+
// this.addressIsComplete = false;
|
|
4153
|
+
if (this.showDebugMessageToConsole) {
|
|
4154
|
+
console.warn('street number - ngOnchanges - streetName changes detection');
|
|
4155
|
+
}
|
|
4156
|
+
if (changes.streetName.currentValue === '') {
|
|
4157
|
+
this.clearWidget();
|
|
4158
|
+
this.valueChanged();
|
|
4159
|
+
}
|
|
4160
|
+
*/
|
|
4161
|
+
const sl = Number(changes['suggestionLevel'].currentValue);
|
|
4162
|
+
switch (sl) {
|
|
4163
|
+
case 0:
|
|
4164
|
+
this.suggestionLevel = SuggestionLevelType.None;
|
|
4165
|
+
break;
|
|
4166
|
+
case 1:
|
|
4167
|
+
this.suggestionLevel = SuggestionLevelType.StreetNumber;
|
|
4168
|
+
break;
|
|
4169
|
+
case 2:
|
|
4170
|
+
this.suggestionLevel = SuggestionLevelType.StreetAndBoxNumber;
|
|
4171
|
+
break;
|
|
4172
|
+
}
|
|
4173
|
+
}
|
|
4174
|
+
// showDebugMessageToConsole
|
|
4175
|
+
if (changes.hasOwnProperty('showDebugMessageToConsole')
|
|
4176
|
+
&& !changes['showDebugMessageToConsole'].firstChange) {
|
|
4177
|
+
const sdm2c = changes['showDebugMessageToConsole'].currentValue;
|
|
4178
|
+
if (sdm2c) {
|
|
4179
|
+
this.httpService.setShowDebugMessageToConsole(sdm2c);
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4109
4182
|
}
|
|
4110
4183
|
}
|
|
4111
4184
|
displayParametersChangesToConsole(changes) {
|
|
4112
4185
|
// messageOption
|
|
4113
|
-
if (changes.hasOwnProperty('messageOption') && !changes
|
|
4114
|
-
const wcChanges = changes
|
|
4186
|
+
if (changes.hasOwnProperty('messageOption') && !changes['messageOption'].firstChange) {
|
|
4187
|
+
const wcChanges = changes['messageOption'].currentValue;
|
|
4115
4188
|
console.log('lib widget9 - messageOption', wcChanges);
|
|
4116
4189
|
}
|
|
4117
4190
|
// maxSuggestionLocality
|
|
4118
|
-
if (changes.hasOwnProperty('maxSuggestionLocality') && !changes
|
|
4119
|
-
const wcChanges = changes
|
|
4191
|
+
if (changes.hasOwnProperty('maxSuggestionLocality') && !changes['maxSuggestionLocality'].firstChange) {
|
|
4192
|
+
const wcChanges = changes['maxSuggestionLocality'].currentValue;
|
|
4120
4193
|
console.log('lib widget9 - maxSuggestionLocality', wcChanges);
|
|
4121
4194
|
}
|
|
4122
4195
|
// visibleSuggestionLocalityCount
|
|
4123
|
-
if (changes.hasOwnProperty('visibleSuggestionLocalityCount') && !changes
|
|
4124
|
-
const wcChanges = changes
|
|
4196
|
+
if (changes.hasOwnProperty('visibleSuggestionLocalityCount') && !changes['visibleSuggestionLocalityCount'].firstChange) {
|
|
4197
|
+
const wcChanges = changes['visibleSuggestionLocalityCount'].currentValue;
|
|
4125
4198
|
console.log('lib widget9 - visibleSuggestionLocalityCount', wcChanges);
|
|
4126
4199
|
}
|
|
4127
4200
|
// sortCriteriaLocality
|
|
4128
|
-
if (changes.hasOwnProperty('sortCriteriaLocality') && !changes
|
|
4129
|
-
const wcChanges = changes
|
|
4201
|
+
if (changes.hasOwnProperty('sortCriteriaLocality') && !changes['sortCriteriaLocality'].firstChange) {
|
|
4202
|
+
const wcChanges = changes['sortCriteriaLocality'].currentValue;
|
|
4130
4203
|
console.log('lib widget9 - sortCriteriaLocality', wcChanges);
|
|
4131
4204
|
}
|
|
4132
4205
|
// maxSuggestionStreet
|
|
4133
|
-
if (changes.hasOwnProperty('maxSuggestionStreet') && !changes
|
|
4134
|
-
const wcChanges = changes
|
|
4206
|
+
if (changes.hasOwnProperty('maxSuggestionStreet') && !changes['maxSuggestionStreet'].firstChange) {
|
|
4207
|
+
const wcChanges = changes['maxSuggestionStreet'].currentValue;
|
|
4135
4208
|
console.log('lib widget9 - maxSuggestionStreet', wcChanges);
|
|
4136
4209
|
}
|
|
4137
4210
|
// visibleSuggestionStreetCount
|
|
4138
|
-
if (changes.hasOwnProperty('visibleSuggestionStreetCount') && !changes
|
|
4139
|
-
const wcChanges = changes
|
|
4211
|
+
if (changes.hasOwnProperty('visibleSuggestionStreetCount') && !changes['visibleSuggestionStreetCount'].firstChange) {
|
|
4212
|
+
const wcChanges = changes['visibleSuggestionStreetCount'].currentValue;
|
|
4140
4213
|
console.log('lib widget9 - visibleSuggestionStreetCount', wcChanges);
|
|
4141
4214
|
}
|
|
4142
4215
|
// sortCriteriaStreet
|
|
4143
|
-
if (changes.hasOwnProperty('sortCriteriaStreet') && !changes
|
|
4144
|
-
const wcChanges = changes
|
|
4216
|
+
if (changes.hasOwnProperty('sortCriteriaStreet') && !changes['sortCriteriaStreet'].firstChange) {
|
|
4217
|
+
const wcChanges = changes['sortCriteriaStreet'].currentValue;
|
|
4145
4218
|
console.log('lib widget9 - sortCriteriaStreet', wcChanges);
|
|
4146
4219
|
}
|
|
4147
4220
|
// maxSuggestionStreetNb
|
|
4148
|
-
if (changes.hasOwnProperty('maxSuggestionStreetNb') && !changes
|
|
4149
|
-
const wcChanges = changes
|
|
4221
|
+
if (changes.hasOwnProperty('maxSuggestionStreetNb') && !changes['maxSuggestionStreetNb'].firstChange) {
|
|
4222
|
+
const wcChanges = changes['maxSuggestionStreetNb'].currentValue;
|
|
4150
4223
|
console.log('lib widget9 - maxSuggestionStreetNb', wcChanges);
|
|
4151
4224
|
}
|
|
4152
4225
|
// visibleSuggestionStreetNbCount
|
|
4153
|
-
if (changes.hasOwnProperty('visibleSuggestionStreetNbCount') && !changes
|
|
4154
|
-
const wcChanges = changes
|
|
4226
|
+
if (changes.hasOwnProperty('visibleSuggestionStreetNbCount') && !changes['visibleSuggestionStreetNbCount'].firstChange) {
|
|
4227
|
+
const wcChanges = changes['visibleSuggestionStreetNbCount'].currentValue;
|
|
4155
4228
|
console.log('lib widget9 - visibleSuggestionStreetNbCount', wcChanges);
|
|
4156
4229
|
}
|
|
4157
4230
|
// sortCriteriaStreetNb
|
|
4158
|
-
if (changes.hasOwnProperty('sortCriteriaStreetNb') && !changes
|
|
4159
|
-
const wcChanges = changes
|
|
4231
|
+
if (changes.hasOwnProperty('sortCriteriaStreetNb') && !changes['sortCriteriaStreetNb'].firstChange) {
|
|
4232
|
+
const wcChanges = changes['sortCriteriaStreetNb'].currentValue;
|
|
4160
4233
|
console.log('lib widget9 - sortCriteriaStreetNb', wcChanges);
|
|
4161
4234
|
}
|
|
4162
4235
|
// maxSuggestionBoxNb
|
|
4163
|
-
if (changes.hasOwnProperty('maxSuggestionBoxNb') && !changes
|
|
4164
|
-
const wcChanges = changes
|
|
4236
|
+
if (changes.hasOwnProperty('maxSuggestionBoxNb') && !changes['maxSuggestionBoxNb'].firstChange) {
|
|
4237
|
+
const wcChanges = changes['maxSuggestionBoxNb'].currentValue;
|
|
4165
4238
|
console.log('lib widget9 - maxSuggestionBoxNb', wcChanges);
|
|
4166
4239
|
}
|
|
4167
4240
|
// visibleSuggestionBoxNbCount
|
|
4168
|
-
if (changes.hasOwnProperty('visibleSuggestionBoxNbCount') && !changes
|
|
4169
|
-
const wcChanges = changes
|
|
4241
|
+
if (changes.hasOwnProperty('visibleSuggestionBoxNbCount') && !changes['visibleSuggestionBoxNbCount'].firstChange) {
|
|
4242
|
+
const wcChanges = changes['visibleSuggestionBoxNbCount'].currentValue;
|
|
4170
4243
|
console.log('lib widget9 - visibleSuggestionBoxNbCount', wcChanges);
|
|
4171
4244
|
}
|
|
4172
4245
|
// sortCriteriaBoxNb
|
|
4173
|
-
if (changes.hasOwnProperty('sortCriteriaBoxNb') && !changes
|
|
4174
|
-
const wcChanges = changes
|
|
4246
|
+
if (changes.hasOwnProperty('sortCriteriaBoxNb') && !changes['sortCriteriaBoxNb'].firstChange) {
|
|
4247
|
+
const wcChanges = changes['sortCriteriaBoxNb'].currentValue;
|
|
4175
4248
|
console.log('lib widget9 - sortCriteriaBoxNb', wcChanges);
|
|
4176
4249
|
}
|
|
4250
|
+
// apiKey
|
|
4251
|
+
if (changes.hasOwnProperty('apiKey') && !changes['apiKey'].firstChange) {
|
|
4252
|
+
const wcChanges = changes['apiKey'].currentValue;
|
|
4253
|
+
console.log('lib widget9 - apiKey', wcChanges);
|
|
4254
|
+
}
|
|
4255
|
+
// localityUrl
|
|
4256
|
+
if (changes.hasOwnProperty('localityUrl') && !changes['localityUrl'].firstChange) {
|
|
4257
|
+
const wcChanges = changes['localityUrl'].currentValue;
|
|
4258
|
+
console.log('lib widget9 - localityUrl', wcChanges);
|
|
4259
|
+
console.log('lib widget9 - current localityUrl', this.localityUrl);
|
|
4260
|
+
}
|
|
4261
|
+
// streetUrl
|
|
4262
|
+
if (changes.hasOwnProperty('streetUrl') && !changes['streetUrl'].firstChange) {
|
|
4263
|
+
const wcChanges = changes['streetUrl'].currentValue;
|
|
4264
|
+
console.log('lib widget9 - streetUrl', wcChanges);
|
|
4265
|
+
}
|
|
4266
|
+
// streetNumberUrl
|
|
4267
|
+
if (changes.hasOwnProperty('streetNumberUrl') && !changes['streetNumberUrl'].firstChange) {
|
|
4268
|
+
const wcChanges = changes['streetNumberUrl'].currentValue;
|
|
4269
|
+
console.log('lib widget9 - streetNumberUrl', wcChanges);
|
|
4270
|
+
}
|
|
4271
|
+
// boxNumberUrl
|
|
4272
|
+
if (changes.hasOwnProperty('boxNumberUrl') && !changes['boxNumberUrl'].firstChange) {
|
|
4273
|
+
const wcChanges = changes['boxNumberUrl'].currentValue;
|
|
4274
|
+
console.log('lib widget9 - boxNumberUrl', wcChanges);
|
|
4275
|
+
}
|
|
4276
|
+
// suggestionLevel
|
|
4277
|
+
if (changes.hasOwnProperty('suggestionLevel') && !changes['suggestionLevel'].firstChange) {
|
|
4278
|
+
const wcChanges = changes['suggestionLevel'].currentValue;
|
|
4279
|
+
console.log('lib widget9 - suggestionLevel', wcChanges);
|
|
4280
|
+
}
|
|
4177
4281
|
}
|
|
4178
4282
|
clearWidget() {
|
|
4179
4283
|
this.autocompleteBoxNb.clearWidget();
|
|
@@ -4424,6 +4528,9 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
|
|
|
4424
4528
|
this.autocompleteStreetNb.addressIsComplete = addressIsComplete;
|
|
4425
4529
|
}
|
|
4426
4530
|
this.clearInputEventEmitter.emit(event);
|
|
4531
|
+
if (this.showDebugMessageToConsole) {
|
|
4532
|
+
console.log('lib::onClearInputEventEmitter', 'emitted address:' + JSON.stringify(this.emittedAddress), 'nextAddress:' + JSON.stringify(nextAddress));
|
|
4533
|
+
}
|
|
4427
4534
|
if (this.emittedAddress !== null) {
|
|
4428
4535
|
if (nextAddress !== undefined && nextAddress !== null && nextAddress.hasOwnProperty('latitude') && nextAddress.hasOwnProperty('longitude')) {
|
|
4429
4536
|
const latitude = nextAddress.latitude;
|
|
@@ -4714,6 +4821,29 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
|
|
|
4714
4821
|
this.notifyAddressComplete();
|
|
4715
4822
|
}
|
|
4716
4823
|
}
|
|
4824
|
+
setAddressStreetNumber(streetNumber) {
|
|
4825
|
+
this.streetNumberAddress = this.streetAddress;
|
|
4826
|
+
this.selectedAddress = this.streetAddress;
|
|
4827
|
+
this.selectedAddress.streetNumber = streetNumber;
|
|
4828
|
+
/*
|
|
4829
|
+
this.streetNumber = streetNumber;
|
|
4830
|
+
*/
|
|
4831
|
+
//this.notifyAddressComplete();
|
|
4832
|
+
this.streetNumber = streetNumber;
|
|
4833
|
+
this.boxNumber = '';
|
|
4834
|
+
this.selectedAddress.boxNumber = '';
|
|
4835
|
+
this.addressCompleteEventEmitter.emit(this.selectedAddress);
|
|
4836
|
+
this.emittedAddress = this.selectedAddress;
|
|
4837
|
+
console.log('set street number value:', streetNumber, 'this.streetNumber:' + this.streetNumber, 'this.minLevel:' + this.minLevel);
|
|
4838
|
+
}
|
|
4839
|
+
setAddressBoxNumber(boxNumber) {
|
|
4840
|
+
console.log('set box number value:', boxNumber);
|
|
4841
|
+
//this.streetNumberAddress = this.streetAddress;
|
|
4842
|
+
this.selectedAddress = this.streetNumberAddress;
|
|
4843
|
+
this.selectedAddress.boxNumber = boxNumber;
|
|
4844
|
+
this.boxNumber = boxNumber;
|
|
4845
|
+
this.notifyAddressComplete();
|
|
4846
|
+
}
|
|
4717
4847
|
setLanguage(lang) {
|
|
4718
4848
|
this.selectedLanguage = lang;
|
|
4719
4849
|
}
|
|
@@ -4981,238 +5111,109 @@ let LibAddressAutocompleteByComponentComponent = class LibAddressAutocompleteByC
|
|
|
4981
5111
|
}
|
|
4982
5112
|
this.quitPrefillMode();
|
|
4983
5113
|
}
|
|
4984
|
-
}
|
|
4985
|
-
LibAddressAutocompleteByComponentComponent
|
|
4986
|
-
{ type:
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
],
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
],
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
],
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
],
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
],
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
],
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
],
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
],
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
],
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
],
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
],
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "maxSuggestionBoxNb", void 0);
|
|
5070
|
-
__decorate([
|
|
5071
|
-
Input()
|
|
5072
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "visibleSuggestionBoxNbCount", void 0);
|
|
5073
|
-
__decorate([
|
|
5074
|
-
Input()
|
|
5075
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "sortCriteriaBoxNb", void 0);
|
|
5076
|
-
__decorate([
|
|
5077
|
-
Output()
|
|
5078
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "addressCompleteEventEmitter", void 0);
|
|
5079
|
-
__decorate([
|
|
5080
|
-
Output()
|
|
5081
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "validationMessageEventEmitter", void 0);
|
|
5082
|
-
__decorate([
|
|
5083
|
-
Output()
|
|
5084
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "clearInputEventEmitter", void 0);
|
|
5085
|
-
__decorate([
|
|
5086
|
-
Input()
|
|
5087
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "apiKey", void 0);
|
|
5088
|
-
__decorate([
|
|
5089
|
-
Input()
|
|
5090
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "isReadonly", void 0);
|
|
5091
|
-
__decorate([
|
|
5092
|
-
Input()
|
|
5093
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "nis9InResponse", void 0);
|
|
5094
|
-
__decorate([
|
|
5095
|
-
Input()
|
|
5096
|
-
], LibAddressAutocompleteByComponentComponent.prototype, "nis9ServiceURL", void 0);
|
|
5097
|
-
LibAddressAutocompleteByComponentComponent = __decorate([
|
|
5098
|
-
Component({
|
|
5099
|
-
selector: 'bp-lib-address-autocomplete-by-component',
|
|
5100
|
-
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 (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"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 (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"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 (addressChanged)=\"setAddress($event, 2)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreetNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetNumberPrefillEvent($event)\"></bp-street-number>\r\n\r\n <bp-box-number class=\"aacwidget-address-boxnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"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 (messageChanged)=\"setValidationMessage($event)\"\r\n (addressChanged)=\"setAddress($event, 1)\" \r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetBoxNumber($event, false)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onBoxNumberPrefillEvent($event)\"></bp-box-number>\r\n</div>",
|
|
5101
|
-
styles: [""]
|
|
5102
|
-
})
|
|
5103
|
-
], LibAddressAutocompleteByComponentComponent);
|
|
5104
|
-
|
|
5105
|
-
let HighlightSuggestionPipe = class HighlightSuggestionPipe {
|
|
5106
|
-
constructor(sanitizer) {
|
|
5107
|
-
this.sanitizer = sanitizer;
|
|
5108
|
-
}
|
|
5109
|
-
transform(value, args) {
|
|
5110
|
-
if (!args) {
|
|
5111
|
-
return value;
|
|
5112
|
-
}
|
|
5113
|
-
if (Array.isArray(args) && args.length > 1) {
|
|
5114
|
-
return this.transformForArray(value, args);
|
|
5115
|
-
}
|
|
5116
|
-
if (args === '.') {
|
|
5117
|
-
args = '\\.';
|
|
5118
|
-
}
|
|
5119
|
-
else if (Array.isArray(args) && args.length === 1) {
|
|
5120
|
-
if (args[0] === '.') {
|
|
5121
|
-
args[0] = '\\.';
|
|
5122
|
-
}
|
|
5123
|
-
}
|
|
5124
|
-
// Match in a case insensitive manner
|
|
5125
|
-
const re = new RegExp(args, 'gi');
|
|
5126
|
-
const match = value.match(re);
|
|
5127
|
-
// If there's no match, just return the original value.
|
|
5128
|
-
if (!match) {
|
|
5129
|
-
return value;
|
|
5130
|
-
}
|
|
5131
|
-
/* console.warn('HighlightSuggestionPipe::transform: value=' + value);
|
|
5132
|
-
console.warn('HighlightSuggestionPipe::transform: args=' + args);
|
|
5133
|
-
console.warn('HighlightSuggestionPipe::transform: match=' + match); */
|
|
5134
|
-
const replacedValue = value.replace(re, '<span style=\'font-weight: bold;\'>' + match[0] + '</span>');
|
|
5135
|
-
// console.warn('HighlightSuggestionPipe::transform: replacedValue=' + replacedValue);
|
|
5136
|
-
return this.sanitizer.bypassSecurityTrustHtml(replacedValue);
|
|
5137
|
-
}
|
|
5138
|
-
transformForArray(value, args) {
|
|
5139
|
-
let query = '';
|
|
5140
|
-
let ix = 0;
|
|
5141
|
-
for (const word of args) {
|
|
5142
|
-
ix++;
|
|
5143
|
-
if (ix < args.length) {
|
|
5144
|
-
query = query.concat(word + '|');
|
|
5145
|
-
}
|
|
5146
|
-
else {
|
|
5147
|
-
query = query.concat(word);
|
|
5148
|
-
}
|
|
5149
|
-
}
|
|
5150
|
-
// console.warn('HighlightSuggestionPipe::transformForArray', value, args, query);
|
|
5151
|
-
const replacedValue = value.replace(new RegExp('(' + query + ')', 'gi'), '<span style="font-weight: bold;">$1</span>');
|
|
5152
|
-
return this.sanitizer.bypassSecurityTrustHtml(replacedValue);
|
|
5153
|
-
}
|
|
5154
|
-
};
|
|
5155
|
-
HighlightSuggestionPipe.ctorParameters = () => [
|
|
5156
|
-
{ type: DomSanitizer }
|
|
5157
|
-
];
|
|
5158
|
-
HighlightSuggestionPipe = __decorate([
|
|
5159
|
-
Pipe({
|
|
5160
|
-
name: 'highlightSuggestion'
|
|
5161
|
-
})
|
|
5162
|
-
], HighlightSuggestionPipe);
|
|
5163
|
-
|
|
5164
|
-
let VisibleSuggestionDirective = class VisibleSuggestionDirective {
|
|
5165
|
-
constructor(el, renderer) {
|
|
5166
|
-
this.el = el;
|
|
5167
|
-
this.renderer = renderer;
|
|
5168
|
-
}
|
|
5169
|
-
ngAfterViewChecked() {
|
|
5170
|
-
this.showHeight(this.el.nativeElement, this.appVisibleSuggestion);
|
|
5171
|
-
}
|
|
5172
|
-
showHeight(parent, count) {
|
|
5173
|
-
if (!parent) {
|
|
5174
|
-
return;
|
|
5175
|
-
}
|
|
5176
|
-
// const children = parent.getElementsByClassName('list-option');
|
|
5177
|
-
// const children = parent.querySelectorAll('li');
|
|
5178
|
-
const children = parent.firstElementChild.children;
|
|
5179
|
-
if (!children || children.length === 0) {
|
|
5180
|
-
return;
|
|
5181
|
-
}
|
|
5182
|
-
const sum = Array.from(children).slice(0, count).reduce((acc, ele) => {
|
|
5183
|
-
return acc + DomHandler.getOuterHeight(ele);
|
|
5184
|
-
}, 7);
|
|
5185
|
-
this.renderer.setStyle(this.el.nativeElement, 'maxHeight', `${sum}px`);
|
|
5186
|
-
// this.el.nativeElement.style.maxHeight = `${sum}px`;
|
|
5187
|
-
}
|
|
5188
|
-
};
|
|
5189
|
-
VisibleSuggestionDirective.ctorParameters = () => [
|
|
5190
|
-
{ type: ElementRef },
|
|
5191
|
-
{ type: Renderer2 }
|
|
5192
|
-
];
|
|
5193
|
-
__decorate([
|
|
5194
|
-
Input()
|
|
5195
|
-
], VisibleSuggestionDirective.prototype, "appVisibleSuggestion", void 0);
|
|
5196
|
-
VisibleSuggestionDirective = __decorate([
|
|
5197
|
-
Directive({
|
|
5198
|
-
selector: '[appVisibleSuggestion]'
|
|
5199
|
-
})
|
|
5200
|
-
], VisibleSuggestionDirective);
|
|
5114
|
+
}
|
|
5115
|
+
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 });
|
|
5116
|
+
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", suggestionLevel: "suggestionLevel", apiKey: "apiKey", isReadonly: "isReadonly", nis9InResponse: "nis9InResponse", nis9ServiceURL: "nis9ServiceURL" }, outputs: { addressCompleteEventEmitter: "addressCompleteEventEmitter", validationMessageEventEmitter: "validationMessageEventEmitter", clearInputEventEmitter: "clearInputEventEmitter" }, 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 (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"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 (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"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 (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)\"></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 (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)\"></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"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter"] }, { type: StreetComponent, selector: "bp-street", inputs: ["labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "prefillData", "showDebugMessageToConsole", "postalCode", "locality", "inputText", "messageOption", "inputLang", "isReadonly"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "clearInputEventEmitter", "prefillEventEmitter"] }, { type: StreetNumberComponent, selector: "bp-street-number", inputs: ["prefillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "notInListAllowed", "selectedAddress", "inputLang", "messageOption", "inputText", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "streetNumberChanged"] }, { type: BoxNumberComponent, selector: "bp-box-number", inputs: ["prefillData", "showDebugMessageToConsole", "labelResourceKey", "maxSuggesionCount", "visibleSuggesionCount", "sortCriteria", "baseUrl", "addressParams", "postalCode", "locality", "streetName", "streetNumber", "selectedAddress", "notInListAllowed", "inputLang", "messageOption", "isReadonly", "suggestionLevel"], outputs: ["messageChanged", "addressChanged", "focusEvent", "blurEvent", "textChangeEvent", "emptyResponseEvent", "clearInputEventEmitter", "prefillEventEmitter", "boxNumberChanged"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
5117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentComponent, decorators: [{
|
|
5118
|
+
type: Component,
|
|
5119
|
+
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 (addressChanged)=\"setAddress($event, 4)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\" \r\n (textChangeEvent)=\"resetLocality($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onLocalityPrefillEvent($event)\"></bp-locality>\r\n\r\n <bp-street class=\"aacwidget-address-street\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"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 (addressChanged)=\"setAddress($event, 3)\"\r\n (messageChanged)=\"setValidationMessage($event)\"\r\n (focusEvent)=\"changeMinLevel($event)\"\r\n (textChangeEvent)=\"resetStreet($event)\"\r\n (clearInputEventEmitter)=\"onClearInputEventEmitter($event)\"\r\n (prefillEventEmitter)=\"onStreetPrefillEvent($event)\"></bp-street>\r\n\r\n <bp-street-number class=\"aacwidget-address-streetnumber\"\r\n [isReadonly]=\"isReadonly\"\r\n [showDebugMessageToConsole]=\"showDebugMessageToConsole\"\r\n [baseUrl]=\"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 (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)\"></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 (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)\"></bp-box-number>\r\n</div>", styles: [""] }]
|
|
5120
|
+
}], ctorParameters: function () { return [{ type: Nis9Service }, { type: HttpService }]; }, propDecorators: { autocompleteLocality: [{
|
|
5121
|
+
type: ViewChild,
|
|
5122
|
+
args: [LocalityComponent, { static: false }]
|
|
5123
|
+
}], autocompleteStreet: [{
|
|
5124
|
+
type: ViewChild,
|
|
5125
|
+
args: [StreetComponent, { static: false }]
|
|
5126
|
+
}], autocompleteStreetNb: [{
|
|
5127
|
+
type: ViewChild,
|
|
5128
|
+
args: [StreetNumberComponent, { static: false }]
|
|
5129
|
+
}], autocompleteBoxNb: [{
|
|
5130
|
+
type: ViewChild,
|
|
5131
|
+
args: [BoxNumberComponent, { static: false }]
|
|
5132
|
+
}], inputLang: [{
|
|
5133
|
+
type: Input
|
|
5134
|
+
}], clearInput: [{
|
|
5135
|
+
type: Input
|
|
5136
|
+
}], validationMessageOption: [{
|
|
5137
|
+
type: Input
|
|
5138
|
+
}], defaultLang: [{
|
|
5139
|
+
type: Input
|
|
5140
|
+
}], showDebugMessageToConsole: [{
|
|
5141
|
+
type: Input
|
|
5142
|
+
}], minLevel: [{
|
|
5143
|
+
type: Input
|
|
5144
|
+
}], notInListAllowed: [{
|
|
5145
|
+
type: Input
|
|
5146
|
+
}], addressParams: [{
|
|
5147
|
+
type: Input
|
|
5148
|
+
}], messageOption: [{
|
|
5149
|
+
type: Input
|
|
5150
|
+
}], localityUrl: [{
|
|
5151
|
+
type: Input
|
|
5152
|
+
}], maxSuggestionLocality: [{
|
|
5153
|
+
type: Input
|
|
5154
|
+
}], visibleSuggestionLocalityCount: [{
|
|
5155
|
+
type: Input
|
|
5156
|
+
}], sortCriteriaLocality: [{
|
|
5157
|
+
type: Input
|
|
5158
|
+
}], streetUrl: [{
|
|
5159
|
+
type: Input
|
|
5160
|
+
}], maxSuggestionStreet: [{
|
|
5161
|
+
type: Input
|
|
5162
|
+
}], visibleSuggestionStreetCount: [{
|
|
5163
|
+
type: Input
|
|
5164
|
+
}], sortCriteriaStreet: [{
|
|
5165
|
+
type: Input
|
|
5166
|
+
}], streetNumberUrl: [{
|
|
5167
|
+
type: Input
|
|
5168
|
+
}], maxSuggestionStreetNb: [{
|
|
5169
|
+
type: Input
|
|
5170
|
+
}], visibleSuggestionStreetNbCount: [{
|
|
5171
|
+
type: Input
|
|
5172
|
+
}], sortCriteriaStreetNb: [{
|
|
5173
|
+
type: Input
|
|
5174
|
+
}], boxNumberUrl: [{
|
|
5175
|
+
type: Input
|
|
5176
|
+
}], maxSuggestionBoxNb: [{
|
|
5177
|
+
type: Input
|
|
5178
|
+
}], visibleSuggestionBoxNbCount: [{
|
|
5179
|
+
type: Input
|
|
5180
|
+
}], sortCriteriaBoxNb: [{
|
|
5181
|
+
type: Input
|
|
5182
|
+
}], suggestionLevel: [{
|
|
5183
|
+
type: Input
|
|
5184
|
+
}], addressCompleteEventEmitter: [{
|
|
5185
|
+
type: Output
|
|
5186
|
+
}], validationMessageEventEmitter: [{
|
|
5187
|
+
type: Output
|
|
5188
|
+
}], clearInputEventEmitter: [{
|
|
5189
|
+
type: Output
|
|
5190
|
+
}], apiKey: [{
|
|
5191
|
+
type: Input
|
|
5192
|
+
}], isReadonly: [{
|
|
5193
|
+
type: Input
|
|
5194
|
+
}], nis9InResponse: [{
|
|
5195
|
+
type: Input
|
|
5196
|
+
}], nis9ServiceURL: [{
|
|
5197
|
+
type: Input
|
|
5198
|
+
}] } });
|
|
5201
5199
|
|
|
5202
|
-
|
|
5203
|
-
}
|
|
5204
|
-
LibAddressAutocompleteByComponentModule =
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5200
|
+
class LibAddressAutocompleteByComponentModule {
|
|
5201
|
+
}
|
|
5202
|
+
LibAddressAutocompleteByComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5203
|
+
LibAddressAutocompleteByComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentModule, declarations: [HighlightSuggestionPipe,
|
|
5204
|
+
VisibleSuggestionDirective,
|
|
5205
|
+
LibAddressAutocompleteByComponentComponent,
|
|
5206
|
+
LocalityComponent,
|
|
5207
|
+
StreetComponent,
|
|
5208
|
+
StreetNumberComponent,
|
|
5209
|
+
BoxNumberComponent], imports: [CommonModule,
|
|
5210
|
+
// BrowserModule,
|
|
5211
|
+
// BrowserAnimationsModule,
|
|
5212
|
+
HttpClientModule,
|
|
5213
|
+
FormsModule,
|
|
5214
|
+
ReactiveFormsModule,
|
|
5215
|
+
TranslateModule], exports: [LibAddressAutocompleteByComponentComponent] });
|
|
5216
|
+
LibAddressAutocompleteByComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentModule, imports: [[
|
|
5216
5217
|
CommonModule,
|
|
5217
5218
|
// BrowserModule,
|
|
5218
5219
|
// BrowserAnimationsModule,
|
|
@@ -5220,12 +5221,33 @@ LibAddressAutocompleteByComponentModule = __decorate([
|
|
|
5220
5221
|
FormsModule,
|
|
5221
5222
|
ReactiveFormsModule,
|
|
5222
5223
|
TranslateModule,
|
|
5223
|
-
]
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5224
|
+
]] });
|
|
5225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: LibAddressAutocompleteByComponentModule, decorators: [{
|
|
5226
|
+
type: NgModule,
|
|
5227
|
+
args: [{
|
|
5228
|
+
declarations: [
|
|
5229
|
+
HighlightSuggestionPipe,
|
|
5230
|
+
VisibleSuggestionDirective,
|
|
5231
|
+
LibAddressAutocompleteByComponentComponent,
|
|
5232
|
+
LocalityComponent,
|
|
5233
|
+
StreetComponent,
|
|
5234
|
+
StreetNumberComponent,
|
|
5235
|
+
BoxNumberComponent
|
|
5236
|
+
],
|
|
5237
|
+
imports: [
|
|
5238
|
+
CommonModule,
|
|
5239
|
+
// BrowserModule,
|
|
5240
|
+
// BrowserAnimationsModule,
|
|
5241
|
+
HttpClientModule,
|
|
5242
|
+
FormsModule,
|
|
5243
|
+
ReactiveFormsModule,
|
|
5244
|
+
TranslateModule,
|
|
5245
|
+
],
|
|
5246
|
+
exports: [
|
|
5247
|
+
LibAddressAutocompleteByComponentComponent,
|
|
5248
|
+
]
|
|
5249
|
+
}]
|
|
5250
|
+
}] });
|
|
5229
5251
|
|
|
5230
5252
|
class PrefilledParameters {
|
|
5231
5253
|
constructor(init) {
|
|
@@ -5257,5 +5279,5 @@ class PrefilledParameters {
|
|
|
5257
5279
|
* Generated bundle index. Do not edit.
|
|
5258
5280
|
*/
|
|
5259
5281
|
|
|
5260
|
-
export { ADDRESSLEVEL, LibAddressAutocompleteByComponentComponent, LibAddressAutocompleteByComponentModule, LibAddressAutocompleteByComponentService, PrefilledParameters,
|
|
5261
|
-
//# sourceMappingURL=bpost-bp-address-auto-complete-by-component.
|
|
5282
|
+
export { ADDRESSLEVEL, InputNameType, LibAddressAutocompleteByComponentComponent, LibAddressAutocompleteByComponentModule, LibAddressAutocompleteByComponentService, PrefilledParameters, SourceType, SuggestionLevelType, ValidationMessageOptionType, ValidationMessageType };
|
|
5283
|
+
//# sourceMappingURL=bpost-bp-address-auto-complete-by-component.mjs.map
|