@delon/theme 19.1.0 → 20.0.0-beta.0

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 (110) hide show
  1. package/compact.css +994 -245
  2. package/compact.min.css +1 -1
  3. package/dark.css +991 -242
  4. package/dark.min.css +1 -1
  5. package/default.css +994 -245
  6. package/default.min.css +1 -1
  7. package/fesm2022/layout-default.mjs +52 -66
  8. package/fesm2022/layout-default.mjs.map +1 -1
  9. package/fesm2022/setting-drawer.mjs +14 -22
  10. package/fesm2022/setting-drawer.mjs.map +1 -1
  11. package/fesm2022/theme-btn.mjs +10 -19
  12. package/fesm2022/theme-btn.mjs.map +1 -1
  13. package/fesm2022/theme.mjs +112 -94
  14. package/fesm2022/theme.mjs.map +1 -1
  15. package/index.d.ts +1689 -3
  16. package/layout-blank/index.d.ts +2 -5
  17. package/layout-default/index.d.ts +245 -5
  18. package/layout-default/style/_header.less +3 -3
  19. package/layout-default/style/_layout.less +1 -1
  20. package/layout-default/style/fix/_sidebar-nav.less +21 -6
  21. package/layout-default/style/theme-dark.less +1 -0
  22. package/layout-default/style/theme-default.less +1 -0
  23. package/layout-default/style/widgets/_app-icons.less +2 -2
  24. package/package.json +6 -6
  25. package/setting-drawer/index.d.ts +65 -5
  26. package/setting-drawer/style/index.less +2 -2
  27. package/system/antd/_drawer.less +2 -2
  28. package/system/antd/_modal.less +3 -3
  29. package/system/antd/_table.less +2 -2
  30. package/system/antd/_tag.less +1 -1
  31. package/system/ng/_preserve-white-spaces.less +8 -8
  32. package/system/utils/_code.less +2 -2
  33. package/system/utils/_scrollbar.less +1 -1
  34. package/system/widgets/_header-dropdown.less +1 -1
  35. package/theme-btn/index.d.ts +42 -5
  36. package/variable.css +994 -245
  37. package/variable.min.css +1 -1
  38. package/layout-blank/public_api.d.ts +0 -2
  39. package/layout-default/layout-header-item-trigger.directive.d.ts +0 -5
  40. package/layout-default/layout-header-item.component.d.ts +0 -10
  41. package/layout-default/layout-header.component.d.ts +0 -31
  42. package/layout-default/layout-nav.component.d.ts +0 -61
  43. package/layout-default/layout-top-menu-item.d.ts +0 -9
  44. package/layout-default/layout.component.d.ts +0 -39
  45. package/layout-default/layout.module.d.ts +0 -19
  46. package/layout-default/layout.service.d.ts +0 -29
  47. package/layout-default/public_api.d.ts +0 -9
  48. package/layout-default/types.d.ts +0 -60
  49. package/public_api.d.ts +0 -8
  50. package/setting-drawer/public_api.d.ts +0 -3
  51. package/setting-drawer/setting-drawer-item.component.d.ts +0 -11
  52. package/setting-drawer/setting-drawer.component.d.ts +0 -48
  53. package/setting-drawer/setting-drawer.module.d.ts +0 -8
  54. package/setting-drawer/setting-drawer.types.d.ts +0 -7
  55. package/src/config.d.ts +0 -63
  56. package/src/locale/index.d.ts +0 -1
  57. package/src/locale/languages/ar-SA.d.ts +0 -3
  58. package/src/locale/languages/el-GR.d.ts +0 -3
  59. package/src/locale/languages/en-US.d.ts +0 -3
  60. package/src/locale/languages/es-ES.d.ts +0 -3
  61. package/src/locale/languages/fr-FR.d.ts +0 -3
  62. package/src/locale/languages/hr-HR.d.ts +0 -3
  63. package/src/locale/languages/it-IT.d.ts +0 -3
  64. package/src/locale/languages/ja-JP.d.ts +0 -3
  65. package/src/locale/languages/ko-KR.d.ts +0 -3
  66. package/src/locale/languages/pl-PL.d.ts +0 -3
  67. package/src/locale/languages/sl-SI.d.ts +0 -3
  68. package/src/locale/languages/tr-TR.d.ts +0 -3
  69. package/src/locale/languages/vi-VI.d.ts +0 -3
  70. package/src/locale/languages/zh-CN.d.ts +0 -3
  71. package/src/locale/languages/zh-TW.d.ts +0 -3
  72. package/src/locale/locale.module.d.ts +0 -6
  73. package/src/locale/locale.service.d.ts +0 -17
  74. package/src/locale/locale.tokens.d.ts +0 -3
  75. package/src/locale/locale.types.d.ts +0 -93
  76. package/src/locale/public_api.d.ts +0 -19
  77. package/src/pipes/date/date.pipe.d.ts +0 -9
  78. package/src/pipes/index.d.ts +0 -5
  79. package/src/pipes/keys/keys.pipe.d.ts +0 -11
  80. package/src/pipes/safe/html.pipe.d.ts +0 -9
  81. package/src/pipes/safe/url.pipe.d.ts +0 -9
  82. package/src/pipes/yn/yn.pipe.d.ts +0 -16
  83. package/src/provide.d.ts +0 -23
  84. package/src/router/optional-preloader.d.ts +0 -20
  85. package/src/services/drawer/drawer.helper.d.ts +0 -71
  86. package/src/services/http/http.client.d.ts +0 -570
  87. package/src/services/http/http.decorator.d.ts +0 -108
  88. package/src/services/http/http.token.d.ts +0 -37
  89. package/src/services/http/index.d.ts +0 -3
  90. package/src/services/i18n/i18n-url.guard.d.ts +0 -36
  91. package/src/services/i18n/i18n.d.ts +0 -90
  92. package/src/services/i18n/i18n.pipe.d.ts +0 -8
  93. package/src/services/i18n/index.d.ts +0 -3
  94. package/src/services/index.d.ts +0 -10
  95. package/src/services/menu/index.d.ts +0 -2
  96. package/src/services/menu/interface.d.ts +0 -79
  97. package/src/services/menu/menu.service.d.ts +0 -114
  98. package/src/services/modal/modal.helper.d.ts +0 -78
  99. package/src/services/preloader/preloader.d.ts +0 -1
  100. package/src/services/responsive/responsive.d.ts +0 -12
  101. package/src/services/rtl/rtl.service.d.ts +0 -48
  102. package/src/services/settings/index.d.ts +0 -2
  103. package/src/services/settings/settings.service.d.ts +0 -40
  104. package/src/services/settings/types.d.ts +0 -35
  105. package/src/services/title/title.service.d.ts +0 -72
  106. package/src/theme.module.d.ts +0 -22
  107. package/src/version.d.ts +0 -2
  108. package/theme-btn/public_api.d.ts +0 -2
  109. package/theme-btn/theme-btn.component.d.ts +0 -32
  110. package/theme-btn/theme-btn.module.d.ts +0 -10
@@ -1,37 +0,0 @@
1
- import { HttpContextToken } from '@angular/common/http';
2
- /**
3
- * Whether to customize the handling of exception messages
4
- *
5
- * 是否自定义处理异常消息
6
- *
7
- * @example
8
- * this.http.post(`login`, {
9
- * name: 'cipchk', pwd: '123456'
10
- * }, {
11
- * context: new HttpContext()
12
- * .set(ALLOW_ANONYMOUS, true)
13
- * .set(CUSTOM_ERROR, true)
14
- * }).subscribe({
15
- * next: console.log,
16
- * error: console.log
17
- * });
18
- */
19
- export declare const CUSTOM_ERROR: HttpContextToken<boolean>;
20
- /**
21
- * Whether to ignore API prefixes
22
- *
23
- * 是否忽略API前缀
24
- *
25
- * @example
26
- * // When environment.api.baseUrl set '/api'
27
- *
28
- * this.http.get(`/path`) // Request Url: /api/path
29
- * this.http.get(`/path`, { context: new HttpContext().set(IGNORE_BASE_URL, true) }) // Request Url: /path
30
- */
31
- export declare const IGNORE_BASE_URL: HttpContextToken<boolean>;
32
- /**
33
- * Whether to return raw response body
34
- *
35
- * 是否原样返回请求Body
36
- */
37
- export declare const RAW_BODY: HttpContextToken<boolean>;
@@ -1,3 +0,0 @@
1
- export * from './http.client';
2
- export * from './http.decorator';
3
- export * from './http.token';
@@ -1,36 +0,0 @@
1
- import { ActivatedRouteSnapshot, CanActivateChildFn, CanActivateFn } from '@angular/router';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare class AlainI18NGuardService {
5
- private readonly i18nSrv;
6
- private readonly cogSrv;
7
- process(route: ActivatedRouteSnapshot): Observable<boolean>;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<AlainI18NGuardService, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<AlainI18NGuardService>;
10
- }
11
- /**
12
- * Internationalization guard, automatically recognizes the language in Url and triggers the `ALAIN_I18N_TOKEN.use` method
13
- *
14
- * 国际化守卫,自动识别Url中的语言,并触发 `ALAIN_I18N_TOKEN.use` 方法
15
- *
16
- * ```ts
17
- * data: {
18
- * path: 'home',
19
- * canActivate: [ alainI18nCanActivate ]
20
- * }
21
- * ```
22
- */
23
- export declare const alainI18nCanActivate: CanActivateFn;
24
- /**
25
- * Internationalization guard, automatically recognizes the language in Url and triggers the `ALAIN_I18N_TOKEN.use` method
26
- *
27
- * 国际化守卫,自动识别Url中的语言,并触发 `ALAIN_I18N_TOKEN.use` 方法
28
- *
29
- * ```ts
30
- * data: {
31
- * path: 'home',
32
- * canActivateChild: [ alainI18nCanActivateChild ]
33
- * }
34
- * ```
35
- */
36
- export declare const alainI18nCanActivateChild: CanActivateChildFn;
@@ -1,90 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { BehaviorSubject, Observable } from 'rxjs';
3
- import { AlainConfigService } from '@delon/util/config';
4
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
5
- import * as i0 from "@angular/core";
6
- export interface AlainI18NService {
7
- [key: string]: NzSafeAny;
8
- /**
9
- * Call `use` to trigger change notification
10
- *
11
- * 调用 `use` 触发变更通知
12
- */
13
- readonly change: Observable<string>;
14
- /**
15
- * Get the default language
16
- *
17
- * 获取默认语言
18
- */
19
- readonly defaultLang: string;
20
- /**
21
- * Get current language
22
- *
23
- * 获取当前语言
24
- */
25
- readonly currentLang: string;
26
- /**
27
- * Change language
28
- *
29
- * 变更语言
30
- *
31
- * @param emit 是否触发 `change`,默认:true ; Should be removed, please use `change` event instead.
32
- */
33
- use(lang: string, data?: Record<string, unknown>): void;
34
- /**
35
- * Return to the current language list
36
- *
37
- * 返回当前语言列表
38
- */
39
- getLangs(): NzSafeAny[];
40
- /**
41
- * Translate 翻译
42
- *
43
- * @param params 模板所需要的参数对象
44
- * @param isSafe 是否返回安全字符,自动调用 `bypassSecurityTrustHtml`; Should be removed, If you need SafeHtml support, please use `| html` pipe instead.
45
- */
46
- fanyi(path: string, params?: unknown | unknown[]): string;
47
- }
48
- export declare const ALAIN_I18N_TOKEN: InjectionToken<AlainI18NService>;
49
- export declare abstract class AlainI18nBaseService implements AlainI18NService {
50
- private cog;
51
- protected _change$: BehaviorSubject<string | null>;
52
- protected _currentLang: string;
53
- protected _defaultLang: string;
54
- protected _data: Record<string, string>;
55
- get change(): Observable<string>;
56
- get defaultLang(): string;
57
- get currentLang(): string;
58
- get data(): Record<string, string>;
59
- constructor(cogSrv: AlainConfigService);
60
- /**
61
- * Flattened data source
62
- *
63
- * @example
64
- * {
65
- * "name": "Name",
66
- * "sys": {
67
- * "": "System",
68
- * "title": "Title"
69
- * }
70
- * }
71
- * =>
72
- * {
73
- * "name": "Name",
74
- * "sys": "System",
75
- * "sys.title": "Title"
76
- * }
77
- */
78
- flatData(data: Record<string, unknown>, parentKey: string[]): Record<string, string>;
79
- abstract use(lang: string, data?: Record<string, unknown>): void;
80
- abstract getLangs(): NzSafeAny[];
81
- fanyi(path: string, params?: unknown | unknown[]): string;
82
- static ɵfac: i0.ɵɵFactoryDeclaration<AlainI18nBaseService, never>;
83
- static ɵprov: i0.ɵɵInjectableDeclaration<AlainI18nBaseService>;
84
- }
85
- export declare class AlainI18NServiceFake extends AlainI18nBaseService {
86
- use(lang: string, data: Record<string, unknown>): void;
87
- getLangs(): NzSafeAny[];
88
- static ɵfac: i0.ɵɵFactoryDeclaration<AlainI18NServiceFake, never>;
89
- static ɵprov: i0.ɵɵInjectableDeclaration<AlainI18NServiceFake>;
90
- }
@@ -1,8 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class I18nPipe implements PipeTransform {
4
- private readonly i18n;
5
- transform(key: string, params?: unknown | unknown[]): string;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<I18nPipe, never>;
7
- static ɵpipe: i0.ɵɵPipeDeclaration<I18nPipe, "i18n", true>;
8
- }
@@ -1,3 +0,0 @@
1
- export * from './i18n';
2
- export * from './i18n.pipe';
3
- export * from './i18n-url.guard';
@@ -1,10 +0,0 @@
1
- export * from './preloader/preloader';
2
- export * from './menu/index';
3
- export * from './settings/index';
4
- export * from './responsive/responsive';
5
- export * from './rtl/rtl.service';
6
- export * from './title/title.service';
7
- export * from './i18n/index';
8
- export * from './modal/modal.helper';
9
- export * from './drawer/drawer.helper';
10
- export * from './http/index';
@@ -1,2 +0,0 @@
1
- export * from './interface';
2
- export * from './menu.service';
@@ -1,79 +0,0 @@
1
- import { SafeHtml } from '@angular/platform-browser';
2
- import type { ACLCanType } from '@delon/acl';
3
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
4
- export interface MenuIcon {
5
- /**
6
- * Type for icon
7
- *
8
- * - `img`, `svg` Size uses `14px` width and height
9
- */
10
- type: 'class' | 'icon' | 'iconfont' | 'img' | 'svg';
11
- /** Value for the icon, can be set Class Name, nz-icon of `nzType`, image */
12
- value?: string | SafeHtml;
13
- /** Type of the ant design icon, default: `outline` */
14
- theme?: 'outline' | 'twotone' | 'fill';
15
- /** Rotate icon with animation, default: `false` */
16
- spin?: boolean;
17
- /** Only support the two-tone icon. Specific the primary color */
18
- twoToneColor?: string;
19
- /** Type of the icon from iconfont */
20
- iconfont?: string;
21
- /** Rotate degrees */
22
- rotate?: number;
23
- }
24
- export interface Menu {
25
- [key: string]: NzSafeAny;
26
- /** Text of menu item, can be choose one of `text` or `i18n` (Support HTML) */
27
- text?: string;
28
- /** I18n key of menu item, can be choose one of `text` or `i18n` (Support HTML) */
29
- i18n?: string;
30
- /** Whether to display the group name, default: `true` */
31
- group?: boolean;
32
- /** Routing for the menu item, can be choose one of `link` or `externalLink` */
33
- link?: string;
34
- /** External link for the menu item, can be choose one of `link` or `externalLink` */
35
- externalLink?: string;
36
- /** Specifies `externalLink` where to display the linked URL */
37
- target?: '_blank' | '_self' | '_parent' | '_top';
38
- /** Icon for the menu item, only valid for the first level menu */
39
- icon?: string | MenuIcon | null;
40
- /** Badget for the menu item when `group` is `true` */
41
- badge?: number;
42
- /** Whether to display a red dot instead of `badge` value */
43
- badgeDot?: boolean;
44
- /** Badge [color](https://ng.ant.design/components/badge/en#nz-badge) */
45
- badgeStatus?: 'success' | 'processing' | 'default' | 'error' | 'warning';
46
- /** Maximum count to show in badge, show `${badgeOverflowCount}+` when exceed */
47
- badgeOverflowCount?: number;
48
- /** Whether disable for the menu item */
49
- disabled?: boolean;
50
- /** Whether hidden for the menu item */
51
- hide?: boolean;
52
- /** Whether hide in breadcrumbs, which are valid when the `page-header` component automatically generates breadcrumbs */
53
- hideInBreadcrumb?: boolean;
54
- /** ACL configuration, it's equivalent to `ACLService.can(roleOrAbility: ACLCanType)` parameter value */
55
- acl?: ACLCanType;
56
- /** Whether shortcut menu item */
57
- shortcut?: boolean;
58
- /** Wheter shortcut menu root node */
59
- shortcutRoot?: boolean;
60
- /** Whether to allow reuse, need to cooperate with the `reuse-tab` component */
61
- reuse?: boolean;
62
- /**
63
- * Whether to expand, when `checkStrictly` is valid in `sidebar-nav` component
64
- */
65
- open?: boolean;
66
- /** Unique identifier of the menu item, can be used in `getItem`,` setItem` to update a menu */
67
- key?: string;
68
- /** Children menu of menu item */
69
- children?: Menu[];
70
- }
71
- /** @inner Just only inner type */
72
- export interface MenuInner extends Menu {
73
- _id?: number;
74
- _parent?: Menu | null;
75
- _depth?: number;
76
- _hidden?: boolean;
77
- _selected?: boolean;
78
- _aclResult?: boolean;
79
- }
@@ -1,114 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { Menu } from './interface';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * 菜单服务,[在线文档](https://ng-alain.com/theme/menu)
7
- */
8
- export declare class MenuService implements OnDestroy {
9
- private readonly i18nSrv;
10
- private readonly aclService;
11
- private _change$;
12
- private i18n$?;
13
- private data;
14
- /**
15
- * 是否完全受控菜单打开状态,默认:`false`
16
- */
17
- openStrictly: boolean;
18
- constructor();
19
- get change(): Observable<Menu[]>;
20
- get menus(): Menu[];
21
- /**
22
- * Returns a default menu link
23
- *
24
- * 返回一个默认跳转的菜单链接
25
- */
26
- getDefaultRedirect(opt?: {
27
- redirectUrl?: string;
28
- }): string | null | undefined;
29
- visit<T extends Menu = Menu>(data: T[], callback: (item: T, parentMenum: T | null, depth?: number) => void): void;
30
- visit(data: Menu[], callback: (item: Menu, parentMenum: Menu | null, depth?: number) => void): void;
31
- add(items: Menu[]): void;
32
- private fixItem;
33
- /**
34
- * 重置菜单,可能I18N、用户权限变动时需要调用刷新
35
- */
36
- resume<T extends Menu = Menu>(callback?: (item: T, parentMenum: T | null, depth?: number) => void): void;
37
- resume(callback?: (item: Menu, parentMenum: Menu | null, depth?: number) => void): void;
38
- /**
39
- * 加载快捷菜单,加载位置规则如下:
40
- * 1、统一在下标0的节点下(即【主导航】节点下方)
41
- * 1、若 children 存在 【shortcutRoot: true】则最优先【推荐】这种方式
42
- * 2、否则查找带有【dashboard】字样链接,若存在则在此菜单的下方创建快捷入口
43
- * 3、否则放在0节点位置
44
- */
45
- private loadShortcut;
46
- /**
47
- * 清空菜单
48
- */
49
- clear(): void;
50
- /**
51
- * Use `url` or `key` to find menus
52
- *
53
- * 利用 `url` 或 `key` 查找菜单
54
- */
55
- find(options: {
56
- key?: string | null;
57
- url?: string | null;
58
- recursive?: boolean | null;
59
- /**
60
- * When the callback returns a Boolean type, it means the custom validation result
61
- *
62
- * 当回调返回一个布尔类型时,表示自定义校验结果
63
- */
64
- cb?: ((i: Menu) => boolean | null) | null;
65
- /**
66
- * Use the current menu data by default
67
- *
68
- * 默认使用当前菜单数据
69
- */
70
- data?: Menu[] | null;
71
- /**
72
- * Whether to ignore hide items, default: `false`
73
- *
74
- * 是否忽略隐藏的项,默认:`false`
75
- */
76
- ignoreHide?: boolean;
77
- /**
78
- * Whether to return the last one, default: `false`
79
- *
80
- * 是否返回最后一个,默认:`false`
81
- */
82
- last?: boolean;
83
- }): Menu | null;
84
- /**
85
- * 根据url获取菜单列表
86
- * - 若 `recursive: true` 则会自动向上递归查找
87
- * - 菜单数据源包含 `/ware`,则 `/ware/1` 也视为 `/ware` 项
88
- */
89
- getPathByUrl(url: string, recursive?: boolean): Menu[];
90
- /**
91
- * Get menu based on `key`
92
- */
93
- getItem(key: string): Menu | null;
94
- /**
95
- * Set menu based on `key`
96
- */
97
- setItem(key: string | Menu, value: Menu, options?: {
98
- emit?: boolean;
99
- }): void;
100
- /**
101
- * Open menu based on `key` or menu object
102
- */
103
- open(keyOrItem: string | Menu | null, options?: {
104
- emit?: boolean;
105
- }): void;
106
- openAll(status?: boolean): void;
107
- toggleOpen(keyOrItem: string | Menu | null, options?: {
108
- allStatus?: boolean;
109
- emit?: boolean;
110
- }): void;
111
- ngOnDestroy(): void;
112
- static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, never>;
113
- static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
114
- }
@@ -1,78 +0,0 @@
1
- import { TemplateRef, Type } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
4
- import { ModalOptions } from 'ng-zorro-antd/modal';
5
- import * as i0 from "@angular/core";
6
- export interface ModalHelperOptions {
7
- /** 大小;例如:lg、600、80%,默认:`lg` */
8
- size?: 'sm' | 'md' | 'lg' | 'xl' | '' | number | string;
9
- /** 对话框 [ModalOptions](https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/modal/modal-types.ts) 参数 */
10
- modalOptions?: ModalOptions;
11
- /** 是否精准(默认:`true`),若返回值非空值(`null`或`undefined`)视为成功,否则视为错误 */
12
- exact?: boolean;
13
- /** 是否包裹标签页,修复模态包含标签间距问题 */
14
- includeTabs?: boolean;
15
- /**
16
- * 是否支持拖动,默认是通过标题来触发
17
- */
18
- drag?: ModalHelperDragOptions | boolean;
19
- /**
20
- * 是否强制使用 `nzData` 传递参数,若为 `false` 表示参数会直接映射到组件实例中,其他值只能通过 `NZ_MODAL_DATA` 的方式来获取参数,默认:`false`
21
- */
22
- useNzData?: boolean;
23
- /**
24
- * 设置焦点按钮
25
- */
26
- focus?: 'ok' | 'cancel';
27
- }
28
- export interface ModalHelperDragOptions {
29
- /**
30
- * 指定拖地区域的类名,若指定为 `null` 时表示整个对话框,默认:`.modal-header, .ant-modal-title`
31
- */
32
- handleCls?: string | null;
33
- }
34
- /**
35
- * 对话框辅助类
36
- */
37
- export declare class ModalHelper {
38
- private readonly srv;
39
- private readonly drag;
40
- private readonly doc;
41
- private createDragRef;
42
- /**
43
- * 构建一个对话框
44
- *
45
- * @param comp 组件
46
- * @param params 组件参数
47
- * @param options 额外参数
48
- *
49
- * @example
50
- * this.modalHelper.create(FormEditComponent, { i }).subscribe(res => this.load());
51
- * // 对于组件的成功&关闭的处理说明
52
- * // 成功,其中 `nzModalRef` 指目标组件在构造函数 `NzModalRef` 变量名
53
- * this.nzModalRef.close(data);
54
- * this.nzModalRef.close();
55
- * // 关闭
56
- * this.nzModalRef.destroy();
57
- */
58
- create(comp?: TemplateRef<NzSafeAny> | Type<NzSafeAny> | 'confirm' | 'info' | 'success' | 'error' | 'warning', params?: NzSafeAny | ModalHelperOptions | null, options?: ModalHelperOptions): Observable<NzSafeAny>;
59
- /**
60
- * 构建静态框,点击蒙层不允许关闭
61
- *
62
- * @param comp 组件
63
- * @param params 组件参数
64
- * @param options 额外参数
65
- *
66
- * @example
67
- * this.modalHelper.open(FormEditComponent, { i }).subscribe(res => this.load());
68
- * // 对于组件的成功&关闭的处理说明
69
- * // 成功,其中 `nzModalRef` 指目标组件在构造函数 `NzModalRef` 变量名
70
- * this.nzModalRef.close(data);
71
- * this.nzModalRef.close();
72
- * // 关闭
73
- * this.nzModalRef.destroy();
74
- */
75
- createStatic(comp: TemplateRef<NzSafeAny> | Type<NzSafeAny>, params?: NzSafeAny, options?: ModalHelperOptions): Observable<NzSafeAny>;
76
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalHelper, never>;
77
- static ɵprov: i0.ɵɵInjectableDeclaration<ModalHelper>;
78
- }
@@ -1 +0,0 @@
1
- export declare function stepPreloader(): () => void;
@@ -1,12 +0,0 @@
1
- import { AlainConfigService } from '@delon/util/config';
2
- import * as i0 from "@angular/core";
3
- export declare const REP_MAX = 6;
4
- export declare const SPAN_MAX = 24;
5
- export type REP_TYPE = 1 | 2 | 3 | 4 | 5 | 6;
6
- export declare class ResponsiveService {
7
- private cog;
8
- constructor(cogSrv: AlainConfigService);
9
- genCls(count: number, defaultCol?: number): string[];
10
- static ɵfac: i0.ɵɵFactoryDeclaration<ResponsiveService, never>;
11
- static ɵprov: i0.ɵɵInjectableDeclaration<ResponsiveService>;
12
- }
@@ -1,48 +0,0 @@
1
- import { Direction } from '@angular/cdk/bidi';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare const HTML_DIR = "dir";
5
- export declare const RTL_DIRECTION = "direction";
6
- export declare const RTL_NZ_COMPONENTS: string[];
7
- export declare const RTL_DELON_COMPONENTS: string[];
8
- export declare const LTR = "ltr";
9
- export declare const RTL = "rtl";
10
- export declare class RTLService {
11
- private readonly d;
12
- private readonly nz;
13
- private readonly delon;
14
- private readonly platform;
15
- private readonly doc;
16
- private readonly srv;
17
- private _dir;
18
- /**
19
- * Get or Set the current text direction
20
- *
21
- * 获取或设置当前文字方向
22
- */
23
- get dir(): Direction;
24
- set dir(value: Direction);
25
- /**
26
- * Get the next text direction
27
- *
28
- * 获取下一次文字方向
29
- */
30
- get nextDir(): Direction;
31
- /**
32
- * Subscription change notification
33
- *
34
- * 订阅变更通知
35
- */
36
- get change(): Observable<Direction>;
37
- constructor();
38
- /**
39
- * Toggle text direction
40
- *
41
- * 切换文字方向
42
- */
43
- toggle(): void;
44
- private updateHtml;
45
- private updateLibConfig;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<RTLService, never>;
47
- static ɵprov: i0.ɵɵInjectableDeclaration<RTLService>;
48
- }
@@ -1,2 +0,0 @@
1
- export * from './types';
2
- export * from './settings.service';
@@ -1,40 +0,0 @@
1
- import { InjectionToken, Provider } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
4
- import { App, Layout, SettingsNotify, User } from './types';
5
- import * as i0 from "@angular/core";
6
- export interface SettingsKeys {
7
- /** Layout data specifies the stored key, default: `layout` */
8
- layout: string;
9
- /** User data specifies the stored key, default: `user` */
10
- user: string;
11
- /** App data specifies the stored key, default: `app` */
12
- app: string;
13
- }
14
- export declare const ALAIN_SETTING_KEYS: InjectionToken<SettingsKeys>;
15
- export declare const ALAIN_SETTING_DEFAULT: Provider;
16
- export declare class SettingsService<L extends Layout = Layout, U extends User = User, A extends App = App> {
17
- private readonly KEYS;
18
- private readonly platform;
19
- private notify$;
20
- private _app;
21
- private _user;
22
- private _layout;
23
- getData(key: string): NzSafeAny;
24
- setData(key: string, value: NzSafeAny): void;
25
- get layout(): L;
26
- get app(): A;
27
- get user(): U;
28
- get notify(): Observable<SettingsNotify>;
29
- setLayout<T extends Layout = Layout>(name: T, value?: NzSafeAny): boolean;
30
- setLayout(name: string | L, value?: NzSafeAny): boolean;
31
- getLayout<T>(): T;
32
- setApp<T extends App = App>(value: T): void;
33
- setApp(value: A): void;
34
- getApp<T>(): T;
35
- setUser<T extends User = User>(value: T): void;
36
- setUser(value: U): void;
37
- getUser<T>(): T;
38
- static ɵfac: i0.ɵɵFactoryDeclaration<SettingsService<any, any, any>, never>;
39
- static ɵprov: i0.ɵɵInjectableDeclaration<SettingsService<any, any, any>>;
40
- }
@@ -1,35 +0,0 @@
1
- import { Direction } from '@angular/cdk/bidi';
2
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
3
- export interface App {
4
- [key: string]: NzSafeAny;
5
- /** Name for app */
6
- name?: string;
7
- /** Description for app */
8
- description?: string;
9
- }
10
- export interface User {
11
- [key: string]: NzSafeAny;
12
- /** Name for current user */
13
- name?: string;
14
- /** Avatar for current user */
15
- avatar?: string;
16
- /** Email for current user */
17
- email?: string;
18
- }
19
- export interface Layout {
20
- [key: string]: NzSafeAny;
21
- /** Whether to fold menu */
22
- collapsed: boolean;
23
- /** Current language */
24
- lang: string;
25
- /** Color weak */
26
- colorWeak: boolean;
27
- /** Direction of the text */
28
- direction: Direction;
29
- }
30
- export interface SettingsNotify {
31
- type: 'layout' | 'app' | 'user';
32
- /** Update `key` name, limited `layout` type */
33
- name?: string;
34
- value: NzSafeAny;
35
- }