@bpost/bp-address-auto-complete-by-component 1.1.1 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/bpost-bp-address-auto-complete-by-component.d.ts +1 -11
  2. package/esm2020/bpost-bp-address-auto-complete-by-component.mjs +5 -0
  3. package/esm2020/lib/box-number/box-number.component.mjs +873 -0
  4. package/esm2020/lib/enum/address-level.enum.mjs +8 -0
  5. package/esm2020/lib/enum/index.mjs +7 -0
  6. package/esm2020/lib/enum/input-name.enum.mjs +8 -0
  7. package/esm2020/lib/enum/source-type.enum.mjs +5 -0
  8. package/esm2020/lib/enum/suggestion-level-type.enum.mjs +8 -0
  9. package/esm2020/lib/enum/validation-message-option-type.enum.mjs +6 -0
  10. package/esm2020/lib/enum/validation-message-type.enum.mjs +7 -0
  11. package/esm2020/lib/lib-address-autocomplete-by-component.component.mjs +1383 -0
  12. package/esm2020/lib/lib-address-autocomplete-by-component.module.mjs +65 -0
  13. package/esm2020/lib/lib-address-autocomplete-by-component.service.mjs +14 -0
  14. package/esm2020/lib/locality/locality.component.mjs +747 -0
  15. package/{esm2015/lib/model/Locality.js → esm2020/lib/model/Box.mjs} +2 -2
  16. package/esm2020/lib/model/Locality.mjs +30 -0
  17. package/esm2020/lib/model/Street.mjs +30 -0
  18. package/esm2020/lib/model/query-parameters.model.mjs +21 -0
  19. package/esm2020/lib/services/adress.service.mjs +64 -0
  20. package/esm2020/lib/services/http.service.mjs +57 -0
  21. package/esm2020/lib/services/locale.service.mjs +37 -0
  22. package/esm2020/lib/services/nis9.service.mjs +26 -0
  23. package/esm2020/lib/services/unicode.service.mjs +376 -0
  24. package/esm2020/lib/street/street.component.mjs +735 -0
  25. package/esm2020/lib/street-number/street-number.component.mjs +967 -0
  26. package/esm2020/lib/utils/constants.mjs +2 -0
  27. package/esm2020/lib/utils/domhandler.mjs +47 -0
  28. package/esm2020/lib/utils/highlight-suggestion.pipe.mjs +62 -0
  29. package/{esm5/lib/utils/prefill-data.js → esm2020/lib/utils/prefill-data.mjs} +5 -7
  30. package/esm2020/lib/utils/prefilled-parameters.mjs +23 -0
  31. package/esm2020/lib/utils/preflll.event.mjs +7 -0
  32. package/esm2020/lib/utils/visible-suggestion.directive.mjs +39 -0
  33. package/esm2020/public-api.mjs +9 -0
  34. package/fesm2015/{bpost-bp-address-auto-complete-by-component.js → bpost-bp-address-auto-complete-by-component.mjs} +1141 -808
  35. package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs.map +1 -0
  36. package/{fesm5/bpost-bp-address-auto-complete-by-component.js → fesm2020/bpost-bp-address-auto-complete-by-component.mjs} +2073 -1945
  37. package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs.map +1 -0
  38. package/lib/box-number/box-number.component.d.ts +11 -2
  39. package/lib/enum/index.d.ts +3 -0
  40. package/lib/enum/suggestion-level-type.enum.d.ts +5 -0
  41. package/lib/lib-address-autocomplete-by-component.component.d.ts +9 -0
  42. package/lib/lib-address-autocomplete-by-component.module.d.ts +15 -0
  43. package/lib/lib-address-autocomplete-by-component.service.d.ts +3 -0
  44. package/lib/locality/locality.component.d.ts +3 -0
  45. package/lib/services/adress.service.d.ts +3 -0
  46. package/lib/services/http.service.d.ts +5 -0
  47. package/lib/services/locale.service.d.ts +3 -0
  48. package/lib/services/nis9.service.d.ts +3 -0
  49. package/lib/services/unicode.service.d.ts +3 -0
  50. package/lib/street/street.component.d.ts +3 -0
  51. package/lib/street-number/street-number.component.d.ts +9 -1
  52. package/lib/utils/constants.d.ts +1 -0
  53. package/lib/utils/highlight-suggestion.pipe.d.ts +3 -0
  54. package/lib/utils/visible-suggestion.directive.d.ts +3 -0
  55. package/package.json +23 -13
  56. package/VERSION.md +0 -159
  57. package/address-complete-2020-04-15_23-29-54.png +0 -0
  58. package/address-incomplete-2020-04-15_23-28-40.png +0 -0
  59. package/bpost-bp-address-auto-complete-by-component.metadata.json +0 -1
  60. package/bundles/bpost-bp-address-auto-complete-by-component.umd.js +0 -5689
  61. package/bundles/bpost-bp-address-auto-complete-by-component.umd.js.map +0 -1
  62. package/bundles/bpost-bp-address-auto-complete-by-component.umd.min.js +0 -16
  63. package/bundles/bpost-bp-address-auto-complete-by-component.umd.min.js.map +0 -1
  64. package/esm2015/bpost-bp-address-auto-complete-by-component.js +0 -16
  65. package/esm2015/lib/box-number/box-number.component.js +0 -811
  66. package/esm2015/lib/enum/address-level.enum.js +0 -8
  67. package/esm2015/lib/enum/index.js +0 -4
  68. package/esm2015/lib/enum/input-name.enum.js +0 -8
  69. package/esm2015/lib/enum/source-type.enum.js +0 -5
  70. package/esm2015/lib/enum/validation-message-option-type.enum.js +0 -6
  71. package/esm2015/lib/enum/validation-message-type.enum.js +0 -7
  72. package/esm2015/lib/lib-address-autocomplete-by-component.component.js +0 -1167
  73. package/esm2015/lib/lib-address-autocomplete-by-component.module.js +0 -42
  74. package/esm2015/lib/lib-address-autocomplete-by-component.service.js +0 -14
  75. package/esm2015/lib/locality/locality.component.js +0 -769
  76. package/esm2015/lib/model/Box.js +0 -30
  77. package/esm2015/lib/model/Street.js +0 -30
  78. package/esm2015/lib/model/query-parameters.model.js +0 -21
  79. package/esm2015/lib/services/adress.service.js +0 -68
  80. package/esm2015/lib/services/http.service.js +0 -53
  81. package/esm2015/lib/services/locale.service.js +0 -39
  82. package/esm2015/lib/services/nis9.service.js +0 -30
  83. package/esm2015/lib/services/unicode.service.js +0 -376
  84. package/esm2015/lib/street/street.component.js +0 -749
  85. package/esm2015/lib/street-number/street-number.component.js +0 -900
  86. package/esm2015/lib/utils/domhandler.js +0 -47
  87. package/esm2015/lib/utils/highlight-suggestion.pipe.js +0 -63
  88. package/esm2015/lib/utils/prefill-data.js +0 -24
  89. package/esm2015/lib/utils/prefilled-parameters.js +0 -23
  90. package/esm2015/lib/utils/preflll.event.js +0 -7
  91. package/esm2015/lib/utils/visible-suggestion.directive.js +0 -42
  92. package/esm2015/public-api.js +0 -9
  93. package/esm5/bpost-bp-address-auto-complete-by-component.js +0 -16
  94. package/esm5/lib/box-number/box-number.component.js +0 -831
  95. package/esm5/lib/enum/address-level.enum.js +0 -8
  96. package/esm5/lib/enum/index.js +0 -4
  97. package/esm5/lib/enum/input-name.enum.js +0 -8
  98. package/esm5/lib/enum/source-type.enum.js +0 -5
  99. package/esm5/lib/enum/validation-message-option-type.enum.js +0 -6
  100. package/esm5/lib/enum/validation-message-type.enum.js +0 -7
  101. package/esm5/lib/lib-address-autocomplete-by-component.component.js +0 -1183
  102. package/esm5/lib/lib-address-autocomplete-by-component.module.js +0 -45
  103. package/esm5/lib/lib-address-autocomplete-by-component.service.js +0 -16
  104. package/esm5/lib/locality/locality.component.js +0 -825
  105. package/esm5/lib/model/Box.js +0 -35
  106. package/esm5/lib/model/Locality.js +0 -35
  107. package/esm5/lib/model/Street.js +0 -35
  108. package/esm5/lib/model/query-parameters.model.js +0 -23
  109. package/esm5/lib/services/adress.service.js +0 -72
  110. package/esm5/lib/services/http.service.js +0 -55
  111. package/esm5/lib/services/locale.service.js +0 -40
  112. package/esm5/lib/services/nis9.service.js +0 -31
  113. package/esm5/lib/services/unicode.service.js +0 -379
  114. package/esm5/lib/street/street.component.js +0 -794
  115. package/esm5/lib/street-number/street-number.component.js +0 -920
  116. package/esm5/lib/utils/domhandler.js +0 -51
  117. package/esm5/lib/utils/highlight-suggestion.pipe.js +0 -75
  118. package/esm5/lib/utils/prefilled-parameters.js +0 -25
  119. package/esm5/lib/utils/preflll.event.js +0 -9
  120. package/esm5/lib/utils/visible-suggestion.directive.js +0 -43
  121. package/esm5/public-api.js +0 -9
  122. package/fesm2015/bpost-bp-address-auto-complete-by-component.js.map +0 -1
  123. package/fesm5/bpost-bp-address-auto-complete-by-component.js.map +0 -1
  124. package/install-and-start-demo.bat +0 -11
  125. package/resources/assets/aacwidget/i18n/de.json +0 -62
  126. package/resources/assets/aacwidget/i18n/en.json +0 -62
  127. package/resources/assets/aacwidget/i18n/fr.json +0 -62
  128. package/resources/assets/aacwidget/i18n/nl.json +0 -62
  129. package/resources/assets/aacwidget/scss/aacwidget-custom.scss +0 -81
  130. package/resources/assets/aacwidget/scss/aacwidget-default.scss +0 -424
  131. package/tutorial/aacwidget-tutorial/.editorconfig +0 -16
  132. package/tutorial/aacwidget-tutorial/angular.json +0 -128
  133. package/tutorial/aacwidget-tutorial/browserslist +0 -13
  134. package/tutorial/aacwidget-tutorial/e2e/protractor.conf.js +0 -32
  135. package/tutorial/aacwidget-tutorial/e2e/src/app.e2e-spec.ts +0 -23
  136. package/tutorial/aacwidget-tutorial/e2e/src/app.po.ts +0 -11
  137. package/tutorial/aacwidget-tutorial/e2e/tsconfig.json +0 -13
  138. package/tutorial/aacwidget-tutorial/karma.conf.js +0 -32
  139. package/tutorial/aacwidget-tutorial/package-lock.json +0 -13314
  140. package/tutorial/aacwidget-tutorial/package.json +0 -49
  141. package/tutorial/aacwidget-tutorial/src/app/app-routing.module.ts +0 -18
  142. package/tutorial/aacwidget-tutorial/src/app/app.component.html +0 -6
  143. package/tutorial/aacwidget-tutorial/src/app/app.component.scss +0 -0
  144. package/tutorial/aacwidget-tutorial/src/app/app.component.spec.ts +0 -35
  145. package/tutorial/aacwidget-tutorial/src/app/app.component.ts +0 -28
  146. package/tutorial/aacwidget-tutorial/src/app/app.module.ts +0 -47
  147. package/tutorial/aacwidget-tutorial/src/app/widget-full/widget-full.component.html +0 -57
  148. package/tutorial/aacwidget-tutorial/src/app/widget-full/widget-full.component.scss +0 -0
  149. package/tutorial/aacwidget-tutorial/src/app/widget-full/widget-full.component.ts +0 -160
  150. package/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.html +0 -20
  151. package/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.scss +0 -0
  152. package/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.spec.ts +0 -25
  153. package/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.ts +0 -49
  154. package/tutorial/aacwidget-tutorial/src/assets/.gitkeep +0 -0
  155. package/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/de.json +0 -62
  156. package/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/en.json +0 -62
  157. package/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/fr.json +0 -62
  158. package/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/nl.json +0 -62
  159. package/tutorial/aacwidget-tutorial/src/assets/aacwidget/scss/aacwidget-custom.scss +0 -81
  160. package/tutorial/aacwidget-tutorial/src/assets/aacwidget/scss/aacwidget-default.scss +0 -424
  161. package/tutorial/aacwidget-tutorial/src/environments/environment.prod.ts +0 -3
  162. package/tutorial/aacwidget-tutorial/src/environments/environment.ts +0 -16
  163. package/tutorial/aacwidget-tutorial/src/favicon.ico +0 -0
  164. package/tutorial/aacwidget-tutorial/src/index.html +0 -45
  165. package/tutorial/aacwidget-tutorial/src/main.ts +0 -12
  166. package/tutorial/aacwidget-tutorial/src/polyfills.ts +0 -63
  167. package/tutorial/aacwidget-tutorial/src/styles.scss +0 -4
  168. package/tutorial/aacwidget-tutorial/src/test.ts +0 -25
  169. package/tutorial/aacwidget-tutorial/tsconfig.app.json +0 -15
  170. package/tutorial/aacwidget-tutorial/tsconfig.json +0 -23
  171. package/tutorial/aacwidget-tutorial/tsconfig.spec.json +0 -18
  172. package/tutorial/aacwidget-tutorial/tslint.json +0 -148
  173. package/tutorial/tutorial-videos.txt +0 -41
@@ -9,6 +9,8 @@ import { QueryParameters } from '../model/query-parameters.model';
9
9
  import { PrefillData } from '../utils/prefill-data';
10
10
  import { SourceType } from '../enum/source-type.enum';
11
11
  import { PrefillEvent } from '../utils/preflll.event';
12
+ import { SuggestionLevelType } from '../enum/suggestion-level-type.enum';
13
+ import * as i0 from "@angular/core";
12
14
  export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnChanges, OnDestroy {
13
15
  private addressService;
14
16
  private localeService;
@@ -35,6 +37,7 @@ export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnC
35
37
  messageOption: string;
36
38
  µ: any;
37
39
  isReadonly: boolean;
40
+ suggestionLevel: SuggestionLevelType;
38
41
  messageChanged: EventEmitter<{
39
42
  messageType: ValidationMessageType;
40
43
  translatedMessage: string;
@@ -46,6 +49,7 @@ export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnC
46
49
  emptyResponseEvent: EventEmitter<any>;
47
50
  clearInputEventEmitter: EventEmitter<string>;
48
51
  prefillEventEmitter: EventEmitter<PrefillEvent>;
52
+ boxNumberChanged: EventEmitter<string>;
49
53
  searchText: string;
50
54
  addressIsValidated: boolean;
51
55
  suggestionValidationMessage: string;
@@ -71,6 +75,7 @@ export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnC
71
75
  emptyResponse: boolean;
72
76
  prefilling: boolean;
73
77
  isPrefillWithNoMatch: boolean;
78
+ SuggestionLevelType: typeof SuggestionLevelType;
74
79
  constructor(addressService: AddressService, localeService: LocaleService, translateService: TranslateService, unicodeService: UnicodeService);
75
80
  ngOnInit(): void;
76
81
  ngAfterViewChecked(): void;
@@ -104,8 +109,10 @@ export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnC
104
109
  clearConnectionErrorMessage(): void;
105
110
  parseTopSuggestions(topSuggestions: any, source?: SourceType): void;
106
111
  prefillBuildNotInListSuggestion(): any;
107
- parseSingleSuggestion(suggestion: any, source: SourceType): void;
108
- prefillCheckForPerfectMatch(suggestion: any): void;
112
+ parseSingleSuggestion(suggestion: any, source: SourceType): boolean;
113
+ checkForPerfectMatch(suggestion: any): boolean;
114
+ prefillCheckForPerfectMatch(suggestion: any): boolean;
115
+ onInputChange_new(source?: SourceType): void;
109
116
  onInputChange(source?: SourceType): void;
110
117
  clickSuggestion(event: any, suggestion?: any): void;
111
118
  modifySelectedAddress(suggestion: object): any;
@@ -134,4 +141,6 @@ export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnC
134
141
  showAddressNotFoundMessage(): void;
135
142
  isDisabled(): boolean;
136
143
  onInputClick(): void;
144
+ static ɵfac: i0.ɵɵFactoryDeclaration<BoxNumberComponent, never>;
145
+ static ɵcmp: i0.ɵɵComponentDeclaration<BoxNumberComponent, "bp-box-number", never, { "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"; }, { "messageChanged": "messageChanged"; "addressChanged": "addressChanged"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; "textChangeEvent": "textChangeEvent"; "emptyResponseEvent": "emptyResponseEvent"; "clearInputEventEmitter": "clearInputEventEmitter"; "prefillEventEmitter": "prefillEventEmitter"; "boxNumberChanged": "boxNumberChanged"; }, never, never>;
137
146
  }
@@ -1,3 +1,6 @@
1
1
  export * from './address-level.enum';
2
+ export * from './input-name.enum';
3
+ export * from './source-type.enum';
4
+ export * from './suggestion-level-type.enum';
2
5
  export * from './validation-message-option-type.enum';
3
6
  export * from './validation-message-type.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum SuggestionLevelType {
2
+ None = 0,
3
+ StreetNumber = 1,
4
+ StreetAndBoxNumber = 2
5
+ }
@@ -6,6 +6,8 @@ import { PrefillData } from './utils/prefill-data';
6
6
  import { PrefillEvent } from './utils/preflll.event';
7
7
  import { HttpService } from './services/http.service';
8
8
  import { Nis9Service } from './services/nis9.service';
9
+ import { SuggestionLevelType } from './enum/suggestion-level-type.enum';
10
+ import * as i0 from "@angular/core";
9
11
  export declare class LibAddressAutocompleteByComponentComponent implements OnInit, OnDestroy, OnChanges {
10
12
  private nis9Service;
11
13
  private httpService;
@@ -57,6 +59,7 @@ export declare class LibAddressAutocompleteByComponentComponent implements OnIni
57
59
  visibleSuggestionBoxNbCount: number;
58
60
  sortCriteriaBoxNb: string;
59
61
  boxNumberPrefillData: PrefillData;
62
+ suggestionLevel: SuggestionLevelType;
60
63
  boxNumber: string;
61
64
  completeAddress: string;
62
65
  emittedAddress: any;
@@ -106,6 +109,8 @@ export declare class LibAddressAutocompleteByComponentComponent implements OnIni
106
109
  enterPrefillMode(): void;
107
110
  quitPrefillMode(): void;
108
111
  setAddress(address: any, level?: number): void;
112
+ setAddressStreetNumber(streetNumber: string): void;
113
+ setAddressBoxNumber(boxNumber: string): void;
109
114
  setLanguage(lang: string): void;
110
115
  setValidationMessage(/*message: string*/ message: {
111
116
  messageType: ValidationMessageType;
@@ -121,6 +126,10 @@ export declare class LibAddressAutocompleteByComponentComponent implements OnIni
121
126
  }): void;
122
127
  onLocalityPrefillEvent(event: PrefillEvent): void;
123
128
  onStreetPrefillEvent(event: PrefillEvent): void;
129
+ onStreetNumberPrefillEvent_new(event: PrefillEvent): void;
124
130
  onStreetNumberPrefillEvent(event: PrefillEvent): void;
131
+ onBoxNumberPrefillEvent_new(event: PrefillEvent): void;
125
132
  onBoxNumberPrefillEvent(event: PrefillEvent): void;
133
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibAddressAutocompleteByComponentComponent, never>;
134
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibAddressAutocompleteByComponentComponent, "bp-lib-address-autocomplete-by-component", never, { "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"; }, { "addressCompleteEventEmitter": "addressCompleteEventEmitter"; "validationMessageEventEmitter": "validationMessageEventEmitter"; "clearInputEventEmitter": "clearInputEventEmitter"; }, never, never>;
126
135
  }
@@ -1,2 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./utils/highlight-suggestion.pipe";
3
+ import * as i2 from "./utils/visible-suggestion.directive";
4
+ import * as i3 from "./lib-address-autocomplete-by-component.component";
5
+ import * as i4 from "./locality/locality.component";
6
+ import * as i5 from "./street/street.component";
7
+ import * as i6 from "./street-number/street-number.component";
8
+ import * as i7 from "./box-number/box-number.component";
9
+ import * as i8 from "@angular/common";
10
+ import * as i9 from "@angular/common/http";
11
+ import * as i10 from "@angular/forms";
12
+ import * as i11 from "@ngx-translate/core";
1
13
  export declare class LibAddressAutocompleteByComponentModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibAddressAutocompleteByComponentModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LibAddressAutocompleteByComponentModule, [typeof i1.HighlightSuggestionPipe, typeof i2.VisibleSuggestionDirective, typeof i3.LibAddressAutocompleteByComponentComponent, typeof i4.LocalityComponent, typeof i5.StreetComponent, typeof i6.StreetNumberComponent, typeof i7.BoxNumberComponent], [typeof i8.CommonModule, typeof i9.HttpClientModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.TranslateModule], [typeof i3.LibAddressAutocompleteByComponentComponent]>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<LibAddressAutocompleteByComponentModule>;
2
17
  }
@@ -1,3 +1,6 @@
1
+ import * as i0 from "@angular/core";
1
2
  export declare class LibAddressAutocompleteByComponentService {
2
3
  constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibAddressAutocompleteByComponentService, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<LibAddressAutocompleteByComponentService>;
3
6
  }
@@ -9,6 +9,7 @@ import { UnicodeService } from '../services/unicode.service';
9
9
  import { SourceType } from '../enum/source-type.enum';
10
10
  import { PrefillData } from '../utils/prefill-data';
11
11
  import { PrefillEvent } from '../utils/preflll.event';
12
+ import * as i0 from "@angular/core";
12
13
  export declare class LocalityComponent implements OnInit, OnChanges, OnDestroy, AfterViewChecked {
13
14
  private addressService;
14
15
  private localeService;
@@ -116,4 +117,6 @@ export declare class LocalityComponent implements OnInit, OnChanges, OnDestroy,
116
117
  selectFirstInListOfSuggesions(): void;
117
118
  setSearchText(value: any): void;
118
119
  setSearchTextBasedOnArrowSelection(newVal: any, oldVal: any): void;
120
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalityComponent, never>;
121
+ static ɵcmp: i0.ɵɵComponentDeclaration<LocalityComponent, "bp-locality", never, { "labelResourceKey": "labelResourceKey"; "messageOption": "messageOption"; "maxSuggesionCount": "maxSuggesionCount"; "visibleSuggestionCount": "visibleSuggestionCount"; "sortCriteria": "sortCriteria"; "baseUrl": "baseUrl"; "inputText": "inputText"; "prefillData": "prefillData"; "showDebugMessageToConsole": "showDebugMessageToConsole"; "inputLang": "inputLang"; "isReadonly": "isReadonly"; }, { "messageChanged": "messageChanged"; "addressChanged": "addressChanged"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; "textChangeEvent": "textChangeEvent"; "clearInputEventEmitter": "clearInputEventEmitter"; "prefillEventEmitter": "prefillEventEmitter"; }, never, never>;
119
122
  }
@@ -5,6 +5,7 @@ import { QueryParameters } from '../model/query-parameters.model';
5
5
  import { Locality } from '../model/Locality';
6
6
  import { Street } from '../model/Street';
7
7
  import { Box } from '../model/Box';
8
+ import * as i0 from "@angular/core";
8
9
  export declare class AddressService {
9
10
  private httpService;
10
11
  private domain;
@@ -20,4 +21,6 @@ export declare class AddressService {
20
21
  getBox(baseUrl: string, locality: string, postalcode: string, params: QueryParameters): Observable<Box>;
21
22
  private handleGetBox;
22
23
  handleError(error: HttpErrorResponse): Observable<never>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<AddressService, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<AddressService>;
23
26
  }
@@ -1,14 +1,19 @@
1
1
  import { HttpClient, HttpHeaders } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class HttpService {
4
5
  private httpClient;
5
6
  private openConnections;
7
+ private showDebugMessageToConsole;
6
8
  constructor(httpClient: HttpClient);
7
9
  private apiKey;
8
10
  setApiKey(apiKey: string): void;
11
+ setShowDebugMessageToConsole(showDebugMessageToConsole: boolean): void;
9
12
  getHttpHeaders(): HttpHeaders;
10
13
  get(url: string, options?: any): Observable<any>;
11
14
  private request;
12
15
  private handleResponse;
13
16
  private handleError;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpService>;
14
19
  }
@@ -1,4 +1,5 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class LocaleService {
3
4
  inputLanguageEvent: BehaviorSubject<string>;
4
5
  currentLang: import("rxjs").Observable<string>;
@@ -8,4 +9,6 @@ export declare class LocaleService {
8
9
  isLocaleFrench(): boolean;
9
10
  isLocaleGerman(): boolean;
10
11
  private isPreferredLocale;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocaleService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocaleService>;
11
14
  }
@@ -1,9 +1,12 @@
1
1
  import { HttpClient } from "@angular/common/http";
2
2
  import { Observable } from "rxjs";
3
+ import * as i0 from "@angular/core";
3
4
  export declare class Nis9Service {
4
5
  private httpClient;
5
6
  private nis9ServiceURL;
6
7
  constructor(httpClient: HttpClient);
7
8
  setNis9ServiceURL(nis9ServiceURL: string): void;
8
9
  determineNis9Data(longitude: any, latitude: any): Observable<any>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<Nis9Service, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<Nis9Service>;
9
12
  }
@@ -1,8 +1,11 @@
1
1
  import { OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class UnicodeService implements OnDestroy {
3
4
  private defaultDiacriticsRemovalMap;
4
5
  private diacriticsMap;
5
6
  constructor();
6
7
  removeDiacritics(str: any): any;
7
8
  ngOnDestroy(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<UnicodeService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<UnicodeService>;
8
11
  }
@@ -8,6 +8,7 @@ import { QueryParameters } from '../model/query-parameters.model';
8
8
  import { PrefillData } from '../utils/prefill-data';
9
9
  import { SourceType } from '../enum/source-type.enum';
10
10
  import { PrefillEvent } from '../utils/preflll.event';
11
+ import * as i0 from "@angular/core";
11
12
  export declare class StreetComponent implements OnInit, AfterViewChecked, OnChanges, OnDestroy {
12
13
  private addressService;
13
14
  private localeService;
@@ -124,4 +125,6 @@ export declare class StreetComponent implements OnInit, AfterViewChecked, OnChan
124
125
  showAddressNotFoundMessage(): void;
125
126
  isDisabled(): boolean;
126
127
  onInputClick(): void;
128
+ static ɵfac: i0.ɵɵFactoryDeclaration<StreetComponent, never>;
129
+ static ɵcmp: i0.ɵɵComponentDeclaration<StreetComponent, "bp-street", never, { "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"; }, { "messageChanged": "messageChanged"; "addressChanged": "addressChanged"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; "textChangeEvent": "textChangeEvent"; "clearInputEventEmitter": "clearInputEventEmitter"; "prefillEventEmitter": "prefillEventEmitter"; }, never, never>;
127
130
  }
@@ -9,6 +9,8 @@ import { QueryParameters } from '../model/query-parameters.model';
9
9
  import { PrefillData } from '../utils/prefill-data';
10
10
  import { SourceType } from '../enum/source-type.enum';
11
11
  import { PrefillEvent } from '../utils/preflll.event';
12
+ import { SuggestionLevelType } from '../enum/suggestion-level-type.enum';
13
+ import * as i0 from "@angular/core";
12
14
  export declare class StreetNumberComponent implements OnInit, AfterViewChecked, OnChanges, OnDestroy {
13
15
  private addressService;
14
16
  private localeService;
@@ -34,6 +36,7 @@ export declare class StreetNumberComponent implements OnInit, AfterViewChecked,
34
36
  messageOption: string;
35
37
  inputText: string;
36
38
  isReadonly: boolean;
39
+ suggestionLevel: SuggestionLevelType;
37
40
  messageChanged: EventEmitter<{
38
41
  messageType: ValidationMessageType;
39
42
  translatedMessage: string;
@@ -45,6 +48,7 @@ export declare class StreetNumberComponent implements OnInit, AfterViewChecked,
45
48
  emptyResponseEvent: EventEmitter<any>;
46
49
  clearInputEventEmitter: EventEmitter<string>;
47
50
  prefillEventEmitter: EventEmitter<PrefillEvent>;
51
+ streetNumberChanged: EventEmitter<string>;
48
52
  searchText: string;
49
53
  addressIsValidated: boolean;
50
54
  addressIsComplete: boolean;
@@ -71,6 +75,7 @@ export declare class StreetNumberComponent implements OnInit, AfterViewChecked,
71
75
  emptyResponse: boolean;
72
76
  prefilling: boolean;
73
77
  isPrefillWithNoMatch: boolean;
78
+ SuggestionLevelType: typeof SuggestionLevelType;
74
79
  constructor(addressService: AddressService, localeService: LocaleService, translateService: TranslateService, unicodeService: UnicodeService);
75
80
  ngOnInit(): void;
76
81
  ngOnDestroy(): void;
@@ -106,12 +111,13 @@ export declare class StreetNumberComponent implements OnInit, AfterViewChecked,
106
111
  parseTopSuggestions(topSuggestions: any, source?: SourceType): void;
107
112
  prefillBuildNotInListSuggestion(): any;
108
113
  parseSingleSuggestion(suggestion: any, source: SourceType): void;
114
+ checkForPerfectMatch(suggestion: any): boolean;
109
115
  prefillCheckForPerfectMatch(suggestion: any): void;
116
+ onInputChange_new(source?: SourceType): void;
110
117
  onInputChange(source?: SourceType): void;
111
118
  clickSuggestion(event: any, suggestion?: any): void;
112
119
  modifySelectedAddress(suggestion: object): any;
113
120
  setSelectedAddress(suggestion: any): void;
114
- clearSelectedAddress(): void;
115
121
  emitTranslatedValidationMessage(validationMessageType: ValidationMessageType, options?: string[]): void;
116
122
  notifyAddressIsValidated(): void;
117
123
  checkKeyDown(event: any): void;
@@ -135,4 +141,6 @@ export declare class StreetNumberComponent implements OnInit, AfterViewChecked,
135
141
  showAddressNotFoundMessage(): void;
136
142
  isDisabled(): boolean;
137
143
  onInputClick(): void;
144
+ static ɵfac: i0.ɵɵFactoryDeclaration<StreetNumberComponent, never>;
145
+ static ɵcmp: i0.ɵɵComponentDeclaration<StreetNumberComponent, "bp-street-number", never, { "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"; }, { "messageChanged": "messageChanged"; "addressChanged": "addressChanged"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; "textChangeEvent": "textChangeEvent"; "emptyResponseEvent": "emptyResponseEvent"; "clearInputEventEmitter": "clearInputEventEmitter"; "prefillEventEmitter": "prefillEventEmitter"; "streetNumberChanged": "streetNumberChanged"; }, never, never>;
138
146
  }
@@ -0,0 +1 @@
1
+ export declare const LIB_VERSION = "1.1.5";
@@ -1,8 +1,11 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { DomSanitizer } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class HighlightSuggestionPipe implements PipeTransform {
4
5
  private sanitizer;
5
6
  constructor(sanitizer: DomSanitizer);
6
7
  transform(value: any, args?: any): any;
7
8
  private transformForArray;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<HighlightSuggestionPipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<HighlightSuggestionPipe, "highlightSuggestion">;
8
11
  }
@@ -1,4 +1,5 @@
1
1
  import { ElementRef, AfterViewChecked, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class VisibleSuggestionDirective implements AfterViewChecked {
3
4
  private el;
4
5
  private renderer;
@@ -6,4 +7,6 @@ export declare class VisibleSuggestionDirective implements AfterViewChecked {
6
7
  constructor(el: ElementRef, renderer: Renderer2);
7
8
  ngAfterViewChecked(): void;
8
9
  showHeight(parent: HTMLElement, count: number): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisibleSuggestionDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<VisibleSuggestionDirective, "[appVisibleSuggestion]", never, { "appVisibleSuggestion": "appVisibleSuggestion"; }, {}, never>;
9
12
  }
package/package.json CHANGED
@@ -1,21 +1,31 @@
1
1
  {
2
2
  "name": "@bpost/bp-address-auto-complete-by-component",
3
- "version": "1.1.1",
3
+ "version": "1.1.5",
4
4
  "peerDependencies": {
5
- "@angular/common": "^9.1.9",
6
- "@angular/core": "^9.1.9"
5
+ "@angular/common": "^13.2.0",
6
+ "@angular/core": "^13.2.0"
7
7
  },
8
8
  "dependencies": {
9
- "tslib": "^1.10.0"
9
+ "tslib": "^2.3.0"
10
10
  },
11
- "main": "bundles/bpost-bp-address-auto-complete-by-component.umd.js",
12
- "module": "fesm5/bpost-bp-address-auto-complete-by-component.js",
13
- "es2015": "fesm2015/bpost-bp-address-auto-complete-by-component.js",
14
- "esm5": "esm5/bpost-bp-address-auto-complete-by-component.js",
15
- "esm2015": "esm2015/bpost-bp-address-auto-complete-by-component.js",
16
- "fesm5": "fesm5/bpost-bp-address-auto-complete-by-component.js",
17
- "fesm2015": "fesm2015/bpost-bp-address-auto-complete-by-component.js",
11
+ "module": "fesm2015/bpost-bp-address-auto-complete-by-component.mjs",
12
+ "es2020": "fesm2020/bpost-bp-address-auto-complete-by-component.mjs",
13
+ "esm2020": "esm2020/bpost-bp-address-auto-complete-by-component.mjs",
14
+ "fesm2020": "fesm2020/bpost-bp-address-auto-complete-by-component.mjs",
15
+ "fesm2015": "fesm2015/bpost-bp-address-auto-complete-by-component.mjs",
18
16
  "typings": "bpost-bp-address-auto-complete-by-component.d.ts",
19
- "metadata": "bpost-bp-address-auto-complete-by-component.metadata.json",
17
+ "exports": {
18
+ "./package.json": {
19
+ "default": "./package.json"
20
+ },
21
+ ".": {
22
+ "types": "./bpost-bp-address-auto-complete-by-component.d.ts",
23
+ "esm2020": "./esm2020/bpost-bp-address-auto-complete-by-component.mjs",
24
+ "es2020": "./fesm2020/bpost-bp-address-auto-complete-by-component.mjs",
25
+ "es2015": "./fesm2015/bpost-bp-address-auto-complete-by-component.mjs",
26
+ "node": "./fesm2015/bpost-bp-address-auto-complete-by-component.mjs",
27
+ "default": "./fesm2020/bpost-bp-address-auto-complete-by-component.mjs"
28
+ }
29
+ },
20
30
  "sideEffects": false
21
- }
31
+ }
package/VERSION.md DELETED
@@ -1,159 +0,0 @@
1
- # bp-address-auto-complete-by-component Version
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.9.
4
-
5
- This is a pure angular library and can be imported as a module inside an angular (version>=7) application.
6
- This library is not suited for a pure javascript application.
7
- For any pure JS application, another version of this component exists in our repository.
8
-
9
- ## Version 1.1.0
10
- Correction of small bug.
11
- Add a customer demo application.
12
- Just copy it somewhere.
13
- Initialize the packages, running 'npm i'.
14
- Start the demo running'ng serve -o', enjoy.
15
-
16
- ## Version 1.0.30
17
- Adding two features:
18
- - set the component readonly dynamically
19
- - ask to get the nis9 data in response
20
-
21
- To achieve that, we have added 2 new attributes (optional) for the widget.
22
-
23
- - isReadonly: a boolean telling all the fields in the widget are r/o
24
- - nis9InResponse: a boolean telling to add the nis9 data in the response if found.
25
-
26
- In that case, a new field is added in the response.
27
-
28
-
29
- An exemple of the tag:
30
-
31
- <bp-lib-address-autocomplete-by-component
32
-
33
- [isReadonly]="readonly"
34
- [nis9InResponse]="nis9InResponse"
35
- [defaultLang]="defaultLanguage"
36
- [inputLang]="selectedLanguage"
37
-
38
- [showDebugMessageToConsole]="showDebugMessageToConsole"
39
-
40
- (addressCompleteEventEmitter)="onAddressComplete($event)"
41
- (clearInputEventEmitter)="onClearInputEventMessage($event)"
42
- (validationMessageEventEmitter)="onAddressValidationMessage($event)"></bp-lib-address-autocomplete-by-component>
43
-
44
- And if the nis9 data has been found, it is added in the address message, like this:
45
-
46
- {
47
- detectedLanguage: "fr"
48
- houseNumber: "107"
49
- isComplete: true
50
- isCompleteNotificationDone: true
51
- latitude: 50.710406
52
- localityName: "WAVRE"
53
- longitude: 4.629168
54
- municipalityName: "WAVRE"
55
- nis9: "25112A21-"
56
- postalCode: "1300"
57
- searchBarString: "107"
58
- streetName: "AVENUE DES HUIT BONNIERS"
59
- string: "107"
60
- }
61
-
62
- ## Version 1.0.29
63
- Updating url endpoint and adding security keys
64
-
65
- ## Version 1.0.28
66
- Optimizing address search when prefilling: keeping best suggestion when
67
- match found on both municipality name and locality name.
68
-
69
- ## Version 1.0.27
70
- Correcting box number sort
71
-
72
- ## Version 1.0.26
73
- Correcting box number sort
74
- ## Version 1.0.25
75
- Correcting box number sort
76
- ## Version 1.0.24
77
- Correcting box number sort
78
-
79
- ## Version 1.0.23
80
- Logging parameters changes to the console if message log is enabled.
81
-
82
- ## Version 1.0.22
83
- Correction: Sorting on Street and box number
84
-
85
- ## Version 1.0.21
86
- Correction: clear input with or without focus.
87
-
88
- ## Version 1.0.20
89
- Correction: prefilling error detection on locality level.
90
-
91
- ## Version 1.0.19
92
- Suggestion match not working if data is '.'.
93
- Need to escape the value from '.' to '\\.' to make the regep working
94
-
95
- ## Version 1.0.18
96
- Correcting bug when 'not-in-list' option is 'on' and no match found
97
-
98
- ## Version 1.0.17
99
- Prefill support multi lang
100
-
101
- ## Version 1.0.16
102
- Correcting prefilling
103
-
104
- ## Version 1.0.15
105
- When prefilling, indicates the wrong field (no match only) in red
106
-
107
- ## Version 1.0.14
108
- Correcting prefilling
109
-
110
- ## Version 1.0.13
111
- Correcting typeahead when prefilling and suggestion list
112
-
113
- ## Version 1.0.12
114
- Adding a parameter to hide/show log message to the console
115
- showDebugMessageToConsole, with value: true/false
116
-
117
- ## Version 1.0.11
118
- Correcting prefill: use localityNames when available
119
-
120
- ## Version 1.0.10
121
- Correction some bugs of verion 1.0.9.
122
- Adding prefill 'not-in-list' support
123
-
124
- ## Version 1.0.9
125
- Adding an option, for when prefilling, avoid suggestions drop when a field got the focus.
126
- Auto validate an address on prefilling
127
- Correction of some typos in the html (ids definitions)
128
- Prefilling is no more supporting the 'unstructured' address.
129
- (use version 1.0.10 instead !)
130
-
131
- ## Version 1.0.8
132
- Enable the library to support Module Lazy Loading
133
-
134
- ## Version 1.0.7
135
- The documentation in updated ! (finally!)
136
- And added a tutorial with free videos !
137
-
138
- ## Version 1.0.6
139
- Fixing some little bugs, like typos, missing translations in DE
140
-
141
- ## Version 1.0.5
142
- Full refactoring
143
-
144
- ## Version 1.0.4
145
- Correcting some bugs and resources.
146
-
147
- ## Version 1.0.3
148
- First working version of the widget.
149
- It has been refactored and rewritten using angular 9.
150
- But the documentation is still not up2date.
151
-
152
- ## Version 1.0.1, 1.0.2
153
- These are bad version and should not be used !
154
-
155
- ## Version 1.0.0 - 15/04/2020
156
- First version of the component.
157
-
158
-
159
-