@delon/theme 13.5.2 → 14.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 +59 -2
- package/compact.min.css +1 -1
- package/dark.css +59 -2
- package/dark.min.css +1 -1
- package/default.css +59 -2
- 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 +32 -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 +295 -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 +292 -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 +31 -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/fesm2015/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,29 @@ 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
|
+
var _a;
|
|
295
|
+
const opt = Object.assign({ recursive: false }, options);
|
|
296
|
+
if (opt.key != null) {
|
|
297
|
+
return this.getItem(opt.key);
|
|
298
|
+
}
|
|
299
|
+
let url = opt.url;
|
|
284
300
|
let item = null;
|
|
285
301
|
while (!item && url) {
|
|
286
|
-
this.visit(data, i => {
|
|
287
|
-
if (cb) {
|
|
288
|
-
cb(i);
|
|
302
|
+
this.visit((_a = opt.data) !== null && _a !== void 0 ? _a : this.data, i => {
|
|
303
|
+
if (opt.cb) {
|
|
304
|
+
opt.cb(i);
|
|
289
305
|
}
|
|
290
306
|
if (i.link != null && i.link === url) {
|
|
291
307
|
item = i;
|
|
292
308
|
}
|
|
293
309
|
});
|
|
294
|
-
if (!recursive)
|
|
310
|
+
if (!opt.recursive)
|
|
295
311
|
break;
|
|
296
312
|
if (/[?;]/g.test(url)) {
|
|
297
313
|
url = url.split(/[?;]/g)[0];
|
|
@@ -302,26 +318,6 @@ class MenuService {
|
|
|
302
318
|
}
|
|
303
319
|
return item;
|
|
304
320
|
}
|
|
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
321
|
/**
|
|
326
322
|
* 根据url获取菜单列表
|
|
327
323
|
* - 若 `recursive: true` 则会自动向上递归查找
|
|
@@ -329,7 +325,7 @@ class MenuService {
|
|
|
329
325
|
*/
|
|
330
326
|
getPathByUrl(url, recursive = false) {
|
|
331
327
|
const ret = [];
|
|
332
|
-
let item = this.
|
|
328
|
+
let item = this.find({ url, recursive });
|
|
333
329
|
if (!item)
|
|
334
330
|
return ret;
|
|
335
331
|
do {
|
|
@@ -353,24 +349,120 @@ class MenuService {
|
|
|
353
349
|
/**
|
|
354
350
|
* Set menu based on `key`
|
|
355
351
|
*/
|
|
356
|
-
setItem(key, value) {
|
|
357
|
-
const item = this.getItem(key);
|
|
352
|
+
setItem(key, value, options) {
|
|
353
|
+
const item = typeof key === 'string' ? this.getItem(key) : key;
|
|
358
354
|
if (item == null)
|
|
359
355
|
return;
|
|
360
356
|
Object.keys(value).forEach(k => {
|
|
361
357
|
item[k] = value[k];
|
|
362
358
|
});
|
|
363
359
|
this.fixItem(item);
|
|
364
|
-
|
|
360
|
+
if ((options === null || options === void 0 ? void 0 : options.emit) !== false)
|
|
361
|
+
this._change$.next(this.data);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Open menu based on `key` or menu object
|
|
365
|
+
*/
|
|
366
|
+
open(keyOrItem, options) {
|
|
367
|
+
let item = typeof keyOrItem === 'string' ? this.find({ key: keyOrItem }) : keyOrItem;
|
|
368
|
+
if (item == null)
|
|
369
|
+
return;
|
|
370
|
+
this.visit(this.menus, (i) => {
|
|
371
|
+
i._selected = false;
|
|
372
|
+
if (!this.openStrictly)
|
|
373
|
+
i.open = false;
|
|
374
|
+
});
|
|
375
|
+
do {
|
|
376
|
+
item._selected = true;
|
|
377
|
+
item.open = true;
|
|
378
|
+
item = item._parent;
|
|
379
|
+
} while (item);
|
|
380
|
+
if ((options === null || options === void 0 ? void 0 : options.emit) !== false)
|
|
381
|
+
this._change$.next(this.data);
|
|
382
|
+
}
|
|
383
|
+
openAll(status) {
|
|
384
|
+
this.toggleOpen(null, { allStatus: status });
|
|
385
|
+
}
|
|
386
|
+
toggleOpen(keyOrItem, options) {
|
|
387
|
+
let item = typeof keyOrItem === 'string' ? this.find({ key: keyOrItem }) : keyOrItem;
|
|
388
|
+
if (item == null) {
|
|
389
|
+
this.visit(this.menus, (i) => {
|
|
390
|
+
i._selected = false;
|
|
391
|
+
i.open = (options === null || options === void 0 ? void 0 : options.allStatus) === true;
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
if (!this.openStrictly) {
|
|
396
|
+
this.visit(this.menus, (i) => {
|
|
397
|
+
if (i !== item)
|
|
398
|
+
i.open = false;
|
|
399
|
+
});
|
|
400
|
+
let pItem = item._parent;
|
|
401
|
+
while (pItem) {
|
|
402
|
+
pItem.open = true;
|
|
403
|
+
pItem = pItem._parent;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
item.open = !item.open;
|
|
407
|
+
}
|
|
408
|
+
if ((options === null || options === void 0 ? void 0 : options.emit) !== false)
|
|
409
|
+
this._change$.next(this.data);
|
|
365
410
|
}
|
|
366
411
|
ngOnDestroy() {
|
|
367
412
|
this._change$.unsubscribe();
|
|
368
413
|
this.i18n$.unsubscribe();
|
|
369
414
|
}
|
|
415
|
+
/**
|
|
416
|
+
* @deprecated Will be removed in 15.0.0, Pls used `find` instead
|
|
417
|
+
*/
|
|
418
|
+
getHit(data, url, recursive = false, cb = null) {
|
|
419
|
+
let item = null;
|
|
420
|
+
while (!item && url) {
|
|
421
|
+
this.visit(data, i => {
|
|
422
|
+
if (cb) {
|
|
423
|
+
cb(i);
|
|
424
|
+
}
|
|
425
|
+
if (i.link != null && i.link === url) {
|
|
426
|
+
item = i;
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
if (!recursive)
|
|
430
|
+
break;
|
|
431
|
+
if (/[?;]/g.test(url)) {
|
|
432
|
+
url = url.split(/[?;]/g)[0];
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
url = url.split('/').slice(0, -1).join('/');
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return item;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* @deprecated Will be removed in 15.0.0, Pls used `find` and `setItem` instead
|
|
442
|
+
*
|
|
443
|
+
* 根据URL设置菜单 `_open` 属性
|
|
444
|
+
* - 若 `recursive: true` 则会自动向上递归查找
|
|
445
|
+
* - 菜单数据源包含 `/ware`,则 `/ware/1` 也视为 `/ware` 项
|
|
446
|
+
*/
|
|
447
|
+
openedByUrl(url, recursive = false) {
|
|
448
|
+
if (!url)
|
|
449
|
+
return;
|
|
450
|
+
let findItem = this.getHit(this.data, url, recursive, (i) => {
|
|
451
|
+
i._selected = false;
|
|
452
|
+
i._open = false;
|
|
453
|
+
});
|
|
454
|
+
if (findItem == null)
|
|
455
|
+
return;
|
|
456
|
+
do {
|
|
457
|
+
findItem._selected = true;
|
|
458
|
+
findItem._open = true;
|
|
459
|
+
findItem = findItem._parent;
|
|
460
|
+
} while (findItem);
|
|
461
|
+
}
|
|
370
462
|
}
|
|
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: "
|
|
463
|
+
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 });
|
|
464
|
+
MenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MenuService, providedIn: 'root' });
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MenuService, decorators: [{
|
|
374
466
|
type: Injectable,
|
|
375
467
|
args: [{ providedIn: 'root' }]
|
|
376
468
|
}], ctorParameters: function () {
|
|
@@ -461,9 +553,9 @@ class SettingsService {
|
|
|
461
553
|
return this._user;
|
|
462
554
|
}
|
|
463
555
|
}
|
|
464
|
-
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
465
|
-
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
556
|
+
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 });
|
|
557
|
+
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SettingsService, providedIn: 'root' });
|
|
558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SettingsService, decorators: [{
|
|
467
559
|
type: Injectable,
|
|
468
560
|
args: [{ providedIn: 'root' }]
|
|
469
561
|
}], ctorParameters: function () {
|
|
@@ -509,9 +601,9 @@ class ResponsiveService {
|
|
|
509
601
|
return clsMap;
|
|
510
602
|
}
|
|
511
603
|
}
|
|
512
|
-
ResponsiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
513
|
-
ResponsiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
604
|
+
ResponsiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ResponsiveService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
605
|
+
ResponsiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ResponsiveService, providedIn: 'root' });
|
|
606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ResponsiveService, decorators: [{
|
|
515
607
|
type: Injectable,
|
|
516
608
|
args: [{ providedIn: 'root' }]
|
|
517
609
|
}], ctorParameters: function () { return [{ type: i1.AlainConfigService }]; } });
|
|
@@ -598,9 +690,9 @@ class RTLService {
|
|
|
598
690
|
});
|
|
599
691
|
}
|
|
600
692
|
}
|
|
601
|
-
RTLService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
602
|
-
RTLService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
693
|
+
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 });
|
|
694
|
+
RTLService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: RTLService, providedIn: 'root' });
|
|
695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: RTLService, decorators: [{
|
|
604
696
|
type: Injectable,
|
|
605
697
|
args: [{ providedIn: 'root' }]
|
|
606
698
|
}], ctorParameters: function () {
|
|
@@ -621,40 +713,64 @@ class TitleService {
|
|
|
621
713
|
this._suffix = '';
|
|
622
714
|
this._separator = ' - ';
|
|
623
715
|
this._reverse = false;
|
|
716
|
+
this.destroy$ = new Subject();
|
|
624
717
|
this.DELAY_TIME = 25;
|
|
625
|
-
/**
|
|
718
|
+
/**
|
|
719
|
+
* Set default title name
|
|
720
|
+
*
|
|
721
|
+
* 设置默认标题名
|
|
722
|
+
*/
|
|
626
723
|
this.default = `Not Page Name`;
|
|
627
|
-
this.
|
|
724
|
+
this.i18nSrv.change.pipe(takeUntil(this.destroy$)).subscribe(() => this.setTitle());
|
|
628
725
|
}
|
|
629
|
-
/**
|
|
726
|
+
/**
|
|
727
|
+
* Set separator
|
|
728
|
+
*
|
|
729
|
+
* 设置分隔符
|
|
730
|
+
*/
|
|
630
731
|
set separator(value) {
|
|
631
732
|
this._separator = value;
|
|
632
733
|
}
|
|
633
|
-
/**
|
|
734
|
+
/**
|
|
735
|
+
* Set prefix
|
|
736
|
+
*
|
|
737
|
+
* 设置前缀
|
|
738
|
+
*/
|
|
634
739
|
set prefix(value) {
|
|
635
740
|
this._prefix = value;
|
|
636
741
|
}
|
|
637
|
-
/**
|
|
742
|
+
/**
|
|
743
|
+
* Set suffix
|
|
744
|
+
*
|
|
745
|
+
* 设置后缀
|
|
746
|
+
*/
|
|
638
747
|
set suffix(value) {
|
|
639
748
|
this._suffix = value;
|
|
640
749
|
}
|
|
641
|
-
/**
|
|
750
|
+
/**
|
|
751
|
+
* Set whether to reverse
|
|
752
|
+
*
|
|
753
|
+
* 设置是否反转
|
|
754
|
+
*/
|
|
642
755
|
set reverse(value) {
|
|
643
756
|
this._reverse = value;
|
|
644
757
|
}
|
|
645
758
|
getByElement() {
|
|
646
|
-
|
|
647
|
-
this.doc.querySelector(
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
el
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
759
|
+
return of('').pipe(delay(this.DELAY_TIME), map(() => {
|
|
760
|
+
const el = ((this.selector != null ? this.doc.querySelector(this.selector) : null) ||
|
|
761
|
+
this.doc.querySelector('.alain-default__content-title h1') ||
|
|
762
|
+
this.doc.querySelector('.page-header__title'));
|
|
763
|
+
if (el) {
|
|
764
|
+
let text = '';
|
|
765
|
+
el.childNodes.forEach(val => {
|
|
766
|
+
if (!text && val.nodeType === 3) {
|
|
767
|
+
text = val.textContent.trim();
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
return text || el.firstChild.textContent.trim();
|
|
771
|
+
}
|
|
772
|
+
return '';
|
|
773
|
+
}));
|
|
658
774
|
}
|
|
659
775
|
getByRoute() {
|
|
660
776
|
let next = this.injector.get(ActivatedRoute);
|
|
@@ -663,43 +779,40 @@ class TitleService {
|
|
|
663
779
|
const data = (next.snapshot && next.snapshot.data) || {};
|
|
664
780
|
if (data.titleI18n && this.i18nSrv)
|
|
665
781
|
data.title = this.i18nSrv.fanyi(data.titleI18n);
|
|
666
|
-
return data.title;
|
|
782
|
+
return isObservable(data.title) ? data.title : of(data.title);
|
|
667
783
|
}
|
|
668
784
|
getByMenu() {
|
|
669
785
|
const menus = this.menuSrv.getPathByUrl(this.injector.get(Router).url);
|
|
670
786
|
if (!menus || menus.length <= 0)
|
|
671
|
-
return '';
|
|
787
|
+
return of('');
|
|
672
788
|
const item = menus[menus.length - 1];
|
|
673
789
|
let title;
|
|
674
790
|
if (item.i18n && this.i18nSrv)
|
|
675
791
|
title = this.i18nSrv.fanyi(item.i18n);
|
|
676
|
-
return title || item.text;
|
|
677
|
-
}
|
|
678
|
-
_setTitle(title) {
|
|
679
|
-
if (!title) {
|
|
680
|
-
title = this.getByRoute() || this.getByMenu() || this.getByElement() || this.default;
|
|
681
|
-
}
|
|
682
|
-
if (title && !Array.isArray(title)) {
|
|
683
|
-
title = [title];
|
|
684
|
-
}
|
|
685
|
-
let newTitles = [];
|
|
686
|
-
if (this._prefix) {
|
|
687
|
-
newTitles.push(this._prefix);
|
|
688
|
-
}
|
|
689
|
-
newTitles.push(...title);
|
|
690
|
-
if (this._suffix) {
|
|
691
|
-
newTitles.push(this._suffix);
|
|
692
|
-
}
|
|
693
|
-
if (this._reverse) {
|
|
694
|
-
newTitles = newTitles.reverse();
|
|
695
|
-
}
|
|
696
|
-
this.title.setTitle(newTitles.join(this._separator));
|
|
792
|
+
return of(title || item.text);
|
|
697
793
|
}
|
|
698
794
|
/**
|
|
699
|
-
* Set the document title
|
|
795
|
+
* Set the document title
|
|
700
796
|
*/
|
|
701
797
|
setTitle(title) {
|
|
702
|
-
|
|
798
|
+
var _a;
|
|
799
|
+
(_a = this.tit$) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
800
|
+
this.tit$ = of(title)
|
|
801
|
+
.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$))
|
|
802
|
+
.subscribe(titles => {
|
|
803
|
+
let newTitles = [];
|
|
804
|
+
if (this._prefix) {
|
|
805
|
+
newTitles.push(this._prefix);
|
|
806
|
+
}
|
|
807
|
+
newTitles.push(...titles);
|
|
808
|
+
if (this._suffix) {
|
|
809
|
+
newTitles.push(this._suffix);
|
|
810
|
+
}
|
|
811
|
+
if (this._reverse) {
|
|
812
|
+
newTitles = newTitles.reverse();
|
|
813
|
+
}
|
|
814
|
+
this.title.setTitle(newTitles.join(this._separator));
|
|
815
|
+
});
|
|
703
816
|
}
|
|
704
817
|
/**
|
|
705
818
|
* Set i18n key of the document title
|
|
@@ -708,12 +821,15 @@ class TitleService {
|
|
|
708
821
|
this.setTitle(this.i18nSrv.fanyi(key, params));
|
|
709
822
|
}
|
|
710
823
|
ngOnDestroy() {
|
|
711
|
-
|
|
824
|
+
var _a;
|
|
825
|
+
(_a = this.tit$) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
826
|
+
this.destroy$.next();
|
|
827
|
+
this.destroy$.complete();
|
|
712
828
|
}
|
|
713
829
|
}
|
|
714
|
-
TitleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
715
|
-
TitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
716
|
-
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: [{
|
|
717
833
|
type: Injectable,
|
|
718
834
|
args: [{ providedIn: 'root' }]
|
|
719
835
|
}], ctorParameters: function () {
|
|
@@ -736,9 +852,9 @@ class I18nPipe {
|
|
|
736
852
|
return this.i18n.fanyi(key, params);
|
|
737
853
|
}
|
|
738
854
|
}
|
|
739
|
-
I18nPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
740
|
-
I18nPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
855
|
+
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 });
|
|
856
|
+
I18nPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: I18nPipe, name: "i18n" });
|
|
857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: I18nPipe, decorators: [{
|
|
742
858
|
type: Pipe,
|
|
743
859
|
args: [{ name: 'i18n' }]
|
|
744
860
|
}], ctorParameters: function () {
|
|
@@ -768,9 +884,9 @@ class AlainI18NGuard {
|
|
|
768
884
|
return this.resolve(route);
|
|
769
885
|
}
|
|
770
886
|
}
|
|
771
|
-
AlainI18NGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
772
|
-
AlainI18NGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
887
|
+
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 });
|
|
888
|
+
AlainI18NGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NGuard, providedIn: 'root' });
|
|
889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainI18NGuard, decorators: [{
|
|
774
890
|
type: Injectable,
|
|
775
891
|
args: [{ providedIn: 'root' }]
|
|
776
892
|
}], ctorParameters: function () {
|
|
@@ -890,9 +1006,9 @@ class DelonLocaleService {
|
|
|
890
1006
|
return (this._locale[path] || {});
|
|
891
1007
|
}
|
|
892
1008
|
}
|
|
893
|
-
DelonLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
894
|
-
DelonLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1009
|
+
DelonLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleService, deps: [{ token: DELON_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1010
|
+
DelonLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleService });
|
|
1011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleService, decorators: [{
|
|
896
1012
|
type: Injectable
|
|
897
1013
|
}], ctorParameters: function () {
|
|
898
1014
|
return [{ type: undefined, decorators: [{
|
|
@@ -911,10 +1027,10 @@ const DELON_LOCALE_SERVICE_PROVIDER = {
|
|
|
911
1027
|
|
|
912
1028
|
class DelonLocaleModule {
|
|
913
1029
|
}
|
|
914
|
-
DelonLocaleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
915
|
-
DelonLocaleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
916
|
-
DelonLocaleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1030
|
+
DelonLocaleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1031
|
+
DelonLocaleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleModule });
|
|
1032
|
+
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] });
|
|
1033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DelonLocaleModule, decorators: [{
|
|
918
1034
|
type: NgModule,
|
|
919
1035
|
args: [{
|
|
920
1036
|
providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER]
|
|
@@ -1007,8 +1123,8 @@ var enUS = {
|
|
|
1007
1123
|
var zhTW = {
|
|
1008
1124
|
abbr: 'zh-TW',
|
|
1009
1125
|
exception: {
|
|
1010
|
-
403: '
|
|
1011
|
-
404: '
|
|
1126
|
+
403: '抱歉,你無權訪問該頁面',
|
|
1127
|
+
404: '抱歉,你訪問的頁面不存在',
|
|
1012
1128
|
500: '抱歉,服務器出錯了',
|
|
1013
1129
|
backToHome: '返回首頁'
|
|
1014
1130
|
},
|
|
@@ -1971,9 +2087,9 @@ class ModalHelper {
|
|
|
1971
2087
|
return this.create(comp, params, Object.assign(Object.assign({}, options), { modalOptions }));
|
|
1972
2088
|
}
|
|
1973
2089
|
}
|
|
1974
|
-
ModalHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1975
|
-
ModalHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1976
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2090
|
+
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 });
|
|
2091
|
+
ModalHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ModalHelper, providedIn: 'root' });
|
|
2092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ModalHelper, decorators: [{
|
|
1977
2093
|
type: Injectable,
|
|
1978
2094
|
args: [{ providedIn: 'root' }]
|
|
1979
2095
|
}], ctorParameters: function () { return [{ type: i1$5.NzModalService }]; } });
|
|
@@ -2054,9 +2170,9 @@ class DrawerHelper {
|
|
|
2054
2170
|
return this.create(title, comp, params, Object.assign(Object.assign({}, options), { drawerOptions }));
|
|
2055
2171
|
}
|
|
2056
2172
|
}
|
|
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: "
|
|
2173
|
+
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 });
|
|
2174
|
+
DrawerHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DrawerHelper, providedIn: 'root' });
|
|
2175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DrawerHelper, decorators: [{
|
|
2060
2176
|
type: Injectable,
|
|
2061
2177
|
args: [{ providedIn: 'root' }]
|
|
2062
2178
|
}], ctorParameters: function () { return [{ type: i1$6.NzDrawerService }]; } });
|
|
@@ -2182,9 +2298,9 @@ class _HttpClient {
|
|
|
2182
2298
|
delay(0), tap(() => this.push()), switchMap(() => this.http.request(method, url, options)), finalize(() => this.pop()));
|
|
2183
2299
|
}
|
|
2184
2300
|
}
|
|
2185
|
-
_HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2186
|
-
_HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2301
|
+
_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 });
|
|
2302
|
+
_HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: _HttpClient, providedIn: 'root' });
|
|
2303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: _HttpClient, decorators: [{
|
|
2188
2304
|
type: Injectable,
|
|
2189
2305
|
args: [{ providedIn: 'root' }]
|
|
2190
2306
|
}], ctorParameters: function () { return [{ type: i1$7.HttpClient }, { type: i1.AlainConfigService }]; } });
|
|
@@ -2201,9 +2317,9 @@ class BaseApi {
|
|
|
2201
2317
|
this.injector = injector;
|
|
2202
2318
|
}
|
|
2203
2319
|
}
|
|
2204
|
-
BaseApi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2205
|
-
BaseApi.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2320
|
+
BaseApi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BaseApi, deps: [{ token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2321
|
+
BaseApi.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BaseApi });
|
|
2322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BaseApi, decorators: [{
|
|
2207
2323
|
type: Injectable
|
|
2208
2324
|
}], ctorParameters: function () {
|
|
2209
2325
|
return [{ type: i0.Injector, decorators: [{
|
|
@@ -2396,6 +2512,37 @@ const JSONP = makeMethod('JSONP');
|
|
|
2396
2512
|
*/
|
|
2397
2513
|
const FORM = makeMethod('FORM');
|
|
2398
2514
|
|
|
2515
|
+
/**
|
|
2516
|
+
* Whether to customize the handling of exception messages
|
|
2517
|
+
*
|
|
2518
|
+
* 是否自定义处理异常消息
|
|
2519
|
+
*
|
|
2520
|
+
* @example
|
|
2521
|
+
* this.http.post(`login`, {
|
|
2522
|
+
* name: 'cipchk', pwd: '123456'
|
|
2523
|
+
* }, {
|
|
2524
|
+
* context: new HttpContext()
|
|
2525
|
+
* .set(ALLOW_ANONYMOUS, true)
|
|
2526
|
+
* .set(CUSTOM_ERROR, true)
|
|
2527
|
+
* }).subscribe({
|
|
2528
|
+
* next: console.log,
|
|
2529
|
+
* error: console.log
|
|
2530
|
+
* });
|
|
2531
|
+
*/
|
|
2532
|
+
const CUSTOM_ERROR = new HttpContextToken(() => false);
|
|
2533
|
+
/**
|
|
2534
|
+
* Whether to ignore API prefixes
|
|
2535
|
+
*
|
|
2536
|
+
* 是否忽略API前缀
|
|
2537
|
+
*
|
|
2538
|
+
* @example
|
|
2539
|
+
* // When environment.api.baseUrl set '/api'
|
|
2540
|
+
*
|
|
2541
|
+
* this.http.get(`/path`) // Request Url: /api/path
|
|
2542
|
+
* this.http.get(`/path`, { context: new HttpContext().set(IGNORE_BASE_URL, true) }) // Request Url: /path
|
|
2543
|
+
*/
|
|
2544
|
+
const IGNORE_BASE_URL = new HttpContextToken(() => false);
|
|
2545
|
+
|
|
2399
2546
|
class DatePipe {
|
|
2400
2547
|
constructor(nzI18n) {
|
|
2401
2548
|
this.nzI18n = nzI18n;
|
|
@@ -2408,9 +2555,9 @@ class DatePipe {
|
|
|
2408
2555
|
return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt);
|
|
2409
2556
|
}
|
|
2410
2557
|
}
|
|
2411
|
-
DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2412
|
-
DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2558
|
+
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 });
|
|
2559
|
+
DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: DatePipe, name: "_date" });
|
|
2560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DatePipe, decorators: [{
|
|
2414
2561
|
type: Pipe,
|
|
2415
2562
|
args: [{ name: '_date' }]
|
|
2416
2563
|
}], ctorParameters: function () { return [{ type: i1$8.NzI18nService }]; } });
|
|
@@ -2427,9 +2574,9 @@ class KeysPipe {
|
|
|
2427
2574
|
return ret;
|
|
2428
2575
|
}
|
|
2429
2576
|
}
|
|
2430
|
-
KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2431
|
-
KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2577
|
+
KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2578
|
+
KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: KeysPipe, name: "keys" });
|
|
2579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: KeysPipe, decorators: [{
|
|
2433
2580
|
type: Pipe,
|
|
2434
2581
|
args: [{ name: 'keys' }]
|
|
2435
2582
|
}] });
|
|
@@ -2462,9 +2609,9 @@ class YNPipe {
|
|
|
2462
2609
|
return isSafeHtml ? this.dom.bypassSecurityTrustHtml(html) : html;
|
|
2463
2610
|
}
|
|
2464
2611
|
}
|
|
2465
|
-
YNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2466
|
-
YNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2612
|
+
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 });
|
|
2613
|
+
YNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: YNPipe, name: "yn" });
|
|
2614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: YNPipe, decorators: [{
|
|
2468
2615
|
type: Pipe,
|
|
2469
2616
|
args: [{ name: 'yn' }]
|
|
2470
2617
|
}], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
|
|
@@ -2477,9 +2624,9 @@ class HTMLPipe {
|
|
|
2477
2624
|
return html ? this.dom.bypassSecurityTrustHtml(html) : '';
|
|
2478
2625
|
}
|
|
2479
2626
|
}
|
|
2480
|
-
HTMLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2481
|
-
HTMLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2627
|
+
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 });
|
|
2628
|
+
HTMLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: HTMLPipe, name: "html" });
|
|
2629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: HTMLPipe, decorators: [{
|
|
2483
2630
|
type: Pipe,
|
|
2484
2631
|
args: [{ name: 'html' }]
|
|
2485
2632
|
}], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
|
|
@@ -2492,9 +2639,9 @@ class URLPipe {
|
|
|
2492
2639
|
return url ? this.dom.bypassSecurityTrustUrl(url) : '';
|
|
2493
2640
|
}
|
|
2494
2641
|
}
|
|
2495
|
-
URLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2496
|
-
URLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
2497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2642
|
+
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 });
|
|
2643
|
+
URLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: URLPipe, name: "url" });
|
|
2644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: URLPipe, decorators: [{
|
|
2498
2645
|
type: Pipe,
|
|
2499
2646
|
args: [{ name: 'url' }]
|
|
2500
2647
|
}], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
|
|
@@ -2522,9 +2669,9 @@ class AlainThemeModule {
|
|
|
2522
2669
|
};
|
|
2523
2670
|
}
|
|
2524
2671
|
}
|
|
2525
|
-
AlainThemeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2526
|
-
AlainThemeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2527
|
-
AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2672
|
+
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 });
|
|
2673
|
+
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] });
|
|
2674
|
+
AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainThemeModule, providers: [
|
|
2528
2675
|
{
|
|
2529
2676
|
provide: ALAIN_SETTING_KEYS,
|
|
2530
2677
|
useValue: {
|
|
@@ -2533,8 +2680,8 @@ AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
2533
2680
|
app: 'app'
|
|
2534
2681
|
}
|
|
2535
2682
|
}
|
|
2536
|
-
], imports: [
|
|
2537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2683
|
+
], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule, DelonLocaleModule] });
|
|
2684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlainThemeModule, decorators: [{
|
|
2538
2685
|
type: NgModule,
|
|
2539
2686
|
args: [{
|
|
2540
2687
|
imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule],
|
|
@@ -2574,11 +2721,11 @@ class PreloadOptionalModules {
|
|
|
2574
2721
|
}
|
|
2575
2722
|
}
|
|
2576
2723
|
|
|
2577
|
-
const VERSION = new Version('
|
|
2724
|
+
const VERSION = new Version('14.0.0-beta.0');
|
|
2578
2725
|
|
|
2579
2726
|
/**
|
|
2580
2727
|
* Generated bundle index. Do not edit.
|
|
2581
2728
|
*/
|
|
2582
2729
|
|
|
2583
|
-
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 };
|
|
2730
|
+
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, 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 };
|
|
2584
2731
|
//# sourceMappingURL=theme.mjs.map
|