@yelon/bis 18.3.0 → 19.0.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.
Files changed (45) hide show
  1. package/fesm2022/bis.mjs +96 -82
  2. package/fesm2022/bis.mjs.map +1 -1
  3. package/fesm2022/layout.mjs +99 -110
  4. package/fesm2022/layout.mjs.map +1 -1
  5. package/fesm2022/yunzai-widgets.mjs +104 -114
  6. package/fesm2022/yunzai-widgets.mjs.map +1 -1
  7. package/layout/layout-basic.component.d.ts +1 -2
  8. package/layout/style/layout-website-01.less +1 -0
  9. package/package.json +12 -20
  10. package/src/helper.d.ts +3 -8
  11. package/src/refresh-token.d.ts +1 -2
  12. package/src/startup.service.d.ts +2 -2
  13. package/src/website/layout-website-01.component.d.ts +4 -5
  14. package/src/website/layout-website-02.component.d.ts +6 -7
  15. package/src/yunzai-analysis-addon.guard.d.ts +1 -2
  16. package/esm2022/bis.mjs +0 -5
  17. package/esm2022/config/bis.config.mjs +0 -15
  18. package/esm2022/config/config.mjs +0 -5
  19. package/esm2022/config/public_api.mjs +0 -2
  20. package/esm2022/layout/layout-basic.component.mjs +0 -518
  21. package/esm2022/layout/layout-nav-application.component.mjs +0 -372
  22. package/esm2022/layout/layout-nav-group.component.mjs +0 -166
  23. package/esm2022/layout/layout-nav-tile.component.mjs +0 -15
  24. package/esm2022/layout/layout.mjs +0 -5
  25. package/esm2022/layout/layout.module.mjs +0 -54
  26. package/esm2022/layout/public_api.mjs +0 -6
  27. package/esm2022/public_api.mjs +0 -11
  28. package/esm2022/src/bis.module.mjs +0 -17
  29. package/esm2022/src/helper.mjs +0 -45
  30. package/esm2022/src/provide.mjs +0 -8
  31. package/esm2022/src/refresh-token.mjs +0 -79
  32. package/esm2022/src/startup.service.mjs +0 -205
  33. package/esm2022/src/website/layout-website-01.component.mjs +0 -173
  34. package/esm2022/src/website/layout-website-02.component.mjs +0 -204
  35. package/esm2022/src/yunzai-act.guard.mjs +0 -88
  36. package/esm2022/src/yunzai-analysis-addon.guard.mjs +0 -99
  37. package/esm2022/src/yunzai-default.interceptor.mjs +0 -63
  38. package/esm2022/yunzai-widgets/public_api.mjs +0 -7
  39. package/esm2022/yunzai-widgets/yunzai-clear-storage.component.mjs +0 -47
  40. package/esm2022/yunzai-widgets/yunzai-fullscreen.component.mjs +0 -47
  41. package/esm2022/yunzai-widgets/yunzai-i18n.component.mjs +0 -139
  42. package/esm2022/yunzai-widgets/yunzai-notify.component.mjs +0 -180
  43. package/esm2022/yunzai-widgets/yunzai-user.component.mjs +0 -120
  44. package/esm2022/yunzai-widgets/yunzai-widget.module.mjs +0 -62
  45. package/esm2022/yunzai-widgets/yunzai-widgets.mjs +0 -5
package/fesm2022/bis.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule, importProvidersFrom, makeEnvironmentProviders, inject, APP_INITIALIZER, Injector, Injectable, Inject, Component, Input } from '@angular/core';
2
+ import { NgModule, importProvidersFrom, makeEnvironmentProviders, inject, Injector, APP_INITIALIZER, provideAppInitializer, Injectable, Inject, Input, Component } 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';
@@ -24,11 +24,11 @@ import * as i4 from 'ng-zorro-antd/avatar';
24
24
  import { NzAvatarModule } from 'ng-zorro-antd/avatar';
25
25
 
26
26
  class BisModule {
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: BisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
28
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.11", ngImport: i0, type: BisModule, imports: [YunzaiLayoutModule, YunzaiWidgetsModule], exports: [YunzaiLayoutModule, YunzaiWidgetsModule] }); }
29
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: BisModule, imports: [YunzaiLayoutModule, YunzaiWidgetsModule, YunzaiLayoutModule, YunzaiWidgetsModule] }); }
27
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: BisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
28
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: BisModule, imports: [YunzaiLayoutModule, YunzaiWidgetsModule], exports: [YunzaiLayoutModule, YunzaiWidgetsModule] });
29
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: BisModule, imports: [YunzaiLayoutModule, YunzaiWidgetsModule, YunzaiLayoutModule, YunzaiWidgetsModule] });
30
30
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: BisModule, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: BisModule, decorators: [{
32
32
  type: NgModule,
33
33
  args: [{
34
34
  imports: [YunzaiLayoutModule, YunzaiWidgetsModule],
@@ -122,7 +122,9 @@ function reAttachToken(injector, req) {
122
122
  function refreshTokenRequest(injector) {
123
123
  const model = injector.get(YA_SERVICE_TOKEN).get();
124
124
  const form = new FormData();
125
- form.set('refresh_token', model?.refresh_token);
125
+ if (model?.refresh_token) {
126
+ form.set('refresh_token', model.refresh_token);
127
+ }
126
128
  form.set('grant_type', 'refresh_token');
127
129
  form.set('scope', 'webapp');
128
130
  return injector.get(HttpClient).post(`/auth/oauth/getOrCreateToken/webapp`, form);
@@ -210,30 +212,35 @@ const yunzaiDefaultInterceptor = (req, next) => {
210
212
  }), catchError((err) => handleData(injector, err, newReq, next)));
211
213
  };
212
214
 
215
+ // export function provideYunzaiStartup(): Provider[] {
216
+ // return [
217
+ // YunzaiStartupService,
218
+ // {
219
+ // provide: APP_INITIALIZER,
220
+ // useFactory: (startupService: YunzaiStartupService) => () => startupService.load(),
221
+ // deps: [YunzaiStartupService],
222
+ // multi: true
223
+ // }
224
+ // ];
225
+ // }
213
226
  function provideYunzaiStartup() {
214
- return [
215
- YunzaiStartupService,
216
- {
217
- provide: APP_INITIALIZER,
218
- useFactory: (startupService) => () => startupService.load(),
219
- deps: [YunzaiStartupService],
220
- multi: true
221
- }
222
- ];
227
+ const appInitializer = () => {
228
+ const startupService = inject(YunzaiStartupService);
229
+ return startupService.load();
230
+ };
231
+ return [YunzaiStartupService, provideAppInitializer(appInitializer)];
223
232
  }
224
233
  class YunzaiStartupService {
225
- constructor() {
226
- this.config = mergeBisConfig(inject(YunzaiConfigService));
227
- this.menuService = inject(MenuService);
228
- this.aclService = inject(ACLService);
229
- this.titleService = inject(TitleService);
230
- this.tokenService = inject(YA_SERVICE_TOKEN);
231
- this.httpClient = inject(HttpClient);
232
- this.settingService = inject(SettingsService);
233
- this.i18n = inject(YUNZAI_I18N_TOKEN);
234
- this.win = inject(WINDOW);
235
- this.configService = inject(YunzaiConfigService);
236
- }
234
+ config = mergeBisConfig(inject(YunzaiConfigService));
235
+ menuService = inject(MenuService);
236
+ aclService = inject(ACLService);
237
+ titleService = inject(TitleService);
238
+ tokenService = inject(YA_SERVICE_TOKEN);
239
+ httpClient = inject(HttpClient);
240
+ settingService = inject(SettingsService);
241
+ i18n = inject(YUNZAI_I18N_TOKEN);
242
+ win = inject(WINDOW);
243
+ configService = inject(YunzaiConfigService);
237
244
  load(param) {
238
245
  let defaultLang = this.settingService.layout.lang || this.i18n.defaultLang || 'zh-CN';
239
246
  const [setTenant] = useLocalStorageTenant();
@@ -281,7 +288,9 @@ class YunzaiStartupService {
281
288
  this.settingService.setApp({ name: currentMenu.text, description: currentMenu.intro });
282
289
  this.settingService.setUser({
283
290
  name: yunzaiUser.realname,
284
- avatar: `${this.config.baseUrl}/filecenter/file/${yunzaiUser.avatarId}` || '',
291
+ avatar: this.config.baseUrl && yunzaiUser.avatarId
292
+ ? `${this.config.baseUrl}/filecenter/file/${yunzaiUser.avatarId}`
293
+ : '',
285
294
  email: yunzaiUser.email
286
295
  });
287
296
  this.titleService.default = currentMenu && currentMenu.text ? currentMenu.text : 'default application name';
@@ -366,10 +375,10 @@ class YunzaiStartupService {
366
375
  }));
367
376
  }
368
377
  }
369
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiStartupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
370
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiStartupService }); }
378
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiStartupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
379
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiStartupService });
371
380
  }
372
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiStartupService, decorators: [{
381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiStartupService, decorators: [{
373
382
  type: Injectable
374
383
  }] });
375
384
  function mapYzSideToYelonMenu(menus) {
@@ -407,15 +416,19 @@ function generateAbility(menus, abilities, prefix) {
407
416
  }
408
417
 
409
418
  class YunzaiAnalysisAddonGuardService {
419
+ configService;
420
+ pathToRegexp;
421
+ win;
422
+ tokenService;
423
+ bis = BUSINESS_DEFAULT_CONFIG;
424
+ menus = [];
425
+ links = [];
426
+ value = {};
410
427
  constructor(configService, pathToRegexp, win, tokenService) {
411
428
  this.configService = configService;
412
429
  this.pathToRegexp = pathToRegexp;
413
430
  this.win = win;
414
431
  this.tokenService = tokenService;
415
- this.bis = BUSINESS_DEFAULT_CONFIG;
416
- this.menus = [];
417
- this.links = [];
418
- this.value = {};
419
432
  this.bis = mergeBisConfig(this.configService);
420
433
  const [, getUser] = useLocalStorageUser();
421
434
  const user = getUser();
@@ -481,10 +494,10 @@ class YunzaiAnalysisAddonGuardService {
481
494
  }
482
495
  });
483
496
  }
484
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiAnalysisAddonGuardService, deps: [{ token: i1.YunzaiConfigService }, { token: i1.PathToRegexpService }, { token: WINDOW }, { token: YA_SERVICE_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
485
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiAnalysisAddonGuardService, providedIn: 'root' }); }
497
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiAnalysisAddonGuardService, deps: [{ token: i1.YunzaiConfigService }, { token: i1.PathToRegexpService }, { token: WINDOW }, { token: YA_SERVICE_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
498
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiAnalysisAddonGuardService, providedIn: 'root' });
486
499
  }
487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiAnalysisAddonGuardService, decorators: [{
500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiAnalysisAddonGuardService, decorators: [{
488
501
  type: Injectable,
489
502
  args: [{
490
503
  providedIn: 'root'
@@ -500,20 +513,22 @@ const analysisAddonCanActive = (_, state) => inject(YunzaiAnalysisAddonGuardServ
500
513
  const analysisAddonCanActiveChild = (_, state) => inject(YunzaiAnalysisAddonGuardService).process(state.url);
501
514
 
502
515
  class ActGuardService {
516
+ configService;
517
+ pathToRegexp;
518
+ router;
519
+ bis = BUSINESS_DEFAULT_CONFIG;
520
+ menus = [];
521
+ links = [];
503
522
  constructor(configService, pathToRegexp, router) {
504
523
  this.configService = configService;
505
524
  this.pathToRegexp = pathToRegexp;
506
525
  this.router = router;
507
- this.bis = BUSINESS_DEFAULT_CONFIG;
508
- this.menus = [];
509
- this.links = [];
510
526
  log('act: ');
511
527
  this.bis = mergeBisConfig(this.configService);
512
528
  log('act: config ', this.bis);
513
529
  const [, getUser] = useLocalStorageUser();
514
530
  const user = getUser();
515
531
  log('act: user ', user);
516
- // @ts-ignore
517
532
  this.menus = deepCopy(user.menu || []).filter((m) => m.systemCode && m.systemCode === this.bis.systemCode);
518
533
  log('act: menus ', this.menus);
519
534
  this.getAllLinks(this.menus, this.links);
@@ -571,10 +586,10 @@ class ActGuardService {
571
586
  }
572
587
  });
573
588
  }
574
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: ActGuardService, deps: [{ token: i1.YunzaiConfigService }, { token: i1.PathToRegexpService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
575
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: ActGuardService, providedIn: 'root' }); }
589
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ActGuardService, deps: [{ token: i1.YunzaiConfigService }, { token: i1.PathToRegexpService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
590
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ActGuardService, providedIn: 'root' });
576
591
  }
577
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: ActGuardService, decorators: [{
592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: ActGuardService, decorators: [{
578
593
  type: Injectable,
579
594
  args: [{ providedIn: 'root' }]
580
595
  }], ctorParameters: () => [{ type: i1.YunzaiConfigService }, { type: i1.PathToRegexpService }, { type: i2.Router }] });
@@ -582,14 +597,14 @@ const actGuardCanActive = (_, state) => inject(ActGuardService).process(state.ur
582
597
  const actGuardCanActiveChild = (_, state) => inject(ActGuardService).process(state.url);
583
598
 
584
599
  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
- }
600
+ logoSrc;
601
+ logoAlt = 'logo';
602
+ slogan = '';
603
+ contentTpl;
604
+ tokenService = inject(YA_SERVICE_TOKEN);
605
+ configService = inject(YunzaiConfigService);
606
+ startupSrv = inject(YunzaiStartupService);
607
+ win = inject(WINDOW);
593
608
  get _logoSrc() {
594
609
  return this.logoSrc;
595
610
  }
@@ -603,15 +618,15 @@ class YunzaiLayoutWebsite01Component {
603
618
  return this.contentTpl;
604
619
  }
605
620
  get _username() {
606
- const [_, getUser] = useLocalStorageUser();
621
+ const [, getUser] = useLocalStorageUser();
607
622
  return getUser()?.realname || '';
608
623
  }
609
624
  get isLogin() {
610
- const [_, getUser] = useLocalStorageUser();
625
+ const [, getUser] = useLocalStorageUser();
611
626
  return !!this.tokenService.get()?.access_token && !!getUser();
612
627
  }
613
628
  get _links() {
614
- const [_, getProjectInfo] = useLocalStorageProjectInfo();
629
+ const [, getProjectInfo] = useLocalStorageProjectInfo();
615
630
  return getProjectInfo()?.profileList || [];
616
631
  }
617
632
  login() {
@@ -625,8 +640,8 @@ class YunzaiLayoutWebsite01Component {
625
640
  if (url)
626
641
  this.win.location.href = url;
627
642
  }
628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiLayoutWebsite01Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
629
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: YunzaiLayoutWebsite01Component, isStandalone: true, selector: "yunzai-layout-website-01", inputs: { logoSrc: "logoSrc", logoAlt: "logoAlt", slogan: "slogan", contentTpl: "contentTpl" }, ngImport: i0, template: `
643
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiLayoutWebsite01Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
644
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: YunzaiLayoutWebsite01Component, isStandalone: true, selector: "yunzai-layout-website-01", inputs: { logoSrc: "logoSrc", logoAlt: "logoAlt", slogan: "slogan", contentTpl: "contentTpl" }, ngImport: i0, template: `
630
645
  <div class="yz-layout-website-01">
631
646
  <div class="yz-layout-website-01-nav__user">
632
647
  @if (isLogin) {
@@ -639,11 +654,11 @@ class YunzaiLayoutWebsite01Component {
639
654
  <span nz-icon nzType="user" nzTheme="outline"></span>{{ _username }}<span nz-icon nzType="down"></span>
640
655
  </a>
641
656
  <nz-dropdown-menu #menu="nzDropdownMenu">
642
- <ul nz-menu nzSelectable>
657
+ <ul nz-menu [nzSelectable]="true">
643
658
  @for (link of _links; track $index) {
644
659
  <li nz-menu-item class="yz-layout-website-01-link__li" (click)="to(link.url)">{{ link.name }}</li>
645
660
  }
646
- <li nz-menu-item nzDanger class="yz-layout-website-01-link__li" (click)="logout()"
661
+ <li nz-menu-item [nzDanger]="true" class="yz-layout-website-01-link__li" (click)="logout()"
647
662
  >{{ 'menu.account.logout' | i18n }}
648
663
  </li>
649
664
  </ul>
@@ -673,9 +688,9 @@ class YunzaiLayoutWebsite01Component {
673
688
  <router-outlet />
674
689
  </main>
675
690
  </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"] }] }); }
691
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], 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,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
677
692
  }
678
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiLayoutWebsite01Component, decorators: [{
693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiLayoutWebsite01Component, decorators: [{
679
694
  type: Component,
680
695
  args: [{
681
696
  selector: 'yunzai-layout-website-01',
@@ -692,11 +707,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
692
707
  <span nz-icon nzType="user" nzTheme="outline"></span>{{ _username }}<span nz-icon nzType="down"></span>
693
708
  </a>
694
709
  <nz-dropdown-menu #menu="nzDropdownMenu">
695
- <ul nz-menu nzSelectable>
710
+ <ul nz-menu [nzSelectable]="true">
696
711
  @for (link of _links; track $index) {
697
712
  <li nz-menu-item class="yz-layout-website-01-link__li" (click)="to(link.url)">{{ link.name }}</li>
698
713
  }
699
- <li nz-menu-item nzDanger class="yz-layout-website-01-link__li" (click)="logout()"
714
+ <li nz-menu-item [nzDanger]="true" class="yz-layout-website-01-link__li" (click)="logout()"
700
715
  >{{ 'menu.account.logout' | i18n }}
701
716
  </li>
702
717
  </ul>
@@ -727,7 +742,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
727
742
  </main>
728
743
  </div>
729
744
  `,
730
- standalone: true,
731
745
  imports: [RouterOutlet, I18nPipe, NzI18nModule, NgFor, NgIf, NzDropDownModule, NzIconModule, NgTemplateOutlet]
732
746
  }]
733
747
  }], propDecorators: { logoSrc: [{
@@ -741,14 +755,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
741
755
  }] } });
742
756
 
743
757
  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
- }
758
+ logoSrc;
759
+ logoAlt = 'logo';
760
+ userMenuShow = false;
761
+ slogan;
762
+ contentTpl;
763
+ tokenService = inject(YA_SERVICE_TOKEN);
764
+ configService = inject(YunzaiConfigService);
765
+ startupSrv = inject(YunzaiStartupService);
766
+ win = inject(WINDOW);
752
767
  get _logoSrc() {
753
768
  return this.logoSrc;
754
769
  }
@@ -765,21 +780,21 @@ class YunzaiLayoutWebsite02Component {
765
780
  return this.contentTpl;
766
781
  }
767
782
  get _username() {
768
- const [_, getUser] = useLocalStorageUser();
783
+ const [, getUser] = useLocalStorageUser();
769
784
  return getUser()?.realname || '';
770
785
  }
771
786
  get _avatar() {
772
- const [_, getUser] = useLocalStorageUser();
787
+ const [, getUser] = useLocalStorageUser();
773
788
  const baseUrl = this.configService.get('bis')?.baseUrl || '/backstage';
774
789
  const avatarUrl = getUser()?.avatarId ? `${baseUrl}/filecenter/file/${getUser()?.avatarId}` : undefined;
775
790
  return avatarUrl;
776
791
  }
777
792
  get isLogin() {
778
- const [_, getUser] = useLocalStorageUser();
793
+ const [, getUser] = useLocalStorageUser();
779
794
  return !!this.tokenService.get()?.access_token && !!getUser();
780
795
  }
781
796
  get _links() {
782
- const [_, getProjectInfo] = useLocalStorageProjectInfo();
797
+ const [, getProjectInfo] = useLocalStorageProjectInfo();
783
798
  return getProjectInfo()?.profileList || [];
784
799
  }
785
800
  login() {
@@ -793,8 +808,8 @@ class YunzaiLayoutWebsite02Component {
793
808
  if (url)
794
809
  this.win.location.href = url;
795
810
  }
796
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiLayoutWebsite02Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
797
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: YunzaiLayoutWebsite02Component, isStandalone: true, selector: "yunzai-layout-website-02", inputs: { logoSrc: "logoSrc", logoAlt: "logoAlt", userMenuShow: "userMenuShow", slogan: "slogan", contentTpl: "contentTpl" }, ngImport: i0, template: `
811
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiLayoutWebsite02Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
812
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: YunzaiLayoutWebsite02Component, isStandalone: true, selector: "yunzai-layout-website-02", inputs: { logoSrc: "logoSrc", logoAlt: "logoAlt", userMenuShow: "userMenuShow", slogan: "slogan", contentTpl: "contentTpl" }, ngImport: i0, template: `
798
813
  <div class="yz-layout-website-02">
799
814
  <header class="yz-layout-website-02-nav">
800
815
  <div class="yz-layout-website-02-inner-content">
@@ -845,9 +860,9 @@ class YunzaiLayoutWebsite02Component {
845
860
  <router-outlet />
846
861
  </main>
847
862
  </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"] }] }); }
863
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], 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,[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
864
  }
850
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: YunzaiLayoutWebsite02Component, decorators: [{
865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: YunzaiLayoutWebsite02Component, decorators: [{
851
866
  type: Component,
852
867
  args: [{
853
868
  selector: 'yunzai-layout-website-02',
@@ -903,7 +918,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
903
918
  </main>
904
919
  </div>
905
920
  `,
906
- standalone: true,
907
921
  imports: [
908
922
  RouterOutlet,
909
923
  I18nPipe,