@yelon/bis 16.0.1 → 16.0.3

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 (34) hide show
  1. package/esm2022/layout/layout-basic/interface.mjs +2 -7
  2. package/esm2022/layout/layout-basic/layout-basic.component.mjs +83 -54
  3. package/esm2022/layout/layout-nav/index.mjs +1 -2
  4. package/esm2022/layout/layout-nav/layout-nav-application.component.mjs +36 -33
  5. package/esm2022/layout/layout-nav/layout-nav-group.component.mjs +82 -77
  6. package/esm2022/layout/layout-nav/layout-nav-tile.component.mjs +3 -3
  7. package/esm2022/layout/widgets/yunzai-clear-storage.component.mjs +3 -3
  8. package/esm2022/layout/widgets/yunzai-fullscreen.component.mjs +3 -3
  9. package/esm2022/layout/widgets/yunzai-i18n.component.mjs +3 -3
  10. package/esm2022/layout/widgets/yunzai-notify.component.mjs +3 -3
  11. package/esm2022/layout/widgets/yunzai-theme-btn.component.mjs +3 -3
  12. package/esm2022/layout/widgets/yunzai-user.component.mjs +19 -19
  13. package/esm2022/layout/yunzai-act.guard.mjs +12 -12
  14. package/esm2022/layout/yunzai-auth.service.mjs +27 -95
  15. package/esm2022/layout/yunzai-default.interceptor.mjs +8 -16
  16. package/esm2022/layout/yunzai-i18n.service.mjs +15 -16
  17. package/esm2022/layout/yunzai-layout.module.mjs +10 -9
  18. package/esm2022/layout/yunzai-startup.service.mjs +26 -35
  19. package/fesm2022/layout.mjs +287 -336
  20. package/fesm2022/layout.mjs.map +1 -1
  21. package/layout/layout-basic/interface.d.ts +1 -15
  22. package/layout/layout-basic/layout-basic.component.d.ts +3 -6
  23. package/layout/layout-nav/index.d.ts +0 -1
  24. package/layout/layout-nav/layout-nav-application.component.d.ts +2 -4
  25. package/layout/layout-nav/layout-nav-group.component.d.ts +2 -4
  26. package/layout/widgets/yunzai-user.component.d.ts +1 -3
  27. package/layout/yunzai-act.guard.d.ts +1 -3
  28. package/layout/yunzai-auth.service.d.ts +2 -4
  29. package/layout/yunzai-i18n.service.d.ts +1 -3
  30. package/layout/yunzai-layout.module.d.ts +3 -2
  31. package/layout/yunzai-startup.service.d.ts +7 -10
  32. package/package.json +11 -11
  33. package/esm2022/layout/layout-nav/types.mjs +0 -2
  34. package/layout/layout-nav/types.d.ts +0 -15
@@ -1,20 +1,6 @@
1
1
  import { Subject } from 'rxjs';
2
2
  import { LayoutDefaultOptions } from '@yelon/theme/layout-default';
3
- export declare enum NavType {
4
- APPLICATION = "application",
5
- GROUP = "group",
6
- TILE = "tile"
7
- }
8
- export interface LayoutBasicAside {
9
- name: string;
10
- intro: string;
11
- icon: string;
12
- }
13
- export interface LayoutBasicDisplay {
14
- nav: boolean;
15
- reusetab: boolean;
16
- aside: boolean;
17
- }
3
+ import { LayoutBasicAside, LayoutBasicDisplay, NavType } from "@yelon/util";
18
4
  export interface LayoutBasicState {
19
5
  options: LayoutDefaultOptions;
20
6
  aside: LayoutBasicAside;
@@ -1,12 +1,10 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
- import { CacheService } from '@yelon/cache';
3
2
  import { StompService } from '@yelon/socket';
4
3
  import { LayoutDefaultOptions, LayoutDisplayService } from '@yelon/theme/layout-default';
5
- import { LayoutBasicAside, NavType } from './interface';
4
+ import { NavType, LayoutBasicAside } from '@yelon/util';
6
5
  import * as i0 from "@angular/core";
7
- declare class YunzaiLayoutBasicComponent implements OnInit, OnDestroy {
6
+ export declare class YunzaiLayoutBasicComponent implements OnInit, OnDestroy {
8
7
  private layoutDisplayService;
9
- private cacheService;
10
8
  private stompService;
11
9
  private win;
12
10
  NavType: typeof NavType;
@@ -16,7 +14,7 @@ declare class YunzaiLayoutBasicComponent implements OnInit, OnDestroy {
16
14
  get aside(): LayoutBasicAside;
17
15
  get displayReusetab(): boolean;
18
16
  get reusetabCSS(): any;
19
- constructor(layoutDisplayService: LayoutDisplayService, cacheService: CacheService, stompService: StompService, win: typeof window);
17
+ constructor(layoutDisplayService: LayoutDisplayService, stompService: StompService, win: typeof window);
20
18
  ngOnInit(): void;
21
19
  initFavicon(): void;
22
20
  initAside(): void;
@@ -29,4 +27,3 @@ declare class YunzaiLayoutBasicComponent implements OnInit, OnDestroy {
29
27
  static ɵfac: i0.ɵɵFactoryDeclaration<YunzaiLayoutBasicComponent, never>;
30
28
  static ɵcmp: i0.ɵɵComponentDeclaration<YunzaiLayoutBasicComponent, "yz-layout-basic", never, {}, {}, never, never, false, never>;
31
29
  }
32
- export { YunzaiLayoutBasicComponent as YzLayoutBasicComponent, YunzaiLayoutBasicComponent };
@@ -1,4 +1,3 @@
1
1
  export * from './layout-nav-application.component';
2
2
  export * from './layout-nav-group.component';
3
3
  export * from './layout-nav-tile.component';
4
- export * from './types';
@@ -1,16 +1,14 @@
1
1
  import { Injector, OnDestroy, OnInit } from '@angular/core';
2
- import { CacheService, YunzaiNavTopic } from '@yelon/cache';
3
2
  import { _HttpClient } from '@yelon/theme';
3
+ import { LayoutNavApplicationState, YunzaiNavTopic } from '@yelon/util';
4
4
  import { YunzaiI18NService } from '../yunzai-i18n.service';
5
- import { LayoutNavApplicationState } from './types';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class LayoutNavApplicationComponent implements OnInit, OnDestroy {
8
- private cacheService;
9
7
  private i18n;
10
8
  private http;
11
9
  private inject;
12
10
  state: LayoutNavApplicationState;
13
- constructor(cacheService: CacheService, i18n: YunzaiI18NService, http: _HttpClient, inject: Injector);
11
+ constructor(i18n: YunzaiI18NService, http: _HttpClient, inject: Injector);
14
12
  ngOnInit(): void;
15
13
  fetchAllTopic(): void;
16
14
  attachNav(type: 'all' | 'mine' | 'other', topic?: YunzaiNavTopic): void;
@@ -1,14 +1,12 @@
1
1
  import { Injector, OnDestroy, OnInit } from '@angular/core';
2
- import { CacheService, YunzaiNavTopic } from '@yelon/cache';
3
2
  import { _HttpClient } from '@yelon/theme';
4
- import { LayoutNavGroupState } from './types';
3
+ import { LayoutNavGroupState, YunzaiNavTopic } from '@yelon/util';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class LayoutNavGroupComponent implements OnInit, OnDestroy {
7
6
  private inject;
8
- private cacheService;
9
7
  private http;
10
8
  state: LayoutNavGroupState;
11
- constructor(inject: Injector, cacheService: CacheService, http: _HttpClient);
9
+ constructor(inject: Injector, http: _HttpClient);
12
10
  ngOnInit(): void;
13
11
  open(topic: YunzaiNavTopic): void;
14
12
  ngOnDestroy(): void;
@@ -1,6 +1,5 @@
1
1
  import { Injector, OnInit } from '@angular/core';
2
2
  import { ITokenService } from '@yelon/auth';
3
- import { CacheService } from '@yelon/cache';
4
3
  import { YunzaiConfigService } from '@yelon/util';
5
4
  import { NzMessageService } from 'ng-zorro-antd/message';
6
5
  import * as i0 from "@angular/core";
@@ -14,9 +13,8 @@ export declare class YunzaiUserComponent implements OnInit {
14
13
  private msg;
15
14
  private tokenService;
16
15
  private configService;
17
- private cacheService;
18
16
  private config;
19
- constructor(injector: Injector, msg: NzMessageService, tokenService: ITokenService, configService: YunzaiConfigService, cacheService: CacheService);
17
+ constructor(injector: Injector, msg: NzMessageService, tokenService: ITokenService, configService: YunzaiConfigService);
20
18
  icon: string;
21
19
  username: string;
22
20
  menus: UserLink[];
@@ -1,18 +1,16 @@
1
1
  import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
2
2
  import { Observable } from 'rxjs';
3
- import { CacheService } from '@yelon/cache';
4
3
  import { Menu } from '@yelon/theme';
5
4
  import { YunzaiConfigService, PathToRegexpService } from '@yelon/util';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class ActGuard implements CanActivate, CanActivateChild {
8
7
  private configService;
9
- private cacheService;
10
8
  private pathToRegexp;
11
9
  private router;
12
10
  private bis;
13
11
  private menus;
14
12
  private links;
15
- constructor(configService: YunzaiConfigService, cacheService: CacheService, pathToRegexp: PathToRegexpService, router: Router);
13
+ constructor(configService: YunzaiConfigService, pathToRegexp: PathToRegexpService, router: Router);
16
14
  canActivate(_: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
17
15
  canActivateChild(_: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
18
16
  preHandle(state: RouterStateSnapshot): boolean;
@@ -2,20 +2,18 @@ import { Injector } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { ITokenModel } from '@yelon/auth';
4
4
  import * as i0 from "@angular/core";
5
- declare class YunzaiAuthService {
5
+ export declare class YunzaiAuthService {
6
6
  private injector;
7
7
  private config;
8
8
  constructor(injector: Injector);
9
9
  private get configService();
10
10
  private get tokenService();
11
11
  private get httpClient();
12
- private get cacheService();
13
12
  askToken(): Observable<ITokenModel>;
14
13
  fetchTokenByUP(): Observable<ITokenModel>;
15
14
  fetchTokenByCas(): Observable<ITokenModel>;
16
15
  login(): Observable<void>;
17
- cacheInit(): Observable<void[]>;
16
+ cacheInit(): Observable<void>;
18
17
  static ɵfac: i0.ɵɵFactoryDeclaration<YunzaiAuthService, never>;
19
18
  static ɵprov: i0.ɵɵInjectableDeclaration<YunzaiAuthService>;
20
19
  }
21
- export { YunzaiAuthService as YzAuthService, YunzaiAuthService };
@@ -1,7 +1,6 @@
1
1
  import { Platform } from '@angular/cdk/platform';
2
2
  import { OnDestroy } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
- import { CacheService } from '@yelon/cache';
5
4
  import { YelonLocaleService, SettingsService, _HttpClient, YunzaiI18nBaseService, YunzaiI18NType } from '@yelon/theme';
6
5
  import { YunzaiConfigService } from '@yelon/util/config';
7
6
  import { NzSafeAny } from 'ng-zorro-antd/core/types';
@@ -13,11 +12,10 @@ declare class YunzaiI18NService extends YunzaiI18nBaseService implements OnDestr
13
12
  private nzI18nService;
14
13
  private yelonLocaleService;
15
14
  private platform;
16
- private cacheService;
17
15
  protected _defaultLang: string;
18
16
  private bis;
19
17
  private destroy$;
20
- constructor(http: _HttpClient, settings: SettingsService, nzI18nService: NzI18nService, yelonLocaleService: YelonLocaleService, platform: Platform, cogSrv: YunzaiConfigService, cacheService: CacheService);
18
+ constructor(http: _HttpClient, settings: SettingsService, nzI18nService: NzI18nService, yelonLocaleService: YelonLocaleService, platform: Platform, cogSrv: YunzaiConfigService);
21
19
  private getDefaultLang;
22
20
  loadLangData(lang: string): Observable<NzSafeAny>;
23
21
  use(lang: string, data: Record<string, unknown>): void;
@@ -13,9 +13,10 @@ import * as i11 from "@angular/common/http";
13
13
  import * as i12 from "@angular/common";
14
14
  import * as i13 from "@angular/forms";
15
15
  import * as i14 from "@angular/router";
16
- import * as i15 from "@yelon/bcs";
16
+ import * as i15 from "@yelon/bcs/yunzai-shared-yelon";
17
+ import * as i16 from "@yelon/bcs/yunzai-shared-zorro";
17
18
  export declare class YunzaiLayoutModule {
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<YunzaiLayoutModule, never>;
19
- static ɵmod: i0.ɵɵNgModuleDeclaration<YunzaiLayoutModule, [typeof i1.YunzaiLayoutBasicComponent, typeof i2.YunzaiClearStorageComponent, typeof i3.YunzaiFullScreenComponent, typeof i4.YunzaiI18NComponent, typeof i5.YunzaiNotifyComponent, typeof i6.YunzaiThemBtnComponent, typeof i7.YunzaiUserComponent, typeof i8.LayoutNavApplicationComponent, typeof i9.LayoutNavGroupComponent, typeof i10.LayoutNavTileComponent], [typeof i11.HttpClientModule, typeof i12.CommonModule, typeof i13.FormsModule, typeof i14.RouterModule, typeof i13.ReactiveFormsModule, typeof i15.YunzaiSharedYelonModule, typeof i15.YunzaiSharedZorroModule], [typeof i1.YunzaiLayoutBasicComponent, typeof i2.YunzaiClearStorageComponent, typeof i3.YunzaiFullScreenComponent, typeof i4.YunzaiI18NComponent, typeof i5.YunzaiNotifyComponent, typeof i6.YunzaiThemBtnComponent, typeof i7.YunzaiUserComponent, typeof i8.LayoutNavApplicationComponent, typeof i9.LayoutNavGroupComponent, typeof i10.LayoutNavTileComponent]>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<YunzaiLayoutModule, [typeof i1.YunzaiLayoutBasicComponent, typeof i2.YunzaiClearStorageComponent, typeof i3.YunzaiFullScreenComponent, typeof i4.YunzaiI18NComponent, typeof i5.YunzaiNotifyComponent, typeof i6.YunzaiThemBtnComponent, typeof i7.YunzaiUserComponent, typeof i8.LayoutNavApplicationComponent, typeof i9.LayoutNavGroupComponent, typeof i10.LayoutNavTileComponent], [typeof i11.HttpClientModule, typeof i12.CommonModule, typeof i13.FormsModule, typeof i14.RouterModule, typeof i13.ReactiveFormsModule, typeof i15.YunzaiSharedYelonModule, typeof i16.YunzaiSharedZorroModule], [typeof i1.YunzaiLayoutBasicComponent, typeof i2.YunzaiClearStorageComponent, typeof i3.YunzaiFullScreenComponent, typeof i4.YunzaiI18NComponent, typeof i5.YunzaiNotifyComponent, typeof i6.YunzaiThemBtnComponent, typeof i7.YunzaiUserComponent, typeof i8.LayoutNavApplicationComponent, typeof i9.LayoutNavGroupComponent, typeof i10.LayoutNavTileComponent]>;
20
21
  static ɵinj: i0.ɵɵInjectorDeclaration<YunzaiLayoutModule>;
21
22
  }
@@ -1,14 +1,13 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ACLService } from '@yelon/acl';
3
- import { CacheService, YunzaiMenu } from '@yelon/cache';
4
3
  import { MenuService, SettingsService, TitleService } from '@yelon/theme';
5
- import { YunzaiConfigService } from '@yelon/util';
4
+ import { YunzaiMenu, YunzaiConfigService } from '@yelon/util';
6
5
  import { NzSafeAny } from 'ng-zorro-antd/core/types';
7
6
  import { NzIconService } from 'ng-zorro-antd/icon';
8
7
  import { YunzaiAuthService } from './yunzai-auth.service';
9
8
  import { YunzaiI18NService } from './yunzai-i18n.service';
10
9
  import * as i0 from "@angular/core";
11
- declare class YunzaiStartupService {
10
+ export declare class YunzaiStartupService {
12
11
  private menuService;
13
12
  private i18n;
14
13
  private win;
@@ -16,22 +15,20 @@ declare class YunzaiStartupService {
16
15
  private aclService;
17
16
  private titleService;
18
17
  private yzAuthService;
19
- private cacheService;
20
18
  private configService;
21
19
  private config;
22
- constructor(iconSrv: NzIconService, menuService: MenuService, i18n: YunzaiI18NService, win: NzSafeAny, settingService: SettingsService, aclService: ACLService, titleService: TitleService, yzAuthService: YunzaiAuthService, cacheService: CacheService, configService: YunzaiConfigService);
20
+ constructor(iconSrv: NzIconService, menuService: MenuService, i18n: YunzaiI18NService, win: NzSafeAny, settingService: SettingsService, aclService: ACLService, titleService: TitleService, yzAuthService: YunzaiAuthService, configService: YunzaiConfigService);
23
21
  load(): Observable<void>;
24
22
  systemInit(): void;
25
23
  static ɵfac: i0.ɵɵFactoryDeclaration<YunzaiStartupService, never>;
26
24
  static ɵprov: i0.ɵɵInjectableDeclaration<YunzaiStartupService>;
27
25
  }
28
- declare function mapYzSideToYelonMenu(menus: YunzaiMenu[]): void;
29
- declare function generateAbility(menus: YunzaiMenu[], abilities: string[], prefix: string): void;
30
- declare function YunzaiStartupServiceFactory(startupService: YunzaiStartupService): () => Observable<void>;
31
- declare const YUNZAI_APPINIT_PROVIDES: (typeof YunzaiStartupService | {
26
+ export declare function mapYzSideToYelonMenu(menus: YunzaiMenu[]): void;
27
+ export declare function generateAbility(menus: YunzaiMenu[], abilities: string[], prefix: string): void;
28
+ export declare function YunzaiStartupServiceFactory(startupService: YunzaiStartupService): () => Observable<void>;
29
+ export declare const YUNZAI_APPINIT_PROVIDES: (typeof YunzaiStartupService | {
32
30
  provide: import("@angular/core").InjectionToken<readonly (() => void | Observable<unknown> | Promise<unknown>)[]>;
33
31
  useFactory: typeof YunzaiStartupServiceFactory;
34
32
  deps: (typeof YunzaiStartupService)[];
35
33
  multi: boolean;
36
34
  })[];
37
- export { YunzaiStartupService as YzStartupService, YunzaiStartupService, YunzaiStartupServiceFactory as YzStartupServiceFactory, YunzaiStartupServiceFactory, YUNZAI_APPINIT_PROVIDES as YZ_APPINIT_PROVIDES, YUNZAI_APPINIT_PROVIDES, mapYzSideToYelonMenu, generateAbility };
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@yelon/bis",
3
- "version": "16.0.1",
3
+ "version": "16.0.3",
4
4
  "author": "devcui<devcui@outlook.com>",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
7
  "ng-zorro-antd": "^16.0.0",
8
- "@yelon/acl": "^16.0.1",
9
- "@yelon/auth": "^16.0.1",
10
- "@yelon/theme": "^16.0.1",
11
- "@yelon/mock": "^16.0.1",
12
- "@yelon/cache": "^16.0.1",
13
- "@yelon/chart": "^16.0.1",
14
- "@yelon/form": "^16.0.1",
15
- "@yelon/testing": "^16.0.1",
16
- "@yelon/util": "^16.0.1",
17
- "@yelon/bcs": "^16.0.1",
8
+ "@yelon/acl": "^16.0.3",
9
+ "@yelon/auth": "^16.0.3",
10
+ "@yelon/theme": "^16.0.3",
11
+ "@yelon/mock": "^16.0.3",
12
+ "@yelon/cache": "^16.0.3",
13
+ "@yelon/chart": "^16.0.3",
14
+ "@yelon/form": "^16.0.3",
15
+ "@yelon/testing": "^16.0.3",
16
+ "@yelon/util": "^16.0.3",
17
+ "@yelon/bcs": "^16.0.3",
18
18
  "tslib": "^2.3.0"
19
19
  },
20
20
  "module": "fesm2022/bis.mjs",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9iaXMvbGF5b3V0L2xheW91dC1uYXYvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFN1YmplY3QgfSBmcm9tICdyeGpzJztcblxuaW1wb3J0IHsgWXVuemFpTmF2VG9waWMgfSBmcm9tICdAeWVsb24vY2FjaGUnO1xuXG5leHBvcnQgaW50ZXJmYWNlIExheW91dE5hdkFwcGxpY2F0aW9uU3RhdGUge1xuICBhY3RpdmU6IGJvb2xlYW47XG4gIHR5cGU6ICdhbGwnIHwgJ21pbmUnIHwgJ290aGVyJztcbiAgdG9waWM/OiBZdW56YWlOYXZUb3BpYztcbiAgdG9waWNzOiBZdW56YWlOYXZUb3BpY1tdO1xuICBsaXN0OiBZdW56YWlOYXZUb3BpY1tdO1xuICBzZWFyY2g6IHN0cmluZyB8IG51bGw7XG4gIGRlc3Ryb3kkOiBTdWJqZWN0PGFueT47XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgTGF5b3V0TmF2R3JvdXBTdGF0ZSB7XG4gIHRvcGljczogWXVuemFpTmF2VG9waWNbXTtcbiAgZGVzdHJveSQ6IFN1YmplY3Q8YW55Pjtcbn1cbiJdfQ==
@@ -1,15 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { YunzaiNavTopic } from '@yelon/cache';
3
- export interface LayoutNavApplicationState {
4
- active: boolean;
5
- type: 'all' | 'mine' | 'other';
6
- topic?: YunzaiNavTopic;
7
- topics: YunzaiNavTopic[];
8
- list: YunzaiNavTopic[];
9
- search: string | null;
10
- destroy$: Subject<any>;
11
- }
12
- export interface LayoutNavGroupState {
13
- topics: YunzaiNavTopic[];
14
- destroy$: Subject<any>;
15
- }