@delon/theme 13.5.1 → 14.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compact.css +1273 -794
- package/compact.min.css +1 -1
- package/dark.css +1280 -800
- package/dark.min.css +1 -1
- package/default.css +1275 -796
- package/default.min.css +1 -1
- package/esm2020/layout-default/layout-header-item-trigger.directive.mjs +4 -4
- package/esm2020/layout-default/layout-header-item.component.mjs +4 -4
- package/esm2020/layout-default/layout-header.component.mjs +5 -5
- package/esm2020/layout-default/layout-nav.component.mjs +34 -47
- package/esm2020/layout-default/layout.component.mjs +7 -7
- package/esm2020/layout-default/layout.module.mjs +12 -14
- package/esm2020/public_api.mjs +2 -3
- package/esm2020/setting-drawer/setting-drawer-item.component.mjs +10 -10
- package/esm2020/setting-drawer/setting-drawer.component.mjs +16 -16
- package/esm2020/setting-drawer/setting-drawer.module.mjs +16 -18
- package/esm2020/src/locale/languages/zh-TW.mjs +3 -3
- package/esm2020/src/locale/locale.module.mjs +5 -5
- package/esm2020/src/locale/locale.service.mjs +4 -4
- package/esm2020/src/pipes/date/date.pipe.mjs +4 -4
- package/esm2020/src/pipes/keys/keys.pipe.mjs +4 -4
- package/esm2020/src/pipes/safe/html.pipe.mjs +4 -4
- package/esm2020/src/pipes/safe/url.pipe.mjs +4 -4
- package/esm2020/src/pipes/yn/yn.pipe.mjs +4 -4
- package/esm2020/src/services/drawer/drawer.helper.mjs +4 -4
- package/esm2020/src/services/http/http.client.mjs +4 -4
- package/esm2020/src/services/http/http.decorator.mjs +4 -4
- package/esm2020/src/services/http/http.token.mjs +38 -0
- package/esm2020/src/services/http/index.mjs +4 -0
- package/esm2020/src/services/i18n/i18n-url.guard.mjs +4 -4
- package/esm2020/src/services/i18n/i18n.mjs +7 -7
- package/esm2020/src/services/i18n/i18n.pipe.mjs +4 -4
- package/esm2020/src/services/menu/interface.mjs +1 -1
- package/esm2020/src/services/menu/menu.service.mjs +127 -36
- package/esm2020/src/services/modal/modal.helper.mjs +4 -4
- package/esm2020/src/services/responsive/responsive.mjs +4 -4
- package/esm2020/src/services/rtl/rtl.service.mjs +4 -4
- package/esm2020/src/services/settings/settings.service.mjs +4 -4
- package/esm2020/src/services/title/title.service.mjs +71 -49
- package/esm2020/src/theme.module.mjs +6 -6
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/theme-btn/theme-btn.component.mjs +8 -8
- package/esm2020/theme-btn/theme-btn.module.mjs +6 -6
- package/fesm2015/layout-default.mjs +179 -194
- package/fesm2015/layout-default.mjs.map +1 -1
- package/fesm2015/setting-drawer.mjs +41 -43
- package/fesm2015/setting-drawer.mjs.map +1 -1
- package/fesm2015/theme-btn.mjs +12 -12
- package/fesm2015/theme-btn.mjs.map +1 -1
- package/fesm2015/theme.mjs +301 -148
- package/fesm2015/theme.mjs.map +1 -1
- package/fesm2020/layout-default.mjs +179 -194
- package/fesm2020/layout-default.mjs.map +1 -1
- package/fesm2020/setting-drawer.mjs +41 -43
- package/fesm2020/setting-drawer.mjs.map +1 -1
- package/fesm2020/theme-btn.mjs +12 -12
- package/fesm2020/theme-btn.mjs.map +1 -1
- package/fesm2020/theme.mjs +298 -148
- package/fesm2020/theme.mjs.map +1 -1
- package/{theme.d.ts → index.d.ts} +0 -0
- package/layout-blank/{layout-blank.d.ts → index.d.ts} +0 -0
- package/layout-default/{layout-default.d.ts → index.d.ts} +0 -0
- package/layout-default/layout-header-item-trigger.directive.d.ts +1 -1
- package/layout-default/layout-header-item.component.d.ts +1 -1
- package/layout-default/layout-header.component.d.ts +1 -1
- package/layout-default/layout-nav.component.d.ts +4 -3
- package/layout-default/layout.component.d.ts +1 -1
- package/package.json +10 -10
- package/public_api.d.ts +1 -2
- package/setting-drawer/{setting-drawer.d.ts → index.d.ts} +0 -0
- package/setting-drawer/setting-drawer-item.component.d.ts +1 -1
- package/setting-drawer/setting-drawer.component.d.ts +1 -1
- package/src/pipes/date/date.pipe.d.ts +1 -1
- package/src/pipes/keys/keys.pipe.d.ts +1 -1
- package/src/pipes/safe/html.pipe.d.ts +1 -1
- package/src/pipes/safe/url.pipe.d.ts +1 -1
- package/src/pipes/yn/yn.pipe.d.ts +1 -1
- package/src/services/http/http.decorator.d.ts +12 -12
- package/src/services/http/http.token.d.ts +37 -0
- package/src/services/http/index.d.ts +3 -0
- package/src/services/i18n/i18n.pipe.d.ts +1 -1
- package/src/services/menu/interface.d.ts +5 -22
- package/src/services/menu/menu.service.d.ts +46 -7
- package/src/services/title/title.service.d.ts +39 -8
- package/system/antd/_drawer.less +55 -4
- package/system/theme-default.less +4 -0
- package/theme-btn/{theme-btn.d.ts → index.d.ts} +0 -0
- package/theme-btn/theme-btn.component.d.ts +1 -1
- package/layout-blank/package.json +0 -10
- package/layout-default/package.json +0 -10
- package/setting-drawer/package.json +0 -10
- package/theme-btn/package.json +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i5 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ViewChild, Input,
|
|
4
|
+
import { Component, ViewChild, Input, EventEmitter, ChangeDetectionStrategy, ViewEncapsulation, Inject, Optional, Output, ContentChildren, Directive, NgModule } from '@angular/core';
|
|
5
5
|
import * as i2 from '@angular/router';
|
|
6
6
|
import { NavigationEnd, RouteConfigLoadStart, NavigationError, NavigationCancel, RouteConfigLoadEnd, RouterModule } from '@angular/router';
|
|
7
7
|
import { Subject, takeUntil, filter } from 'rxjs';
|
|
@@ -9,17 +9,17 @@ import { updateHostClass } from '@delon/util/browser';
|
|
|
9
9
|
import * as i2$1 from 'ng-zorro-antd/message';
|
|
10
10
|
import { NzMessageModule } from 'ng-zorro-antd/message';
|
|
11
11
|
import * as i1 from '@delon/theme';
|
|
12
|
-
import * as i4 from 'ng-zorro-antd/icon';
|
|
13
|
-
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
14
12
|
import { __decorate } from 'tslib';
|
|
15
13
|
import { InputBoolean, InputNumber, ZoneOutside } from '@delon/util/decorator';
|
|
16
14
|
import { WINDOW } from '@delon/util/token';
|
|
17
15
|
import * as i3 from '@angular/platform-browser';
|
|
18
|
-
import * as i4
|
|
19
|
-
import * as
|
|
20
|
-
import { NzBadgeModule } from 'ng-zorro-antd/badge';
|
|
21
|
-
import * as i8 from 'ng-zorro-antd/tooltip';
|
|
16
|
+
import * as i4 from '@angular/cdk/bidi';
|
|
17
|
+
import * as i6 from 'ng-zorro-antd/tooltip';
|
|
22
18
|
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
19
|
+
import * as i7 from 'ng-zorro-antd/icon';
|
|
20
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
21
|
+
import * as i8 from 'ng-zorro-antd/badge';
|
|
22
|
+
import { NzBadgeModule } from 'ng-zorro-antd/badge';
|
|
23
23
|
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
|
24
24
|
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
25
25
|
|
|
@@ -29,13 +29,13 @@ class LayoutDefaultHeaderItemComponent {
|
|
|
29
29
|
this.direction = 'right';
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
LayoutDefaultHeaderItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
33
|
-
LayoutDefaultHeaderItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
32
|
+
LayoutDefaultHeaderItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultHeaderItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
LayoutDefaultHeaderItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: LayoutDefaultHeaderItemComponent, selector: "layout-default-header-item", inputs: { hidden: "hidden", direction: "direction" }, viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true, static: true }], ngImport: i0, template: `
|
|
34
34
|
<ng-template #host>
|
|
35
35
|
<ng-content></ng-content>
|
|
36
36
|
</ng-template>
|
|
37
37
|
`, isInline: true });
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultHeaderItemComponent, decorators: [{
|
|
39
39
|
type: Component,
|
|
40
40
|
args: [{
|
|
41
41
|
selector: 'layout-default-header-item',
|
|
@@ -54,125 +54,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
54
54
|
type: Input
|
|
55
55
|
}] } });
|
|
56
56
|
|
|
57
|
-
class LayoutDefaultHeaderComponent {
|
|
58
|
-
constructor(settings, cdr) {
|
|
59
|
-
this.settings = settings;
|
|
60
|
-
this.cdr = cdr;
|
|
61
|
-
this.destroy$ = new Subject();
|
|
62
|
-
this.left = [];
|
|
63
|
-
this.middle = [];
|
|
64
|
-
this.right = [];
|
|
65
|
-
}
|
|
66
|
-
get app() {
|
|
67
|
-
return this.settings.app;
|
|
68
|
-
}
|
|
69
|
-
get collapsed() {
|
|
70
|
-
return this.settings.layout.collapsed;
|
|
71
|
-
}
|
|
72
|
-
get collapsedIcon() {
|
|
73
|
-
let type = this.collapsed ? 'unfold' : 'fold';
|
|
74
|
-
if (this.settings.layout.direction === 'rtl') {
|
|
75
|
-
type = this.collapsed ? 'fold' : 'unfold';
|
|
76
|
-
}
|
|
77
|
-
return `menu-${type}`;
|
|
78
|
-
}
|
|
79
|
-
refresh() {
|
|
80
|
-
const arr = this.items.toArray();
|
|
81
|
-
this.left = arr.filter(i => i.direction === 'left');
|
|
82
|
-
this.middle = arr.filter(i => i.direction === 'middle');
|
|
83
|
-
this.right = arr.filter(i => i.direction === 'right');
|
|
84
|
-
this.cdr.detectChanges();
|
|
85
|
-
}
|
|
86
|
-
ngAfterViewInit() {
|
|
87
|
-
this.items.changes.pipe(takeUntil(this.destroy$)).subscribe(() => this.refresh());
|
|
88
|
-
this.refresh();
|
|
89
|
-
}
|
|
90
|
-
toggleCollapsed() {
|
|
91
|
-
this.settings.setLayout('collapsed', !this.settings.layout.collapsed);
|
|
92
|
-
}
|
|
93
|
-
ngOnDestroy() {
|
|
94
|
-
this.destroy$.next();
|
|
95
|
-
this.destroy$.complete();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
LayoutDefaultHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayoutDefaultHeaderComponent, deps: [{ token: i1.SettingsService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
99
|
-
LayoutDefaultHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: LayoutDefaultHeaderComponent, selector: "layout-default-header", inputs: { items: "items", options: "options" }, host: { properties: { "class.alain-default__header": "true" } }, ngImport: i0, template: `
|
|
100
|
-
<ng-template #render let-ls>
|
|
101
|
-
<li *ngFor="let i of ls" [class.hidden-mobile]="i.hidden === 'mobile'" [class.hidden-pc]="i.hidden === 'pc'">
|
|
102
|
-
<ng-container *ngTemplateOutlet="i.host"></ng-container>
|
|
103
|
-
</li>
|
|
104
|
-
</ng-template>
|
|
105
|
-
<div class="alain-default__header-logo" [style.width.px]="options.logoFixWidth">
|
|
106
|
-
<ng-container *ngIf="!options.logo; else options.logo!">
|
|
107
|
-
<a [routerLink]="options.logoLink" class="alain-default__header-logo-link">
|
|
108
|
-
<img class="alain-default__header-logo-expanded" [attr.src]="options.logoExpanded" [attr.alt]="app.name" />
|
|
109
|
-
<img class="alain-default__header-logo-collapsed" [attr.src]="options.logoCollapsed" [attr.alt]="app.name" />
|
|
110
|
-
</a>
|
|
111
|
-
</ng-container>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="alain-default__nav-wrap">
|
|
114
|
-
<ul class="alain-default__nav">
|
|
115
|
-
<li *ngIf="!options.hideAside">
|
|
116
|
-
<div class="alain-default__nav-item alain-default__nav-item--collapse" (click)="toggleCollapsed()">
|
|
117
|
-
<i nz-icon [nzType]="collapsedIcon"></i>
|
|
118
|
-
</div>
|
|
119
|
-
</li>
|
|
120
|
-
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: left }"></ng-template>
|
|
121
|
-
</ul>
|
|
122
|
-
<div *ngIf="middle.length > 0" class="alain-default__nav alain-default__nav-middle">
|
|
123
|
-
<ng-container *ngTemplateOutlet="middle[0].host"></ng-container>
|
|
124
|
-
</div>
|
|
125
|
-
<ul class="alain-default__nav">
|
|
126
|
-
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: right }"></ng-template>
|
|
127
|
-
</ul>
|
|
128
|
-
</div>
|
|
129
|
-
`, isInline: true, directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayoutDefaultHeaderComponent, decorators: [{
|
|
131
|
-
type: Component,
|
|
132
|
-
args: [{
|
|
133
|
-
selector: 'layout-default-header',
|
|
134
|
-
template: `
|
|
135
|
-
<ng-template #render let-ls>
|
|
136
|
-
<li *ngFor="let i of ls" [class.hidden-mobile]="i.hidden === 'mobile'" [class.hidden-pc]="i.hidden === 'pc'">
|
|
137
|
-
<ng-container *ngTemplateOutlet="i.host"></ng-container>
|
|
138
|
-
</li>
|
|
139
|
-
</ng-template>
|
|
140
|
-
<div class="alain-default__header-logo" [style.width.px]="options.logoFixWidth">
|
|
141
|
-
<ng-container *ngIf="!options.logo; else options.logo!">
|
|
142
|
-
<a [routerLink]="options.logoLink" class="alain-default__header-logo-link">
|
|
143
|
-
<img class="alain-default__header-logo-expanded" [attr.src]="options.logoExpanded" [attr.alt]="app.name" />
|
|
144
|
-
<img class="alain-default__header-logo-collapsed" [attr.src]="options.logoCollapsed" [attr.alt]="app.name" />
|
|
145
|
-
</a>
|
|
146
|
-
</ng-container>
|
|
147
|
-
</div>
|
|
148
|
-
<div class="alain-default__nav-wrap">
|
|
149
|
-
<ul class="alain-default__nav">
|
|
150
|
-
<li *ngIf="!options.hideAside">
|
|
151
|
-
<div class="alain-default__nav-item alain-default__nav-item--collapse" (click)="toggleCollapsed()">
|
|
152
|
-
<i nz-icon [nzType]="collapsedIcon"></i>
|
|
153
|
-
</div>
|
|
154
|
-
</li>
|
|
155
|
-
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: left }"></ng-template>
|
|
156
|
-
</ul>
|
|
157
|
-
<div *ngIf="middle.length > 0" class="alain-default__nav alain-default__nav-middle">
|
|
158
|
-
<ng-container *ngTemplateOutlet="middle[0].host"></ng-container>
|
|
159
|
-
</div>
|
|
160
|
-
<ul class="alain-default__nav">
|
|
161
|
-
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: right }"></ng-template>
|
|
162
|
-
</ul>
|
|
163
|
-
</div>
|
|
164
|
-
`,
|
|
165
|
-
host: {
|
|
166
|
-
'[class.alain-default__header]': `true`
|
|
167
|
-
},
|
|
168
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
169
|
-
}]
|
|
170
|
-
}], ctorParameters: function () { return [{ type: i1.SettingsService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], options: [{
|
|
173
|
-
type: Input
|
|
174
|
-
}] } });
|
|
175
|
-
|
|
176
57
|
const SHOWCLS = 'sidebar-nav__floating-show';
|
|
177
58
|
const FLOATINGCLS = 'sidebar-nav__floating';
|
|
178
59
|
class LayoutDefaultNavComponent {
|
|
@@ -193,10 +74,12 @@ class LayoutDefaultNavComponent {
|
|
|
193
74
|
this.disabledAcl = false;
|
|
194
75
|
this.autoCloseUnderPad = true;
|
|
195
76
|
this.recursivePath = true;
|
|
196
|
-
this.openStrictly = false;
|
|
197
77
|
this.maxLevelIcon = 3;
|
|
198
78
|
this.select = new EventEmitter();
|
|
199
79
|
}
|
|
80
|
+
set openStrictly(value) {
|
|
81
|
+
this.menuSrv.openStrictly = value;
|
|
82
|
+
}
|
|
200
83
|
get collapsed() {
|
|
201
84
|
return this.settings.layout.collapsed;
|
|
202
85
|
}
|
|
@@ -310,19 +193,7 @@ class LayoutDefaultNavComponent {
|
|
|
310
193
|
this.ngZone.run(() => this.router.navigateByUrl(item.link));
|
|
311
194
|
}
|
|
312
195
|
toggleOpen(item) {
|
|
313
|
-
|
|
314
|
-
this.menuSrv.visit(this.list, (i) => {
|
|
315
|
-
if (i !== item)
|
|
316
|
-
i._open = false;
|
|
317
|
-
});
|
|
318
|
-
let pItem = item._parent;
|
|
319
|
-
while (pItem) {
|
|
320
|
-
pItem._open = true;
|
|
321
|
-
pItem = pItem._parent;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
item._open = !item._open;
|
|
325
|
-
this.cdr.markForCheck();
|
|
196
|
+
this.menuSrv.toggleOpen(item);
|
|
326
197
|
}
|
|
327
198
|
_click() {
|
|
328
199
|
if (this.isPad && this.collapsed) {
|
|
@@ -335,29 +206,13 @@ class LayoutDefaultNavComponent {
|
|
|
335
206
|
this.hideAll();
|
|
336
207
|
}
|
|
337
208
|
}
|
|
338
|
-
|
|
339
|
-
const { menuSrv, recursivePath
|
|
340
|
-
|
|
341
|
-
i._selected = false;
|
|
342
|
-
if (!openStrictly) {
|
|
343
|
-
i._open = false;
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
if (findItem == null)
|
|
347
|
-
return;
|
|
348
|
-
do {
|
|
349
|
-
findItem._selected = true;
|
|
350
|
-
if (!openStrictly) {
|
|
351
|
-
findItem._open = true;
|
|
352
|
-
}
|
|
353
|
-
findItem = findItem._parent;
|
|
354
|
-
} while (findItem);
|
|
209
|
+
openByUrl(url) {
|
|
210
|
+
const { menuSrv, recursivePath } = this;
|
|
211
|
+
this.menuSrv.open(menuSrv.find({ url, recursive: recursivePath }));
|
|
355
212
|
}
|
|
356
213
|
ngOnInit() {
|
|
357
214
|
const { doc, router, destroy$, menuSrv, settings, cdr } = this;
|
|
358
215
|
this.bodyEl = doc.querySelector('body');
|
|
359
|
-
this.openedByUrl(router.url);
|
|
360
|
-
this.ngZone.runOutsideAngular(() => this.genFloating());
|
|
361
216
|
menuSrv.change.pipe(takeUntil(destroy$)).subscribe(data => {
|
|
362
217
|
menuSrv.visit(data, (i, _p, depth) => {
|
|
363
218
|
i._text = this.sanitizer.bypassSecurityTrustHtml(i.text);
|
|
@@ -370,20 +225,18 @@ class LayoutDefaultNavComponent {
|
|
|
370
225
|
i._hidden = true;
|
|
371
226
|
}
|
|
372
227
|
}
|
|
373
|
-
if (this.openStrictly) {
|
|
374
|
-
i._open = i.open != null ? i.open : false;
|
|
375
|
-
}
|
|
376
228
|
const icon = i.icon;
|
|
377
229
|
if (icon && icon.type === 'svg' && typeof icon.value === 'string') {
|
|
378
230
|
icon.value = this.sanitizer.bypassSecurityTrustHtml(icon.value);
|
|
379
231
|
}
|
|
380
232
|
});
|
|
381
|
-
this.
|
|
233
|
+
this.fixHide(data);
|
|
234
|
+
this.list = data.filter((w) => w._hidden !== true);
|
|
382
235
|
cdr.detectChanges();
|
|
383
236
|
});
|
|
384
237
|
router.events.pipe(takeUntil(destroy$)).subscribe(e => {
|
|
385
238
|
if (e instanceof NavigationEnd) {
|
|
386
|
-
this.
|
|
239
|
+
this.openByUrl(e.urlAfterRedirects);
|
|
387
240
|
this.underPad();
|
|
388
241
|
this.cdr.detectChanges();
|
|
389
242
|
}
|
|
@@ -396,6 +249,21 @@ class LayoutDefaultNavComponent {
|
|
|
396
249
|
this.directionality.change?.pipe(takeUntil(destroy$)).subscribe((direction) => {
|
|
397
250
|
this.dir = direction;
|
|
398
251
|
});
|
|
252
|
+
this.openByUrl(router.url);
|
|
253
|
+
this.ngZone.runOutsideAngular(() => this.genFloating());
|
|
254
|
+
}
|
|
255
|
+
fixHide(ls) {
|
|
256
|
+
const inFn = (list) => {
|
|
257
|
+
for (const item of list) {
|
|
258
|
+
if (item.children && item.children.length > 0) {
|
|
259
|
+
inFn(item.children);
|
|
260
|
+
if (!item._hidden) {
|
|
261
|
+
item._hidden = item.children.every((v) => v._hidden);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
inFn(ls);
|
|
399
267
|
}
|
|
400
268
|
ngOnDestroy() {
|
|
401
269
|
this.destroy$.next();
|
|
@@ -415,8 +283,8 @@ class LayoutDefaultNavComponent {
|
|
|
415
283
|
this.settings.setLayout('collapsed', status);
|
|
416
284
|
}
|
|
417
285
|
}
|
|
418
|
-
LayoutDefaultNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
419
|
-
LayoutDefaultNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
286
|
+
LayoutDefaultNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultNavComponent, deps: [{ token: i1.MenuService }, { token: i1.SettingsService }, { token: i2.Router }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i3.DomSanitizer }, { token: DOCUMENT }, { token: WINDOW }, { token: i4.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
287
|
+
LayoutDefaultNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: LayoutDefaultNavComponent, selector: "layout-default-nav", inputs: { disabledAcl: "disabledAcl", autoCloseUnderPad: "autoCloseUnderPad", recursivePath: "recursivePath", openStrictly: "openStrictly", maxLevelIcon: "maxLevelIcon" }, outputs: { select: "select" }, host: { listeners: { "click": "_click()", "document:click": "closeSubMenu()" } }, ngImport: i0, template: "<ng-template #icon let-i>\n <ng-container *ngIf=\"i\" [ngSwitch]=\"i.type\">\n <i\n *ngSwitchCase=\"'icon'\"\n class=\"sidebar-nav__item-icon\"\n nz-icon\n [nzType]=\"i.value\"\n [nzTheme]=\"i.theme\"\n [nzSpin]=\"i.spin\"\n [nzTwotoneColor]=\"i.twoToneColor\"\n [nzIconfont]=\"i.iconfont\"\n [nzRotate]=\"i.rotate\"\n ></i>\n <i *ngSwitchCase=\"'iconfont'\" class=\"sidebar-nav__item-icon\" nz-icon [nzIconfont]=\"i.iconfont\"></i>\n <img *ngSwitchCase=\"'img'\" [src]=\"i.value\" class=\"sidebar-nav__item-icon sidebar-nav__item-img\" />\n <span *ngSwitchCase=\"'svg'\" class=\"sidebar-nav__item-icon sidebar-nav__item-svg\" [innerHTML]=\"i.value\"></span>\n <i *ngSwitchDefault class=\"sidebar-nav__item-icon {{ i.value }}\"></i>\n </ng-container>\n</ng-template>\n<ng-template #tree let-ls>\n <ng-container *ngFor=\"let i of ls\">\n <li\n *ngIf=\"i._hidden !== true\"\n class=\"sidebar-nav__item\"\n [class.sidebar-nav__selected]=\"i._selected\"\n [class.sidebar-nav__open]=\"i.open\"\n >\n <!-- link -->\n <a\n *ngIf=\"i.children.length === 0\"\n (click)=\"to(i)\"\n [attr.data-id]=\"i._id\"\n class=\"sidebar-nav__item-link\"\n [ngClass]=\"{ 'sidebar-nav__item-disabled': i.disabled }\"\n (mouseenter)=\"closeSubMenu()\"\n >\n <ng-container *ngIf=\"i._needIcon\">\n <ng-container *ngIf=\"!collapsed\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\"></ng-template>\n </ng-container>\n <span *ngIf=\"collapsed\" nz-tooltip nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"i.text\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\"></ng-template>\n </span>\n </ng-container>\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n </a>\n <!-- has children link -->\n <a\n *ngIf=\"i.children.length > 0\"\n (click)=\"toggleOpen(i)\"\n (mouseenter)=\"showSubMenu($event, i)\"\n class=\"sidebar-nav__item-link\"\n >\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\"></ng-template>\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n <i class=\"sidebar-nav__sub-arrow\"></i>\n </a>\n <!-- badge -->\n <nz-badge *ngIf=\"i.badge\" [nzCount]=\"i.badge\" [nzDot]=\"i.badgeDot\" nzStandalone [nzOverflowCount]=\"9\"></nz-badge>\n <ul *ngIf=\"i.children.length > 0\" class=\"sidebar-nav sidebar-nav__sub sidebar-nav__depth{{ i._depth }}\">\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: i.children }\"></ng-template>\n </ul>\n </li>\n </ng-container>\n</ng-template>\n<ul class=\"sidebar-nav\">\n <ng-container *ngFor=\"let group of list\">\n <li class=\"sidebar-nav__item sidebar-nav__group-title\" *ngIf=\"group.group\">\n <span [innerHTML]=\"group._text\"></span>\n </li>\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: group.children }\"></ng-template>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i6.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: i7.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i8.NzBadgeComponent, selector: "nz-badge", inputs: ["nzShowZero", "nzShowDot", "nzStandalone", "nzDot", "nzOverflowCount", "nzColor", "nzStyle", "nzText", "nzTitle", "nzStatus", "nzCount", "nzOffset", "nzSize"], exportAs: ["nzBadge"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
420
288
|
__decorate([
|
|
421
289
|
InputBoolean()
|
|
422
290
|
], LayoutDefaultNavComponent.prototype, "disabledAcl", void 0);
|
|
@@ -428,26 +296,26 @@ __decorate([
|
|
|
428
296
|
], LayoutDefaultNavComponent.prototype, "recursivePath", void 0);
|
|
429
297
|
__decorate([
|
|
430
298
|
InputBoolean()
|
|
431
|
-
], LayoutDefaultNavComponent.prototype, "openStrictly",
|
|
299
|
+
], LayoutDefaultNavComponent.prototype, "openStrictly", null);
|
|
432
300
|
__decorate([
|
|
433
301
|
InputNumber()
|
|
434
302
|
], LayoutDefaultNavComponent.prototype, "maxLevelIcon", void 0);
|
|
435
303
|
__decorate([
|
|
436
304
|
ZoneOutside()
|
|
437
305
|
], LayoutDefaultNavComponent.prototype, "showSubMenu", null);
|
|
438
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultNavComponent, decorators: [{
|
|
439
307
|
type: Component,
|
|
440
308
|
args: [{ selector: 'layout-default-nav', host: {
|
|
441
309
|
'(click)': '_click()',
|
|
442
310
|
'(document:click)': 'closeSubMenu()'
|
|
443
|
-
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template #icon let-i>\n <ng-container *ngIf=\"i\" [ngSwitch]=\"i.type\">\n <i\n *ngSwitchCase=\"'icon'\"\n class=\"sidebar-nav__item-icon\"\n nz-icon\n [nzType]=\"i.value\"\n [nzTheme]=\"i.theme\"\n [nzSpin]=\"i.spin\"\n [nzTwotoneColor]=\"i.twoToneColor\"\n [nzIconfont]=\"i.iconfont\"\n [nzRotate]=\"i.rotate\"\n ></i>\n <i *ngSwitchCase=\"'iconfont'\" class=\"sidebar-nav__item-icon\" nz-icon [nzIconfont]=\"i.iconfont\"></i>\n <img *ngSwitchCase=\"'img'\" [src]=\"i.value\" class=\"sidebar-nav__item-icon sidebar-nav__item-img\" />\n <span *ngSwitchCase=\"'svg'\" class=\"sidebar-nav__item-icon sidebar-nav__item-svg\" [innerHTML]=\"i.value\"></span>\n <i *ngSwitchDefault class=\"sidebar-nav__item-icon {{ i.value }}\"></i>\n </ng-container>\n</ng-template>\n<ng-template #tree let-ls>\n <ng-container *ngFor=\"let i of ls\">\n <li\n *ngIf=\"i._hidden !== true\"\n class=\"sidebar-nav__item\"\n [class.sidebar-nav__selected]=\"i._selected\"\n [class.sidebar-nav__open]=\"i.
|
|
311
|
+
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template #icon let-i>\n <ng-container *ngIf=\"i\" [ngSwitch]=\"i.type\">\n <i\n *ngSwitchCase=\"'icon'\"\n class=\"sidebar-nav__item-icon\"\n nz-icon\n [nzType]=\"i.value\"\n [nzTheme]=\"i.theme\"\n [nzSpin]=\"i.spin\"\n [nzTwotoneColor]=\"i.twoToneColor\"\n [nzIconfont]=\"i.iconfont\"\n [nzRotate]=\"i.rotate\"\n ></i>\n <i *ngSwitchCase=\"'iconfont'\" class=\"sidebar-nav__item-icon\" nz-icon [nzIconfont]=\"i.iconfont\"></i>\n <img *ngSwitchCase=\"'img'\" [src]=\"i.value\" class=\"sidebar-nav__item-icon sidebar-nav__item-img\" />\n <span *ngSwitchCase=\"'svg'\" class=\"sidebar-nav__item-icon sidebar-nav__item-svg\" [innerHTML]=\"i.value\"></span>\n <i *ngSwitchDefault class=\"sidebar-nav__item-icon {{ i.value }}\"></i>\n </ng-container>\n</ng-template>\n<ng-template #tree let-ls>\n <ng-container *ngFor=\"let i of ls\">\n <li\n *ngIf=\"i._hidden !== true\"\n class=\"sidebar-nav__item\"\n [class.sidebar-nav__selected]=\"i._selected\"\n [class.sidebar-nav__open]=\"i.open\"\n >\n <!-- link -->\n <a\n *ngIf=\"i.children.length === 0\"\n (click)=\"to(i)\"\n [attr.data-id]=\"i._id\"\n class=\"sidebar-nav__item-link\"\n [ngClass]=\"{ 'sidebar-nav__item-disabled': i.disabled }\"\n (mouseenter)=\"closeSubMenu()\"\n >\n <ng-container *ngIf=\"i._needIcon\">\n <ng-container *ngIf=\"!collapsed\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\"></ng-template>\n </ng-container>\n <span *ngIf=\"collapsed\" nz-tooltip nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"i.text\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\"></ng-template>\n </span>\n </ng-container>\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n </a>\n <!-- has children link -->\n <a\n *ngIf=\"i.children.length > 0\"\n (click)=\"toggleOpen(i)\"\n (mouseenter)=\"showSubMenu($event, i)\"\n class=\"sidebar-nav__item-link\"\n >\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\"></ng-template>\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n <i class=\"sidebar-nav__sub-arrow\"></i>\n </a>\n <!-- badge -->\n <nz-badge *ngIf=\"i.badge\" [nzCount]=\"i.badge\" [nzDot]=\"i.badgeDot\" nzStandalone [nzOverflowCount]=\"9\"></nz-badge>\n <ul *ngIf=\"i.children.length > 0\" class=\"sidebar-nav sidebar-nav__sub sidebar-nav__depth{{ i._depth }}\">\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: i.children }\"></ng-template>\n </ul>\n </li>\n </ng-container>\n</ng-template>\n<ul class=\"sidebar-nav\">\n <ng-container *ngFor=\"let group of list\">\n <li class=\"sidebar-nav__item sidebar-nav__group-title\" *ngIf=\"group.group\">\n <span [innerHTML]=\"group._text\"></span>\n </li>\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: group.children }\"></ng-template>\n </ng-container>\n</ul>\n" }]
|
|
444
312
|
}], ctorParameters: function () { return [{ type: i1.MenuService }, { type: i1.SettingsService }, { type: i2.Router }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i3.DomSanitizer }, { type: undefined, decorators: [{
|
|
445
313
|
type: Inject,
|
|
446
314
|
args: [DOCUMENT]
|
|
447
315
|
}] }, { type: undefined, decorators: [{
|
|
448
316
|
type: Inject,
|
|
449
317
|
args: [WINDOW]
|
|
450
|
-
}] }, { type: i4
|
|
318
|
+
}] }, { type: i4.Directionality, decorators: [{
|
|
451
319
|
type: Optional
|
|
452
320
|
}] }]; }, propDecorators: { disabledAcl: [{
|
|
453
321
|
type: Input
|
|
@@ -463,6 +331,125 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
463
331
|
type: Output
|
|
464
332
|
}], showSubMenu: [] } });
|
|
465
333
|
|
|
334
|
+
class LayoutDefaultHeaderComponent {
|
|
335
|
+
constructor(settings, cdr) {
|
|
336
|
+
this.settings = settings;
|
|
337
|
+
this.cdr = cdr;
|
|
338
|
+
this.destroy$ = new Subject();
|
|
339
|
+
this.left = [];
|
|
340
|
+
this.middle = [];
|
|
341
|
+
this.right = [];
|
|
342
|
+
}
|
|
343
|
+
get app() {
|
|
344
|
+
return this.settings.app;
|
|
345
|
+
}
|
|
346
|
+
get collapsed() {
|
|
347
|
+
return this.settings.layout.collapsed;
|
|
348
|
+
}
|
|
349
|
+
get collapsedIcon() {
|
|
350
|
+
let type = this.collapsed ? 'unfold' : 'fold';
|
|
351
|
+
if (this.settings.layout.direction === 'rtl') {
|
|
352
|
+
type = this.collapsed ? 'fold' : 'unfold';
|
|
353
|
+
}
|
|
354
|
+
return `menu-${type}`;
|
|
355
|
+
}
|
|
356
|
+
refresh() {
|
|
357
|
+
const arr = this.items.toArray();
|
|
358
|
+
this.left = arr.filter(i => i.direction === 'left');
|
|
359
|
+
this.middle = arr.filter(i => i.direction === 'middle');
|
|
360
|
+
this.right = arr.filter(i => i.direction === 'right');
|
|
361
|
+
this.cdr.detectChanges();
|
|
362
|
+
}
|
|
363
|
+
ngAfterViewInit() {
|
|
364
|
+
this.items.changes.pipe(takeUntil(this.destroy$)).subscribe(() => this.refresh());
|
|
365
|
+
this.refresh();
|
|
366
|
+
}
|
|
367
|
+
toggleCollapsed() {
|
|
368
|
+
this.settings.setLayout('collapsed', !this.settings.layout.collapsed);
|
|
369
|
+
}
|
|
370
|
+
ngOnDestroy() {
|
|
371
|
+
this.destroy$.next();
|
|
372
|
+
this.destroy$.complete();
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
LayoutDefaultHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultHeaderComponent, deps: [{ token: i1.SettingsService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
376
|
+
LayoutDefaultHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: LayoutDefaultHeaderComponent, selector: "layout-default-header", inputs: { items: "items", options: "options" }, host: { properties: { "class.alain-default__header": "true" } }, ngImport: i0, template: `
|
|
377
|
+
<ng-template #render let-ls>
|
|
378
|
+
<li *ngFor="let i of ls" [class.hidden-mobile]="i.hidden === 'mobile'" [class.hidden-pc]="i.hidden === 'pc'">
|
|
379
|
+
<ng-container *ngTemplateOutlet="i.host"></ng-container>
|
|
380
|
+
</li>
|
|
381
|
+
</ng-template>
|
|
382
|
+
<div class="alain-default__header-logo" [style.width.px]="options.logoFixWidth">
|
|
383
|
+
<ng-container *ngIf="!options.logo; else options.logo!">
|
|
384
|
+
<a [routerLink]="options.logoLink" class="alain-default__header-logo-link">
|
|
385
|
+
<img class="alain-default__header-logo-expanded" [attr.src]="options.logoExpanded" [attr.alt]="app.name" />
|
|
386
|
+
<img class="alain-default__header-logo-collapsed" [attr.src]="options.logoCollapsed" [attr.alt]="app.name" />
|
|
387
|
+
</a>
|
|
388
|
+
</ng-container>
|
|
389
|
+
</div>
|
|
390
|
+
<div class="alain-default__nav-wrap">
|
|
391
|
+
<ul class="alain-default__nav">
|
|
392
|
+
<li *ngIf="!options.hideAside">
|
|
393
|
+
<div class="alain-default__nav-item alain-default__nav-item--collapse" (click)="toggleCollapsed()">
|
|
394
|
+
<i nz-icon [nzType]="collapsedIcon"></i>
|
|
395
|
+
</div>
|
|
396
|
+
</li>
|
|
397
|
+
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: left }"></ng-template>
|
|
398
|
+
</ul>
|
|
399
|
+
<div *ngIf="middle.length > 0" class="alain-default__nav alain-default__nav-middle">
|
|
400
|
+
<ng-container *ngTemplateOutlet="middle[0].host"></ng-container>
|
|
401
|
+
</div>
|
|
402
|
+
<ul class="alain-default__nav">
|
|
403
|
+
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: right }"></ng-template>
|
|
404
|
+
</ul>
|
|
405
|
+
</div>
|
|
406
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i7.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultHeaderComponent, decorators: [{
|
|
408
|
+
type: Component,
|
|
409
|
+
args: [{
|
|
410
|
+
selector: 'layout-default-header',
|
|
411
|
+
template: `
|
|
412
|
+
<ng-template #render let-ls>
|
|
413
|
+
<li *ngFor="let i of ls" [class.hidden-mobile]="i.hidden === 'mobile'" [class.hidden-pc]="i.hidden === 'pc'">
|
|
414
|
+
<ng-container *ngTemplateOutlet="i.host"></ng-container>
|
|
415
|
+
</li>
|
|
416
|
+
</ng-template>
|
|
417
|
+
<div class="alain-default__header-logo" [style.width.px]="options.logoFixWidth">
|
|
418
|
+
<ng-container *ngIf="!options.logo; else options.logo!">
|
|
419
|
+
<a [routerLink]="options.logoLink" class="alain-default__header-logo-link">
|
|
420
|
+
<img class="alain-default__header-logo-expanded" [attr.src]="options.logoExpanded" [attr.alt]="app.name" />
|
|
421
|
+
<img class="alain-default__header-logo-collapsed" [attr.src]="options.logoCollapsed" [attr.alt]="app.name" />
|
|
422
|
+
</a>
|
|
423
|
+
</ng-container>
|
|
424
|
+
</div>
|
|
425
|
+
<div class="alain-default__nav-wrap">
|
|
426
|
+
<ul class="alain-default__nav">
|
|
427
|
+
<li *ngIf="!options.hideAside">
|
|
428
|
+
<div class="alain-default__nav-item alain-default__nav-item--collapse" (click)="toggleCollapsed()">
|
|
429
|
+
<i nz-icon [nzType]="collapsedIcon"></i>
|
|
430
|
+
</div>
|
|
431
|
+
</li>
|
|
432
|
+
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: left }"></ng-template>
|
|
433
|
+
</ul>
|
|
434
|
+
<div *ngIf="middle.length > 0" class="alain-default__nav alain-default__nav-middle">
|
|
435
|
+
<ng-container *ngTemplateOutlet="middle[0].host"></ng-container>
|
|
436
|
+
</div>
|
|
437
|
+
<ul class="alain-default__nav">
|
|
438
|
+
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: right }"></ng-template>
|
|
439
|
+
</ul>
|
|
440
|
+
</div>
|
|
441
|
+
`,
|
|
442
|
+
host: {
|
|
443
|
+
'[class.alain-default__header]': `true`
|
|
444
|
+
},
|
|
445
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
446
|
+
}]
|
|
447
|
+
}], ctorParameters: function () { return [{ type: i1.SettingsService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
|
|
448
|
+
type: Input
|
|
449
|
+
}], options: [{
|
|
450
|
+
type: Input
|
|
451
|
+
}] } });
|
|
452
|
+
|
|
466
453
|
class LayoutDefaultComponent {
|
|
467
454
|
constructor(router, msgSrv, settings, el, renderer, doc) {
|
|
468
455
|
this.msgSrv = msgSrv;
|
|
@@ -526,8 +513,8 @@ class LayoutDefaultComponent {
|
|
|
526
513
|
this.destroy$.complete();
|
|
527
514
|
}
|
|
528
515
|
}
|
|
529
|
-
LayoutDefaultComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
530
|
-
LayoutDefaultComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
516
|
+
LayoutDefaultComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultComponent, deps: [{ token: i2.Router }, { token: i2$1.NzMessageService }, { token: i1.SettingsService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
517
|
+
LayoutDefaultComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: LayoutDefaultComponent, selector: "layout-default", inputs: { options: "options", asideUser: "asideUser", nav: "nav", content: "content", customError: "customError" }, queries: [{ propertyName: "headerItems", predicate: LayoutDefaultHeaderItemComponent }], exportAs: ["layoutDefault"], ngImport: i0, template: `
|
|
531
518
|
<div class="alain-default__progress-bar" *ngIf="isFetching"></div>
|
|
532
519
|
<layout-default-header [options]="options" [items]="headerItems"></layout-default-header>
|
|
533
520
|
<div *ngIf="!options.hideAside" class="alain-default__aside">
|
|
@@ -541,8 +528,8 @@ LayoutDefaultComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
541
528
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
542
529
|
<ng-content></ng-content>
|
|
543
530
|
</section>
|
|
544
|
-
`, isInline: true,
|
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
531
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LayoutDefaultNavComponent, selector: "layout-default-nav", inputs: ["disabledAcl", "autoCloseUnderPad", "recursivePath", "openStrictly", "maxLevelIcon"], outputs: ["select"] }, { kind: "component", type: LayoutDefaultHeaderComponent, selector: "layout-default-header", inputs: ["items", "options"] }] });
|
|
532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultComponent, decorators: [{
|
|
546
533
|
type: Component,
|
|
547
534
|
args: [{
|
|
548
535
|
selector: 'layout-default',
|
|
@@ -583,9 +570,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
583
570
|
|
|
584
571
|
class LayoutDefaultHeaderItemTriggerDirective {
|
|
585
572
|
}
|
|
586
|
-
LayoutDefaultHeaderItemTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
587
|
-
LayoutDefaultHeaderItemTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
588
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
573
|
+
LayoutDefaultHeaderItemTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultHeaderItemTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
574
|
+
LayoutDefaultHeaderItemTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: LayoutDefaultHeaderItemTriggerDirective, selector: "[layout-default-header-item-trigger]", host: { properties: { "class.alain-default__nav-item": "true" } }, ngImport: i0 });
|
|
575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultHeaderItemTriggerDirective, decorators: [{
|
|
589
576
|
type: Directive,
|
|
590
577
|
args: [{
|
|
591
578
|
selector: '[layout-default-header-item-trigger]',
|
|
@@ -604,8 +591,8 @@ const COMPONENTS = [
|
|
|
604
591
|
];
|
|
605
592
|
class LayoutDefaultModule {
|
|
606
593
|
}
|
|
607
|
-
LayoutDefaultModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
608
|
-
LayoutDefaultModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
594
|
+
LayoutDefaultModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
595
|
+
LayoutDefaultModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultModule, declarations: [LayoutDefaultComponent,
|
|
609
596
|
LayoutDefaultNavComponent,
|
|
610
597
|
LayoutDefaultHeaderComponent,
|
|
611
598
|
LayoutDefaultHeaderItemComponent,
|
|
@@ -621,17 +608,15 @@ LayoutDefaultModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
621
608
|
LayoutDefaultHeaderComponent,
|
|
622
609
|
LayoutDefaultHeaderItemComponent,
|
|
623
610
|
LayoutDefaultHeaderItemTriggerDirective] });
|
|
624
|
-
LayoutDefaultModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
]] });
|
|
634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayoutDefaultModule, decorators: [{
|
|
611
|
+
LayoutDefaultModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultModule, imports: [CommonModule,
|
|
612
|
+
RouterModule,
|
|
613
|
+
NzToolTipModule,
|
|
614
|
+
NzIconModule,
|
|
615
|
+
NzAvatarModule,
|
|
616
|
+
NzDropDownModule,
|
|
617
|
+
NzMessageModule,
|
|
618
|
+
NzBadgeModule] });
|
|
619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: LayoutDefaultModule, decorators: [{
|
|
635
620
|
type: NgModule,
|
|
636
621
|
args: [{
|
|
637
622
|
imports: [
|