@yelon/bis 12.0.7 → 12.0.11

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 (38) hide show
  1. package/bundles/bis.umd.js +3 -3
  2. package/bundles/layout.umd.js +184 -54
  3. package/bundles/layout.umd.js.map +1 -1
  4. package/bundles/shared.umd.js +4 -17
  5. package/bundles/shared.umd.js.map +1 -1
  6. package/esm2015/{shared → layout}/bis.config.js +2 -2
  7. package/esm2015/layout/public_api.js +4 -1
  8. package/esm2015/layout/stomp.config.js +20 -0
  9. package/esm2015/layout/widgets/yz.application.component.js +5 -5
  10. package/esm2015/layout/widgets/yz.notify.component.js +3 -3
  11. package/esm2015/layout/widgets/yz.them-btn.component.js +32 -12
  12. package/esm2015/layout/widgets/yz.user.component.js +3 -3
  13. package/esm2015/layout/yz.auth.service.js +2 -2
  14. package/esm2015/layout/yz.basic.component.js +11 -4
  15. package/esm2015/layout/yz.default.interceptor.js +4 -4
  16. package/esm2015/layout/yz.i18n.service.js +7 -7
  17. package/esm2015/layout/yz.startup.service.js +10 -10
  18. package/esm2015/layout/yz.stomp.service.js +91 -0
  19. package/esm2015/shared/public_api.js +1 -2
  20. package/fesm2015/layout.js +179 -43
  21. package/fesm2015/layout.js.map +1 -1
  22. package/fesm2015/shared.js +1 -12
  23. package/fesm2015/shared.js.map +1 -1
  24. package/{shared → layout}/bis.config.d.ts +1 -1
  25. package/layout/layout.metadata.json +1 -1
  26. package/layout/public_api.d.ts +3 -0
  27. package/layout/stomp.config.d.ts +3 -0
  28. package/layout/style/index.less +11 -4
  29. package/layout/yz.basic.component.d.ts +6 -3
  30. package/layout/yz.i18n.service.d.ts +0 -1
  31. package/layout/yz.stomp.service.d.ts +39 -0
  32. package/package.json +10 -10
  33. package/shared/public_api.d.ts +0 -1
  34. package/shared/shared-zorro.module.d.ts +2 -2
  35. package/shared/shared.metadata.json +1 -1
  36. package/theme-compact.less +1 -0
  37. package/theme-dark.less +16 -19
  38. package/theme-default.less +8 -8
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, ChangeDetectionStrategy, Injector, Inject, Input, ChangeDetectorRef, Renderer2, Optional, HostListener, NgModule, APP_INITIALIZER } from '@angular/core';
2
+ import { Injectable, Component, ChangeDetectionStrategy, Injector, Inject, Input, ChangeDetectorRef, Renderer2, Optional, HostListener, isDevMode, NgModule, APP_INITIALIZER } from '@angular/core';
3
+ import * as i2$1 from '@yelon/cache';
3
4
  import { CacheService } from '@yelon/cache';
4
5
  import * as i1 from '@yelon/theme';
5
6
  import { zh_CN as zh_CN$1, zh_TW as zh_TW$1, en_US as en_US$1, YunzaiI18nBaseService, _HttpClient, SettingsService, YelonLocaleService, YUNZAI_I18N_TOKEN, MenuService, TitleService } from '@yelon/theme';
@@ -24,17 +25,20 @@ import { NzMessageService } from 'ng-zorro-antd/message';
24
25
  import { log } from '@yelon/util/other';
25
26
  import { Directionality } from '@angular/cdk/bidi';
26
27
  import { YUNZAI_THEME_BTN_KEYS } from '@yelon/theme/theme-btn';
27
- import { YA_SERVICE_TOKEN, mergeConfig as mergeConfig$1 } from '@yelon/auth';
28
- import { mergeConfig, YzSharedModule, BUSINESS_DEFAULT_CONFIG, ICONS } from '@yelon/bis/shared';
28
+ import { YA_SERVICE_TOKEN, mergeConfig } from '@yelon/auth';
29
29
  import { NzModalService } from 'ng-zorro-antd/modal';
30
30
  import * as screenfull from 'screenfull';
31
31
  import { HttpClientModule, HttpResponse, HttpErrorResponse, HttpResponseBase } from '@angular/common/http';
32
32
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
33
33
  import { RouterModule, Router } from '@angular/router';
34
+ import { YzSharedModule, ICONS } from '@yelon/bis/shared';
35
+ import { RxStomp } from '@stomp/rx-stomp';
36
+ import * as i3$1 from 'ng-zorro-antd/notification';
34
37
  import { NzNotificationService } from 'ng-zorro-antd/notification';
35
38
  import { NzIconService } from 'ng-zorro-antd/icon';
36
39
  import { ACLService } from '@yelon/acl';
37
40
 
41
+ // 请参考:https://ng.yunzainfo.com/docs/i18n
38
42
  const DEFAULT = 'zh-CN';
39
43
  const LANGS = {
40
44
  'zh-CN': {
@@ -63,16 +67,13 @@ const LANGS = {
63
67
  }
64
68
  };
65
69
  class YzI18NService extends YunzaiI18nBaseService {
66
- constructor(http, settings, nzI18nService, yelonLocaleService, platform,
67
- // @ts-ignore
68
- cogSrv) {
70
+ constructor(http, settings, nzI18nService, yelonLocaleService, platform, cogSrv) {
69
71
  super(cogSrv);
70
72
  this.http = http;
71
73
  this.settings = settings;
72
74
  this.nzI18nService = nzI18nService;
73
75
  this.yelonLocaleService = yelonLocaleService;
74
76
  this.platform = platform;
75
- this.cogSrv = cogSrv;
76
77
  this._defaultLang = DEFAULT;
77
78
  this._langs = Object.keys(LANGS).map(code => {
78
79
  const item = LANGS[code];
@@ -90,10 +91,12 @@ class YzI18NService extends YunzaiI18nBaseService {
90
91
  if (this.settings.layout.lang) {
91
92
  return this.settings.layout.lang;
92
93
  }
93
- return (navigator.languages ? navigator.languages[0] : null) || navigator.language;
94
+ let res = (navigator.languages ? navigator.languages[0] : null) || navigator.language;
95
+ const arr = res.split('-');
96
+ return arr.length <= 1 ? res : `${arr[0]}-${arr[1].toUpperCase()}`;
94
97
  }
95
98
  loadLangData(lang) {
96
- return this.http.get(`./assets/tmp/i18n/${lang}.json`);
99
+ return this.http.get(`assets/tmp/i18n/${lang}.json`);
97
100
  }
98
101
  use(lang, data) {
99
102
  if (this._currentLang === lang)
@@ -249,7 +252,7 @@ YzHeaderApplicationComponent.decorators = [
249
252
  <input
250
253
  type="text"
251
254
  nz-input
252
- [placeholder]="'请输入要搜索的应用名称!'"
255
+ placeholder="{{ 'application.search' | i18n }}"
253
256
  [(ngModel)]="searchValue"
254
257
  (ngModelChange)="onSearch()"
255
258
  />
@@ -272,14 +275,14 @@ YzHeaderApplicationComponent.decorators = [
272
275
  <!-- template end-->
273
276
 
274
277
  <!-- button start-->
275
- <div class="yunzai-default__nav-item" (click)="diffChange()"> 应用与服务</div>
278
+ <div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'application.button' | i18n }}</div>
276
279
  <!-- button end-->
277
280
 
278
281
  <!-- header start-->
279
282
  <div class="yz-application" nz-row *ngIf="active">
280
283
  <div nz-col [nzSpan]="3" class="yz-application-topic">
281
- <div class="yz-application-text" (click)="full()">全部应用</div>
282
- <div class="yz-application-text" (click)="own()">我的应用</div>
284
+ <div class="yz-application-text" (click)="full()">{{ 'application.all' | i18n }}</div>
285
+ <div class="yz-application-text" (click)="own()">{{ 'application.mine' | i18n }}</div>
283
286
  <div class="yz-application-text" *ngFor="let d of topicData" (click)="every(d)">
284
287
  {{ d.name }}
285
288
  </div>
@@ -460,7 +463,7 @@ class YzHeaderNotifyComponent {
460
463
  .pipe(map((response) => {
461
464
  const viewMessage = this.data.filter(d => d.key === 'msg')[0];
462
465
  viewMessage.list = response.data.list.map((m) => {
463
- return Object.assign(Object.assign({}, m), { avatar: './assets/tmp/img/message.png', title: m.systemName, description: m.content, extra: formatMessageStatus(m.status).extra, color: formatMessageStatus(m.status).color, datetime: formatDistanceToNow(new Date(m.date), { locale: this.nzI18n.getDateLocale() }) });
466
+ return Object.assign(Object.assign({}, m), { avatar: (m === null || m === void 0 ? void 0 : m.imgUrl) || './assets/tmp/img/message.png', title: m.systemName, description: m.content, extra: formatMessageStatus(m.status).extra, color: formatMessageStatus(m.status).color, datetime: formatDistanceToNow(new Date(m.date), { locale: this.nzI18n.getDateLocale() }) });
464
467
  });
465
468
  this.count += viewMessage.list.length;
466
469
  }));
@@ -486,7 +489,7 @@ class YzHeaderNotifyComponent {
486
489
  .pipe(map((response) => {
487
490
  const viewTodo = this.data.filter(d => d.key === 'todo')[0];
488
491
  viewTodo.list = response.data.list.map((t) => {
489
- return Object.assign(Object.assign({}, t), { avatar: './assets/tmp/img/todo.png', title: t.systemName, description: t.content, datetime: formatDistanceToNow(new Date(t.date), { locale: this.nzI18n.getDateLocale() }), extra: formatTodoStatus(t.status).extra, color: formatTodoStatus(t.status).color });
492
+ return Object.assign(Object.assign({}, t), { avatar: (t === null || t === void 0 ? void 0 : t.imgUrl) || './assets/tmp/img/todo.png', title: t.systemName, description: t.content, datetime: formatDistanceToNow(new Date(t.date), { locale: this.nzI18n.getDateLocale() }), extra: formatTodoStatus(t.status).extra, color: formatTodoStatus(t.status).color });
490
493
  });
491
494
  this.count += viewTodo.list.length;
492
495
  }));
@@ -546,9 +549,18 @@ class YzHeaderThemBtnComponent {
546
549
  this.KEYS = KEYS;
547
550
  this.theme = 'default';
548
551
  this.types = [
549
- { key: 'default', text: 'Default Theme', color: '#2163ff' },
550
- { key: 'compact', text: 'Compact Theme', color: '#2163ff' },
551
- { key: 'dark', text: 'Dark Theme', color: '#020202' }
552
+ { key: 'default', text: 'theme.default', color: '#2163ff' },
553
+ { key: 'compact', text: 'theme.compact', color: '#2163ff' },
554
+ { key: 'dark', text: 'theme.dark', color: '#020202' },
555
+ { key: 'yuhong', text: 'theme.yuhong', color: '#C04851' },
556
+ { key: 'danjuhuang', text: 'theme.danjuhuang', color: '#FBA414' },
557
+ { key: 'xinghuang', text: 'theme.xinghuang', color: '#F28E16' },
558
+ { key: 'shilv', text: 'theme.shilv', color: '#57C3C2' },
559
+ { key: 'zhulv', text: 'theme.zhulv', color: '#1BA784' },
560
+ { key: 'youlan', text: 'theme.youlan', color: '#1781B5' },
561
+ { key: 'dianqing', text: 'theme.dianqing', color: '#1661AB' },
562
+ { key: 'shangengzi', text: 'theme.shangengzi', color: '#61649F' },
563
+ { key: 'shuiniuhui', text: 'theme.shuiniuhui', color: '#2F2F35' }
552
564
  ];
553
565
  this.devTips = `When the dark.css file can't be found, you need to run it once: npm run theme`;
554
566
  this.deployUrl = '';
@@ -627,14 +639,25 @@ YzHeaderThemBtnComponent.decorators = [
627
639
  </svg>
628
640
  </div>
629
641
  <nz-dropdown-menu #iconMenu="nzDropdownMenu">
630
- <div nz-menu class="wd-xl animated jello">
631
- <div nz-row [nzJustify]="'space-between'" [nzAlign]="'middle'" class="app-icons">
632
- <div nz-col [nzSpan]="6" *ngFor="let theme of types" (click)="onThemeChange(theme.key)">
633
- <i nz-icon nzType="bg-colors" class="text-white" [style]="{ backgroundColor: theme.color }"></i>
634
- <span [ngStyle]="{ color: theme.color }">{{ theme.key }}</span>
635
- </div>
636
- </div>
637
- </div>
642
+ <ul nz-menu>
643
+ <li
644
+ nz-menu-item
645
+ *ngFor="let theme of types"
646
+ (click)="onThemeChange(theme.key)"
647
+ [style]="{ color: theme.color }"
648
+ >
649
+ <i nz-icon nzType="bg-colors"></i>
650
+ {{ theme.text | i18n }}
651
+ </li>
652
+ </ul>
653
+ <!-- <div nz-menu class="wd-xl animated jello">-->
654
+ <!-- <div nz-row [nzJustify]="'space-between'" [nzAlign]="'middle'" class="app-icons">-->
655
+ <!-- <div nz-col [nzSpan]="4" *ngFor="let theme of types" (click)="onThemeChange(theme.key)">-->
656
+ <!-- <i nz-icon nzType="bg-colors" class="text-white" [style]="{ backgroundColor: theme.color }"></i>-->
657
+ <!-- <span [ngStyle]="{ color: theme.color }">{{ theme.text | i18n }}</span>-->
658
+ <!-- </div>-->
659
+ <!-- </div>-->
660
+ <!-- </div>-->
638
661
  </nz-dropdown-menu>
639
662
  `,
640
663
  changeDetection: ChangeDetectionStrategy.OnPush
@@ -654,6 +677,17 @@ YzHeaderThemBtnComponent.propDecorators = {
654
677
  deployUrl: [{ type: Input }]
655
678
  };
656
679
 
680
+ const BUSINESS_DEFAULT_CONFIG = {
681
+ baseUrl: '/backstage',
682
+ systemCode: 'portal',
683
+ loginForm: null,
684
+ refreshTokenEnabled: true,
685
+ refreshTokenType: 're-request'
686
+ };
687
+ function mergeBisConfig(srv) {
688
+ return srv.merge('bis', BUSINESS_DEFAULT_CONFIG);
689
+ }
690
+
657
691
  class YzHeaderUserComponent {
658
692
  constructor(injector, msg, tokenService,
659
693
  // @ts-ignore
@@ -666,7 +700,7 @@ class YzHeaderUserComponent {
666
700
  this.icon = '';
667
701
  this.username = '';
668
702
  this.menus = [];
669
- this.config = mergeConfig(configService);
703
+ this.config = mergeBisConfig(configService);
670
704
  }
671
705
  ngOnInit() {
672
706
  const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
@@ -799,9 +833,107 @@ YzHeaderFullScreenComponent.propDecorators = {
799
833
  _click: [{ type: HostListener, args: ['click',] }]
800
834
  };
801
835
 
836
+ const ɵ0 = msg => {
837
+ log$1(msg);
838
+ };
839
+ const STOMP_DEFAULT_CONFIG = {
840
+ connectHeaders: {
841
+ login: 'guest',
842
+ passcode: 'guest'
843
+ },
844
+ brokerURL: '/websocket/ws/',
845
+ heartbeatIncoming: 1000 * 60,
846
+ heartbeatOutgoing: 1000 * 60,
847
+ reconnectDelay: 30000000,
848
+ debug: ɵ0
849
+ };
850
+ function mergeStompConfig(srv) {
851
+ return srv.merge('stomp', STOMP_DEFAULT_CONFIG);
852
+ }
853
+
854
+ class YzStompService {
855
+ constructor(csr, cache, injector, notification) {
856
+ this.csr = csr;
857
+ this.cache = cache;
858
+ this.injector = injector;
859
+ this.notification = notification;
860
+ this.subs = [];
861
+ if (!this.user) {
862
+ this.user = this.cache.get('_yz_user', { mode: 'none' });
863
+ }
864
+ if (!this.config) {
865
+ this.config = mergeStompConfig(this.csr);
866
+ }
867
+ if (!this.bisConfig) {
868
+ this.bisConfig = mergeBisConfig(csr);
869
+ }
870
+ if (!this.rxStomp) {
871
+ this.rxStomp = new RxStomp();
872
+ if (isDevMode()) {
873
+ log$1('yz.stomp.service: is dev mode');
874
+ log$1('yz.stomp.service: ', `config is ${this.config}`);
875
+ this.rxStomp.configure(this.config);
876
+ return;
877
+ }
878
+ const { location } = this.injector.get(DOCUMENT);
879
+ const { protocol, host } = location;
880
+ log$1('yz.stomp.service: ', `protocol is ${protocol},host is ${host}`);
881
+ if (protocol.includes('http') && !protocol.includes('https')) {
882
+ this.config.brokerURL = `ws://${host}${this.config.brokerURL}`;
883
+ }
884
+ if (protocol.includes('https')) {
885
+ this.config.brokerURL = `wss://${host}${this.config.brokerURL}`;
886
+ }
887
+ log$1('yz.stomp.service: ', `config is ${this.config}`);
888
+ this.rxStomp.configure(this.config);
889
+ }
890
+ }
891
+ listen() {
892
+ this.subs.push(this.rxStomp.watch(`/topic/layout_${this.user.username}`).subscribe(message => {
893
+ this.createNotification(JSON.parse(message.body));
894
+ }));
895
+ this.subs.push(this.rxStomp.watch(`/topic/layout_xx_${this.user.username}`).subscribe((message) => {
896
+ this.logoutNotification(JSON.parse(message.body));
897
+ }));
898
+ this.rxStomp.activate();
899
+ }
900
+ createNotification(message) {
901
+ this.notification.create(message.type, message.title, `<a href=${message.href}>${message.content}</a>`);
902
+ }
903
+ logoutNotification(message) {
904
+ this.notification.create(message.type, message.title, `${message.content},剩余时间5秒`);
905
+ setTimeout(() => {
906
+ this.cache.clear();
907
+ localStorage.clear();
908
+ this.injector.get(WINDOW).location.href = `${this.bisConfig.baseUrl}/cas-proxy/app/logout`;
909
+ }, 5000);
910
+ }
911
+ unListen() {
912
+ this.subs.forEach(s => s.unsubscribe());
913
+ this.rxStomp.deactivate().then();
914
+ }
915
+ publish(parameters) {
916
+ this.rxStomp.publish(parameters);
917
+ }
918
+ watch(destination, headers) {
919
+ return this.rxStomp.watch(destination, headers);
920
+ }
921
+ }
922
+ YzStompService.ɵprov = i0.ɵɵdefineInjectable({ factory: function YzStompService_Factory() { return new YzStompService(i0.ɵɵinject(i4.YunzaiConfigService), i0.ɵɵinject(i2$1.CacheService), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i3$1.NzNotificationService)); }, token: YzStompService, providedIn: "root" });
923
+ YzStompService.decorators = [
924
+ { type: Injectable, args: [{ providedIn: 'root' },] }
925
+ ];
926
+ YzStompService.ctorParameters = () => [
927
+ { type: YunzaiConfigService$1 },
928
+ { type: CacheService },
929
+ { type: Injector },
930
+ { type: NzNotificationService }
931
+ ];
932
+
802
933
  class YzLayoutBasicComponent {
803
- constructor(cacheService) {
934
+ constructor(cacheService, yzStompService) {
804
935
  this.cacheService = cacheService;
936
+ this.yzStompService = yzStompService;
805
937
  this.options = {
806
938
  logoExpanded: `./assets/logo-full.svg`,
807
939
  logoCollapsed: `./assets/logo.svg`
@@ -818,6 +950,10 @@ class YzLayoutBasicComponent {
818
950
  this.icon = current.icon ? current.icon : `./assets/tmp/img/avatar.jpg`;
819
951
  this.options.logoExpanded = project.maxLogoUrl ? project.maxLogoUrl : `./assets/logo-full.svg`;
820
952
  this.options.logoCollapsed = project.miniLogoUrl ? project.miniLogoUrl : `./assets/logo.svg`;
953
+ this.yzStompService.listen();
954
+ }
955
+ ngOnDestroy() {
956
+ this.yzStompService.unListen();
821
957
  }
822
958
  }
823
959
  YzLayoutBasicComponent.decorators = [
@@ -874,7 +1010,7 @@ YzLayoutBasicComponent.decorators = [
874
1010
  </div>
875
1011
  <nz-dropdown-menu #userMenu="nzDropdownMenu">
876
1012
  <ul nz-menu>
877
- <li nz-menu-item routerLink="/">回到首页</li>
1013
+ <li nz-menu-item routerLink="/">{{ 'menu.backtohome' | i18n }}</li>
878
1014
  </ul>
879
1015
  </nz-dropdown-menu>
880
1016
  </ng-template>
@@ -888,7 +1024,8 @@ YzLayoutBasicComponent.decorators = [
888
1024
  },] }
889
1025
  ];
890
1026
  YzLayoutBasicComponent.ctorParameters = () => [
891
- { type: CacheService }
1027
+ { type: CacheService },
1028
+ { type: YzStompService }
892
1029
  ];
893
1030
 
894
1031
  const COMPONENTS = [
@@ -920,8 +1057,8 @@ YunzaiLayoutModule.decorators = [
920
1057
  class YzAuthService {
921
1058
  constructor(injector) {
922
1059
  this.injector = injector;
923
- this.option = mergeConfig$1(this.csr);
924
- this.bis = mergeConfig(this.csr);
1060
+ this.option = mergeConfig(this.csr);
1061
+ this.bis = mergeBisConfig(this.csr);
925
1062
  }
926
1063
  get csr() {
927
1064
  return this.injector.get(YunzaiConfigService);
@@ -1103,7 +1240,7 @@ class YzDefaultInterceptor {
1103
1240
  return this.injector.get(_HttpClient);
1104
1241
  }
1105
1242
  get config() {
1106
- return mergeConfig(this.injector.get(YunzaiConfigService));
1243
+ return mergeBisConfig(this.injector.get(YunzaiConfigService));
1107
1244
  }
1108
1245
  goTo(url) {
1109
1246
  setTimeout(() => this.injector.get(Router).navigateByUrl(url));
@@ -1222,7 +1359,7 @@ class YzDefaultInterceptor {
1222
1359
  if (!url.startsWith('https://') && !url.startsWith('http://')) {
1223
1360
  url = this.config.baseUrl + url;
1224
1361
  }
1225
- if (url.includes('.json')) {
1362
+ if (url.includes('.json') && url.includes('assets')) {
1226
1363
  url = req.url;
1227
1364
  }
1228
1365
  // 加入语言头
@@ -1249,6 +1386,7 @@ function mapYzSideToYelonMenu(menus) {
1249
1386
  menu.badgeDot = menu.badge_dot || null;
1250
1387
  menu.badgeStatus = menu.badge_status || null;
1251
1388
  menu.shortcutRoot = menu.shortcut_root || null;
1389
+ menu.reuse = true;
1252
1390
  if (menu.children) {
1253
1391
  mapYzSideToYelonMenu(menu.children);
1254
1392
  }
@@ -1284,7 +1422,7 @@ class YzStartupService {
1284
1422
  this.cacheService = cacheService;
1285
1423
  this.configService = configService;
1286
1424
  this.bis = BUSINESS_DEFAULT_CONFIG;
1287
- this.bis = mergeConfig(this.configService);
1425
+ this.bis = mergeBisConfig(this.configService);
1288
1426
  iconSrv.addIcon(...ICONS);
1289
1427
  }
1290
1428
  load() {
@@ -1315,7 +1453,7 @@ class YzStartupService {
1315
1453
  const ms = deepCopy(user.menu).filter((m) => m.systemCode && m.systemCode === this.bis.systemCode);
1316
1454
  mapYzSideToYelonMenu(ms);
1317
1455
  const currentMenu = ms.pop();
1318
- this.menuService.add(currentMenu.children);
1456
+ this.menuService.add([currentMenu]);
1319
1457
  // logo app
1320
1458
  this.settingService.setApp({ name: currentMenu.text, description: currentMenu.intro });
1321
1459
  this.settingService.setUser({
@@ -1329,12 +1467,10 @@ class YzStartupService {
1329
1467
  // acl
1330
1468
  const abilities = [];
1331
1469
  generateAbility([currentMenu], abilities, '');
1332
- this.aclService.add({
1333
- role: (user === null || user === void 0 ? void 0 : user.roles.map((role) => {
1334
- return role.roleValue;
1335
- }).filter((a) => !!a)) || [],
1336
- ability: abilities
1337
- });
1470
+ this.aclService.attachRole((user === null || user === void 0 ? void 0 : user.roles.map((role) => {
1471
+ return role.roleValue;
1472
+ }).filter((a) => !!a)) || []);
1473
+ this.aclService.attachAbility(abilities);
1338
1474
  // cache current
1339
1475
  this.cacheService.set('_yz_current', {
1340
1476
  text: currentMenu.text,
@@ -1375,5 +1511,5 @@ const YZ_APPINIT_PROVIDES = [
1375
1511
  * Generated bundle index. Do not edit.
1376
1512
  */
1377
1513
 
1378
- export { TOPIC, YZ_APPINIT_PROVIDES, YunzaiLayoutModule, YzAuthService, YzDefaultInterceptor, YzHeaderApplicationComponent, YzHeaderClearStorageComponent, YzHeaderFullScreenComponent, YzHeaderI18NComponent, YzHeaderNotifyComponent, YzHeaderThemBtnComponent, YzHeaderUserComponent, YzI18NService, YzLayoutBasicComponent, YzStartupService, YzStartupServiceFactory, generateAbility, mapYzSideToYelonMenu, YzHeaderApplicationComponent as ɵa, YzHeaderNotifyComponent as ɵb, YzHeaderThemBtnComponent as ɵc, YzHeaderUserComponent as ɵd, YzHeaderFullScreenComponent as ɵe, YzHeaderClearStorageComponent as ɵf, YzHeaderI18NComponent as ɵg };
1514
+ export { BUSINESS_DEFAULT_CONFIG, STOMP_DEFAULT_CONFIG, TOPIC, YZ_APPINIT_PROVIDES, YunzaiLayoutModule, YzAuthService, YzDefaultInterceptor, YzHeaderApplicationComponent, YzHeaderClearStorageComponent, YzHeaderFullScreenComponent, YzHeaderI18NComponent, YzHeaderNotifyComponent, YzHeaderThemBtnComponent, YzHeaderUserComponent, YzI18NService, YzLayoutBasicComponent, YzStartupService, YzStartupServiceFactory, YzStompService, generateAbility, mapYzSideToYelonMenu, mergeBisConfig, mergeStompConfig, ɵ0, YzHeaderApplicationComponent as ɵa, YzHeaderNotifyComponent as ɵb, YzHeaderThemBtnComponent as ɵc, YzHeaderUserComponent as ɵd, YzHeaderFullScreenComponent as ɵe, YzHeaderClearStorageComponent as ɵf, YzHeaderI18NComponent as ɵg };
1379
1515
  //# sourceMappingURL=layout.js.map