@bpost/bp-address-auto-complete-by-component 1.1.3 → 1.1.6

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 (64) hide show
  1. package/esm2020/lib/box-number/box-number.component.mjs +80 -7
  2. package/esm2020/lib/lib-address-autocomplete-by-component.component.mjs +152 -2
  3. package/esm2020/lib/locality/locality.component.mjs +2 -2
  4. package/esm2020/lib/services/adress.service.mjs +2 -2
  5. package/esm2020/lib/street/street.component.mjs +11 -1
  6. package/esm2020/lib/street-number/street-number.component.mjs +82 -6
  7. package/esm2020/lib/utils/constants.mjs +2 -2
  8. package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs +324 -15
  9. package/fesm2015/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
  10. package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs +324 -15
  11. package/fesm2020/bpost-bp-address-auto-complete-by-component.mjs.map +1 -1
  12. package/lib/box-number/box-number.component.d.ts +5 -2
  13. package/lib/lib-address-autocomplete-by-component.component.d.ts +2 -0
  14. package/lib/street-number/street-number.component.d.ts +3 -0
  15. package/lib/utils/constants.d.ts +1 -1
  16. package/package.json +1 -1
  17. package/VERSION.md +0 -195
  18. package/address-complete-2020-04-15_23-29-54.png +0 -0
  19. package/address-incomplete-2020-04-15_23-28-40.png +0 -0
  20. package/install-and-start-demo.bat +0 -11
  21. package/tutorial/tutorial/aacwidget-tutorial/.editorconfig +0 -16
  22. package/tutorial/tutorial/aacwidget-tutorial/README.md +0 -27
  23. package/tutorial/tutorial/aacwidget-tutorial/angular.json +0 -128
  24. package/tutorial/tutorial/aacwidget-tutorial/browserslist +0 -13
  25. package/tutorial/tutorial/aacwidget-tutorial/e2e/protractor.conf.js +0 -32
  26. package/tutorial/tutorial/aacwidget-tutorial/e2e/src/app.e2e-spec.ts +0 -23
  27. package/tutorial/tutorial/aacwidget-tutorial/e2e/src/app.po.ts +0 -11
  28. package/tutorial/tutorial/aacwidget-tutorial/e2e/tsconfig.json +0 -13
  29. package/tutorial/tutorial/aacwidget-tutorial/karma.conf.js +0 -32
  30. package/tutorial/tutorial/aacwidget-tutorial/package-lock.json +0 -13314
  31. package/tutorial/tutorial/aacwidget-tutorial/package.json +0 -49
  32. package/tutorial/tutorial/aacwidget-tutorial/src/app/app-routing.module.ts +0 -18
  33. package/tutorial/tutorial/aacwidget-tutorial/src/app/app.component.html +0 -6
  34. package/tutorial/tutorial/aacwidget-tutorial/src/app/app.component.scss +0 -0
  35. package/tutorial/tutorial/aacwidget-tutorial/src/app/app.component.spec.ts +0 -35
  36. package/tutorial/tutorial/aacwidget-tutorial/src/app/app.component.ts +0 -28
  37. package/tutorial/tutorial/aacwidget-tutorial/src/app/app.module.ts +0 -47
  38. package/tutorial/tutorial/aacwidget-tutorial/src/app/widget-full/widget-full.component.html +0 -57
  39. package/tutorial/tutorial/aacwidget-tutorial/src/app/widget-full/widget-full.component.scss +0 -0
  40. package/tutorial/tutorial/aacwidget-tutorial/src/app/widget-full/widget-full.component.ts +0 -160
  41. package/tutorial/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.html +0 -20
  42. package/tutorial/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.scss +0 -0
  43. package/tutorial/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.spec.ts +0 -25
  44. package/tutorial/tutorial/aacwidget-tutorial/src/app/widget-simple/widget-simple.component.ts +0 -49
  45. package/tutorial/tutorial/aacwidget-tutorial/src/assets/.gitkeep +0 -0
  46. package/tutorial/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/de.json +0 -62
  47. package/tutorial/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/en.json +0 -62
  48. package/tutorial/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/fr.json +0 -62
  49. package/tutorial/tutorial/aacwidget-tutorial/src/assets/aacwidget/i18n/nl.json +0 -62
  50. package/tutorial/tutorial/aacwidget-tutorial/src/assets/aacwidget/scss/aacwidget-custom.scss +0 -81
  51. package/tutorial/tutorial/aacwidget-tutorial/src/assets/aacwidget/scss/aacwidget-default.scss +0 -424
  52. package/tutorial/tutorial/aacwidget-tutorial/src/environments/environment.prod.ts +0 -3
  53. package/tutorial/tutorial/aacwidget-tutorial/src/environments/environment.ts +0 -16
  54. package/tutorial/tutorial/aacwidget-tutorial/src/favicon.ico +0 -0
  55. package/tutorial/tutorial/aacwidget-tutorial/src/index.html +0 -45
  56. package/tutorial/tutorial/aacwidget-tutorial/src/main.ts +0 -12
  57. package/tutorial/tutorial/aacwidget-tutorial/src/polyfills.ts +0 -63
  58. package/tutorial/tutorial/aacwidget-tutorial/src/styles.scss +0 -4
  59. package/tutorial/tutorial/aacwidget-tutorial/src/test.ts +0 -25
  60. package/tutorial/tutorial/aacwidget-tutorial/tsconfig.app.json +0 -15
  61. package/tutorial/tutorial/aacwidget-tutorial/tsconfig.json +0 -23
  62. package/tutorial/tutorial/aacwidget-tutorial/tsconfig.spec.json +0 -18
  63. package/tutorial/tutorial/aacwidget-tutorial/tslint.json +0 -148
  64. package/tutorial/tutorial/tutorial-videos.txt +0 -41
@@ -75,6 +75,7 @@ export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnC
75
75
  emptyResponse: boolean;
76
76
  prefilling: boolean;
77
77
  isPrefillWithNoMatch: boolean;
78
+ SuggestionLevelType: typeof SuggestionLevelType;
78
79
  constructor(addressService: AddressService, localeService: LocaleService, translateService: TranslateService, unicodeService: UnicodeService);
79
80
  ngOnInit(): void;
80
81
  ngAfterViewChecked(): void;
@@ -108,8 +109,10 @@ export declare class BoxNumberComponent implements OnInit, AfterViewChecked, OnC
108
109
  clearConnectionErrorMessage(): void;
109
110
  parseTopSuggestions(topSuggestions: any, source?: SourceType): void;
110
111
  prefillBuildNotInListSuggestion(): any;
111
- parseSingleSuggestion(suggestion: any, source: SourceType): void;
112
- 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;
113
116
  onInputChange(source?: SourceType): void;
114
117
  clickSuggestion(event: any, suggestion?: any): void;
115
118
  modifySelectedAddress(suggestion: object): any;
@@ -126,7 +126,9 @@ export declare class LibAddressAutocompleteByComponentComponent implements OnIni
126
126
  }): void;
127
127
  onLocalityPrefillEvent(event: PrefillEvent): void;
128
128
  onStreetPrefillEvent(event: PrefillEvent): void;
129
+ onStreetNumberPrefillEvent_new(event: PrefillEvent): void;
129
130
  onStreetNumberPrefillEvent(event: PrefillEvent): void;
131
+ onBoxNumberPrefillEvent_new(event: PrefillEvent): void;
130
132
  onBoxNumberPrefillEvent(event: PrefillEvent): void;
131
133
  static ɵfac: i0.ɵɵFactoryDeclaration<LibAddressAutocompleteByComponentComponent, never>;
132
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>;
@@ -75,6 +75,7 @@ export declare class StreetNumberComponent implements OnInit, AfterViewChecked,
75
75
  emptyResponse: boolean;
76
76
  prefilling: boolean;
77
77
  isPrefillWithNoMatch: boolean;
78
+ SuggestionLevelType: typeof SuggestionLevelType;
78
79
  constructor(addressService: AddressService, localeService: LocaleService, translateService: TranslateService, unicodeService: UnicodeService);
79
80
  ngOnInit(): void;
80
81
  ngOnDestroy(): void;
@@ -110,7 +111,9 @@ export declare class StreetNumberComponent implements OnInit, AfterViewChecked,
110
111
  parseTopSuggestions(topSuggestions: any, source?: SourceType): void;
111
112
  prefillBuildNotInListSuggestion(): any;
112
113
  parseSingleSuggestion(suggestion: any, source: SourceType): void;
114
+ checkForPerfectMatch(suggestion: any): boolean;
113
115
  prefillCheckForPerfectMatch(suggestion: any): void;
116
+ onInputChange_new(source?: SourceType): void;
114
117
  onInputChange(source?: SourceType): void;
115
118
  clickSuggestion(event: any, suggestion?: any): void;
116
119
  modifySelectedAddress(suggestion: object): any;
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "1.1.3";
1
+ export declare const LIB_VERSION = "1.1.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpost/bp-address-auto-complete-by-component",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.2.0",
6
6
  "@angular/core": "^13.2.0"
package/VERSION.md DELETED
@@ -1,195 +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.3
10
- Adding some features:
11
- - adding new option: suggestionLevel
12
- Possible values:
13
- 1. StreetAndBoxNumber (value: 2)
14
- In that case, drop down for street number and box number are used.
15
- This is the default behaviour as already available in version 1.1.2
16
- 2. StreetNumber (value: 1)
17
- In that case, the suggestion list will not be shown fort the box number,
18
- and the value of the box number is free
19
- 3. None (value: 0)
20
- In that case, both suggestion lists for the street number and box number are not shown,
21
- and value for the stret number and box number are free
22
-
23
- An exemple of the tag:
24
-
25
- <bp-lib-address-autocomplete-by-component
26
- ...
27
- [suggestionLevel]="1"
28
- ...
29
-
30
-
31
-
32
- WARNING:
33
- This version is still under test.
34
- Do not use for production..
35
- A final tested version with those features will be published as version 1.1.4
36
-
37
-
38
-
39
- ## Version 1.1.2
40
- correcting prefilling bug
41
-
42
- ## Version 1.1.1
43
- correcting a small bug
44
-
45
- ## Version 1.1.0
46
- Correction of small bug.
47
- Add a customer demo application.
48
- Just copy it somewhere.
49
- Initialize the packages, running 'npm i'.
50
- Start the demo running'ng serve -o', enjoy.
51
-
52
- ## Version 1.0.30
53
- Adding two features:
54
- - set the component readonly dynamically
55
- - ask to get the nis9 data in response
56
-
57
- To achieve that, we have added 2 new attributes (optional) for the widget.
58
-
59
- - isReadonly: a boolean telling all the fields in the widget are r/o
60
- - nis9InResponse: a boolean telling to add the nis9 data in the response if found.
61
-
62
- In that case, a new field is added in the response.
63
-
64
-
65
- An exemple of the tag:
66
-
67
- <bp-lib-address-autocomplete-by-component
68
-
69
- [isReadonly]="readonly"
70
- [nis9InResponse]="nis9InResponse"
71
- [defaultLang]="defaultLanguage"
72
- [inputLang]="selectedLanguage"
73
-
74
- [showDebugMessageToConsole]="showDebugMessageToConsole"
75
-
76
- (addressCompleteEventEmitter)="onAddressComplete($event)"
77
- (clearInputEventEmitter)="onClearInputEventMessage($event)"
78
- (validationMessageEventEmitter)="onAddressValidationMessage($event)"></bp-lib-address-autocomplete-by-component>
79
-
80
- And if the nis9 data has been found, it is added in the address message, like this:
81
-
82
- {
83
- detectedLanguage: "fr"
84
- houseNumber: "107"
85
- isComplete: true
86
- isCompleteNotificationDone: true
87
- latitude: 50.710406
88
- localityName: "WAVRE"
89
- longitude: 4.629168
90
- municipalityName: "WAVRE"
91
- nis9: "25112A21-"
92
- postalCode: "1300"
93
- searchBarString: "107"
94
- streetName: "AVENUE DES HUIT BONNIERS"
95
- string: "107"
96
- }
97
-
98
- ## Version 1.0.29
99
- Updating url endpoint and adding security keys
100
-
101
- ## Version 1.0.28
102
- Optimizing address search when prefilling: keeping best suggestion when
103
- match found on both municipality name and locality name.
104
-
105
- ## Version 1.0.27
106
- Correcting box number sort
107
-
108
- ## Version 1.0.26
109
- Correcting box number sort
110
- ## Version 1.0.25
111
- Correcting box number sort
112
- ## Version 1.0.24
113
- Correcting box number sort
114
-
115
- ## Version 1.0.23
116
- Logging parameters changes to the console if message log is enabled.
117
-
118
- ## Version 1.0.22
119
- Correction: Sorting on Street and box number
120
-
121
- ## Version 1.0.21
122
- Correction: clear input with or without focus.
123
-
124
- ## Version 1.0.20
125
- Correction: prefilling error detection on locality level.
126
-
127
- ## Version 1.0.19
128
- Suggestion match not working if data is '.'.
129
- Need to escape the value from '.' to '\\.' to make the regep working
130
-
131
- ## Version 1.0.18
132
- Correcting bug when 'not-in-list' option is 'on' and no match found
133
-
134
- ## Version 1.0.17
135
- Prefill support multi lang
136
-
137
- ## Version 1.0.16
138
- Correcting prefilling
139
-
140
- ## Version 1.0.15
141
- When prefilling, indicates the wrong field (no match only) in red
142
-
143
- ## Version 1.0.14
144
- Correcting prefilling
145
-
146
- ## Version 1.0.13
147
- Correcting typeahead when prefilling and suggestion list
148
-
149
- ## Version 1.0.12
150
- Adding a parameter to hide/show log message to the console
151
- showDebugMessageToConsole, with value: true/false
152
-
153
- ## Version 1.0.11
154
- Correcting prefill: use localityNames when available
155
-
156
- ## Version 1.0.10
157
- Correction some bugs of verion 1.0.9.
158
- Adding prefill 'not-in-list' support
159
-
160
- ## Version 1.0.9
161
- Adding an option, for when prefilling, avoid suggestions drop when a field got the focus.
162
- Auto validate an address on prefilling
163
- Correction of some typos in the html (ids definitions)
164
- Prefilling is no more supporting the 'unstructured' address.
165
- (use version 1.0.10 instead !)
166
-
167
- ## Version 1.0.8
168
- Enable the library to support Module Lazy Loading
169
-
170
- ## Version 1.0.7
171
- The documentation in updated ! (finally!)
172
- And added a tutorial with free videos !
173
-
174
- ## Version 1.0.6
175
- Fixing some little bugs, like typos, missing translations in DE
176
-
177
- ## Version 1.0.5
178
- Full refactoring
179
-
180
- ## Version 1.0.4
181
- Correcting some bugs and resources.
182
-
183
- ## Version 1.0.3
184
- First working version of the widget.
185
- It has been refactored and rewritten using angular 9.
186
- But the documentation is still not up2date.
187
-
188
- ## Version 1.0.1, 1.0.2
189
- These are bad version and should not be used !
190
-
191
- ## Version 1.0.0 - 15/04/2020
192
- First version of the component.
193
-
194
-
195
-
@@ -1,11 +0,0 @@
1
- call rmdir demo /Q /S
2
- call mkdir demo
3
- cd demo
4
- call npm init -y
5
- call npm i @bpost/bp-address-auto-complete-by-component-demo-application --save
6
- call xcopy .\node_modules\@bpost\bp-address-auto-complete-by-component-demo-application\*.* . /S /Y
7
- call npm i
8
- echo call ./node_modules/.bin/ng serve --port 4210 -o > run-demo.bat
9
- call run-demo.bat
10
-
11
-
@@ -1,16 +0,0 @@
1
- # Editor configuration, see https://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 2
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
-
11
- [*.ts]
12
- quote_type = single
13
-
14
- [*.md]
15
- max_line_length = off
16
- trim_trailing_whitespace = false
@@ -1,27 +0,0 @@
1
- # AacwidgetDemo
2
-
3
- This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.7.
4
-
5
- ## Development server
6
-
7
- Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8
-
9
- ## Code scaffolding
10
-
11
- Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12
-
13
- ## Build
14
-
15
- Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16
-
17
- ## Running unit tests
18
-
19
- Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20
-
21
- ## Running end-to-end tests
22
-
23
- Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24
-
25
- ## Further help
26
-
27
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
@@ -1,128 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "aacwidget-demo": {
7
- "projectType": "application",
8
- "schematics": {
9
- "@schematics/angular:component": {
10
- "style": "scss"
11
- }
12
- },
13
- "root": "",
14
- "sourceRoot": "src",
15
- "prefix": "app",
16
- "architect": {
17
- "build": {
18
- "builder": "@angular-devkit/build-angular:browser",
19
- "options": {
20
- "outputPath": "dist/aacwidget-demo",
21
- "index": "src/index.html",
22
- "main": "src/main.ts",
23
- "polyfills": "src/polyfills.ts",
24
- "tsConfig": "tsconfig.app.json",
25
- "aot": true,
26
- "assets": [
27
- "src/favicon.ico",
28
- "src/assets"
29
- ],
30
- "styles": [
31
- "src/styles.scss"
32
- ],
33
- "scripts": []
34
- },
35
- "configurations": {
36
- "production": {
37
- "fileReplacements": [
38
- {
39
- "replace": "src/environments/environment.ts",
40
- "with": "src/environments/environment.prod.ts"
41
- }
42
- ],
43
- "optimization": true,
44
- "outputHashing": "all",
45
- "sourceMap": false,
46
- "extractCss": true,
47
- "namedChunks": false,
48
- "extractLicenses": true,
49
- "vendorChunk": false,
50
- "buildOptimizer": true,
51
- "budgets": [
52
- {
53
- "type": "initial",
54
- "maximumWarning": "2mb",
55
- "maximumError": "5mb"
56
- },
57
- {
58
- "type": "anyComponentStyle",
59
- "maximumWarning": "6kb",
60
- "maximumError": "10kb"
61
- }
62
- ]
63
- }
64
- }
65
- },
66
- "serve": {
67
- "builder": "@angular-devkit/build-angular:dev-server",
68
- "options": {
69
- "browserTarget": "aacwidget-demo:build"
70
- },
71
- "configurations": {
72
- "production": {
73
- "browserTarget": "aacwidget-demo:build:production"
74
- }
75
- }
76
- },
77
- "extract-i18n": {
78
- "builder": "@angular-devkit/build-angular:extract-i18n",
79
- "options": {
80
- "browserTarget": "aacwidget-demo:build"
81
- }
82
- },
83
- "test": {
84
- "builder": "@angular-devkit/build-angular:karma",
85
- "options": {
86
- "main": "src/test.ts",
87
- "polyfills": "src/polyfills.ts",
88
- "tsConfig": "tsconfig.spec.json",
89
- "karmaConfig": "karma.conf.js",
90
- "assets": [
91
- "src/favicon.ico",
92
- "src/assets"
93
- ],
94
- "styles": [
95
- "src/styles.scss"
96
- ],
97
- "scripts": []
98
- }
99
- },
100
- "lint": {
101
- "builder": "@angular-devkit/build-angular:tslint",
102
- "options": {
103
- "tsConfig": [
104
- "tsconfig.app.json",
105
- "tsconfig.spec.json",
106
- "e2e/tsconfig.json"
107
- ],
108
- "exclude": [
109
- "**/node_modules/**"
110
- ]
111
- }
112
- },
113
- "e2e": {
114
- "builder": "@angular-devkit/build-angular:protractor",
115
- "options": {
116
- "protractorConfig": "e2e/protractor.conf.js",
117
- "devServerTarget": "aacwidget-demo:serve"
118
- },
119
- "configurations": {
120
- "production": {
121
- "devServerTarget": "aacwidget-demo:serve:production"
122
- }
123
- }
124
- }
125
- }
126
- }},
127
- "defaultProject": "aacwidget-demo"
128
- }
@@ -1,13 +0,0 @@
1
- # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
- # For additional information regarding the format and rule options, please see:
3
- # https://github.com/browserslist/browserslist#queries
4
-
5
- # You can see what browsers were selected by your queries by running:
6
- # npx browserslist
7
-
8
- > 0.5%
9
- last 2 versions
10
- Firefox ESR
11
- not dead
12
- # not IE 9-11 # For IE 9-11 support, remove 'not'.
13
- IE 9-11
@@ -1,32 +0,0 @@
1
- // @ts-check
2
- // Protractor configuration file, see link for more information
3
- // https://github.com/angular/protractor/blob/master/lib/config.ts
4
-
5
- const { SpecReporter } = require('jasmine-spec-reporter');
6
-
7
- /**
8
- * @type { import("protractor").Config }
9
- */
10
- exports.config = {
11
- allScriptsTimeout: 11000,
12
- specs: [
13
- './src/**/*.e2e-spec.ts'
14
- ],
15
- capabilities: {
16
- browserName: 'chrome'
17
- },
18
- directConnect: true,
19
- baseUrl: 'http://localhost:4200/',
20
- framework: 'jasmine',
21
- jasmineNodeOpts: {
22
- showColors: true,
23
- defaultTimeoutInterval: 30000,
24
- print: function() {}
25
- },
26
- onPrepare() {
27
- require('ts-node').register({
28
- project: require('path').join(__dirname, './tsconfig.json')
29
- });
30
- jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
31
- }
32
- };
@@ -1,23 +0,0 @@
1
- import { AppPage } from './app.po';
2
- import { browser, logging } from 'protractor';
3
-
4
- describe('workspace-project App', () => {
5
- let page: AppPage;
6
-
7
- beforeEach(() => {
8
- page = new AppPage();
9
- });
10
-
11
- it('should display welcome message', () => {
12
- page.navigateTo();
13
- expect(page.getTitleText()).toEqual('aacwidget-demo app is running!');
14
- });
15
-
16
- afterEach(async () => {
17
- // Assert that there are no errors emitted from the browser
18
- const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19
- expect(logs).not.toContain(jasmine.objectContaining({
20
- level: logging.Level.SEVERE,
21
- } as logging.Entry));
22
- });
23
- });
@@ -1,11 +0,0 @@
1
- import { browser, by, element } from 'protractor';
2
-
3
- export class AppPage {
4
- navigateTo(): Promise<unknown> {
5
- return browser.get(browser.baseUrl) as Promise<unknown>;
6
- }
7
-
8
- getTitleText(): Promise<string> {
9
- return element(by.css('app-root .content span')).getText() as Promise<string>;
10
- }
11
- }
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../out-tsc/e2e",
5
- "module": "commonjs",
6
- "target": "es5",
7
- "types": [
8
- "jasmine",
9
- "jasminewd2",
10
- "node"
11
- ]
12
- }
13
- }
@@ -1,32 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage-istanbul-reporter'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- clearContext: false // leave Jasmine Spec Runner output visible in browser
17
- },
18
- coverageIstanbulReporter: {
19
- dir: require('path').join(__dirname, './coverage/aacwidget-demo'),
20
- reports: ['html', 'lcovonly', 'text-summary'],
21
- fixWebpackSourcePaths: true
22
- },
23
- reporters: ['progress', 'kjhtml'],
24
- port: 9876,
25
- colors: true,
26
- logLevel: config.LOG_INFO,
27
- autoWatch: true,
28
- browsers: ['Chrome'],
29
- singleRun: false,
30
- restartOnFileChange: true
31
- });
32
- };