@angular/common 14.0.0-next.12 → 14.0.0-next.15
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/esm2020/http/src/client.mjs +3 -3
- package/esm2020/http/src/interceptor.mjs +3 -3
- package/esm2020/http/src/jsonp.mjs +6 -6
- package/esm2020/http/src/module.mjs +20 -22
- package/esm2020/http/src/params.mjs +1 -2
- package/esm2020/http/src/xhr.mjs +3 -3
- package/esm2020/http/src/xsrf.mjs +6 -6
- package/esm2020/http/testing/src/backend.mjs +3 -3
- package/esm2020/http/testing/src/module.mjs +6 -8
- package/esm2020/src/common_module.mjs +4 -4
- package/esm2020/src/directives/ng_class.mjs +3 -3
- package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
- package/esm2020/src/directives/ng_for_of.mjs +3 -3
- package/esm2020/src/directives/ng_if.mjs +3 -3
- package/esm2020/src/directives/ng_plural.mjs +6 -6
- package/esm2020/src/directives/ng_style.mjs +3 -3
- package/esm2020/src/directives/ng_switch.mjs +9 -9
- package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
- package/esm2020/src/i18n/localization.mjs +6 -6
- package/esm2020/src/location/hash_location_strategy.mjs +7 -4
- package/esm2020/src/location/location.mjs +18 -21
- package/esm2020/src/location/location_strategy.mjs +11 -8
- package/esm2020/src/location/platform_location.mjs +6 -6
- package/esm2020/src/pipes/async_pipe.mjs +3 -3
- package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
- package/esm2020/src/pipes/date_pipe.mjs +3 -3
- package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
- package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
- package/esm2020/src/pipes/json_pipe.mjs +3 -3
- package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
- package/esm2020/src/pipes/number_pipe.mjs +9 -9
- package/esm2020/src/pipes/slice_pipe.mjs +3 -3
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/location_mock.mjs +5 -7
- package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
- package/esm2020/testing/src/mock_platform_location.mjs +3 -3
- package/esm2020/upgrade/src/location_upgrade_module.mjs +5 -5
- package/fesm2015/common.mjs +123 -118
- package/fesm2015/common.mjs.map +1 -1
- package/fesm2015/http/testing.mjs +9 -11
- package/fesm2015/http/testing.mjs.map +1 -1
- package/fesm2015/http.mjs +41 -44
- package/fesm2015/http.mjs.map +1 -1
- package/fesm2015/testing.mjs +11 -13
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +5 -5
- package/fesm2015/upgrade.mjs.map +1 -1
- package/fesm2020/common.mjs +123 -118
- package/fesm2020/common.mjs.map +1 -1
- package/fesm2020/http/testing.mjs +9 -11
- package/fesm2020/http/testing.mjs.map +1 -1
- package/fesm2020/http.mjs +41 -44
- package/fesm2020/http.mjs.map +1 -1
- package/fesm2020/testing.mjs +11 -13
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +5 -5
- package/fesm2020/upgrade.mjs.map +1 -1
- package/http/{http.d.ts → index.d.ts} +4007 -4006
- package/http/testing/{testing.d.ts → index.d.ts} +177 -176
- package/{common.d.ts → index.d.ts} +2870 -2866
- package/package.json +8 -8
- package/testing/{testing.d.ts → index.d.ts} +121 -120
- package/upgrade/{upgrade.d.ts → index.d.ts} +445 -444
- package/http/package.json +0 -10
- package/http/testing/package.json +0 -9
- package/locales/package.json +0 -4
- package/testing/package.json +0 -9
- package/upgrade/package.json +0 -10
|
@@ -1,181 +1,182 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.15
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import * as
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
static
|
|
24
|
-
static
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
*
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
*
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
*
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
7
|
+
|
|
8
|
+
import { HttpEvent } from '@angular/common/http';
|
|
9
|
+
import { HttpHeaders } from '@angular/common/http';
|
|
10
|
+
import { HttpRequest } from '@angular/common/http';
|
|
11
|
+
import * as i0 from '@angular/core';
|
|
12
|
+
import * as i1 from '@angular/common/http';
|
|
13
|
+
import { Observer } from 'rxjs';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Configures `HttpClientTestingBackend` as the `HttpBackend` used by `HttpClient`.
|
|
17
|
+
*
|
|
18
|
+
* Inject `HttpTestingController` to expect and flush requests in your tests.
|
|
19
|
+
*
|
|
20
|
+
* @publicApi
|
|
21
|
+
*/
|
|
22
|
+
export declare class HttpClientTestingModule {
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientTestingModule, never>;
|
|
24
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientTestingModule, never, [typeof i1.HttpClientModule], never>;
|
|
25
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientTestingModule>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Controller to be injected into tests, that allows for mocking and flushing
|
|
30
|
+
* of requests.
|
|
31
|
+
*
|
|
32
|
+
* @publicApi
|
|
33
|
+
*/
|
|
34
|
+
export declare abstract class HttpTestingController {
|
|
35
|
+
/**
|
|
36
|
+
* Search for requests that match the given parameter, without any expectations.
|
|
37
|
+
*/
|
|
38
|
+
abstract match(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean)): TestRequest[];
|
|
39
|
+
/**
|
|
40
|
+
* Expect that a single request has been made which matches the given URL, and return its
|
|
41
|
+
* mock.
|
|
42
|
+
*
|
|
43
|
+
* If no such request has been made, or more than one such request has been made, fail with an
|
|
44
|
+
* error message including the given request description, if any.
|
|
45
|
+
*/
|
|
46
|
+
abstract expectOne(url: string, description?: string): TestRequest;
|
|
47
|
+
/**
|
|
48
|
+
* Expect that a single request has been made which matches the given parameters, and return
|
|
49
|
+
* its mock.
|
|
50
|
+
*
|
|
51
|
+
* If no such request has been made, or more than one such request has been made, fail with an
|
|
52
|
+
* error message including the given request description, if any.
|
|
53
|
+
*/
|
|
54
|
+
abstract expectOne(params: RequestMatch, description?: string): TestRequest;
|
|
55
|
+
/**
|
|
56
|
+
* Expect that a single request has been made which matches the given predicate function, and
|
|
57
|
+
* return its mock.
|
|
58
|
+
*
|
|
59
|
+
* If no such request has been made, or more than one such request has been made, fail with an
|
|
60
|
+
* error message including the given request description, if any.
|
|
61
|
+
*/
|
|
62
|
+
abstract expectOne(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
|
|
63
|
+
/**
|
|
64
|
+
* Expect that a single request has been made which matches the given condition, and return
|
|
65
|
+
* its mock.
|
|
66
|
+
*
|
|
67
|
+
* If no such request has been made, or more than one such request has been made, fail with an
|
|
68
|
+
* error message including the given request description, if any.
|
|
69
|
+
*/
|
|
70
|
+
abstract expectOne(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
|
|
71
|
+
/**
|
|
72
|
+
* Expect that no requests have been made which match the given URL.
|
|
73
|
+
*
|
|
74
|
+
* If a matching request has been made, fail with an error message including the given request
|
|
75
|
+
* description, if any.
|
|
76
|
+
*/
|
|
77
|
+
abstract expectNone(url: string, description?: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* Expect that no requests have been made which match the given parameters.
|
|
80
|
+
*
|
|
81
|
+
* If a matching request has been made, fail with an error message including the given request
|
|
82
|
+
* description, if any.
|
|
83
|
+
*/
|
|
84
|
+
abstract expectNone(params: RequestMatch, description?: string): void;
|
|
85
|
+
/**
|
|
86
|
+
* Expect that no requests have been made which match the given predicate function.
|
|
87
|
+
*
|
|
88
|
+
* If a matching request has been made, fail with an error message including the given request
|
|
89
|
+
* description, if any.
|
|
90
|
+
*/
|
|
91
|
+
abstract expectNone(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): void;
|
|
92
|
+
/**
|
|
93
|
+
* Expect that no requests have been made which match the given condition.
|
|
94
|
+
*
|
|
95
|
+
* If a matching request has been made, fail with an error message including the given request
|
|
96
|
+
* description, if any.
|
|
97
|
+
*/
|
|
98
|
+
abstract expectNone(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Verify that no unmatched requests are outstanding.
|
|
101
|
+
*
|
|
102
|
+
* If any requests are outstanding, fail with an error message indicating which requests were not
|
|
103
|
+
* handled.
|
|
104
|
+
*
|
|
105
|
+
* If `ignoreCancelled` is not set (the default), `verify()` will also fail if cancelled requests
|
|
106
|
+
* were not explicitly matched.
|
|
107
|
+
*/
|
|
108
|
+
abstract verify(opts?: {
|
|
109
|
+
ignoreCancelled?: boolean;
|
|
110
|
+
}): void;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Defines a matcher for requests based on URL, method, or both.
|
|
115
|
+
*
|
|
116
|
+
* @publicApi
|
|
117
|
+
*/
|
|
118
|
+
export declare interface RequestMatch {
|
|
119
|
+
method?: string;
|
|
120
|
+
url?: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* A mock requests that was received and is ready to be answered.
|
|
125
|
+
*
|
|
126
|
+
* This interface allows access to the underlying `HttpRequest`, and allows
|
|
127
|
+
* responding with `HttpEvent`s or `HttpErrorResponse`s.
|
|
128
|
+
*
|
|
129
|
+
* @publicApi
|
|
130
|
+
*/
|
|
131
|
+
export declare class TestRequest {
|
|
132
|
+
request: HttpRequest<any>;
|
|
133
|
+
private observer;
|
|
134
|
+
/**
|
|
135
|
+
* Whether the request was cancelled after it was sent.
|
|
136
|
+
*/
|
|
137
|
+
get cancelled(): boolean;
|
|
138
|
+
constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
|
|
139
|
+
/**
|
|
140
|
+
* Resolve the request by returning a body plus additional HTTP information (such as response
|
|
141
|
+
* headers) if provided.
|
|
142
|
+
* If the request specifies an expected body type, the body is converted into the requested type.
|
|
143
|
+
* Otherwise, the body is converted to `JSON` by default.
|
|
144
|
+
*
|
|
145
|
+
* Both successful and unsuccessful responses can be delivered via `flush()`.
|
|
146
|
+
*/
|
|
147
|
+
flush(body: ArrayBuffer | Blob | boolean | string | number | Object | (boolean | string | number | Object | null)[] | null, opts?: {
|
|
148
|
+
headers?: HttpHeaders | {
|
|
149
|
+
[name: string]: string | string[];
|
|
150
|
+
};
|
|
151
|
+
status?: number;
|
|
152
|
+
statusText?: string;
|
|
153
|
+
}): void;
|
|
154
|
+
/**
|
|
155
|
+
* Resolve the request by returning an `ErrorEvent` (e.g. simulating a network failure).
|
|
156
|
+
* @deprecated Http requests never emit an `ErrorEvent`. Please specify a `ProgressEvent`.
|
|
157
|
+
*/
|
|
158
|
+
error(error: ErrorEvent, opts?: TestRequestErrorOptions): void;
|
|
159
|
+
/**
|
|
160
|
+
* Resolve the request by returning an `ProgressEvent` (e.g. simulating a network failure).
|
|
161
|
+
*/
|
|
162
|
+
error(error: ProgressEvent, opts?: TestRequestErrorOptions): void;
|
|
163
|
+
/**
|
|
164
|
+
* Deliver an arbitrary `HttpEvent` (such as a progress event) on the response stream for this
|
|
165
|
+
* request.
|
|
166
|
+
*/
|
|
167
|
+
event(event: HttpEvent<any>): void;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Type that describes options that can be used to create an error
|
|
172
|
+
* in `TestRequest`.
|
|
173
|
+
*/
|
|
174
|
+
declare type TestRequestErrorOptions = {
|
|
175
|
+
headers?: HttpHeaders | {
|
|
176
|
+
[name: string]: string | string[];
|
|
177
|
+
};
|
|
178
|
+
status?: number;
|
|
179
|
+
statusText?: string;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export { }
|