@delon/theme 19.2.0 → 20.0.0-beta.0
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/compact.css +529 -181
- package/compact.min.css +1 -1
- package/dark.css +529 -181
- package/dark.min.css +1 -1
- package/default.css +529 -181
- package/default.min.css +1 -1
- package/fesm2022/layout-default.mjs +52 -66
- package/fesm2022/layout-default.mjs.map +1 -1
- package/fesm2022/setting-drawer.mjs +14 -22
- package/fesm2022/setting-drawer.mjs.map +1 -1
- package/fesm2022/theme-btn.mjs +10 -19
- package/fesm2022/theme-btn.mjs.map +1 -1
- package/fesm2022/theme.mjs +112 -94
- package/fesm2022/theme.mjs.map +1 -1
- package/index.d.ts +1689 -3
- package/layout-blank/index.d.ts +2 -5
- package/layout-default/index.d.ts +245 -5
- package/layout-default/style/fix/_sidebar-nav.less +18 -3
- package/layout-default/style/theme-dark.less +1 -0
- package/layout-default/style/theme-default.less +1 -0
- package/package.json +6 -6
- package/setting-drawer/index.d.ts +65 -5
- package/system/antd/_modal.less +1 -1
- package/system/ng/_preserve-white-spaces.less +8 -8
- package/theme-btn/index.d.ts +42 -5
- package/variable.css +529 -181
- package/variable.min.css +1 -1
- package/layout-blank/public_api.d.ts +0 -2
- package/layout-default/layout-header-item-trigger.directive.d.ts +0 -5
- package/layout-default/layout-header-item.component.d.ts +0 -10
- package/layout-default/layout-header.component.d.ts +0 -31
- package/layout-default/layout-nav.component.d.ts +0 -61
- package/layout-default/layout-top-menu-item.d.ts +0 -9
- package/layout-default/layout.component.d.ts +0 -39
- package/layout-default/layout.module.d.ts +0 -19
- package/layout-default/layout.service.d.ts +0 -29
- package/layout-default/public_api.d.ts +0 -9
- package/layout-default/types.d.ts +0 -60
- package/public_api.d.ts +0 -8
- package/setting-drawer/public_api.d.ts +0 -3
- package/setting-drawer/setting-drawer-item.component.d.ts +0 -11
- package/setting-drawer/setting-drawer.component.d.ts +0 -48
- package/setting-drawer/setting-drawer.module.d.ts +0 -8
- package/setting-drawer/setting-drawer.types.d.ts +0 -7
- package/src/config.d.ts +0 -63
- package/src/locale/index.d.ts +0 -1
- package/src/locale/languages/ar-SA.d.ts +0 -3
- package/src/locale/languages/el-GR.d.ts +0 -3
- package/src/locale/languages/en-US.d.ts +0 -3
- package/src/locale/languages/es-ES.d.ts +0 -3
- package/src/locale/languages/fr-FR.d.ts +0 -3
- package/src/locale/languages/hr-HR.d.ts +0 -3
- package/src/locale/languages/it-IT.d.ts +0 -3
- package/src/locale/languages/ja-JP.d.ts +0 -3
- package/src/locale/languages/ko-KR.d.ts +0 -3
- package/src/locale/languages/pl-PL.d.ts +0 -3
- package/src/locale/languages/sl-SI.d.ts +0 -3
- package/src/locale/languages/tr-TR.d.ts +0 -3
- package/src/locale/languages/vi-VI.d.ts +0 -3
- package/src/locale/languages/zh-CN.d.ts +0 -3
- package/src/locale/languages/zh-TW.d.ts +0 -3
- package/src/locale/locale.module.d.ts +0 -6
- package/src/locale/locale.service.d.ts +0 -17
- package/src/locale/locale.tokens.d.ts +0 -3
- package/src/locale/locale.types.d.ts +0 -93
- package/src/locale/public_api.d.ts +0 -19
- package/src/pipes/date/date.pipe.d.ts +0 -9
- package/src/pipes/index.d.ts +0 -5
- package/src/pipes/keys/keys.pipe.d.ts +0 -11
- package/src/pipes/safe/html.pipe.d.ts +0 -9
- package/src/pipes/safe/url.pipe.d.ts +0 -9
- package/src/pipes/yn/yn.pipe.d.ts +0 -16
- package/src/provide.d.ts +0 -23
- package/src/router/optional-preloader.d.ts +0 -20
- package/src/services/drawer/drawer.helper.d.ts +0 -71
- package/src/services/http/http.client.d.ts +0 -570
- package/src/services/http/http.decorator.d.ts +0 -108
- package/src/services/http/http.token.d.ts +0 -37
- package/src/services/http/index.d.ts +0 -3
- package/src/services/i18n/i18n-url.guard.d.ts +0 -36
- package/src/services/i18n/i18n.d.ts +0 -90
- package/src/services/i18n/i18n.pipe.d.ts +0 -8
- package/src/services/i18n/index.d.ts +0 -3
- package/src/services/index.d.ts +0 -10
- package/src/services/menu/index.d.ts +0 -2
- package/src/services/menu/interface.d.ts +0 -79
- package/src/services/menu/menu.service.d.ts +0 -114
- package/src/services/modal/modal.helper.d.ts +0 -78
- package/src/services/preloader/preloader.d.ts +0 -1
- package/src/services/responsive/responsive.d.ts +0 -12
- package/src/services/rtl/rtl.service.d.ts +0 -48
- package/src/services/settings/index.d.ts +0 -2
- package/src/services/settings/settings.service.d.ts +0 -40
- package/src/services/settings/types.d.ts +0 -35
- package/src/services/title/title.service.d.ts +0 -72
- package/src/theme.module.d.ts +0 -22
- package/src/version.d.ts +0 -2
- package/theme-btn/public_api.d.ts +0 -2
- package/theme-btn/theme-btn.component.d.ts +0 -32
- package/theme-btn/theme-btn.module.d.ts +0 -10
|
@@ -1,570 +0,0 @@
|
|
|
1
|
-
import { HttpContext, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { AlainConfigService } from '@delon/util/config';
|
|
4
|
-
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export type _HttpHeaders = HttpHeaders | Record<string, string | string[]>;
|
|
7
|
-
export type HttpObserve = 'body' | 'events' | 'response';
|
|
8
|
-
/**
|
|
9
|
-
* 封装HttpClient,主要解决:
|
|
10
|
-
* + 优化HttpClient在参数上便利性
|
|
11
|
-
* + 统一实现 loading
|
|
12
|
-
* + 统一处理时间格式问题
|
|
13
|
-
*/
|
|
14
|
-
export declare class _HttpClient {
|
|
15
|
-
private readonly http;
|
|
16
|
-
private cog;
|
|
17
|
-
constructor(cogSrv: AlainConfigService);
|
|
18
|
-
private lc;
|
|
19
|
-
/**
|
|
20
|
-
* Get whether it's loading
|
|
21
|
-
*
|
|
22
|
-
* 获取是否正在加载中
|
|
23
|
-
*/
|
|
24
|
-
get loading(): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Get the currently loading count
|
|
27
|
-
*
|
|
28
|
-
* 获取当前加载中的数量
|
|
29
|
-
*/
|
|
30
|
-
get loadingCount(): number;
|
|
31
|
-
parseParams(params: NzSafeAny): HttpParams;
|
|
32
|
-
appliedUrl(url: string, params?: NzSafeAny): string;
|
|
33
|
-
private setCount;
|
|
34
|
-
private push;
|
|
35
|
-
private pop;
|
|
36
|
-
/**
|
|
37
|
-
* Clean loading count
|
|
38
|
-
*
|
|
39
|
-
* 清空加载中
|
|
40
|
-
*/
|
|
41
|
-
cleanLoading(): void;
|
|
42
|
-
/**
|
|
43
|
-
* **GET Request** Return a `string` type / 返回一个 `string` 类型
|
|
44
|
-
*/
|
|
45
|
-
get(url: string, params: any, options: {
|
|
46
|
-
headers?: _HttpHeaders;
|
|
47
|
-
observe?: 'body';
|
|
48
|
-
reportProgress?: boolean;
|
|
49
|
-
responseType: 'text';
|
|
50
|
-
withCredentials?: boolean;
|
|
51
|
-
context?: HttpContext;
|
|
52
|
-
}): Observable<string>;
|
|
53
|
-
/**
|
|
54
|
-
* **GET Request** Return a `HttpEvent<T>` type / 返回一个 `HttpEvent<T>` 类型
|
|
55
|
-
*/
|
|
56
|
-
get<T>(url: string, params: any, options: {
|
|
57
|
-
headers?: _HttpHeaders;
|
|
58
|
-
observe: 'events';
|
|
59
|
-
reportProgress?: boolean;
|
|
60
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
61
|
-
withCredentials?: boolean;
|
|
62
|
-
context?: HttpContext;
|
|
63
|
-
}): Observable<HttpEvent<T>>;
|
|
64
|
-
/**
|
|
65
|
-
* **GET Request** Return a `HttpResponse<any>` type / 返回一个 `HttpResponse<any>` 类型
|
|
66
|
-
*/
|
|
67
|
-
get(url: string, params: any, options: {
|
|
68
|
-
headers?: _HttpHeaders;
|
|
69
|
-
observe: 'response';
|
|
70
|
-
reportProgress?: boolean;
|
|
71
|
-
responseType?: 'json';
|
|
72
|
-
withCredentials?: boolean;
|
|
73
|
-
context?: HttpContext;
|
|
74
|
-
}): Observable<HttpResponse<any>>;
|
|
75
|
-
/**
|
|
76
|
-
* **GET Request** Return a `HttpResponse<T>` type / 返回一个 `HttpResponse<T>` 类型
|
|
77
|
-
*/
|
|
78
|
-
get<T>(url: string, params: any, options: {
|
|
79
|
-
headers?: _HttpHeaders;
|
|
80
|
-
observe: 'response';
|
|
81
|
-
reportProgress?: boolean;
|
|
82
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
83
|
-
withCredentials?: boolean;
|
|
84
|
-
context?: HttpContext;
|
|
85
|
-
}): Observable<HttpResponse<T>>;
|
|
86
|
-
/**
|
|
87
|
-
* **GET Request** Return a `any` type / 返回一个 `any` 类型
|
|
88
|
-
*/
|
|
89
|
-
get(url: string, params?: any, options?: {
|
|
90
|
-
headers?: _HttpHeaders;
|
|
91
|
-
observe?: 'body' | 'events' | 'response';
|
|
92
|
-
reportProgress?: boolean;
|
|
93
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
94
|
-
withCredentials?: boolean;
|
|
95
|
-
context?: HttpContext;
|
|
96
|
-
}): Observable<any>;
|
|
97
|
-
/**
|
|
98
|
-
* **GET Request** Return a generic type / 返回一个泛类型
|
|
99
|
-
*/
|
|
100
|
-
get<T>(url: string, params?: any, options?: {
|
|
101
|
-
headers?: _HttpHeaders;
|
|
102
|
-
observe: 'body';
|
|
103
|
-
reportProgress?: boolean;
|
|
104
|
-
responseType?: 'json';
|
|
105
|
-
withCredentials?: boolean;
|
|
106
|
-
context?: HttpContext;
|
|
107
|
-
}): Observable<T>;
|
|
108
|
-
/**
|
|
109
|
-
* **POST Request** Return a `string` type / 返回一个 `string` 类型
|
|
110
|
-
*/
|
|
111
|
-
post(url: string, body: any, params: any, options: {
|
|
112
|
-
headers?: _HttpHeaders;
|
|
113
|
-
observe?: 'body';
|
|
114
|
-
reportProgress?: boolean;
|
|
115
|
-
responseType: 'text';
|
|
116
|
-
withCredentials?: boolean;
|
|
117
|
-
context?: HttpContext;
|
|
118
|
-
}): Observable<string>;
|
|
119
|
-
/**
|
|
120
|
-
* **POST Request** Return a `HttpEvent<T>` type / 返回一个 `HttpEvent<T>` 类型
|
|
121
|
-
*/
|
|
122
|
-
post<T>(url: string, body: any, params: any, options: {
|
|
123
|
-
headers?: _HttpHeaders;
|
|
124
|
-
observe: 'events';
|
|
125
|
-
reportProgress?: boolean;
|
|
126
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
127
|
-
withCredentials?: boolean;
|
|
128
|
-
context?: HttpContext;
|
|
129
|
-
}): Observable<HttpEvent<T>>;
|
|
130
|
-
/**
|
|
131
|
-
* **POST Request** Return a `HttpResponse<any>` type / 返回一个 `HttpResponse<any>` 类型
|
|
132
|
-
*/
|
|
133
|
-
post(url: string, body: any, params: any, options: {
|
|
134
|
-
headers?: _HttpHeaders;
|
|
135
|
-
observe: 'response';
|
|
136
|
-
reportProgress?: boolean;
|
|
137
|
-
responseType?: 'json';
|
|
138
|
-
withCredentials?: boolean;
|
|
139
|
-
context?: HttpContext;
|
|
140
|
-
}): Observable<HttpResponse<any>>;
|
|
141
|
-
/**
|
|
142
|
-
* **POST Request** Return a `any` type / 返回一个 `any` 类型
|
|
143
|
-
*/
|
|
144
|
-
post(url: string, body?: any, params?: any, options?: {
|
|
145
|
-
headers?: _HttpHeaders;
|
|
146
|
-
observe?: 'body' | 'events' | 'response';
|
|
147
|
-
reportProgress?: boolean;
|
|
148
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
149
|
-
withCredentials?: boolean;
|
|
150
|
-
context?: HttpContext;
|
|
151
|
-
}): Observable<any>;
|
|
152
|
-
/**
|
|
153
|
-
* **POST Request** Return a JSON type / 返回一个 `JSON` 类型
|
|
154
|
-
*/
|
|
155
|
-
post<T>(url: string, body?: any, params?: any, options?: {
|
|
156
|
-
headers?: _HttpHeaders;
|
|
157
|
-
observe: 'body' | 'response';
|
|
158
|
-
reportProgress?: boolean;
|
|
159
|
-
responseType?: 'json';
|
|
160
|
-
withCredentials?: boolean;
|
|
161
|
-
context?: HttpContext;
|
|
162
|
-
}): Observable<T>;
|
|
163
|
-
/**
|
|
164
|
-
* **DELETE Request** Return a `string` type / 返回一个 `string` 类型
|
|
165
|
-
*/
|
|
166
|
-
delete(url: string, params: any, options: {
|
|
167
|
-
body?: any;
|
|
168
|
-
headers?: _HttpHeaders;
|
|
169
|
-
observe?: 'body';
|
|
170
|
-
reportProgress?: boolean;
|
|
171
|
-
responseType: 'text';
|
|
172
|
-
withCredentials?: boolean;
|
|
173
|
-
context?: HttpContext;
|
|
174
|
-
}): Observable<string>;
|
|
175
|
-
/**
|
|
176
|
-
* **DELETE Request** Return a `JSON` type / 返回一个 `JSON` 类型
|
|
177
|
-
*/
|
|
178
|
-
delete(url: string, params: any, options: {
|
|
179
|
-
body?: any;
|
|
180
|
-
headers?: _HttpHeaders;
|
|
181
|
-
observe: 'response';
|
|
182
|
-
reportProgress?: boolean;
|
|
183
|
-
responseType?: 'json';
|
|
184
|
-
withCredentials?: boolean;
|
|
185
|
-
context?: HttpContext;
|
|
186
|
-
}): Observable<HttpResponse<NzSafeAny>>;
|
|
187
|
-
/**
|
|
188
|
-
* **DELETE Request** Return a `any` type / 返回一个 `any` 类型
|
|
189
|
-
*/
|
|
190
|
-
delete(url: string, params?: any, options?: {
|
|
191
|
-
body?: any;
|
|
192
|
-
headers?: _HttpHeaders;
|
|
193
|
-
observe?: 'body' | 'events' | 'response';
|
|
194
|
-
reportProgress?: boolean;
|
|
195
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
196
|
-
withCredentials?: boolean;
|
|
197
|
-
context?: HttpContext;
|
|
198
|
-
}): Observable<any>;
|
|
199
|
-
/**
|
|
200
|
-
* c返回一个泛类型
|
|
201
|
-
*/
|
|
202
|
-
delete<T>(url: string, params?: any, options?: {
|
|
203
|
-
body?: any;
|
|
204
|
-
headers?: _HttpHeaders;
|
|
205
|
-
observe?: 'body' | 'events' | 'response';
|
|
206
|
-
reportProgress?: boolean;
|
|
207
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
208
|
-
withCredentials?: boolean;
|
|
209
|
-
context?: HttpContext;
|
|
210
|
-
}): Observable<T>;
|
|
211
|
-
/**
|
|
212
|
-
* **JSONP Request**
|
|
213
|
-
*
|
|
214
|
-
* @param callbackParam CALLBACK值,默认:JSONP_CALLBACK
|
|
215
|
-
*/
|
|
216
|
-
jsonp(url: string, params?: any, callbackParam?: string): Observable<any>;
|
|
217
|
-
/**
|
|
218
|
-
* **PATCH Request** Return a `string` type / 返回一个 `string` 类型
|
|
219
|
-
*/
|
|
220
|
-
patch(url: string, body: any, params: any, options: {
|
|
221
|
-
headers?: _HttpHeaders;
|
|
222
|
-
observe?: 'body';
|
|
223
|
-
reportProgress?: boolean;
|
|
224
|
-
responseType: 'text';
|
|
225
|
-
withCredentials?: boolean;
|
|
226
|
-
context?: HttpContext;
|
|
227
|
-
}): Observable<string>;
|
|
228
|
-
/**
|
|
229
|
-
* **PATCH Request** Return a `HttpResponse<JSON>` type / 返回一个 `HttpResponse<JSON>` 类型
|
|
230
|
-
*/
|
|
231
|
-
patch(url: string, body: any, params: any, options: {
|
|
232
|
-
headers?: _HttpHeaders;
|
|
233
|
-
observe: 'response';
|
|
234
|
-
reportProgress?: boolean;
|
|
235
|
-
responseType?: 'json';
|
|
236
|
-
withCredentials?: boolean;
|
|
237
|
-
context?: HttpContext;
|
|
238
|
-
}): Observable<HttpResponse<NzSafeAny>>;
|
|
239
|
-
/**
|
|
240
|
-
* **PATCH Request** Return a `any` type / 返回一个 `any` 类型
|
|
241
|
-
*/
|
|
242
|
-
patch(url: string, body?: any, params?: any, options?: {
|
|
243
|
-
headers?: _HttpHeaders;
|
|
244
|
-
observe?: 'body' | 'events' | 'response';
|
|
245
|
-
reportProgress?: boolean;
|
|
246
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
247
|
-
withCredentials?: boolean;
|
|
248
|
-
context?: HttpContext;
|
|
249
|
-
}): Observable<any>;
|
|
250
|
-
/**
|
|
251
|
-
* **PATCH Request** Return a `JSON` type / 返回一个 `JSON` 类型
|
|
252
|
-
*/
|
|
253
|
-
patch<T>(url: string, body?: any, params?: any, options?: {
|
|
254
|
-
headers?: _HttpHeaders;
|
|
255
|
-
observe: 'response';
|
|
256
|
-
reportProgress?: boolean;
|
|
257
|
-
responseType?: 'json';
|
|
258
|
-
withCredentials?: boolean;
|
|
259
|
-
context?: HttpContext;
|
|
260
|
-
}): Observable<T>;
|
|
261
|
-
/**
|
|
262
|
-
* **PUT Request** Return a `string` type / 返回一个 `string` 类型
|
|
263
|
-
*/
|
|
264
|
-
put(url: string, body: any, params: any, options: {
|
|
265
|
-
headers?: _HttpHeaders;
|
|
266
|
-
observe?: 'body';
|
|
267
|
-
reportProgress?: boolean;
|
|
268
|
-
responseType: 'text';
|
|
269
|
-
withCredentials?: boolean;
|
|
270
|
-
context?: HttpContext;
|
|
271
|
-
}): Observable<string>;
|
|
272
|
-
/**
|
|
273
|
-
* **PUT Request** Return a `HttpResponse<JSON>` type / 返回一个 `HttpResponse<JSON>` 类型
|
|
274
|
-
*/
|
|
275
|
-
put(url: string, body: any, params: any, options: {
|
|
276
|
-
headers?: _HttpHeaders;
|
|
277
|
-
observe: 'response';
|
|
278
|
-
reportProgress?: boolean;
|
|
279
|
-
responseType?: 'json';
|
|
280
|
-
withCredentials?: boolean;
|
|
281
|
-
context?: HttpContext;
|
|
282
|
-
}): Observable<HttpResponse<NzSafeAny>>;
|
|
283
|
-
/**
|
|
284
|
-
* **PUT Request** Return a `any` type / 返回一个 `any` 类型
|
|
285
|
-
*/
|
|
286
|
-
put(url: string, body?: any, params?: any, options?: {
|
|
287
|
-
headers?: _HttpHeaders;
|
|
288
|
-
observe?: 'body' | 'events' | 'response';
|
|
289
|
-
reportProgress?: boolean;
|
|
290
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
291
|
-
withCredentials?: boolean;
|
|
292
|
-
context?: HttpContext;
|
|
293
|
-
}): Observable<any>;
|
|
294
|
-
/**
|
|
295
|
-
* **PUT Request** Return a `JSON` type / 返回一个 `JSON` 类型
|
|
296
|
-
*/
|
|
297
|
-
put<T>(url: string, body?: any, params?: any, options?: {
|
|
298
|
-
headers?: _HttpHeaders;
|
|
299
|
-
observe: 'response';
|
|
300
|
-
reportProgress?: boolean;
|
|
301
|
-
responseType?: 'json';
|
|
302
|
-
withCredentials?: boolean;
|
|
303
|
-
context?: HttpContext;
|
|
304
|
-
}): Observable<T>;
|
|
305
|
-
/**
|
|
306
|
-
* **Form Request** Return a `string` type / 返回一个 `string` 类型
|
|
307
|
-
*/
|
|
308
|
-
form(url: string, body: any, params: any, options: {
|
|
309
|
-
headers?: _HttpHeaders;
|
|
310
|
-
observe?: 'body';
|
|
311
|
-
reportProgress?: boolean;
|
|
312
|
-
responseType: 'text';
|
|
313
|
-
withCredentials?: boolean;
|
|
314
|
-
context?: HttpContext;
|
|
315
|
-
}): Observable<string>;
|
|
316
|
-
/**
|
|
317
|
-
* **Form Request** Return a `HttpEvent<T>` type / 返回一个 `HttpEvent<T>` 类型
|
|
318
|
-
*/
|
|
319
|
-
form<T>(url: string, body: any, params: any, options: {
|
|
320
|
-
headers?: _HttpHeaders;
|
|
321
|
-
observe: 'events';
|
|
322
|
-
reportProgress?: boolean;
|
|
323
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
324
|
-
withCredentials?: boolean;
|
|
325
|
-
context?: HttpContext;
|
|
326
|
-
}): Observable<HttpEvent<T>>;
|
|
327
|
-
/**
|
|
328
|
-
* **Form Request** Return a `HttpResponse<JSON>` type / 返回一个 `HttpResponse<JSON>` 类型
|
|
329
|
-
*/
|
|
330
|
-
form(url: string, body: any, params: any, options: {
|
|
331
|
-
headers?: _HttpHeaders;
|
|
332
|
-
observe: 'response';
|
|
333
|
-
reportProgress?: boolean;
|
|
334
|
-
responseType?: 'json';
|
|
335
|
-
withCredentials?: boolean;
|
|
336
|
-
context?: HttpContext;
|
|
337
|
-
}): Observable<HttpResponse<any>>;
|
|
338
|
-
/**
|
|
339
|
-
* **Form Request** Return a `any` type / 返回一个 `any` 类型
|
|
340
|
-
*/
|
|
341
|
-
form(url: string, body?: any, params?: any, options?: {
|
|
342
|
-
headers?: _HttpHeaders;
|
|
343
|
-
observe?: 'body' | 'events' | 'response';
|
|
344
|
-
reportProgress?: boolean;
|
|
345
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
346
|
-
withCredentials?: boolean;
|
|
347
|
-
context?: HttpContext;
|
|
348
|
-
}): Observable<any>;
|
|
349
|
-
/**
|
|
350
|
-
* **Form Request** Return a `JSON` type / 返回一个 `JSON` 类型
|
|
351
|
-
*/
|
|
352
|
-
form<T>(url: string, body?: any, params?: any, options?: {
|
|
353
|
-
headers?: _HttpHeaders;
|
|
354
|
-
observe: 'response';
|
|
355
|
-
reportProgress?: boolean;
|
|
356
|
-
responseType?: 'json';
|
|
357
|
-
withCredentials?: boolean;
|
|
358
|
-
context?: HttpContext;
|
|
359
|
-
}): Observable<T>;
|
|
360
|
-
/**
|
|
361
|
-
* **Request** Return a `ArrayBuffer` type / 返回一个 `ArrayBuffer` 类型
|
|
362
|
-
*/
|
|
363
|
-
request(method: string, url: string, options: {
|
|
364
|
-
body?: any;
|
|
365
|
-
headers?: _HttpHeaders;
|
|
366
|
-
params?: any;
|
|
367
|
-
observe?: 'body';
|
|
368
|
-
reportProgress?: boolean;
|
|
369
|
-
responseType: 'arraybuffer';
|
|
370
|
-
withCredentials?: boolean;
|
|
371
|
-
context?: HttpContext;
|
|
372
|
-
}): Observable<ArrayBuffer>;
|
|
373
|
-
/**
|
|
374
|
-
* **Request** Return a `Blob` type / 返回一个 `Blob` 类型
|
|
375
|
-
*/
|
|
376
|
-
request(method: string, url: string, options: {
|
|
377
|
-
body?: any;
|
|
378
|
-
headers?: _HttpHeaders;
|
|
379
|
-
params?: any;
|
|
380
|
-
observe?: 'body';
|
|
381
|
-
reportProgress?: boolean;
|
|
382
|
-
responseType: 'blob';
|
|
383
|
-
withCredentials?: boolean;
|
|
384
|
-
context?: HttpContext;
|
|
385
|
-
}): Observable<Blob>;
|
|
386
|
-
/**
|
|
387
|
-
* **Request** Return a `string` type / 返回一个 `string` 类型
|
|
388
|
-
*/
|
|
389
|
-
request(method: string, url: string, options: {
|
|
390
|
-
body?: any;
|
|
391
|
-
headers?: _HttpHeaders;
|
|
392
|
-
params?: any;
|
|
393
|
-
observe?: 'body';
|
|
394
|
-
reportProgress?: boolean;
|
|
395
|
-
responseType: 'text';
|
|
396
|
-
withCredentials?: boolean;
|
|
397
|
-
context?: HttpContext;
|
|
398
|
-
}): Observable<string>;
|
|
399
|
-
/**
|
|
400
|
-
* **Request** Return a `HttpEvent<ArrayBuffer>` type / 返回一个 `HttpEvent<ArrayBuffer>` 类型
|
|
401
|
-
*/
|
|
402
|
-
request(method: string, url: string, options: {
|
|
403
|
-
body?: any;
|
|
404
|
-
headers?: _HttpHeaders;
|
|
405
|
-
params?: any;
|
|
406
|
-
observe: 'events';
|
|
407
|
-
reportProgress?: boolean;
|
|
408
|
-
responseType: 'arraybuffer';
|
|
409
|
-
withCredentials?: boolean;
|
|
410
|
-
context?: HttpContext;
|
|
411
|
-
}): Observable<HttpEvent<ArrayBuffer>>;
|
|
412
|
-
/**
|
|
413
|
-
* **Request** Return a `HttpEvent<Blob>` type / 返回一个 `HttpEvent<Blob>` 类型
|
|
414
|
-
*/
|
|
415
|
-
request(method: string, url: string, options: {
|
|
416
|
-
body?: any;
|
|
417
|
-
headers?: _HttpHeaders;
|
|
418
|
-
params?: any;
|
|
419
|
-
observe: 'events';
|
|
420
|
-
reportProgress?: boolean;
|
|
421
|
-
responseType: 'blob';
|
|
422
|
-
withCredentials?: boolean;
|
|
423
|
-
context?: HttpContext;
|
|
424
|
-
}): Observable<HttpEvent<Blob>>;
|
|
425
|
-
/**
|
|
426
|
-
* **Request** Return a `HttpEvent<string>` type / 返回一个 `HttpEvent<string>` 类型
|
|
427
|
-
*/
|
|
428
|
-
request(method: string, url: string, options: {
|
|
429
|
-
body?: any;
|
|
430
|
-
headers?: _HttpHeaders;
|
|
431
|
-
params?: any;
|
|
432
|
-
observe: 'events';
|
|
433
|
-
reportProgress?: boolean;
|
|
434
|
-
responseType: 'text';
|
|
435
|
-
withCredentials?: boolean;
|
|
436
|
-
context?: HttpContext;
|
|
437
|
-
}): Observable<HttpEvent<string>>;
|
|
438
|
-
/**
|
|
439
|
-
* **Request** Return a `HttpEvent<any>` type / 返回一个 `HttpEvent<any>` 类型
|
|
440
|
-
*/
|
|
441
|
-
request(method: string, url: string, options: {
|
|
442
|
-
body?: any;
|
|
443
|
-
headers?: _HttpHeaders;
|
|
444
|
-
params?: any;
|
|
445
|
-
reportProgress?: boolean;
|
|
446
|
-
observe: 'events';
|
|
447
|
-
responseType?: 'json';
|
|
448
|
-
withCredentials?: boolean;
|
|
449
|
-
context?: HttpContext;
|
|
450
|
-
}): Observable<HttpEvent<any>>;
|
|
451
|
-
/**
|
|
452
|
-
* **Request** Return a `HttpEvent<R>` type / 返回一个 `HttpEvent<R>` 类型
|
|
453
|
-
*/
|
|
454
|
-
request<R>(method: string, url: string, options: {
|
|
455
|
-
body?: any;
|
|
456
|
-
headers?: _HttpHeaders;
|
|
457
|
-
params?: any;
|
|
458
|
-
reportProgress?: boolean;
|
|
459
|
-
observe: 'events';
|
|
460
|
-
responseType?: 'json';
|
|
461
|
-
withCredentials?: boolean;
|
|
462
|
-
context?: HttpContext;
|
|
463
|
-
}): Observable<HttpEvent<R>>;
|
|
464
|
-
/**
|
|
465
|
-
* **Request** Return a `HttpResponse<ArrayBuffer>` type / 返回一个 `HttpResponse<ArrayBuffer>` 类型
|
|
466
|
-
*/
|
|
467
|
-
request(method: string, url: string, options: {
|
|
468
|
-
body?: any;
|
|
469
|
-
headers?: _HttpHeaders;
|
|
470
|
-
params?: any;
|
|
471
|
-
observe: 'response';
|
|
472
|
-
reportProgress?: boolean;
|
|
473
|
-
responseType: 'arraybuffer';
|
|
474
|
-
withCredentials?: boolean;
|
|
475
|
-
context?: HttpContext;
|
|
476
|
-
}): Observable<HttpResponse<ArrayBuffer>>;
|
|
477
|
-
/**
|
|
478
|
-
* **Request** Return a `HttpResponse<Blob>` type / 返回一个 `HttpResponse<Blob>` 类型
|
|
479
|
-
*/
|
|
480
|
-
request(method: string, url: string, options: {
|
|
481
|
-
body?: any;
|
|
482
|
-
headers?: _HttpHeaders;
|
|
483
|
-
params?: any;
|
|
484
|
-
observe: 'response';
|
|
485
|
-
reportProgress?: boolean;
|
|
486
|
-
responseType: 'blob';
|
|
487
|
-
withCredentials?: boolean;
|
|
488
|
-
context?: HttpContext;
|
|
489
|
-
}): Observable<HttpResponse<Blob>>;
|
|
490
|
-
/**
|
|
491
|
-
* **Request** Return a `HttpResponse<string>` type / 返回一个 `HttpResponse<string>` 类型
|
|
492
|
-
*/
|
|
493
|
-
request(method: string, url: string, options: {
|
|
494
|
-
body?: any;
|
|
495
|
-
headers?: _HttpHeaders;
|
|
496
|
-
params?: any;
|
|
497
|
-
observe: 'response';
|
|
498
|
-
reportProgress?: boolean;
|
|
499
|
-
responseType: 'text';
|
|
500
|
-
withCredentials?: boolean;
|
|
501
|
-
context?: HttpContext;
|
|
502
|
-
}): Observable<HttpResponse<string>>;
|
|
503
|
-
/**
|
|
504
|
-
* **Request** Return a `HttpResponse<Object>` type / 返回一个 `HttpResponse<Object>` 类型
|
|
505
|
-
*/
|
|
506
|
-
request(method: string, url: string, options: {
|
|
507
|
-
body?: any;
|
|
508
|
-
headers?: _HttpHeaders;
|
|
509
|
-
params?: any;
|
|
510
|
-
reportProgress?: boolean;
|
|
511
|
-
observe: 'response';
|
|
512
|
-
responseType?: 'json';
|
|
513
|
-
withCredentials?: boolean;
|
|
514
|
-
context?: HttpContext;
|
|
515
|
-
}): Observable<HttpResponse<NzSafeAny>>;
|
|
516
|
-
/**
|
|
517
|
-
* **Request** Return a `HttpResponse<R>` type / 返回一个 `HttpResponse<R>` 类型
|
|
518
|
-
*/
|
|
519
|
-
request<R>(method: string, url: string, options: {
|
|
520
|
-
body?: any;
|
|
521
|
-
headers?: _HttpHeaders;
|
|
522
|
-
params?: any;
|
|
523
|
-
reportProgress?: boolean;
|
|
524
|
-
observe: 'response';
|
|
525
|
-
responseType?: 'json';
|
|
526
|
-
withCredentials?: boolean;
|
|
527
|
-
context?: HttpContext;
|
|
528
|
-
}): Observable<HttpResponse<R>>;
|
|
529
|
-
/**
|
|
530
|
-
* **Request** Return a `HttpResponse<Object>` type / 返回一个 `HttpResponse<Object>` 类型
|
|
531
|
-
*/
|
|
532
|
-
request(method: string, url: string, options?: {
|
|
533
|
-
body?: any;
|
|
534
|
-
headers?: _HttpHeaders;
|
|
535
|
-
params?: any;
|
|
536
|
-
observe?: 'body';
|
|
537
|
-
responseType?: 'json';
|
|
538
|
-
reportProgress?: boolean;
|
|
539
|
-
withCredentials?: boolean;
|
|
540
|
-
context?: HttpContext;
|
|
541
|
-
}): Observable<Record<string, unknown>>;
|
|
542
|
-
/**
|
|
543
|
-
* **Request** Return a `R` type / 返回一个 `R` 类型
|
|
544
|
-
*/
|
|
545
|
-
request<R>(method: string, url: string, options?: {
|
|
546
|
-
body?: any;
|
|
547
|
-
headers?: _HttpHeaders;
|
|
548
|
-
params?: any;
|
|
549
|
-
observe?: 'body';
|
|
550
|
-
responseType?: 'json';
|
|
551
|
-
reportProgress?: boolean;
|
|
552
|
-
withCredentials?: boolean;
|
|
553
|
-
context?: HttpContext;
|
|
554
|
-
}): Observable<R>;
|
|
555
|
-
/**
|
|
556
|
-
* **Request** Return a `any` type / 返回一个 `any` 类型
|
|
557
|
-
*/
|
|
558
|
-
request(method: string, url: string, options?: {
|
|
559
|
-
body?: any;
|
|
560
|
-
headers?: _HttpHeaders;
|
|
561
|
-
params?: any;
|
|
562
|
-
observe?: HttpObserve;
|
|
563
|
-
reportProgress?: boolean;
|
|
564
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
565
|
-
withCredentials?: boolean;
|
|
566
|
-
context?: HttpContext;
|
|
567
|
-
}): Observable<any>;
|
|
568
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<_HttpClient, never>;
|
|
569
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<_HttpClient>;
|
|
570
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { HttpHeaders, HttpContext } from '@angular/common/http';
|
|
2
|
-
import { Injector } from '@angular/core';
|
|
3
|
-
import { ACLCanType } from '@delon/acl';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Every http decorator must be based on `BaseAPI`, Like this:
|
|
7
|
-
* ```ts
|
|
8
|
-
* \@Injectable()
|
|
9
|
-
* class DataService extends BaseApi {}
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export declare abstract class BaseApi {
|
|
13
|
-
protected readonly injector: Injector;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseApi, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BaseApi>;
|
|
16
|
-
}
|
|
17
|
-
export interface HttpOptions {
|
|
18
|
-
/** ACL配置,若导入 `@delon/acl` 时自动有效,等同于 `ACLService.can(roleOrAbility: ACLCanType)` 参数值 */
|
|
19
|
-
acl?: ACLCanType;
|
|
20
|
-
observe?: 'body' | 'events' | 'response';
|
|
21
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
22
|
-
reportProgress?: boolean;
|
|
23
|
-
withCredentials?: boolean;
|
|
24
|
-
context?: HttpContext;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 默认基准URL
|
|
28
|
-
* - 有效范围:类
|
|
29
|
-
*/
|
|
30
|
-
export declare function BaseUrl(url: string): <TClass extends new (...args: any[]) => BaseApi>(target: TClass) => TClass;
|
|
31
|
-
/**
|
|
32
|
-
* 默认 `headers`
|
|
33
|
-
* - 有效范围:类
|
|
34
|
-
*/
|
|
35
|
-
export declare function BaseHeaders(headers: HttpHeaders | Record<string, string | string[]>): <TClass extends new (...args: any[]) => BaseApi>(target: TClass) => TClass;
|
|
36
|
-
/**
|
|
37
|
-
* URL路由参数
|
|
38
|
-
* - 有效范围:方法参数
|
|
39
|
-
*/
|
|
40
|
-
export declare const Path: (key?: string) => (target: BaseApi, propertyKey: string, index: number) => void;
|
|
41
|
-
/**
|
|
42
|
-
* URL 参数 `QueryString`
|
|
43
|
-
* - 有效范围:方法参数
|
|
44
|
-
*/
|
|
45
|
-
export declare const Query: (key?: string) => (target: BaseApi, propertyKey: string, index: number) => void;
|
|
46
|
-
/**
|
|
47
|
-
* 参数 `Body`
|
|
48
|
-
* - 有效范围:方法参数
|
|
49
|
-
*/
|
|
50
|
-
export declare const Body: (target: BaseApi, propertyKey: string, index: number) => void;
|
|
51
|
-
/**
|
|
52
|
-
* 参数 `headers`
|
|
53
|
-
* - 有效范围:方法参数
|
|
54
|
-
* - 合并 `BaseHeaders`
|
|
55
|
-
*/
|
|
56
|
-
export declare const Headers: (key?: string) => (target: BaseApi, propertyKey: string, index: number) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Request Payload
|
|
59
|
-
* - Supported body (like`POST`, `PUT`) as a body data, equivalent to `@Body`
|
|
60
|
-
* - Not supported body (like `GET`, `DELETE` etc) as a `QueryString`
|
|
61
|
-
*/
|
|
62
|
-
export declare const Payload: (target: BaseApi, propertyKey: string, index: number) => void;
|
|
63
|
-
export type METHOD_TYPE = 'OPTIONS' | 'GET' | 'POST' | 'DELETE' | 'PUT' | 'HEAD' | 'PATCH' | 'JSONP' | 'FORM';
|
|
64
|
-
/**
|
|
65
|
-
* `OPTIONS` 请求
|
|
66
|
-
* - 有效范围:方法
|
|
67
|
-
*/
|
|
68
|
-
export declare const OPTIONS: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* `GET` 请求
|
|
71
|
-
* - 有效范围:方法
|
|
72
|
-
*/
|
|
73
|
-
export declare const GET: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
74
|
-
/**
|
|
75
|
-
* `POST` 请求
|
|
76
|
-
* - 有效范围:方法
|
|
77
|
-
*/
|
|
78
|
-
export declare const POST: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
79
|
-
/**
|
|
80
|
-
* `DELETE` 请求
|
|
81
|
-
* - 有效范围:方法
|
|
82
|
-
*/
|
|
83
|
-
export declare const DELETE: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* `PUT` 请求
|
|
86
|
-
* - 有效范围:方法
|
|
87
|
-
*/
|
|
88
|
-
export declare const PUT: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* `HEAD` 请求
|
|
91
|
-
* - 有效范围:方法
|
|
92
|
-
*/
|
|
93
|
-
export declare const HEAD: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
94
|
-
/**
|
|
95
|
-
* `PATCH` 请求
|
|
96
|
-
* - 有效范围:方法
|
|
97
|
-
*/
|
|
98
|
-
export declare const PATCH: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* `JSONP` 请求
|
|
101
|
-
* - 有效范围:方法
|
|
102
|
-
*/
|
|
103
|
-
export declare const JSONP: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* `FORM` 请求
|
|
106
|
-
* - 有效范围:方法
|
|
107
|
-
*/
|
|
108
|
-
export declare const FORM: (url?: string, options?: HttpOptions) => (_target: BaseApi, targetKey?: string, descriptor?: PropertyDescriptor) => PropertyDescriptor | undefined;
|