@delon/theme 20.1.0 → 21.0.0-next.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.
@@ -1,245 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { TemplateRef, QueryList, OnInit, OnDestroy, EventEmitter, AfterViewInit } from '@angular/core';
3
- import * as i8 from '@angular/router';
4
- import { Event } from '@angular/router';
5
- import { NzSafeAny } from 'ng-zorro-antd/core/types';
6
- import * as _angular_cdk_bidi from '@angular/cdk/bidi';
7
- import { SafeHtml } from '@angular/platform-browser';
8
- import { MenuInner, Menu, App } from '@delon/theme';
9
- import * as i7 from '@angular/common';
10
- import * as i9 from 'ng-zorro-antd/tooltip';
11
- import * as i10 from 'ng-zorro-antd/icon';
12
- import * as i11 from 'ng-zorro-antd/avatar';
13
- import * as i12 from 'ng-zorro-antd/dropdown';
14
- import * as i13 from 'ng-zorro-antd/badge';
15
- import { Observable } from 'rxjs';
16
-
17
- type LayoutDefaultHeaderItemHidden = 'pc' | 'mobile' | 'none';
18
- type LayoutDefaultHeaderItemDirection = 'left' | 'middle' | 'right';
19
- interface LayoutDefaultOptions {
20
- /**
21
- * Custom Logo Area
22
- *
23
- * 自定义 Logo 区域
24
- */
25
- logo?: TemplateRef<NzSafeAny> | null;
26
- /**
27
- * Logo url of expanded status, default: `./assets/logo-full.svg`
28
- *
29
- * 展开时 Logo 地址,默认:`./assets/logo-full.svg`
30
- */
31
- logoExpanded?: string;
32
- /**
33
- * Logo url of collapsed status, default: `./assets/logo.svg`
34
- *
35
- * 收缩时 Logo 地址,默认:`./assets/logo.svg`
36
- */
37
- logoCollapsed?: string;
38
- /**
39
- * Specify the logo routing address, default: `/`
40
- *
41
- * 指定 Logo 路由地址,默认:`/`
42
- */
43
- logoLink?: string;
44
- /**
45
- * Specify a fixed logo width
46
- *
47
- * 指定固定 Logo 宽度
48
- */
49
- logoFixWidth?: number;
50
- /**
51
- * Hide the sidebar without showing the collapsed icon button, default: `false`
52
- *
53
- * 隐藏侧边栏,同时不显收缩图标按钮,默认:`false`
54
- */
55
- hideAside?: boolean;
56
- /**
57
- * Hide top bar, default: `false`
58
- *
59
- * 隐藏顶栏,默认:`false`
60
- */
61
- hideHeader?: boolean;
62
- /**
63
- * Whether to display the menu collapse button on the top bar, default: `true`
64
- *
65
- * 是否在顶栏显示菜单折叠按钮,默认:`true`
66
- */
67
- showHeaderCollapse?: boolean;
68
- /**
69
- * Whether to show the menu collapse button at the bottom of the sidebar, default: `false`
70
- *
71
- * 是否在侧边栏底部显示菜单折叠按钮,默认:`false`
72
- */
73
- showSiderCollapse?: boolean;
74
- }
75
-
76
- declare class LayoutDefaultHeaderItemComponent {
77
- host: TemplateRef<void>;
78
- hidden: LayoutDefaultHeaderItemHidden;
79
- direction: LayoutDefaultHeaderItemDirection;
80
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultHeaderItemComponent, never>;
81
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutDefaultHeaderItemComponent, "layout-default-header-item", never, { "hidden": { "alias": "hidden"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; }, {}, never, ["*"], false, never>;
82
- }
83
-
84
- declare class LayoutDefaultComponent {
85
- headerItems: QueryList<LayoutDefaultHeaderItemComponent>;
86
- get opt(): LayoutDefaultOptions;
87
- set options(value: LayoutDefaultOptions | null | undefined);
88
- asideUser: TemplateRef<void> | null;
89
- asideBottom: TemplateRef<NzSafeAny> | null;
90
- nav: TemplateRef<void> | null;
91
- content: TemplateRef<void> | null;
92
- customError?: string | null;
93
- fetchingStrictly: boolean;
94
- fetching: boolean;
95
- private isFetching;
96
- get showFetching(): boolean;
97
- get collapsed(): boolean;
98
- get collapsedIcon(): string;
99
- toggleCollapsed(): void;
100
- private readonly router;
101
- private readonly msgSrv;
102
- private readonly settings;
103
- private readonly el;
104
- private readonly renderer;
105
- private readonly doc;
106
- private readonly srv;
107
- constructor();
108
- processEv(ev: Event): void;
109
- private setClass;
110
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultComponent, never>;
111
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutDefaultComponent, "layout-default", ["layoutDefault"], { "options": { "alias": "options"; "required": false; }; "asideUser": { "alias": "asideUser"; "required": false; }; "asideBottom": { "alias": "asideBottom"; "required": false; }; "nav": { "alias": "nav"; "required": false; }; "content": { "alias": "content"; "required": false; }; "customError": { "alias": "customError"; "required": false; }; "fetchingStrictly": { "alias": "fetchingStrictly"; "required": false; }; "fetching": { "alias": "fetching"; "required": false; }; }, {}, ["headerItems"], ["*"], false, never>;
112
- static ngAcceptInputType_fetchingStrictly: unknown;
113
- static ngAcceptInputType_fetching: unknown;
114
- }
115
-
116
- interface Nav extends MenuInner {
117
- _needIcon?: boolean;
118
- _text?: SafeHtml;
119
- }
120
- declare class LayoutDefaultNavComponent implements OnInit, OnDestroy {
121
- private readonly doc;
122
- private readonly win;
123
- private readonly router;
124
- private readonly render;
125
- private readonly menuSrv;
126
- private readonly settings;
127
- private readonly cdr;
128
- private readonly ngZone;
129
- private readonly sanitizer;
130
- private bodyEl;
131
- private destroy$;
132
- private floatingEl;
133
- dir: i0.WritableSignal<_angular_cdk_bidi.Direction>;
134
- list: Nav[];
135
- disabledAcl: boolean;
136
- autoCloseUnderPad: boolean;
137
- recursivePath: boolean;
138
- hideEmptyChildren: boolean;
139
- set openStrictly(value: boolean);
140
- maxLevelIcon: number;
141
- readonly select: EventEmitter<Menu>;
142
- get collapsed(): boolean;
143
- private getLinkNode;
144
- private floatingClickHandle;
145
- private clearFloating;
146
- private genFloating;
147
- private genSubNode;
148
- private hideAll;
149
- private calPos;
150
- showSubMenu(e: MouseEvent, item: Nav): void;
151
- to(item: Menu): void;
152
- toggleOpen(item: Nav): void;
153
- _click(): void;
154
- closeSubMenu(): void;
155
- private openByUrl;
156
- ngOnInit(): void;
157
- private fixHide;
158
- ngOnDestroy(): void;
159
- private get isPad();
160
- private underPad;
161
- private openAside;
162
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultNavComponent, never>;
163
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutDefaultNavComponent, "layout-default-nav", never, { "disabledAcl": { "alias": "disabledAcl"; "required": false; }; "autoCloseUnderPad": { "alias": "autoCloseUnderPad"; "required": false; }; "recursivePath": { "alias": "recursivePath"; "required": false; }; "hideEmptyChildren": { "alias": "hideEmptyChildren"; "required": false; }; "openStrictly": { "alias": "openStrictly"; "required": false; }; "maxLevelIcon": { "alias": "maxLevelIcon"; "required": false; }; }, { "select": "select"; }, never, never, false, never>;
164
- static ngAcceptInputType_disabledAcl: unknown;
165
- static ngAcceptInputType_autoCloseUnderPad: unknown;
166
- static ngAcceptInputType_recursivePath: unknown;
167
- static ngAcceptInputType_hideEmptyChildren: unknown;
168
- static ngAcceptInputType_openStrictly: unknown;
169
- static ngAcceptInputType_maxLevelIcon: unknown;
170
- }
171
-
172
- interface LayoutDefaultHeaderItem {
173
- host: TemplateRef<NzSafeAny>;
174
- hidden?: LayoutDefaultHeaderItemHidden;
175
- direction?: LayoutDefaultHeaderItemDirection;
176
- }
177
- declare class LayoutDefaultHeaderComponent implements AfterViewInit {
178
- private readonly settings;
179
- private readonly srv;
180
- private readonly cdr;
181
- private readonly destroy$;
182
- items: QueryList<LayoutDefaultHeaderItemComponent>;
183
- left: LayoutDefaultHeaderItem[];
184
- middle: LayoutDefaultHeaderItem[];
185
- right: LayoutDefaultHeaderItem[];
186
- get opt(): LayoutDefaultOptions;
187
- get app(): App;
188
- get collapsed(): boolean;
189
- get collapsedIcon(): string;
190
- private refresh;
191
- ngAfterViewInit(): void;
192
- toggleCollapsed(): void;
193
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultHeaderComponent, never>;
194
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutDefaultHeaderComponent, "layout-default-header", never, { "items": { "alias": "items"; "required": false; }; }, {}, never, never, false, never>;
195
- }
196
-
197
- declare class LayoutDefaultHeaderItemTriggerDirective {
198
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultHeaderItemTriggerDirective, never>;
199
- static ɵdir: i0.ɵɵDirectiveDeclaration<LayoutDefaultHeaderItemTriggerDirective, "[layout-default-header-item-trigger]", never, {}, {}, never, never, false, never>;
200
- }
201
-
202
- declare class LayoutDefaultTopMenuItemComponent {
203
- selected: boolean;
204
- disabled: boolean;
205
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultTopMenuItemComponent, never>;
206
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutDefaultTopMenuItemComponent, "layout-default-top-menu-item", never, { "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], false, never>;
207
- static ngAcceptInputType_selected: unknown;
208
- static ngAcceptInputType_disabled: unknown;
209
- }
210
-
211
- declare class LayoutDefaultModule {
212
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultModule, never>;
213
- static ɵmod: i0.ɵɵNgModuleDeclaration<LayoutDefaultModule, [typeof LayoutDefaultComponent, typeof LayoutDefaultNavComponent, typeof LayoutDefaultHeaderComponent, typeof LayoutDefaultHeaderItemComponent, typeof LayoutDefaultHeaderItemTriggerDirective, typeof LayoutDefaultTopMenuItemComponent], [typeof i7.CommonModule, typeof i8.RouterModule, typeof i9.NzTooltipModule, typeof i10.NzIconModule, typeof i11.NzAvatarModule, typeof i12.NzDropDownModule, typeof i13.NzBadgeModule], [typeof LayoutDefaultComponent, typeof LayoutDefaultNavComponent, typeof LayoutDefaultHeaderComponent, typeof LayoutDefaultHeaderItemComponent, typeof LayoutDefaultHeaderItemTriggerDirective, typeof LayoutDefaultTopMenuItemComponent]>;
214
- static ɵinj: i0.ɵɵInjectorDeclaration<LayoutDefaultModule>;
215
- }
216
-
217
- declare class LayoutDefaultService {
218
- private readonly settings;
219
- private readonly bm;
220
- private _options$;
221
- private _options;
222
- get options(): LayoutDefaultOptions;
223
- get options$(): Observable<LayoutDefaultOptions>;
224
- get collapsedIcon(): string;
225
- constructor();
226
- private checkMedia;
227
- private notify;
228
- /**
229
- * Set layout configuration
230
- *
231
- * 设置布局配置
232
- */
233
- setOptions(options?: LayoutDefaultOptions | null): void;
234
- /**
235
- * Toggle the collapsed state of the sidebar menu bar
236
- *
237
- * 切换侧边栏菜单栏折叠状态
238
- */
239
- toggleCollapsed(status?: boolean): void;
240
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutDefaultService, never>;
241
- static ɵprov: i0.ɵɵInjectableDeclaration<LayoutDefaultService>;
242
- }
243
-
244
- export { LayoutDefaultComponent, LayoutDefaultHeaderComponent, LayoutDefaultHeaderItemComponent, LayoutDefaultHeaderItemTriggerDirective, LayoutDefaultModule, LayoutDefaultNavComponent, LayoutDefaultService, LayoutDefaultTopMenuItemComponent };
245
- export type { LayoutDefaultHeaderItemDirection, LayoutDefaultHeaderItemHidden, LayoutDefaultOptions, Nav };
@@ -1,42 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, OnInit, OnDestroy, EventEmitter } from '@angular/core';
3
- import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
- import * as i1 from '@angular/common';
5
- import * as i2 from 'ng-zorro-antd/dropdown';
6
- import * as i3 from 'ng-zorro-antd/tooltip';
7
-
8
- interface ThemeBtnType {
9
- key: string;
10
- text: string;
11
- }
12
- declare const ALAIN_THEME_BTN_KEYS: InjectionToken<string>;
13
- declare class ThemeBtnComponent implements OnInit, OnDestroy {
14
- private readonly doc;
15
- private readonly platform;
16
- private readonly renderer;
17
- private readonly configSrv;
18
- private theme;
19
- isDev: boolean;
20
- types: ThemeBtnType[];
21
- devTips: string;
22
- deployUrl: string;
23
- readonly themeChange: EventEmitter<string>;
24
- dir: i0.WritableSignal<_angular_cdk_bidi.Direction>;
25
- private key;
26
- ngOnInit(): void;
27
- private initTheme;
28
- private updateChartTheme;
29
- onThemeChange(theme: string): void;
30
- ngOnDestroy(): void;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemeBtnComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<ThemeBtnComponent, "theme-btn", never, { "types": { "alias": "types"; "required": false; }; "devTips": { "alias": "devTips"; "required": false; }; "deployUrl": { "alias": "deployUrl"; "required": false; }; }, { "themeChange": "themeChange"; }, never, never, true, never>;
33
- }
34
-
35
- declare class ThemeBtnModule {
36
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemeBtnModule, never>;
37
- static ɵmod: i0.ɵɵNgModuleDeclaration<ThemeBtnModule, never, [typeof i1.CommonModule, typeof i2.NzDropDownModule, typeof i3.NzTooltipModule, typeof ThemeBtnComponent], [typeof ThemeBtnComponent]>;
38
- static ɵinj: i0.ɵɵInjectorDeclaration<ThemeBtnModule>;
39
- }
40
-
41
- export { ALAIN_THEME_BTN_KEYS, ThemeBtnComponent, ThemeBtnModule };
42
- export type { ThemeBtnType };