@delon/theme 13.5.1 → 14.0.0-beta.1
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 +1273 -794
- package/compact.min.css +1 -1
- package/dark.css +1280 -800
- package/dark.min.css +1 -1
- package/default.css +1275 -796
- package/default.min.css +1 -1
- package/esm2020/layout-default/layout-header-item-trigger.directive.mjs +4 -4
- package/esm2020/layout-default/layout-header-item.component.mjs +4 -4
- package/esm2020/layout-default/layout-header.component.mjs +5 -5
- package/esm2020/layout-default/layout-nav.component.mjs +34 -47
- package/esm2020/layout-default/layout.component.mjs +7 -7
- package/esm2020/layout-default/layout.module.mjs +12 -14
- package/esm2020/public_api.mjs +2 -3
- package/esm2020/setting-drawer/setting-drawer-item.component.mjs +10 -10
- package/esm2020/setting-drawer/setting-drawer.component.mjs +16 -16
- package/esm2020/setting-drawer/setting-drawer.module.mjs +16 -18
- package/esm2020/src/locale/languages/zh-TW.mjs +3 -3
- package/esm2020/src/locale/locale.module.mjs +5 -5
- package/esm2020/src/locale/locale.service.mjs +4 -4
- package/esm2020/src/pipes/date/date.pipe.mjs +4 -4
- package/esm2020/src/pipes/keys/keys.pipe.mjs +4 -4
- package/esm2020/src/pipes/safe/html.pipe.mjs +4 -4
- package/esm2020/src/pipes/safe/url.pipe.mjs +4 -4
- package/esm2020/src/pipes/yn/yn.pipe.mjs +4 -4
- package/esm2020/src/services/drawer/drawer.helper.mjs +4 -4
- package/esm2020/src/services/http/http.client.mjs +4 -4
- package/esm2020/src/services/http/http.decorator.mjs +4 -4
- package/esm2020/src/services/http/http.token.mjs +38 -0
- package/esm2020/src/services/http/index.mjs +4 -0
- package/esm2020/src/services/i18n/i18n-url.guard.mjs +4 -4
- package/esm2020/src/services/i18n/i18n.mjs +7 -7
- package/esm2020/src/services/i18n/i18n.pipe.mjs +4 -4
- package/esm2020/src/services/menu/interface.mjs +1 -1
- package/esm2020/src/services/menu/menu.service.mjs +127 -36
- package/esm2020/src/services/modal/modal.helper.mjs +4 -4
- package/esm2020/src/services/responsive/responsive.mjs +4 -4
- package/esm2020/src/services/rtl/rtl.service.mjs +4 -4
- package/esm2020/src/services/settings/settings.service.mjs +4 -4
- package/esm2020/src/services/title/title.service.mjs +71 -49
- package/esm2020/src/theme.module.mjs +6 -6
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/theme-btn/theme-btn.component.mjs +8 -8
- package/esm2020/theme-btn/theme-btn.module.mjs +6 -6
- package/fesm2015/layout-default.mjs +179 -194
- package/fesm2015/layout-default.mjs.map +1 -1
- package/fesm2015/setting-drawer.mjs +41 -43
- package/fesm2015/setting-drawer.mjs.map +1 -1
- package/fesm2015/theme-btn.mjs +12 -12
- package/fesm2015/theme-btn.mjs.map +1 -1
- package/fesm2015/theme.mjs +301 -148
- package/fesm2015/theme.mjs.map +1 -1
- package/fesm2020/layout-default.mjs +179 -194
- package/fesm2020/layout-default.mjs.map +1 -1
- package/fesm2020/setting-drawer.mjs +41 -43
- package/fesm2020/setting-drawer.mjs.map +1 -1
- package/fesm2020/theme-btn.mjs +12 -12
- package/fesm2020/theme-btn.mjs.map +1 -1
- package/fesm2020/theme.mjs +298 -148
- package/fesm2020/theme.mjs.map +1 -1
- package/{theme.d.ts → index.d.ts} +0 -0
- package/layout-blank/{layout-blank.d.ts → index.d.ts} +0 -0
- package/layout-default/{layout-default.d.ts → index.d.ts} +0 -0
- package/layout-default/layout-header-item-trigger.directive.d.ts +1 -1
- package/layout-default/layout-header-item.component.d.ts +1 -1
- package/layout-default/layout-header.component.d.ts +1 -1
- package/layout-default/layout-nav.component.d.ts +4 -3
- package/layout-default/layout.component.d.ts +1 -1
- package/package.json +10 -10
- package/public_api.d.ts +1 -2
- package/setting-drawer/{setting-drawer.d.ts → index.d.ts} +0 -0
- package/setting-drawer/setting-drawer-item.component.d.ts +1 -1
- package/setting-drawer/setting-drawer.component.d.ts +1 -1
- package/src/pipes/date/date.pipe.d.ts +1 -1
- package/src/pipes/keys/keys.pipe.d.ts +1 -1
- package/src/pipes/safe/html.pipe.d.ts +1 -1
- package/src/pipes/safe/url.pipe.d.ts +1 -1
- package/src/pipes/yn/yn.pipe.d.ts +1 -1
- package/src/services/http/http.decorator.d.ts +12 -12
- package/src/services/http/http.token.d.ts +37 -0
- package/src/services/http/index.d.ts +3 -0
- package/src/services/i18n/i18n.pipe.d.ts +1 -1
- package/src/services/menu/interface.d.ts +5 -22
- package/src/services/menu/menu.service.d.ts +46 -7
- package/src/services/title/title.service.d.ts +39 -8
- package/system/antd/_drawer.less +55 -4
- package/system/theme-default.less +4 -0
- package/theme-btn/{theme-btn.d.ts → index.d.ts} +0 -0
- package/theme-btn/theme-btn.component.d.ts +1 -1
- package/layout-blank/package.json +0 -10
- package/layout-default/package.json +0 -10
- package/setting-drawer/package.json +0 -10
- package/theme-btn/package.json +0 -10
package/fesm2020/theme.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, Optional, Inject, Pipe, SkipSelf, NgModule, Injector, Version } from '@angular/core';
|
|
3
|
-
import { BehaviorSubject, filter, share, Subject, map,
|
|
3
|
+
import { BehaviorSubject, filter, share, Subject, map, takeUntil, of, delay, isObservable, switchMap, Observable, tap, finalize, throwError, catchError } from 'rxjs';
|
|
4
4
|
import * as i1 from '@delon/util/config';
|
|
5
5
|
import { AlainConfigService } from '@delon/util/config';
|
|
6
6
|
import * as i1$1 from '@delon/acl';
|
|
@@ -15,7 +15,7 @@ import { deepMerge } from '@delon/util/other';
|
|
|
15
15
|
import * as i1$5 from 'ng-zorro-antd/modal';
|
|
16
16
|
import * as i1$6 from 'ng-zorro-antd/drawer';
|
|
17
17
|
import * as i1$7 from '@angular/common/http';
|
|
18
|
-
import { HttpParams } from '@angular/common/http';
|
|
18
|
+
import { HttpParams, HttpContextToken } from '@angular/common/http';
|
|
19
19
|
import { formatDistanceToNow, format } from 'date-fns';
|
|
20
20
|
import { toDate } from '@delon/util/date-time';
|
|
21
21
|
import * as i1$8 from 'ng-zorro-antd/i18n';
|
|
@@ -114,9 +114,9 @@ class AlainI18nBaseService {
|
|
|
114
114
|
return content;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
AlainI18nBaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
118
|
-
AlainI18nBaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
117
|
+
AlainI18nBaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18nBaseService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
118
|
+
AlainI18nBaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18nBaseService });
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18nBaseService, decorators: [{
|
|
120
120
|
type: Injectable
|
|
121
121
|
}], ctorParameters: function () { return [{ type: i1.AlainConfigService }]; } });
|
|
122
122
|
class AlainI18NServiceFake extends AlainI18nBaseService {
|
|
@@ -129,9 +129,9 @@ class AlainI18NServiceFake extends AlainI18nBaseService {
|
|
|
129
129
|
return [];
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
AlainI18NServiceFake.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
133
|
-
AlainI18NServiceFake.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
132
|
+
AlainI18NServiceFake.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NServiceFake, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
133
|
+
AlainI18NServiceFake.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NServiceFake, providedIn: 'root' });
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NServiceFake, decorators: [{
|
|
135
135
|
type: Injectable,
|
|
136
136
|
args: [{ providedIn: 'root' }]
|
|
137
137
|
}] });
|
|
@@ -145,11 +145,18 @@ class MenuService {
|
|
|
145
145
|
this.aclService = aclService;
|
|
146
146
|
this._change$ = new BehaviorSubject([]);
|
|
147
147
|
this.data = [];
|
|
148
|
+
/**
|
|
149
|
+
* 是否完全受控菜单打开状态,默认:`false`
|
|
150
|
+
*/
|
|
151
|
+
this.openStrictly = false;
|
|
148
152
|
this.i18n$ = this.i18nSrv.change.subscribe(() => this.resume());
|
|
149
153
|
}
|
|
150
154
|
get change() {
|
|
151
155
|
return this._change$.pipe(share());
|
|
152
156
|
}
|
|
157
|
+
get menus() {
|
|
158
|
+
return this.data;
|
|
159
|
+
}
|
|
153
160
|
visit(data, callback) {
|
|
154
161
|
const inFn = (list, parentMenu, depth) => {
|
|
155
162
|
for (const item of list) {
|
|
@@ -212,6 +219,7 @@ class MenuService {
|
|
|
212
219
|
item.disabled = typeof item.disabled === 'undefined' ? false : item.disabled;
|
|
213
220
|
// acl
|
|
214
221
|
item._aclResult = item.acl && this.aclService ? this.aclService.can(item.acl) : true;
|
|
222
|
+
item.open = item.open != null ? item.open : false;
|
|
215
223
|
}
|
|
216
224
|
resume(callback) {
|
|
217
225
|
let i = 1;
|
|
@@ -270,9 +278,6 @@ class MenuService {
|
|
|
270
278
|
return i;
|
|
271
279
|
});
|
|
272
280
|
}
|
|
273
|
-
get menus() {
|
|
274
|
-
return this.data;
|
|
275
|
-
}
|
|
276
281
|
/**
|
|
277
282
|
* 清空菜单
|
|
278
283
|
*/
|
|
@@ -280,18 +285,28 @@ class MenuService {
|
|
|
280
285
|
this.data = [];
|
|
281
286
|
this._change$.next(this.data);
|
|
282
287
|
}
|
|
283
|
-
|
|
288
|
+
/**
|
|
289
|
+
* Use `url` or `key` to find menus
|
|
290
|
+
*
|
|
291
|
+
* 利用 `url` 或 `key` 查找菜单
|
|
292
|
+
*/
|
|
293
|
+
find(options) {
|
|
294
|
+
const opt = { recursive: false, ...options };
|
|
295
|
+
if (opt.key != null) {
|
|
296
|
+
return this.getItem(opt.key);
|
|
297
|
+
}
|
|
298
|
+
let url = opt.url;
|
|
284
299
|
let item = null;
|
|
285
300
|
while (!item && url) {
|
|
286
|
-
this.visit(data, i => {
|
|
287
|
-
if (cb) {
|
|
288
|
-
cb(i);
|
|
301
|
+
this.visit(opt.data ?? this.data, i => {
|
|
302
|
+
if (opt.cb) {
|
|
303
|
+
opt.cb(i);
|
|
289
304
|
}
|
|
290
305
|
if (i.link != null && i.link === url) {
|
|
291
306
|
item = i;
|
|
292
307
|
}
|
|
293
308
|
});
|
|
294
|
-
if (!recursive)
|
|
309
|
+
if (!opt.recursive)
|
|
295
310
|
break;
|
|
296
311
|
if (/[?;]/g.test(url)) {
|
|
297
312
|
url = url.split(/[?;]/g)[0];
|
|
@@ -302,26 +317,6 @@ class MenuService {
|
|
|
302
317
|
}
|
|
303
318
|
return item;
|
|
304
319
|
}
|
|
305
|
-
/**
|
|
306
|
-
* 根据URL设置菜单 `_open` 属性
|
|
307
|
-
* - 若 `recursive: true` 则会自动向上递归查找
|
|
308
|
-
* - 菜单数据源包含 `/ware`,则 `/ware/1` 也视为 `/ware` 项
|
|
309
|
-
*/
|
|
310
|
-
openedByUrl(url, recursive = false) {
|
|
311
|
-
if (!url)
|
|
312
|
-
return;
|
|
313
|
-
let findItem = this.getHit(this.data, url, recursive, (i) => {
|
|
314
|
-
i._selected = false;
|
|
315
|
-
i._open = false;
|
|
316
|
-
});
|
|
317
|
-
if (findItem == null)
|
|
318
|
-
return;
|
|
319
|
-
do {
|
|
320
|
-
findItem._selected = true;
|
|
321
|
-
findItem._open = true;
|
|
322
|
-
findItem = findItem._parent;
|
|
323
|
-
} while (findItem);
|
|
324
|
-
}
|
|
325
320
|
/**
|
|
326
321
|
* 根据url获取菜单列表
|
|
327
322
|
* - 若 `recursive: true` 则会自动向上递归查找
|
|
@@ -329,7 +324,7 @@ class MenuService {
|
|
|
329
324
|
*/
|
|
330
325
|
getPathByUrl(url, recursive = false) {
|
|
331
326
|
const ret = [];
|
|
332
|
-
let item = this.
|
|
327
|
+
let item = this.find({ url, recursive });
|
|
333
328
|
if (!item)
|
|
334
329
|
return ret;
|
|
335
330
|
do {
|
|
@@ -353,24 +348,120 @@ class MenuService {
|
|
|
353
348
|
/**
|
|
354
349
|
* Set menu based on `key`
|
|
355
350
|
*/
|
|
356
|
-
setItem(key, value) {
|
|
357
|
-
const item = this.getItem(key);
|
|
351
|
+
setItem(key, value, options) {
|
|
352
|
+
const item = typeof key === 'string' ? this.getItem(key) : key;
|
|
358
353
|
if (item == null)
|
|
359
354
|
return;
|
|
360
355
|
Object.keys(value).forEach(k => {
|
|
361
356
|
item[k] = value[k];
|
|
362
357
|
});
|
|
363
358
|
this.fixItem(item);
|
|
364
|
-
|
|
359
|
+
if (options?.emit !== false)
|
|
360
|
+
this._change$.next(this.data);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Open menu based on `key` or menu object
|
|
364
|
+
*/
|
|
365
|
+
open(keyOrItem, options) {
|
|
366
|
+
let item = typeof keyOrItem === 'string' ? this.find({ key: keyOrItem }) : keyOrItem;
|
|
367
|
+
if (item == null)
|
|
368
|
+
return;
|
|
369
|
+
this.visit(this.menus, (i) => {
|
|
370
|
+
i._selected = false;
|
|
371
|
+
if (!this.openStrictly)
|
|
372
|
+
i.open = false;
|
|
373
|
+
});
|
|
374
|
+
do {
|
|
375
|
+
item._selected = true;
|
|
376
|
+
item.open = true;
|
|
377
|
+
item = item._parent;
|
|
378
|
+
} while (item);
|
|
379
|
+
if (options?.emit !== false)
|
|
380
|
+
this._change$.next(this.data);
|
|
381
|
+
}
|
|
382
|
+
openAll(status) {
|
|
383
|
+
this.toggleOpen(null, { allStatus: status });
|
|
384
|
+
}
|
|
385
|
+
toggleOpen(keyOrItem, options) {
|
|
386
|
+
let item = typeof keyOrItem === 'string' ? this.find({ key: keyOrItem }) : keyOrItem;
|
|
387
|
+
if (item == null) {
|
|
388
|
+
this.visit(this.menus, (i) => {
|
|
389
|
+
i._selected = false;
|
|
390
|
+
i.open = options?.allStatus === true;
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
if (!this.openStrictly) {
|
|
395
|
+
this.visit(this.menus, (i) => {
|
|
396
|
+
if (i !== item)
|
|
397
|
+
i.open = false;
|
|
398
|
+
});
|
|
399
|
+
let pItem = item._parent;
|
|
400
|
+
while (pItem) {
|
|
401
|
+
pItem.open = true;
|
|
402
|
+
pItem = pItem._parent;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
item.open = !item.open;
|
|
406
|
+
}
|
|
407
|
+
if (options?.emit !== false)
|
|
408
|
+
this._change$.next(this.data);
|
|
365
409
|
}
|
|
366
410
|
ngOnDestroy() {
|
|
367
411
|
this._change$.unsubscribe();
|
|
368
412
|
this.i18n$.unsubscribe();
|
|
369
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* @deprecated Will be removed in 15.0.0, Pls used `find` instead
|
|
416
|
+
*/
|
|
417
|
+
getHit(data, url, recursive = false, cb = null) {
|
|
418
|
+
let item = null;
|
|
419
|
+
while (!item && url) {
|
|
420
|
+
this.visit(data, i => {
|
|
421
|
+
if (cb) {
|
|
422
|
+
cb(i);
|
|
423
|
+
}
|
|
424
|
+
if (i.link != null && i.link === url) {
|
|
425
|
+
item = i;
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
if (!recursive)
|
|
429
|
+
break;
|
|
430
|
+
if (/[?;]/g.test(url)) {
|
|
431
|
+
url = url.split(/[?;]/g)[0];
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
url = url.split('/').slice(0, -1).join('/');
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
return item;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* @deprecated Will be removed in 15.0.0, Pls used `find` and `setItem` instead
|
|
441
|
+
*
|
|
442
|
+
* 根据URL设置菜单 `_open` 属性
|
|
443
|
+
* - 若 `recursive: true` 则会自动向上递归查找
|
|
444
|
+
* - 菜单数据源包含 `/ware`,则 `/ware/1` 也视为 `/ware` 项
|
|
445
|
+
*/
|
|
446
|
+
openedByUrl(url, recursive = false) {
|
|
447
|
+
if (!url)
|
|
448
|
+
return;
|
|
449
|
+
let findItem = this.getHit(this.data, url, recursive, (i) => {
|
|
450
|
+
i._selected = false;
|
|
451
|
+
i._open = false;
|
|
452
|
+
});
|
|
453
|
+
if (findItem == null)
|
|
454
|
+
return;
|
|
455
|
+
do {
|
|
456
|
+
findItem._selected = true;
|
|
457
|
+
findItem._open = true;
|
|
458
|
+
findItem = findItem._parent;
|
|
459
|
+
} while (findItem);
|
|
460
|
+
}
|
|
370
461
|
}
|
|
371
|
-
MenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
372
|
-
MenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
462
|
+
MenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MenuService, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1$1.ACLService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
463
|
+
MenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MenuService, providedIn: 'root' });
|
|
464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MenuService, decorators: [{
|
|
374
465
|
type: Injectable,
|
|
375
466
|
args: [{ providedIn: 'root' }]
|
|
376
467
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -468,9 +559,9 @@ class SettingsService {
|
|
|
468
559
|
return this._user;
|
|
469
560
|
}
|
|
470
561
|
}
|
|
471
|
-
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
472
|
-
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
562
|
+
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SettingsService, deps: [{ token: i1$2.Platform }, { token: ALAIN_SETTING_KEYS }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
563
|
+
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SettingsService, providedIn: 'root' });
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SettingsService, decorators: [{
|
|
474
565
|
type: Injectable,
|
|
475
566
|
args: [{ providedIn: 'root' }]
|
|
476
567
|
}], ctorParameters: function () { return [{ type: i1$2.Platform }, { type: undefined, decorators: [{
|
|
@@ -514,9 +605,9 @@ class ResponsiveService {
|
|
|
514
605
|
return clsMap;
|
|
515
606
|
}
|
|
516
607
|
}
|
|
517
|
-
ResponsiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
518
|
-
ResponsiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
608
|
+
ResponsiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ResponsiveService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
609
|
+
ResponsiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ResponsiveService, providedIn: 'root' });
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ResponsiveService, decorators: [{
|
|
520
611
|
type: Injectable,
|
|
521
612
|
args: [{ providedIn: 'root' }]
|
|
522
613
|
}], ctorParameters: function () { return [{ type: i1.AlainConfigService }]; } });
|
|
@@ -603,9 +694,9 @@ class RTLService {
|
|
|
603
694
|
});
|
|
604
695
|
}
|
|
605
696
|
}
|
|
606
|
-
RTLService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
607
|
-
RTLService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
697
|
+
RTLService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: RTLService, deps: [{ token: i1$3.Directionality }, { token: SettingsService }, { token: i3.NzConfigService }, { token: i1.AlainConfigService }, { token: i1$2.Platform }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
698
|
+
RTLService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: RTLService, providedIn: 'root' });
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: RTLService, decorators: [{
|
|
609
700
|
type: Injectable,
|
|
610
701
|
args: [{ providedIn: 'root' }]
|
|
611
702
|
}], ctorParameters: function () { return [{ type: i1$3.Directionality }, { type: SettingsService }, { type: i3.NzConfigService }, { type: i1.AlainConfigService }, { type: i1$2.Platform }, { type: undefined, decorators: [{
|
|
@@ -624,40 +715,64 @@ class TitleService {
|
|
|
624
715
|
this._suffix = '';
|
|
625
716
|
this._separator = ' - ';
|
|
626
717
|
this._reverse = false;
|
|
718
|
+
this.destroy$ = new Subject();
|
|
627
719
|
this.DELAY_TIME = 25;
|
|
628
|
-
/**
|
|
720
|
+
/**
|
|
721
|
+
* Set default title name
|
|
722
|
+
*
|
|
723
|
+
* 设置默认标题名
|
|
724
|
+
*/
|
|
629
725
|
this.default = `Not Page Name`;
|
|
630
|
-
this.
|
|
726
|
+
this.i18nSrv.change.pipe(takeUntil(this.destroy$)).subscribe(() => this.setTitle());
|
|
631
727
|
}
|
|
632
|
-
/**
|
|
728
|
+
/**
|
|
729
|
+
* Set separator
|
|
730
|
+
*
|
|
731
|
+
* 设置分隔符
|
|
732
|
+
*/
|
|
633
733
|
set separator(value) {
|
|
634
734
|
this._separator = value;
|
|
635
735
|
}
|
|
636
|
-
/**
|
|
736
|
+
/**
|
|
737
|
+
* Set prefix
|
|
738
|
+
*
|
|
739
|
+
* 设置前缀
|
|
740
|
+
*/
|
|
637
741
|
set prefix(value) {
|
|
638
742
|
this._prefix = value;
|
|
639
743
|
}
|
|
640
|
-
/**
|
|
744
|
+
/**
|
|
745
|
+
* Set suffix
|
|
746
|
+
*
|
|
747
|
+
* 设置后缀
|
|
748
|
+
*/
|
|
641
749
|
set suffix(value) {
|
|
642
750
|
this._suffix = value;
|
|
643
751
|
}
|
|
644
|
-
/**
|
|
752
|
+
/**
|
|
753
|
+
* Set whether to reverse
|
|
754
|
+
*
|
|
755
|
+
* 设置是否反转
|
|
756
|
+
*/
|
|
645
757
|
set reverse(value) {
|
|
646
758
|
this._reverse = value;
|
|
647
759
|
}
|
|
648
760
|
getByElement() {
|
|
649
|
-
|
|
650
|
-
this.doc.querySelector(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
el
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
761
|
+
return of('').pipe(delay(this.DELAY_TIME), map(() => {
|
|
762
|
+
const el = ((this.selector != null ? this.doc.querySelector(this.selector) : null) ||
|
|
763
|
+
this.doc.querySelector('.alain-default__content-title h1') ||
|
|
764
|
+
this.doc.querySelector('.page-header__title'));
|
|
765
|
+
if (el) {
|
|
766
|
+
let text = '';
|
|
767
|
+
el.childNodes.forEach(val => {
|
|
768
|
+
if (!text && val.nodeType === 3) {
|
|
769
|
+
text = val.textContent.trim();
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
return text || el.firstChild.textContent.trim();
|
|
773
|
+
}
|
|
774
|
+
return '';
|
|
775
|
+
}));
|
|
661
776
|
}
|
|
662
777
|
getByRoute() {
|
|
663
778
|
let next = this.injector.get(ActivatedRoute);
|
|
@@ -666,43 +781,39 @@ class TitleService {
|
|
|
666
781
|
const data = (next.snapshot && next.snapshot.data) || {};
|
|
667
782
|
if (data.titleI18n && this.i18nSrv)
|
|
668
783
|
data.title = this.i18nSrv.fanyi(data.titleI18n);
|
|
669
|
-
return data.title;
|
|
784
|
+
return isObservable(data.title) ? data.title : of(data.title);
|
|
670
785
|
}
|
|
671
786
|
getByMenu() {
|
|
672
787
|
const menus = this.menuSrv.getPathByUrl(this.injector.get(Router).url);
|
|
673
788
|
if (!menus || menus.length <= 0)
|
|
674
|
-
return '';
|
|
789
|
+
return of('');
|
|
675
790
|
const item = menus[menus.length - 1];
|
|
676
791
|
let title;
|
|
677
792
|
if (item.i18n && this.i18nSrv)
|
|
678
793
|
title = this.i18nSrv.fanyi(item.i18n);
|
|
679
|
-
return title || item.text;
|
|
680
|
-
}
|
|
681
|
-
_setTitle(title) {
|
|
682
|
-
if (!title) {
|
|
683
|
-
title = this.getByRoute() || this.getByMenu() || this.getByElement() || this.default;
|
|
684
|
-
}
|
|
685
|
-
if (title && !Array.isArray(title)) {
|
|
686
|
-
title = [title];
|
|
687
|
-
}
|
|
688
|
-
let newTitles = [];
|
|
689
|
-
if (this._prefix) {
|
|
690
|
-
newTitles.push(this._prefix);
|
|
691
|
-
}
|
|
692
|
-
newTitles.push(...title);
|
|
693
|
-
if (this._suffix) {
|
|
694
|
-
newTitles.push(this._suffix);
|
|
695
|
-
}
|
|
696
|
-
if (this._reverse) {
|
|
697
|
-
newTitles = newTitles.reverse();
|
|
698
|
-
}
|
|
699
|
-
this.title.setTitle(newTitles.join(this._separator));
|
|
794
|
+
return of(title || item.text);
|
|
700
795
|
}
|
|
701
796
|
/**
|
|
702
|
-
* Set the document title
|
|
797
|
+
* Set the document title
|
|
703
798
|
*/
|
|
704
799
|
setTitle(title) {
|
|
705
|
-
|
|
800
|
+
this.tit$?.unsubscribe();
|
|
801
|
+
this.tit$ = of(title)
|
|
802
|
+
.pipe(switchMap(tit => (tit ? of(tit) : this.getByRoute())), switchMap(tit => (tit ? of(tit) : this.getByMenu())), switchMap(tit => (tit ? of(tit) : this.getByElement())), map(tit => tit || this.default), map(title => (!Array.isArray(title) ? [title] : title)), takeUntil(this.destroy$))
|
|
803
|
+
.subscribe(titles => {
|
|
804
|
+
let newTitles = [];
|
|
805
|
+
if (this._prefix) {
|
|
806
|
+
newTitles.push(this._prefix);
|
|
807
|
+
}
|
|
808
|
+
newTitles.push(...titles);
|
|
809
|
+
if (this._suffix) {
|
|
810
|
+
newTitles.push(this._suffix);
|
|
811
|
+
}
|
|
812
|
+
if (this._reverse) {
|
|
813
|
+
newTitles = newTitles.reverse();
|
|
814
|
+
}
|
|
815
|
+
this.title.setTitle(newTitles.join(this._separator));
|
|
816
|
+
});
|
|
706
817
|
}
|
|
707
818
|
/**
|
|
708
819
|
* Set i18n key of the document title
|
|
@@ -711,12 +822,14 @@ class TitleService {
|
|
|
711
822
|
this.setTitle(this.i18nSrv.fanyi(key, params));
|
|
712
823
|
}
|
|
713
824
|
ngOnDestroy() {
|
|
714
|
-
this.
|
|
825
|
+
this.tit$?.unsubscribe();
|
|
826
|
+
this.destroy$.next();
|
|
827
|
+
this.destroy$.complete();
|
|
715
828
|
}
|
|
716
829
|
}
|
|
717
|
-
TitleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
718
|
-
TitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
830
|
+
TitleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TitleService, deps: [{ token: i0.Injector }, { token: i1$4.Title }, { token: MenuService }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
831
|
+
TitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TitleService, providedIn: 'root' });
|
|
832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TitleService, decorators: [{
|
|
720
833
|
type: Injectable,
|
|
721
834
|
args: [{ providedIn: 'root' }]
|
|
722
835
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$4.Title }, { type: MenuService }, { type: undefined, decorators: [{
|
|
@@ -737,9 +850,9 @@ class I18nPipe {
|
|
|
737
850
|
return this.i18n.fanyi(key, params);
|
|
738
851
|
}
|
|
739
852
|
}
|
|
740
|
-
I18nPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
741
|
-
I18nPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
853
|
+
I18nPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: I18nPipe, deps: [{ token: ALAIN_I18N_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
854
|
+
I18nPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: I18nPipe, name: "i18n" });
|
|
855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: I18nPipe, decorators: [{
|
|
743
856
|
type: Pipe,
|
|
744
857
|
args: [{ name: 'i18n' }]
|
|
745
858
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -766,9 +879,9 @@ class AlainI18NGuard {
|
|
|
766
879
|
return this.resolve(route);
|
|
767
880
|
}
|
|
768
881
|
}
|
|
769
|
-
AlainI18NGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
770
|
-
AlainI18NGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
771
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
882
|
+
AlainI18NGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NGuard, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
883
|
+
AlainI18NGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NGuard, providedIn: 'root' });
|
|
884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NGuard, decorators: [{
|
|
772
885
|
type: Injectable,
|
|
773
886
|
args: [{ providedIn: 'root' }]
|
|
774
887
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -886,9 +999,9 @@ class DelonLocaleService {
|
|
|
886
999
|
return (this._locale[path] || {});
|
|
887
1000
|
}
|
|
888
1001
|
}
|
|
889
|
-
DelonLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
890
|
-
DelonLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1002
|
+
DelonLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleService, deps: [{ token: DELON_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1003
|
+
DelonLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleService });
|
|
1004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleService, decorators: [{
|
|
892
1005
|
type: Injectable
|
|
893
1006
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
894
1007
|
type: Inject,
|
|
@@ -905,10 +1018,10 @@ const DELON_LOCALE_SERVICE_PROVIDER = {
|
|
|
905
1018
|
|
|
906
1019
|
class DelonLocaleModule {
|
|
907
1020
|
}
|
|
908
|
-
DelonLocaleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
909
|
-
DelonLocaleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
910
|
-
DelonLocaleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
911
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1021
|
+
DelonLocaleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1022
|
+
DelonLocaleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleModule });
|
|
1023
|
+
DelonLocaleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleModule, providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER] });
|
|
1024
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleModule, decorators: [{
|
|
912
1025
|
type: NgModule,
|
|
913
1026
|
args: [{
|
|
914
1027
|
providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER]
|
|
@@ -1001,8 +1114,8 @@ var enUS = {
|
|
|
1001
1114
|
var zhTW = {
|
|
1002
1115
|
abbr: 'zh-TW',
|
|
1003
1116
|
exception: {
|
|
1004
|
-
403: '
|
|
1005
|
-
404: '
|
|
1117
|
+
403: '抱歉,你無權訪問該頁面',
|
|
1118
|
+
404: '抱歉,你訪問的頁面不存在',
|
|
1006
1119
|
500: '抱歉,服務器出錯了',
|
|
1007
1120
|
backToHome: '返回首頁'
|
|
1008
1121
|
},
|
|
@@ -1968,9 +2081,9 @@ class ModalHelper {
|
|
|
1968
2081
|
return this.create(comp, params, { ...options, modalOptions });
|
|
1969
2082
|
}
|
|
1970
2083
|
}
|
|
1971
|
-
ModalHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1972
|
-
ModalHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1973
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2084
|
+
ModalHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ModalHelper, deps: [{ token: i1$5.NzModalService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2085
|
+
ModalHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ModalHelper, providedIn: 'root' });
|
|
2086
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ModalHelper, decorators: [{
|
|
1974
2087
|
type: Injectable,
|
|
1975
2088
|
args: [{ providedIn: 'root' }]
|
|
1976
2089
|
}], ctorParameters: function () { return [{ type: i1$5.NzModalService }]; } });
|
|
@@ -2054,9 +2167,9 @@ class DrawerHelper {
|
|
|
2054
2167
|
return this.create(title, comp, params, { ...options, drawerOptions });
|
|
2055
2168
|
}
|
|
2056
2169
|
}
|
|
2057
|
-
DrawerHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2058
|
-
DrawerHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2170
|
+
DrawerHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DrawerHelper, deps: [{ token: i1$6.NzDrawerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2171
|
+
DrawerHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DrawerHelper, providedIn: 'root' });
|
|
2172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DrawerHelper, decorators: [{
|
|
2060
2173
|
type: Injectable,
|
|
2061
2174
|
args: [{ providedIn: 'root' }]
|
|
2062
2175
|
}], ctorParameters: function () { return [{ type: i1$6.NzDrawerService }]; } });
|
|
@@ -2201,9 +2314,9 @@ class _HttpClient {
|
|
|
2201
2314
|
delay(0), tap(() => this.push()), switchMap(() => this.http.request(method, url, options)), finalize(() => this.pop()));
|
|
2202
2315
|
}
|
|
2203
2316
|
}
|
|
2204
|
-
_HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2205
|
-
_HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2317
|
+
_HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: _HttpClient, deps: [{ token: i1$7.HttpClient }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2318
|
+
_HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: _HttpClient, providedIn: 'root' });
|
|
2319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: _HttpClient, decorators: [{
|
|
2207
2320
|
type: Injectable,
|
|
2208
2321
|
args: [{ providedIn: 'root' }]
|
|
2209
2322
|
}], ctorParameters: function () { return [{ type: i1$7.HttpClient }, { type: i1.AlainConfigService }]; } });
|
|
@@ -2220,9 +2333,9 @@ class BaseApi {
|
|
|
2220
2333
|
this.injector = injector;
|
|
2221
2334
|
}
|
|
2222
2335
|
}
|
|
2223
|
-
BaseApi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2224
|
-
BaseApi.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2336
|
+
BaseApi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BaseApi, deps: [{ token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2337
|
+
BaseApi.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BaseApi });
|
|
2338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BaseApi, decorators: [{
|
|
2226
2339
|
type: Injectable
|
|
2227
2340
|
}], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
|
|
2228
2341
|
type: Inject,
|
|
@@ -2418,6 +2531,43 @@ const JSONP = makeMethod('JSONP');
|
|
|
2418
2531
|
*/
|
|
2419
2532
|
const FORM = makeMethod('FORM');
|
|
2420
2533
|
|
|
2534
|
+
/**
|
|
2535
|
+
* Whether to customize the handling of exception messages
|
|
2536
|
+
*
|
|
2537
|
+
* 是否自定义处理异常消息
|
|
2538
|
+
*
|
|
2539
|
+
* @example
|
|
2540
|
+
* this.http.post(`login`, {
|
|
2541
|
+
* name: 'cipchk', pwd: '123456'
|
|
2542
|
+
* }, {
|
|
2543
|
+
* context: new HttpContext()
|
|
2544
|
+
* .set(ALLOW_ANONYMOUS, true)
|
|
2545
|
+
* .set(CUSTOM_ERROR, true)
|
|
2546
|
+
* }).subscribe({
|
|
2547
|
+
* next: console.log,
|
|
2548
|
+
* error: console.log
|
|
2549
|
+
* });
|
|
2550
|
+
*/
|
|
2551
|
+
const CUSTOM_ERROR = new HttpContextToken(() => false);
|
|
2552
|
+
/**
|
|
2553
|
+
* Whether to ignore API prefixes
|
|
2554
|
+
*
|
|
2555
|
+
* 是否忽略API前缀
|
|
2556
|
+
*
|
|
2557
|
+
* @example
|
|
2558
|
+
* // When environment.api.baseUrl set '/api'
|
|
2559
|
+
*
|
|
2560
|
+
* this.http.get(`/path`) // Request Url: /api/path
|
|
2561
|
+
* this.http.get(`/path`, { context: new HttpContext().set(IGNORE_BASE_URL, true) }) // Request Url: /path
|
|
2562
|
+
*/
|
|
2563
|
+
const IGNORE_BASE_URL = new HttpContextToken(() => false);
|
|
2564
|
+
/**
|
|
2565
|
+
* Whether to return raw response body
|
|
2566
|
+
*
|
|
2567
|
+
* 是否原样返回请求Body
|
|
2568
|
+
*/
|
|
2569
|
+
const RAW_BODY = new HttpContextToken(() => false);
|
|
2570
|
+
|
|
2421
2571
|
class DatePipe {
|
|
2422
2572
|
constructor(nzI18n) {
|
|
2423
2573
|
this.nzI18n = nzI18n;
|
|
@@ -2430,9 +2580,9 @@ class DatePipe {
|
|
|
2430
2580
|
return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt);
|
|
2431
2581
|
}
|
|
2432
2582
|
}
|
|
2433
|
-
DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2434
|
-
DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2583
|
+
DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DatePipe, deps: [{ token: i1$8.NzI18nService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2584
|
+
DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: DatePipe, name: "_date" });
|
|
2585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DatePipe, decorators: [{
|
|
2436
2586
|
type: Pipe,
|
|
2437
2587
|
args: [{ name: '_date' }]
|
|
2438
2588
|
}], ctorParameters: function () { return [{ type: i1$8.NzI18nService }]; } });
|
|
@@ -2449,9 +2599,9 @@ class KeysPipe {
|
|
|
2449
2599
|
return ret;
|
|
2450
2600
|
}
|
|
2451
2601
|
}
|
|
2452
|
-
KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2453
|
-
KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2602
|
+
KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2603
|
+
KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: KeysPipe, name: "keys" });
|
|
2604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: KeysPipe, decorators: [{
|
|
2455
2605
|
type: Pipe,
|
|
2456
2606
|
args: [{ name: 'keys' }]
|
|
2457
2607
|
}] });
|
|
@@ -2484,9 +2634,9 @@ class YNPipe {
|
|
|
2484
2634
|
return isSafeHtml ? this.dom.bypassSecurityTrustHtml(html) : html;
|
|
2485
2635
|
}
|
|
2486
2636
|
}
|
|
2487
|
-
YNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2488
|
-
YNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2637
|
+
YNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: YNPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2638
|
+
YNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: YNPipe, name: "yn" });
|
|
2639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: YNPipe, decorators: [{
|
|
2490
2640
|
type: Pipe,
|
|
2491
2641
|
args: [{ name: 'yn' }]
|
|
2492
2642
|
}], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
|
|
@@ -2499,9 +2649,9 @@ class HTMLPipe {
|
|
|
2499
2649
|
return html ? this.dom.bypassSecurityTrustHtml(html) : '';
|
|
2500
2650
|
}
|
|
2501
2651
|
}
|
|
2502
|
-
HTMLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2503
|
-
HTMLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2652
|
+
HTMLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: HTMLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2653
|
+
HTMLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: HTMLPipe, name: "html" });
|
|
2654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: HTMLPipe, decorators: [{
|
|
2505
2655
|
type: Pipe,
|
|
2506
2656
|
args: [{ name: 'html' }]
|
|
2507
2657
|
}], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
|
|
@@ -2514,9 +2664,9 @@ class URLPipe {
|
|
|
2514
2664
|
return url ? this.dom.bypassSecurityTrustUrl(url) : '';
|
|
2515
2665
|
}
|
|
2516
2666
|
}
|
|
2517
|
-
URLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2518
|
-
URLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2667
|
+
URLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: URLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2668
|
+
URLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: URLPipe, name: "url" });
|
|
2669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: URLPipe, decorators: [{
|
|
2520
2670
|
type: Pipe,
|
|
2521
2671
|
args: [{ name: 'url' }]
|
|
2522
2672
|
}], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
|
|
@@ -2544,9 +2694,9 @@ class AlainThemeModule {
|
|
|
2544
2694
|
};
|
|
2545
2695
|
}
|
|
2546
2696
|
}
|
|
2547
|
-
AlainThemeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2548
|
-
AlainThemeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2549
|
-
AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2697
|
+
AlainThemeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainThemeModule, deps: [{ token: i1$9.NzIconService }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2698
|
+
AlainThemeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: AlainThemeModule, declarations: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule], exports: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe, DelonLocaleModule] });
|
|
2699
|
+
AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainThemeModule, providers: [
|
|
2550
2700
|
{
|
|
2551
2701
|
provide: ALAIN_SETTING_KEYS,
|
|
2552
2702
|
useValue: {
|
|
@@ -2555,8 +2705,8 @@ AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
2555
2705
|
app: 'app'
|
|
2556
2706
|
}
|
|
2557
2707
|
}
|
|
2558
|
-
], imports: [
|
|
2559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2708
|
+
], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule, DelonLocaleModule] });
|
|
2709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainThemeModule, decorators: [{
|
|
2560
2710
|
type: NgModule,
|
|
2561
2711
|
args: [{
|
|
2562
2712
|
imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule],
|
|
@@ -2595,11 +2745,11 @@ class PreloadOptionalModules {
|
|
|
2595
2745
|
}
|
|
2596
2746
|
}
|
|
2597
2747
|
|
|
2598
|
-
const VERSION = new Version('
|
|
2748
|
+
const VERSION = new Version('14.0.0-beta.1');
|
|
2599
2749
|
|
|
2600
2750
|
/**
|
|
2601
2751
|
* Generated bundle index. Do not edit.
|
|
2602
2752
|
*/
|
|
2603
2753
|
|
|
2604
|
-
export { ALAIN_I18N_TOKEN, ALAIN_SETTING_KEYS, AlainI18NGuard, AlainI18NServiceFake, AlainI18nBaseService, AlainThemeModule, BaseApi, BaseHeaders, BaseUrl, Body, DELETE, DELON_LOCALE, DELON_LOCALE_SERVICE_PROVIDER, DELON_LOCALE_SERVICE_PROVIDER_FACTORY, DatePipe, DelonLocaleModule, DelonLocaleService, DrawerHelper, FORM, GET, HEAD, HTMLPipe, HTML_DIR, Headers, I18nPipe, JSONP, KeysPipe, LTR, MenuService, ModalHelper, OPTIONS, PATCH, POST, PUT, Path, Payload, PreloadOptionalModules, Query, REP_MAX, RTL, RTLService, RTL_DELON_COMPONENTS, RTL_DIRECTION, RTL_NZ_COMPONENTS, ResponsiveService, SettingsService, TitleService, URLPipe, VERSION, YNPipe, _HttpClient, elGR as el_GR, enUS as en_US, esES as es_ES, frFR as fr_FR, hrHR as hr_HR, itIT as it_IT, jaJP as ja_JP, koKR as ko_KR, plPL as pl_PL, preloaderFinished, slSI as sl_SI, trTR as tr_TR, zhCN as zh_CN, zhTW as zh_TW };
|
|
2754
|
+
export { ALAIN_I18N_TOKEN, ALAIN_SETTING_KEYS, AlainI18NGuard, AlainI18NServiceFake, AlainI18nBaseService, AlainThemeModule, BaseApi, BaseHeaders, BaseUrl, Body, CUSTOM_ERROR, DELETE, DELON_LOCALE, DELON_LOCALE_SERVICE_PROVIDER, DELON_LOCALE_SERVICE_PROVIDER_FACTORY, DatePipe, DelonLocaleModule, DelonLocaleService, DrawerHelper, FORM, GET, HEAD, HTMLPipe, HTML_DIR, Headers, I18nPipe, IGNORE_BASE_URL, JSONP, KeysPipe, LTR, MenuService, ModalHelper, OPTIONS, PATCH, POST, PUT, Path, Payload, PreloadOptionalModules, Query, RAW_BODY, REP_MAX, RTL, RTLService, RTL_DELON_COMPONENTS, RTL_DIRECTION, RTL_NZ_COMPONENTS, ResponsiveService, SettingsService, TitleService, URLPipe, VERSION, YNPipe, _HttpClient, elGR as el_GR, enUS as en_US, esES as es_ES, frFR as fr_FR, hrHR as hr_HR, itIT as it_IT, jaJP as ja_JP, koKR as ko_KR, plPL as pl_PL, preloaderFinished, slSI as sl_SI, trTR as tr_TR, zhCN as zh_CN, zhTW as zh_TW };
|
|
2605
2755
|
//# sourceMappingURL=theme.mjs.map
|