@delon/theme 19.2.0 → 20.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compact.css +529 -181
- package/compact.min.css +1 -1
- package/dark.css +529 -181
- package/dark.min.css +1 -1
- package/default.css +529 -181
- package/default.min.css +1 -1
- package/fesm2022/layout-default.mjs +52 -66
- package/fesm2022/layout-default.mjs.map +1 -1
- package/fesm2022/setting-drawer.mjs +14 -22
- package/fesm2022/setting-drawer.mjs.map +1 -1
- package/fesm2022/theme-btn.mjs +10 -19
- package/fesm2022/theme-btn.mjs.map +1 -1
- package/fesm2022/theme.mjs +112 -94
- package/fesm2022/theme.mjs.map +1 -1
- package/index.d.ts +1689 -3
- package/layout-blank/index.d.ts +2 -5
- package/layout-default/index.d.ts +245 -5
- package/layout-default/style/fix/_sidebar-nav.less +18 -3
- package/layout-default/style/theme-dark.less +1 -0
- package/layout-default/style/theme-default.less +1 -0
- package/package.json +6 -6
- package/setting-drawer/index.d.ts +65 -5
- package/system/antd/_modal.less +1 -1
- package/system/ng/_preserve-white-spaces.less +8 -8
- package/theme-btn/index.d.ts +42 -5
- package/variable.css +529 -181
- package/variable.min.css +1 -1
- package/layout-blank/public_api.d.ts +0 -2
- package/layout-default/layout-header-item-trigger.directive.d.ts +0 -5
- package/layout-default/layout-header-item.component.d.ts +0 -10
- package/layout-default/layout-header.component.d.ts +0 -31
- package/layout-default/layout-nav.component.d.ts +0 -61
- package/layout-default/layout-top-menu-item.d.ts +0 -9
- package/layout-default/layout.component.d.ts +0 -39
- package/layout-default/layout.module.d.ts +0 -19
- package/layout-default/layout.service.d.ts +0 -29
- package/layout-default/public_api.d.ts +0 -9
- package/layout-default/types.d.ts +0 -60
- package/public_api.d.ts +0 -8
- package/setting-drawer/public_api.d.ts +0 -3
- package/setting-drawer/setting-drawer-item.component.d.ts +0 -11
- package/setting-drawer/setting-drawer.component.d.ts +0 -48
- package/setting-drawer/setting-drawer.module.d.ts +0 -8
- package/setting-drawer/setting-drawer.types.d.ts +0 -7
- package/src/config.d.ts +0 -63
- package/src/locale/index.d.ts +0 -1
- package/src/locale/languages/ar-SA.d.ts +0 -3
- package/src/locale/languages/el-GR.d.ts +0 -3
- package/src/locale/languages/en-US.d.ts +0 -3
- package/src/locale/languages/es-ES.d.ts +0 -3
- package/src/locale/languages/fr-FR.d.ts +0 -3
- package/src/locale/languages/hr-HR.d.ts +0 -3
- package/src/locale/languages/it-IT.d.ts +0 -3
- package/src/locale/languages/ja-JP.d.ts +0 -3
- package/src/locale/languages/ko-KR.d.ts +0 -3
- package/src/locale/languages/pl-PL.d.ts +0 -3
- package/src/locale/languages/sl-SI.d.ts +0 -3
- package/src/locale/languages/tr-TR.d.ts +0 -3
- package/src/locale/languages/vi-VI.d.ts +0 -3
- package/src/locale/languages/zh-CN.d.ts +0 -3
- package/src/locale/languages/zh-TW.d.ts +0 -3
- package/src/locale/locale.module.d.ts +0 -6
- package/src/locale/locale.service.d.ts +0 -17
- package/src/locale/locale.tokens.d.ts +0 -3
- package/src/locale/locale.types.d.ts +0 -93
- package/src/locale/public_api.d.ts +0 -19
- package/src/pipes/date/date.pipe.d.ts +0 -9
- package/src/pipes/index.d.ts +0 -5
- package/src/pipes/keys/keys.pipe.d.ts +0 -11
- package/src/pipes/safe/html.pipe.d.ts +0 -9
- package/src/pipes/safe/url.pipe.d.ts +0 -9
- package/src/pipes/yn/yn.pipe.d.ts +0 -16
- package/src/provide.d.ts +0 -23
- package/src/router/optional-preloader.d.ts +0 -20
- package/src/services/drawer/drawer.helper.d.ts +0 -71
- package/src/services/http/http.client.d.ts +0 -570
- package/src/services/http/http.decorator.d.ts +0 -108
- package/src/services/http/http.token.d.ts +0 -37
- package/src/services/http/index.d.ts +0 -3
- package/src/services/i18n/i18n-url.guard.d.ts +0 -36
- package/src/services/i18n/i18n.d.ts +0 -90
- package/src/services/i18n/i18n.pipe.d.ts +0 -8
- package/src/services/i18n/index.d.ts +0 -3
- package/src/services/index.d.ts +0 -10
- package/src/services/menu/index.d.ts +0 -2
- package/src/services/menu/interface.d.ts +0 -79
- package/src/services/menu/menu.service.d.ts +0 -114
- package/src/services/modal/modal.helper.d.ts +0 -78
- package/src/services/preloader/preloader.d.ts +0 -1
- package/src/services/responsive/responsive.d.ts +0 -12
- package/src/services/rtl/rtl.service.d.ts +0 -48
- package/src/services/settings/index.d.ts +0 -2
- package/src/services/settings/settings.service.d.ts +0 -40
- package/src/services/settings/types.d.ts +0 -35
- package/src/services/title/title.service.d.ts +0 -72
- package/src/theme.module.d.ts +0 -22
- package/src/version.d.ts +0 -2
- package/theme-btn/public_api.d.ts +0 -2
- package/theme-btn/theme-btn.component.d.ts +0 -32
- package/theme-btn/theme-btn.module.d.ts +0 -10
package/fesm2022/theme.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { DOCUMENT, isPlatformServer, CommonModule, registerLocaleData } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, PLATFORM_ID, InjectionToken, Injectable, DestroyRef, Injector, Pipe,
|
|
3
|
+
import { inject, PLATFORM_ID, InjectionToken, Injectable, DestroyRef, Injector, Pipe, Optional, SkipSelf, NgModule, importProvidersFrom, LOCALE_ID, provideEnvironmentInitializer, makeEnvironmentProviders, Version } from '@angular/core';
|
|
4
4
|
import { BehaviorSubject, filter, share, Subject, map, of, delay, isObservable, switchMap, Observable, take, tap, finalize, throwError, catchError } from 'rxjs';
|
|
5
5
|
import { ACLService } from '@delon/acl';
|
|
6
|
-
import * as i1 from '@delon/util/config';
|
|
7
6
|
import { AlainConfigService, ALAIN_CONFIG } from '@delon/util/config';
|
|
8
7
|
import { Platform } from '@angular/cdk/platform';
|
|
9
8
|
import { Directionality } from '@angular/cdk/bidi';
|
|
10
9
|
import { NzConfigService } from 'ng-zorro-antd/core/config';
|
|
11
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
10
|
+
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
12
11
|
import { Title, DomSanitizer } from '@angular/platform-browser';
|
|
13
12
|
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
14
13
|
import { DragDrop } from '@angular/cdk/drag-drop';
|
|
14
|
+
import { SIGNAL } from '@angular/core/primitives/signals';
|
|
15
15
|
import { deepMerge } from '@delon/util/other';
|
|
16
16
|
import { NzModalService, NzModalModule } from 'ng-zorro-antd/modal';
|
|
17
17
|
import { NzDrawerService, NzDrawerModule } from 'ng-zorro-antd/drawer';
|
|
@@ -20,7 +20,7 @@ import { formatDate } from '@delon/util/date-time';
|
|
|
20
20
|
import { NzI18nService, NzI18nModule, provideNzI18n, NZ_DATE_LOCALE } from 'ng-zorro-antd/i18n';
|
|
21
21
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
22
22
|
import { BellOutline, DeleteOutline, PlusOutline, InboxOutline, MenuFoldOutline, MenuUnfoldOutline } from '@ant-design/icons-angular/icons';
|
|
23
|
-
import * as i1
|
|
23
|
+
import * as i1 from 'ng-zorro-antd/icon';
|
|
24
24
|
import { NzIconService } from 'ng-zorro-antd/icon';
|
|
25
25
|
|
|
26
26
|
function stepPreloader() {
|
|
@@ -50,9 +50,10 @@ function stepPreloader() {
|
|
|
50
50
|
|
|
51
51
|
const ALAIN_I18N_TOKEN = new InjectionToken('alainI18nToken', {
|
|
52
52
|
providedIn: 'root',
|
|
53
|
-
factory: () => new AlainI18NServiceFake(
|
|
53
|
+
factory: () => new AlainI18NServiceFake()
|
|
54
54
|
});
|
|
55
55
|
class AlainI18nBaseService {
|
|
56
|
+
cogSrv = inject(AlainConfigService);
|
|
56
57
|
cog;
|
|
57
58
|
_change$ = new BehaviorSubject(null);
|
|
58
59
|
_currentLang = '';
|
|
@@ -70,8 +71,8 @@ class AlainI18nBaseService {
|
|
|
70
71
|
get data() {
|
|
71
72
|
return this._data;
|
|
72
73
|
}
|
|
73
|
-
constructor(
|
|
74
|
-
this.cog = cogSrv.merge('themeI18n', {
|
|
74
|
+
constructor() {
|
|
75
|
+
this.cog = this.cogSrv.merge('themeI18n', {
|
|
75
76
|
interpolation: ['{{', '}}']
|
|
76
77
|
});
|
|
77
78
|
}
|
|
@@ -123,12 +124,12 @@ class AlainI18nBaseService {
|
|
|
123
124
|
(Array.isArray(params) ? params : [params]).forEach((item, index) => (content = content.replace(new RegExp(`\\{\\s?${index}\\s?\\}`, 'g'), `${item}`)));
|
|
124
125
|
return content;
|
|
125
126
|
}
|
|
126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
127
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
127
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18nBaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
128
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18nBaseService });
|
|
128
129
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18nBaseService, decorators: [{
|
|
130
131
|
type: Injectable
|
|
131
|
-
}], ctorParameters: () => [
|
|
132
|
+
}], ctorParameters: () => [] });
|
|
132
133
|
class AlainI18NServiceFake extends AlainI18nBaseService {
|
|
133
134
|
use(lang, data) {
|
|
134
135
|
this._data = this.flatData(data ?? {}, []);
|
|
@@ -138,10 +139,10 @@ class AlainI18NServiceFake extends AlainI18nBaseService {
|
|
|
138
139
|
getLangs() {
|
|
139
140
|
return [];
|
|
140
141
|
}
|
|
141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
142
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18NServiceFake, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
143
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18NServiceFake, providedIn: 'root' });
|
|
143
144
|
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18NServiceFake, decorators: [{
|
|
145
146
|
type: Injectable,
|
|
146
147
|
args: [{ providedIn: 'root' }]
|
|
147
148
|
}] });
|
|
@@ -205,6 +206,8 @@ class MenuService {
|
|
|
205
206
|
}
|
|
206
207
|
fixItem(item) {
|
|
207
208
|
item._aclResult = true;
|
|
209
|
+
if (!item.render_type)
|
|
210
|
+
item.render_type = 'item';
|
|
208
211
|
if (!item.link)
|
|
209
212
|
item.link = '';
|
|
210
213
|
if (!item.externalLink)
|
|
@@ -448,10 +451,10 @@ class MenuService {
|
|
|
448
451
|
this._change$.unsubscribe();
|
|
449
452
|
this.i18n$?.unsubscribe();
|
|
450
453
|
}
|
|
451
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
452
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
454
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
455
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MenuService, providedIn: 'root' });
|
|
453
456
|
}
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MenuService, decorators: [{
|
|
455
458
|
type: Injectable,
|
|
456
459
|
args: [{ providedIn: 'root' }]
|
|
457
460
|
}], ctorParameters: () => [] });
|
|
@@ -547,10 +550,10 @@ class SettingsService {
|
|
|
547
550
|
getUser() {
|
|
548
551
|
return this._user;
|
|
549
552
|
}
|
|
550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
551
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
553
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
554
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SettingsService, providedIn: 'root' });
|
|
552
555
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: SettingsService, decorators: [{
|
|
554
557
|
type: Injectable,
|
|
555
558
|
args: [{ providedIn: 'root' }]
|
|
556
559
|
}] });
|
|
@@ -558,9 +561,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
558
561
|
const REP_MAX = 6;
|
|
559
562
|
const SPAN_MAX = 24;
|
|
560
563
|
class ResponsiveService {
|
|
564
|
+
cogSrv = inject(AlainConfigService);
|
|
561
565
|
cog;
|
|
562
|
-
constructor(
|
|
563
|
-
this.cog = cogSrv.merge('themeResponsive', {
|
|
566
|
+
constructor() {
|
|
567
|
+
this.cog = this.cogSrv.merge('themeResponsive', {
|
|
564
568
|
rules: {
|
|
565
569
|
1: { xs: 24 },
|
|
566
570
|
2: { xs: 24, sm: 12 },
|
|
@@ -598,13 +602,13 @@ class ResponsiveService {
|
|
|
598
602
|
clsMap.push(`${antColClass}-xxl-${paddingSpan(rule.xxl)}`);
|
|
599
603
|
return clsMap;
|
|
600
604
|
}
|
|
601
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
602
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
605
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ResponsiveService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
606
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ResponsiveService, providedIn: 'root' });
|
|
603
607
|
}
|
|
604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ResponsiveService, decorators: [{
|
|
605
609
|
type: Injectable,
|
|
606
610
|
args: [{ providedIn: 'root' }]
|
|
607
|
-
}], ctorParameters: () => [
|
|
611
|
+
}], ctorParameters: () => [] });
|
|
608
612
|
|
|
609
613
|
const HTML_DIR = 'dir';
|
|
610
614
|
const RTL_DIRECTION = 'direction';
|
|
@@ -634,7 +638,7 @@ class RTLService {
|
|
|
634
638
|
this.updateHtml();
|
|
635
639
|
// Should be wait inited
|
|
636
640
|
Promise.resolve().then(() => {
|
|
637
|
-
this.d.value
|
|
641
|
+
this.d.valueSignal.set(value);
|
|
638
642
|
this.d.change.emit(value);
|
|
639
643
|
this.srv.setLayout(RTL_DIRECTION, value);
|
|
640
644
|
});
|
|
@@ -687,10 +691,10 @@ class RTLService {
|
|
|
687
691
|
this.delon.set(name, { direction: this.dir });
|
|
688
692
|
});
|
|
689
693
|
}
|
|
690
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
691
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: RTLService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
695
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: RTLService, providedIn: 'root' });
|
|
692
696
|
}
|
|
693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: RTLService, decorators: [{
|
|
694
698
|
type: Injectable,
|
|
695
699
|
args: [{ providedIn: 'root' }]
|
|
696
700
|
}], ctorParameters: () => [] });
|
|
@@ -822,10 +826,10 @@ class TitleService {
|
|
|
822
826
|
ngOnDestroy() {
|
|
823
827
|
this.tit$?.unsubscribe();
|
|
824
828
|
}
|
|
825
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
826
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
829
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: TitleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
830
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: TitleService, providedIn: 'root' });
|
|
827
831
|
}
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: TitleService, decorators: [{
|
|
829
833
|
type: Injectable,
|
|
830
834
|
args: [{ providedIn: 'root' }]
|
|
831
835
|
}], ctorParameters: () => [] });
|
|
@@ -835,10 +839,10 @@ class I18nPipe {
|
|
|
835
839
|
transform(key, params) {
|
|
836
840
|
return this.i18n.fanyi(key, params);
|
|
837
841
|
}
|
|
838
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
839
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: I18nPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
843
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: I18nPipe, isStandalone: true, name: "i18n" });
|
|
840
844
|
}
|
|
841
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: I18nPipe, decorators: [{
|
|
842
846
|
type: Pipe,
|
|
843
847
|
args: [{ name: 'i18n' }]
|
|
844
848
|
}] });
|
|
@@ -853,10 +857,10 @@ class AlainI18NGuardService {
|
|
|
853
857
|
}
|
|
854
858
|
return of(true);
|
|
855
859
|
}
|
|
856
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
857
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
860
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18NGuardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
861
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18NGuardService, providedIn: 'root' });
|
|
858
862
|
}
|
|
859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainI18NGuardService, decorators: [{
|
|
860
864
|
type: Injectable,
|
|
861
865
|
args: [{ providedIn: 'root' }]
|
|
862
866
|
}] });
|
|
@@ -975,7 +979,16 @@ class ModalHelper {
|
|
|
975
979
|
});
|
|
976
980
|
// 保留 nzComponentParams 原有风格,但依然可以通过 @Inject(NZ_MODAL_DATA) 获取
|
|
977
981
|
if (subject.componentInstance != null && useNzData !== true) {
|
|
978
|
-
Object.
|
|
982
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
983
|
+
const t = subject.componentInstance;
|
|
984
|
+
const s = t[key]?.[SIGNAL];
|
|
985
|
+
if (s != null) {
|
|
986
|
+
s.value = value;
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
t[key] = value;
|
|
990
|
+
}
|
|
991
|
+
});
|
|
979
992
|
}
|
|
980
993
|
subject.afterOpen
|
|
981
994
|
.pipe(take(1), tap(() => {
|
|
@@ -1038,10 +1051,10 @@ class ModalHelper {
|
|
|
1038
1051
|
};
|
|
1039
1052
|
return this.create(comp, params, { ...options, modalOptions });
|
|
1040
1053
|
}
|
|
1041
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1042
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1054
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ModalHelper, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1055
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ModalHelper, providedIn: 'root' });
|
|
1043
1056
|
}
|
|
1044
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ModalHelper, decorators: [{
|
|
1045
1058
|
type: Injectable,
|
|
1046
1059
|
args: [{ providedIn: 'root' }]
|
|
1047
1060
|
}] });
|
|
@@ -1141,10 +1154,10 @@ class DrawerHelper {
|
|
|
1141
1154
|
};
|
|
1142
1155
|
return this.create(title, comp, params, { ...options, drawerOptions });
|
|
1143
1156
|
}
|
|
1144
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1145
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1157
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DrawerHelper, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1158
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DrawerHelper, providedIn: 'root' });
|
|
1146
1159
|
}
|
|
1147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DrawerHelper, decorators: [{
|
|
1148
1161
|
type: Injectable,
|
|
1149
1162
|
args: [{ providedIn: 'root' }]
|
|
1150
1163
|
}] });
|
|
@@ -1157,9 +1170,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1157
1170
|
*/
|
|
1158
1171
|
class _HttpClient {
|
|
1159
1172
|
http = inject(HttpClient);
|
|
1173
|
+
cogSrv = inject(AlainConfigService);
|
|
1160
1174
|
cog;
|
|
1161
|
-
constructor(
|
|
1162
|
-
this.cog = cogSrv.merge('themeHttp', {
|
|
1175
|
+
constructor() {
|
|
1176
|
+
this.cog = this.cogSrv.merge('themeHttp', {
|
|
1163
1177
|
nullValueHandling: 'include',
|
|
1164
1178
|
dateValueHandling: 'timestamp'
|
|
1165
1179
|
});
|
|
@@ -1290,13 +1304,13 @@ class _HttpClient {
|
|
|
1290
1304
|
// Make sure to always be asynchronous, see issues: https://github.com/ng-alain/ng-alain/issues/1954
|
|
1291
1305
|
delay(0), tap(() => this.push()), switchMap(() => this.http.request(method, url, options)), finalize(() => this.pop()));
|
|
1292
1306
|
}
|
|
1293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1294
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1307
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: _HttpClient, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1308
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: _HttpClient, providedIn: 'root' });
|
|
1295
1309
|
}
|
|
1296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: _HttpClient, decorators: [{
|
|
1297
1311
|
type: Injectable,
|
|
1298
1312
|
args: [{ providedIn: 'root' }]
|
|
1299
|
-
}], ctorParameters: () => [
|
|
1313
|
+
}], ctorParameters: () => [] });
|
|
1300
1314
|
|
|
1301
1315
|
/**
|
|
1302
1316
|
* Every http decorator must be based on `BaseAPI`, Like this:
|
|
@@ -1307,10 +1321,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1307
1321
|
*/
|
|
1308
1322
|
class BaseApi {
|
|
1309
1323
|
injector = inject(Injector);
|
|
1310
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1311
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1324
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: BaseApi, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1325
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: BaseApi });
|
|
1312
1326
|
}
|
|
1313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: BaseApi, decorators: [{
|
|
1314
1328
|
type: Injectable
|
|
1315
1329
|
}] });
|
|
1316
1330
|
const paramKey = `__api_params`;
|
|
@@ -1626,10 +1640,11 @@ var zhCN = {
|
|
|
1626
1640
|
};
|
|
1627
1641
|
|
|
1628
1642
|
class DelonLocaleService {
|
|
1643
|
+
defLocale = inject(DELON_LOCALE, { optional: true });
|
|
1629
1644
|
_locale = zhCN;
|
|
1630
1645
|
change$ = new BehaviorSubject(this._locale);
|
|
1631
|
-
constructor(
|
|
1632
|
-
this.setLocale(
|
|
1646
|
+
constructor() {
|
|
1647
|
+
this.setLocale(this.defLocale || zhCN);
|
|
1633
1648
|
}
|
|
1634
1649
|
get change() {
|
|
1635
1650
|
return this.change$.asObservable();
|
|
@@ -1641,36 +1656,39 @@ class DelonLocaleService {
|
|
|
1641
1656
|
this._locale = locale;
|
|
1642
1657
|
this.change$.next(locale);
|
|
1643
1658
|
}
|
|
1659
|
+
valueSignal(key) {
|
|
1660
|
+
const ret = toSignal(this.change.pipe(map(() => this.getData(key))), {
|
|
1661
|
+
initialValue: this._locale[key]
|
|
1662
|
+
});
|
|
1663
|
+
return ret;
|
|
1664
|
+
}
|
|
1644
1665
|
get locale() {
|
|
1645
1666
|
return this._locale;
|
|
1646
1667
|
}
|
|
1647
|
-
getData(
|
|
1648
|
-
return (this._locale[
|
|
1668
|
+
getData(key) {
|
|
1669
|
+
return (this._locale[key] || {});
|
|
1649
1670
|
}
|
|
1650
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1651
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1671
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DelonLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1672
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DelonLocaleService });
|
|
1652
1673
|
}
|
|
1653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DelonLocaleService, decorators: [{
|
|
1654
1675
|
type: Injectable
|
|
1655
|
-
}], ctorParameters: () => [
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
}] }] });
|
|
1659
|
-
function DELON_LOCALE_SERVICE_PROVIDER_FACTORY(exist, locale) {
|
|
1660
|
-
return exist || new DelonLocaleService(locale);
|
|
1676
|
+
}], ctorParameters: () => [] });
|
|
1677
|
+
function DELON_LOCALE_SERVICE_PROVIDER_FACTORY(exist) {
|
|
1678
|
+
return exist || new DelonLocaleService();
|
|
1661
1679
|
}
|
|
1662
1680
|
const DELON_LOCALE_SERVICE_PROVIDER = {
|
|
1663
1681
|
provide: DelonLocaleService,
|
|
1664
1682
|
useFactory: DELON_LOCALE_SERVICE_PROVIDER_FACTORY,
|
|
1665
|
-
deps: [[new Optional(), new SkipSelf(), DelonLocaleService]
|
|
1683
|
+
deps: [[new Optional(), new SkipSelf(), DelonLocaleService]]
|
|
1666
1684
|
};
|
|
1667
1685
|
|
|
1668
1686
|
class DelonLocaleModule {
|
|
1669
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1670
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1671
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1687
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DelonLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1688
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: DelonLocaleModule });
|
|
1689
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DelonLocaleModule, providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER] });
|
|
1672
1690
|
}
|
|
1673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DelonLocaleModule, decorators: [{
|
|
1674
1692
|
type: NgModule,
|
|
1675
1693
|
args: [{
|
|
1676
1694
|
providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER]
|
|
@@ -2812,10 +2830,10 @@ class DatePipe {
|
|
|
2812
2830
|
customFormat: this.cog?.dateFormatCustom
|
|
2813
2831
|
});
|
|
2814
2832
|
}
|
|
2815
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2816
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2833
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2834
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: DatePipe, isStandalone: true, name: "_date" });
|
|
2817
2835
|
}
|
|
2818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: DatePipe, decorators: [{
|
|
2819
2837
|
type: Pipe,
|
|
2820
2838
|
args: [{ name: '_date' }]
|
|
2821
2839
|
}] });
|
|
@@ -2831,10 +2849,10 @@ class KeysPipe {
|
|
|
2831
2849
|
});
|
|
2832
2850
|
return ret;
|
|
2833
2851
|
}
|
|
2834
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2835
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2852
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2853
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: KeysPipe, isStandalone: true, name: "keys" });
|
|
2836
2854
|
}
|
|
2837
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: KeysPipe, decorators: [{
|
|
2838
2856
|
type: Pipe,
|
|
2839
2857
|
args: [{ name: 'keys' }]
|
|
2840
2858
|
}] });
|
|
@@ -2869,10 +2887,10 @@ class YNPipe {
|
|
|
2869
2887
|
const html = yn(value, { yes, no, mode });
|
|
2870
2888
|
return isSafeHtml ? this.dom.bypassSecurityTrustHtml(html) : html;
|
|
2871
2889
|
}
|
|
2872
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2873
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2890
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: YNPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2891
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: YNPipe, isStandalone: true, name: "yn" });
|
|
2874
2892
|
}
|
|
2875
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2893
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: YNPipe, decorators: [{
|
|
2876
2894
|
type: Pipe,
|
|
2877
2895
|
args: [{ name: 'yn' }]
|
|
2878
2896
|
}] });
|
|
@@ -2882,10 +2900,10 @@ class HTMLPipe {
|
|
|
2882
2900
|
transform(html) {
|
|
2883
2901
|
return html ? this.dom.bypassSecurityTrustHtml(html) : '';
|
|
2884
2902
|
}
|
|
2885
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2886
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2903
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HTMLPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2904
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: HTMLPipe, isStandalone: true, name: "html" });
|
|
2887
2905
|
}
|
|
2888
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HTMLPipe, decorators: [{
|
|
2889
2907
|
type: Pipe,
|
|
2890
2908
|
args: [{ name: 'html' }]
|
|
2891
2909
|
}] });
|
|
@@ -2895,10 +2913,10 @@ class URLPipe {
|
|
|
2895
2913
|
transform(url) {
|
|
2896
2914
|
return url ? this.dom.bypassSecurityTrustUrl(url) : '';
|
|
2897
2915
|
}
|
|
2898
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2899
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2916
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: URLPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2917
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: URLPipe, isStandalone: true, name: "url" });
|
|
2900
2918
|
}
|
|
2901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: URLPipe, decorators: [{
|
|
2902
2920
|
type: Pipe,
|
|
2903
2921
|
args: [{ name: 'url' }]
|
|
2904
2922
|
}] });
|
|
@@ -2925,18 +2943,18 @@ class AlainThemeModule {
|
|
|
2925
2943
|
providers: HELPERS
|
|
2926
2944
|
};
|
|
2927
2945
|
}
|
|
2928
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2929
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2930
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2946
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainThemeModule, deps: [{ token: i1.NzIconService }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2947
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: AlainThemeModule, imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule, DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe], exports: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe, DelonLocaleModule] });
|
|
2948
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainThemeModule, providers: [ALAIN_SETTING_DEFAULT], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule, DelonLocaleModule] });
|
|
2931
2949
|
}
|
|
2932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AlainThemeModule, decorators: [{
|
|
2933
2951
|
type: NgModule,
|
|
2934
2952
|
args: [{
|
|
2935
2953
|
imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule, ...PIPES],
|
|
2936
2954
|
providers: [ALAIN_SETTING_DEFAULT],
|
|
2937
2955
|
exports: [...PIPES, DelonLocaleModule]
|
|
2938
2956
|
}]
|
|
2939
|
-
}], ctorParameters: () => [{ type: i1
|
|
2957
|
+
}], ctorParameters: () => [{ type: i1.NzIconService }] });
|
|
2940
2958
|
|
|
2941
2959
|
function provideAlain(options) {
|
|
2942
2960
|
const lang = options?.defaultLang;
|
|
@@ -2993,7 +3011,7 @@ class PreloadOptionalModules {
|
|
|
2993
3011
|
}
|
|
2994
3012
|
}
|
|
2995
3013
|
|
|
2996
|
-
const VERSION = new Version('
|
|
3014
|
+
const VERSION = new Version('20.0.0-beta.0');
|
|
2997
3015
|
|
|
2998
3016
|
/**
|
|
2999
3017
|
* Generated bundle index. Do not edit.
|