@yelon/bis 18.1.2 → 18.1.4
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/esm2022/public_api.mjs +3 -1
- package/esm2022/src/startup.service.mjs +6 -3
- package/esm2022/src/website/layout-website-01.component.mjs +173 -0
- package/esm2022/src/website/layout-website-02.component.mjs +204 -0
- package/fesm2022/bis.mjs +366 -7
- package/fesm2022/bis.mjs.map +1 -1
- package/index.less +2 -0
- package/layout/style/layout-website-01.less +85 -0
- package/layout/style/layout-website-02.less +83 -0
- package/package.json +11 -11
- package/public_api.d.ts +2 -0
- package/src/website/layout-website-01.component.d.ts +26 -0
- package/src/website/layout-website-02.component.d.ts +29 -0
- package/theme-default.less +36 -0
package/fesm2022/bis.mjs
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { NgModule, importProvidersFrom, makeEnvironmentProviders, inject, APP_INITIALIZER, Injector, Injectable, Inject } from '@angular/core';
|
|
2
|
+
import { NgModule, importProvidersFrom, makeEnvironmentProviders, inject, APP_INITIALIZER, Injector, Injectable, Inject, Component, Input } from '@angular/core';
|
|
3
3
|
import { YunzaiLayoutModule } from '@yelon/bis/layout';
|
|
4
4
|
import { YunzaiWidgetsModule } from '@yelon/bis/yunzai-widgets';
|
|
5
5
|
import * as i2 from '@angular/router';
|
|
6
|
-
import { Router } from '@angular/router';
|
|
6
|
+
import { Router, RouterOutlet } from '@angular/router';
|
|
7
7
|
import { YA_SERVICE_TOKEN } from '@yelon/auth';
|
|
8
|
-
import { YUNZAI_I18N_TOKEN, IGNORE_BASE_URL, MenuService, TitleService, SettingsService } from '@yelon/theme';
|
|
8
|
+
import { YUNZAI_I18N_TOKEN, IGNORE_BASE_URL, MenuService, TitleService, SettingsService, I18nPipe } from '@yelon/theme';
|
|
9
9
|
import { NzNotificationService } from 'ng-zorro-antd/notification';
|
|
10
10
|
import { HttpClient, HttpErrorResponse, HttpResponseBase } from '@angular/common/http';
|
|
11
|
-
import { BehaviorSubject, throwError, filter, take, switchMap, catchError, of, mergeMap, EMPTY, combineLatest
|
|
11
|
+
import { BehaviorSubject, throwError, filter, take, switchMap, catchError, of, mergeMap, map, EMPTY, combineLatest } from 'rxjs';
|
|
12
12
|
import { mergeBisConfig, BUSINESS_DEFAULT_CONFIG } from '@yelon/bis/config';
|
|
13
13
|
import * as i1 from '@yelon/util';
|
|
14
14
|
import { log, YUNZAI_CONFIG, YunzaiConfigService, WINDOW, useLocalStorageTenant, useLocalStorageUser, useLocalStorageHeader, useLocalStorageProjectInfo, useLocalStorageDefaultRoute, useLocalStorageCurrent, deepCopy } from '@yelon/util';
|
|
15
15
|
import { ACLService } from '@yelon/acl';
|
|
16
|
+
import { NgTemplateOutlet, NgFor, NgIf } from '@angular/common';
|
|
17
|
+
import * as i2$1 from 'ng-zorro-antd/dropdown';
|
|
18
|
+
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
19
|
+
import { NzI18nModule } from 'ng-zorro-antd/i18n';
|
|
20
|
+
import * as i3 from 'ng-zorro-antd/icon';
|
|
21
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
22
|
+
import * as i1$1 from 'ng-zorro-antd/menu';
|
|
23
|
+
import * as i4 from 'ng-zorro-antd/avatar';
|
|
24
|
+
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
|
16
25
|
|
|
17
26
|
class BisModule {
|
|
18
27
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: BisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -226,7 +235,7 @@ class YunzaiStartupService {
|
|
|
226
235
|
this.configService = inject(YunzaiConfigService);
|
|
227
236
|
}
|
|
228
237
|
load(param) {
|
|
229
|
-
let defaultLang = this.settingService.layout.lang || this.i18n.defaultLang;
|
|
238
|
+
let defaultLang = this.settingService.layout.lang || this.i18n.defaultLang || 'zh-CN';
|
|
230
239
|
const [setTenant] = useLocalStorageTenant();
|
|
231
240
|
const [setUser, getUser] = useLocalStorageUser();
|
|
232
241
|
const [setHeader] = useLocalStorageHeader();
|
|
@@ -235,7 +244,10 @@ class YunzaiStartupService {
|
|
|
235
244
|
const [setCurrent] = useLocalStorageCurrent();
|
|
236
245
|
return this.token(param).pipe(mergeMap((token) => {
|
|
237
246
|
if (token === false) {
|
|
238
|
-
return this.i18n.loadLocaleData(defaultLang).pipe(
|
|
247
|
+
return this.i18n.loadLocaleData(defaultLang).pipe(map((langData) => {
|
|
248
|
+
this.i18n.use(defaultLang, langData);
|
|
249
|
+
this.settingService.setLayout('lang', defaultLang);
|
|
250
|
+
}), mergeMap(() => EMPTY));
|
|
239
251
|
}
|
|
240
252
|
this.configService.set('auth', {
|
|
241
253
|
token_send_key: 'Authorization',
|
|
@@ -569,9 +581,356 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
|
|
|
569
581
|
const actGuardCanActive = (_, state) => inject(ActGuardService).process(state.url);
|
|
570
582
|
const actGuardCanActiveChild = (_, state) => inject(ActGuardService).process(state.url);
|
|
571
583
|
|
|
584
|
+
class YunzaiLayoutWebsite01Component {
|
|
585
|
+
constructor() {
|
|
586
|
+
this.logoAlt = 'logo';
|
|
587
|
+
this.slogan = '';
|
|
588
|
+
this.tokenService = inject(YA_SERVICE_TOKEN);
|
|
589
|
+
this.configService = inject(YunzaiConfigService);
|
|
590
|
+
this.startupSrv = inject(YunzaiStartupService);
|
|
591
|
+
this.win = inject(WINDOW);
|
|
592
|
+
}
|
|
593
|
+
get _logoSrc() {
|
|
594
|
+
return this.logoSrc;
|
|
595
|
+
}
|
|
596
|
+
get _logoAlt() {
|
|
597
|
+
return this.logoAlt || 'logo';
|
|
598
|
+
}
|
|
599
|
+
get _slogan() {
|
|
600
|
+
return this.slogan || '';
|
|
601
|
+
}
|
|
602
|
+
get _contentTpl() {
|
|
603
|
+
return this.contentTpl;
|
|
604
|
+
}
|
|
605
|
+
get _username() {
|
|
606
|
+
const [_, getUser] = useLocalStorageUser();
|
|
607
|
+
return getUser()?.realname || '';
|
|
608
|
+
}
|
|
609
|
+
get isLogin() {
|
|
610
|
+
const [_, getUser] = useLocalStorageUser();
|
|
611
|
+
return !!this.tokenService.get()?.access_token && !!getUser();
|
|
612
|
+
}
|
|
613
|
+
get _links() {
|
|
614
|
+
const [_, getProjectInfo] = useLocalStorageProjectInfo();
|
|
615
|
+
return getProjectInfo()?.profileList || [];
|
|
616
|
+
}
|
|
617
|
+
login() {
|
|
618
|
+
this.startupSrv.load({ force: true }).subscribe(() => { });
|
|
619
|
+
}
|
|
620
|
+
logout() {
|
|
621
|
+
const baseUrl = this.configService.get('bis')?.baseUrl || '/backstage';
|
|
622
|
+
this.win.location.href = `${baseUrl}/cas-proxy/app/logout`;
|
|
623
|
+
}
|
|
624
|
+
to(url) {
|
|
625
|
+
if (url)
|
|
626
|
+
this.win.location.href = url;
|
|
627
|
+
}
|
|
628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: YunzaiLayoutWebsite01Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
629
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: YunzaiLayoutWebsite01Component, isStandalone: true, selector: "yunzai-layout-website-01", inputs: { logoSrc: "logoSrc", logoAlt: "logoAlt", slogan: "slogan", contentTpl: "contentTpl" }, ngImport: i0, template: `
|
|
630
|
+
<div class="yz-layout-website-01">
|
|
631
|
+
<div class="yz-layout-website-01-nav__user">
|
|
632
|
+
@if (isLogin) {
|
|
633
|
+
<a
|
|
634
|
+
class="yz-layout-website-01-link"
|
|
635
|
+
nz-dropdown
|
|
636
|
+
[nzDropdownMenu]="menu"
|
|
637
|
+
[nzOverlayStyle]="{ width: '120px' }"
|
|
638
|
+
>
|
|
639
|
+
<span nz-icon nzType="user" nzTheme="outline"></span>{{ _username }}<span nz-icon nzType="down"></span>
|
|
640
|
+
</a>
|
|
641
|
+
<nz-dropdown-menu #menu="nzDropdownMenu">
|
|
642
|
+
<ul nz-menu nzSelectable>
|
|
643
|
+
@for (link of _links; track $index) {
|
|
644
|
+
<li nz-menu-item class="yz-layout-website-01-link__li" (click)="to(link.url)">{{ link.name }}</li>
|
|
645
|
+
}
|
|
646
|
+
<li nz-menu-item nzDanger class="yz-layout-website-01-link__li" (click)="logout()"
|
|
647
|
+
>{{ 'menu.account.logout' | i18n }}
|
|
648
|
+
</li>
|
|
649
|
+
</ul>
|
|
650
|
+
</nz-dropdown-menu>
|
|
651
|
+
} @else {
|
|
652
|
+
<a class="yz-layout-website-01-link" (click)="login()">
|
|
653
|
+
<span nz-icon nzType="login" nzTheme="outline"></span>{{ 'app.login.login' | i18n }}</a
|
|
654
|
+
>
|
|
655
|
+
}
|
|
656
|
+
</div>
|
|
657
|
+
|
|
658
|
+
<header class="yz-layout-website-01-nav">
|
|
659
|
+
@if (_logoSrc) {
|
|
660
|
+
<img [alt]="_logoAlt" class="yz-layout-website-01-nav__logo" [src]="_logoSrc" />
|
|
661
|
+
} @else {
|
|
662
|
+
<div class="yz-layout-website-01-nav__logo__full">LOGO</div>
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
<div class="yz-layout-website-01-nav__content">
|
|
666
|
+
<ng-template *ngTemplateOutlet="_contentTpl" />
|
|
667
|
+
</div>
|
|
668
|
+
<div class="yz-layout-website-01-nav__slogan">
|
|
669
|
+
{{ _slogan }}
|
|
670
|
+
</div>
|
|
671
|
+
</header>
|
|
672
|
+
<main class="yz-layout-website-01-container">
|
|
673
|
+
<router-outlet />
|
|
674
|
+
</main>
|
|
675
|
+
</div>
|
|
676
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "ngmodule", type: NzI18nModule }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i1$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i1$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i2$1.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i2$1.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i2$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
677
|
+
}
|
|
678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: YunzaiLayoutWebsite01Component, decorators: [{
|
|
679
|
+
type: Component,
|
|
680
|
+
args: [{
|
|
681
|
+
selector: 'yunzai-layout-website-01',
|
|
682
|
+
template: `
|
|
683
|
+
<div class="yz-layout-website-01">
|
|
684
|
+
<div class="yz-layout-website-01-nav__user">
|
|
685
|
+
@if (isLogin) {
|
|
686
|
+
<a
|
|
687
|
+
class="yz-layout-website-01-link"
|
|
688
|
+
nz-dropdown
|
|
689
|
+
[nzDropdownMenu]="menu"
|
|
690
|
+
[nzOverlayStyle]="{ width: '120px' }"
|
|
691
|
+
>
|
|
692
|
+
<span nz-icon nzType="user" nzTheme="outline"></span>{{ _username }}<span nz-icon nzType="down"></span>
|
|
693
|
+
</a>
|
|
694
|
+
<nz-dropdown-menu #menu="nzDropdownMenu">
|
|
695
|
+
<ul nz-menu nzSelectable>
|
|
696
|
+
@for (link of _links; track $index) {
|
|
697
|
+
<li nz-menu-item class="yz-layout-website-01-link__li" (click)="to(link.url)">{{ link.name }}</li>
|
|
698
|
+
}
|
|
699
|
+
<li nz-menu-item nzDanger class="yz-layout-website-01-link__li" (click)="logout()"
|
|
700
|
+
>{{ 'menu.account.logout' | i18n }}
|
|
701
|
+
</li>
|
|
702
|
+
</ul>
|
|
703
|
+
</nz-dropdown-menu>
|
|
704
|
+
} @else {
|
|
705
|
+
<a class="yz-layout-website-01-link" (click)="login()">
|
|
706
|
+
<span nz-icon nzType="login" nzTheme="outline"></span>{{ 'app.login.login' | i18n }}</a
|
|
707
|
+
>
|
|
708
|
+
}
|
|
709
|
+
</div>
|
|
710
|
+
|
|
711
|
+
<header class="yz-layout-website-01-nav">
|
|
712
|
+
@if (_logoSrc) {
|
|
713
|
+
<img [alt]="_logoAlt" class="yz-layout-website-01-nav__logo" [src]="_logoSrc" />
|
|
714
|
+
} @else {
|
|
715
|
+
<div class="yz-layout-website-01-nav__logo__full">LOGO</div>
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
<div class="yz-layout-website-01-nav__content">
|
|
719
|
+
<ng-template *ngTemplateOutlet="_contentTpl" />
|
|
720
|
+
</div>
|
|
721
|
+
<div class="yz-layout-website-01-nav__slogan">
|
|
722
|
+
{{ _slogan }}
|
|
723
|
+
</div>
|
|
724
|
+
</header>
|
|
725
|
+
<main class="yz-layout-website-01-container">
|
|
726
|
+
<router-outlet />
|
|
727
|
+
</main>
|
|
728
|
+
</div>
|
|
729
|
+
`,
|
|
730
|
+
standalone: true,
|
|
731
|
+
imports: [RouterOutlet, I18nPipe, NzI18nModule, NgFor, NgIf, NzDropDownModule, NzIconModule, NgTemplateOutlet]
|
|
732
|
+
}]
|
|
733
|
+
}], propDecorators: { logoSrc: [{
|
|
734
|
+
type: Input
|
|
735
|
+
}], logoAlt: [{
|
|
736
|
+
type: Input
|
|
737
|
+
}], slogan: [{
|
|
738
|
+
type: Input
|
|
739
|
+
}], contentTpl: [{
|
|
740
|
+
type: Input
|
|
741
|
+
}] } });
|
|
742
|
+
|
|
743
|
+
class YunzaiLayoutWebsite02Component {
|
|
744
|
+
constructor() {
|
|
745
|
+
this.logoAlt = 'logo';
|
|
746
|
+
this.userMenuShow = false;
|
|
747
|
+
this.tokenService = inject(YA_SERVICE_TOKEN);
|
|
748
|
+
this.configService = inject(YunzaiConfigService);
|
|
749
|
+
this.startupSrv = inject(YunzaiStartupService);
|
|
750
|
+
this.win = inject(WINDOW);
|
|
751
|
+
}
|
|
752
|
+
get _logoSrc() {
|
|
753
|
+
return this.logoSrc;
|
|
754
|
+
}
|
|
755
|
+
get _logoAlt() {
|
|
756
|
+
return this.logoAlt || 'logo';
|
|
757
|
+
}
|
|
758
|
+
get _userMenuShow() {
|
|
759
|
+
return this.userMenuShow || false;
|
|
760
|
+
}
|
|
761
|
+
get _slogan() {
|
|
762
|
+
return this.slogan;
|
|
763
|
+
}
|
|
764
|
+
get _contentTpl() {
|
|
765
|
+
return this.contentTpl;
|
|
766
|
+
}
|
|
767
|
+
get _username() {
|
|
768
|
+
const [_, getUser] = useLocalStorageUser();
|
|
769
|
+
return getUser()?.realname || '';
|
|
770
|
+
}
|
|
771
|
+
get _avatar() {
|
|
772
|
+
const [_, getUser] = useLocalStorageUser();
|
|
773
|
+
const baseUrl = this.configService.get('bis')?.baseUrl || '/backstage';
|
|
774
|
+
const avatarUrl = getUser()?.avatarId ? `${baseUrl}/filecenter/file/${getUser()?.avatarId}` : undefined;
|
|
775
|
+
return avatarUrl;
|
|
776
|
+
}
|
|
777
|
+
get isLogin() {
|
|
778
|
+
const [_, getUser] = useLocalStorageUser();
|
|
779
|
+
return !!this.tokenService.get()?.access_token && !!getUser();
|
|
780
|
+
}
|
|
781
|
+
get _links() {
|
|
782
|
+
const [_, getProjectInfo] = useLocalStorageProjectInfo();
|
|
783
|
+
return getProjectInfo()?.profileList || [];
|
|
784
|
+
}
|
|
785
|
+
login() {
|
|
786
|
+
this.startupSrv.load({ force: true }).subscribe(() => { });
|
|
787
|
+
}
|
|
788
|
+
logout() {
|
|
789
|
+
const baseUrl = this.configService.get('bis')?.baseUrl || '/backstage';
|
|
790
|
+
this.win.location.href = `${baseUrl}/cas-proxy/app/logout`;
|
|
791
|
+
}
|
|
792
|
+
to(url) {
|
|
793
|
+
if (url)
|
|
794
|
+
this.win.location.href = url;
|
|
795
|
+
}
|
|
796
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: YunzaiLayoutWebsite02Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
797
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: YunzaiLayoutWebsite02Component, isStandalone: true, selector: "yunzai-layout-website-02", inputs: { logoSrc: "logoSrc", logoAlt: "logoAlt", userMenuShow: "userMenuShow", slogan: "slogan", contentTpl: "contentTpl" }, ngImport: i0, template: `
|
|
798
|
+
<div class="yz-layout-website-02">
|
|
799
|
+
<header class="yz-layout-website-02-nav">
|
|
800
|
+
<div class="yz-layout-website-02-inner-content">
|
|
801
|
+
@if (_logoSrc) {
|
|
802
|
+
<img [alt]="_logoAlt" class="yz-layout-website-02-nav__logo" [src]="_logoSrc" />
|
|
803
|
+
} @else {
|
|
804
|
+
<div class="yz-layout-website-02-nav__logo__full">LOGO</div>
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
<div class="yz-layout-website-02-nav__content">
|
|
808
|
+
<ng-template *ngTemplateOutlet="_contentTpl" />
|
|
809
|
+
</div>
|
|
810
|
+
|
|
811
|
+
<div class="yz-layout-website-02-nav-right">
|
|
812
|
+
<div class="yz-layout-website-02-nav__slogan">
|
|
813
|
+
<ng-template *ngTemplateOutlet="_slogan" />
|
|
814
|
+
</div>
|
|
815
|
+
@if (isLogin) {
|
|
816
|
+
<a
|
|
817
|
+
class="yz-layout-website-02-link"
|
|
818
|
+
nz-dropdown
|
|
819
|
+
[nzDropdownMenu]="menu"
|
|
820
|
+
[nzDisabled]="!_userMenuShow"
|
|
821
|
+
[nzPlacement]="'bottomRight'"
|
|
822
|
+
>
|
|
823
|
+
<nz-avatar nzIcon="user" [nzSrc]="_avatar" /><b>欢迎访问:{{ _username }}</b>
|
|
824
|
+
<span nz-icon nzType="down" *ngIf="_userMenuShow"></span>
|
|
825
|
+
</a>
|
|
826
|
+
<nz-dropdown-menu #menu="nzDropdownMenu">
|
|
827
|
+
<ul nz-menu nzSelectable>
|
|
828
|
+
@for (link of _links; track $index) {
|
|
829
|
+
<li nz-menu-item class="yz-layout-website-02-link__li" (click)="to(link.url)">{{ link.name }}</li>
|
|
830
|
+
}
|
|
831
|
+
<li nz-menu-item nzDanger class="yz-layout-website-02-link__li" (click)="logout()">{{
|
|
832
|
+
'menu.account.logout' | i18n
|
|
833
|
+
}}</li>
|
|
834
|
+
</ul>
|
|
835
|
+
</nz-dropdown-menu>
|
|
836
|
+
} @else {
|
|
837
|
+
<a class="yz-layout-website-02-link" (click)="login()">
|
|
838
|
+
<span nz-icon nzType="login" nzTheme="outline"></span>{{ 'app.login.login' | i18n }}</a
|
|
839
|
+
>
|
|
840
|
+
}
|
|
841
|
+
</div>
|
|
842
|
+
</div>
|
|
843
|
+
</header>
|
|
844
|
+
<main class="yz-layout-website-02-container">
|
|
845
|
+
<router-outlet />
|
|
846
|
+
</main>
|
|
847
|
+
</div>
|
|
848
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "ngmodule", type: NzI18nModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i1$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i1$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i2$1.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i2$1.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i2$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NzAvatarModule }, { kind: "component", type: i4.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }] }); }
|
|
849
|
+
}
|
|
850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: YunzaiLayoutWebsite02Component, decorators: [{
|
|
851
|
+
type: Component,
|
|
852
|
+
args: [{
|
|
853
|
+
selector: 'yunzai-layout-website-02',
|
|
854
|
+
template: `
|
|
855
|
+
<div class="yz-layout-website-02">
|
|
856
|
+
<header class="yz-layout-website-02-nav">
|
|
857
|
+
<div class="yz-layout-website-02-inner-content">
|
|
858
|
+
@if (_logoSrc) {
|
|
859
|
+
<img [alt]="_logoAlt" class="yz-layout-website-02-nav__logo" [src]="_logoSrc" />
|
|
860
|
+
} @else {
|
|
861
|
+
<div class="yz-layout-website-02-nav__logo__full">LOGO</div>
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
<div class="yz-layout-website-02-nav__content">
|
|
865
|
+
<ng-template *ngTemplateOutlet="_contentTpl" />
|
|
866
|
+
</div>
|
|
867
|
+
|
|
868
|
+
<div class="yz-layout-website-02-nav-right">
|
|
869
|
+
<div class="yz-layout-website-02-nav__slogan">
|
|
870
|
+
<ng-template *ngTemplateOutlet="_slogan" />
|
|
871
|
+
</div>
|
|
872
|
+
@if (isLogin) {
|
|
873
|
+
<a
|
|
874
|
+
class="yz-layout-website-02-link"
|
|
875
|
+
nz-dropdown
|
|
876
|
+
[nzDropdownMenu]="menu"
|
|
877
|
+
[nzDisabled]="!_userMenuShow"
|
|
878
|
+
[nzPlacement]="'bottomRight'"
|
|
879
|
+
>
|
|
880
|
+
<nz-avatar nzIcon="user" [nzSrc]="_avatar" /><b>欢迎访问:{{ _username }}</b>
|
|
881
|
+
<span nz-icon nzType="down" *ngIf="_userMenuShow"></span>
|
|
882
|
+
</a>
|
|
883
|
+
<nz-dropdown-menu #menu="nzDropdownMenu">
|
|
884
|
+
<ul nz-menu nzSelectable>
|
|
885
|
+
@for (link of _links; track $index) {
|
|
886
|
+
<li nz-menu-item class="yz-layout-website-02-link__li" (click)="to(link.url)">{{ link.name }}</li>
|
|
887
|
+
}
|
|
888
|
+
<li nz-menu-item nzDanger class="yz-layout-website-02-link__li" (click)="logout()">{{
|
|
889
|
+
'menu.account.logout' | i18n
|
|
890
|
+
}}</li>
|
|
891
|
+
</ul>
|
|
892
|
+
</nz-dropdown-menu>
|
|
893
|
+
} @else {
|
|
894
|
+
<a class="yz-layout-website-02-link" (click)="login()">
|
|
895
|
+
<span nz-icon nzType="login" nzTheme="outline"></span>{{ 'app.login.login' | i18n }}</a
|
|
896
|
+
>
|
|
897
|
+
}
|
|
898
|
+
</div>
|
|
899
|
+
</div>
|
|
900
|
+
</header>
|
|
901
|
+
<main class="yz-layout-website-02-container">
|
|
902
|
+
<router-outlet />
|
|
903
|
+
</main>
|
|
904
|
+
</div>
|
|
905
|
+
`,
|
|
906
|
+
standalone: true,
|
|
907
|
+
imports: [
|
|
908
|
+
RouterOutlet,
|
|
909
|
+
I18nPipe,
|
|
910
|
+
NzI18nModule,
|
|
911
|
+
NgFor,
|
|
912
|
+
NgIf,
|
|
913
|
+
NzDropDownModule,
|
|
914
|
+
NzIconModule,
|
|
915
|
+
NgTemplateOutlet,
|
|
916
|
+
NzAvatarModule
|
|
917
|
+
]
|
|
918
|
+
}]
|
|
919
|
+
}], propDecorators: { logoSrc: [{
|
|
920
|
+
type: Input
|
|
921
|
+
}], logoAlt: [{
|
|
922
|
+
type: Input
|
|
923
|
+
}], userMenuShow: [{
|
|
924
|
+
type: Input
|
|
925
|
+
}], slogan: [{
|
|
926
|
+
type: Input
|
|
927
|
+
}], contentTpl: [{
|
|
928
|
+
type: Input
|
|
929
|
+
}] } });
|
|
930
|
+
|
|
572
931
|
/**
|
|
573
932
|
* Generated bundle index. Do not edit.
|
|
574
933
|
*/
|
|
575
934
|
|
|
576
|
-
export { ActGuardService, BisModule, CODEMESSAGE, YunzaiAnalysisAddonGuardService, YunzaiStartupService, actGuardCanActive, actGuardCanActiveChild, analysisAddonCanActive, analysisAddonCanActiveChild, checkStatus, generateAbility, getAdditionalHeaders, goTo, mapYzSideToYelonMenu, provideYunzaiBindAuthRefresh, provideYunzaiBis, provideYunzaiStartup, toLogin, tryRefreshToken, yunzaiDefaultInterceptor };
|
|
935
|
+
export { ActGuardService, BisModule, CODEMESSAGE, YunzaiAnalysisAddonGuardService, YunzaiLayoutWebsite01Component, YunzaiLayoutWebsite02Component, YunzaiStartupService, actGuardCanActive, actGuardCanActiveChild, analysisAddonCanActive, analysisAddonCanActiveChild, checkStatus, generateAbility, getAdditionalHeaders, goTo, mapYzSideToYelonMenu, provideYunzaiBindAuthRefresh, provideYunzaiBis, provideYunzaiStartup, toLogin, tryRefreshToken, yunzaiDefaultInterceptor };
|
|
577
936
|
//# sourceMappingURL=bis.mjs.map
|