@delon/abc 19.2.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 (239) hide show
  1. package/auto-focus/index.d.ts +19 -2
  2. package/cell/index.d.ts +316 -6
  3. package/count-down/index.d.ts +26 -5
  4. package/date-picker/index.d.ts +51 -5
  5. package/down-file/index.d.ts +34 -5
  6. package/ellipsis/index.d.ts +55 -5
  7. package/error-collect/index.d.ts +35 -5
  8. package/exception/index.d.ts +45 -5
  9. package/fesm2022/auto-focus.mjs +7 -7
  10. package/fesm2022/cell.mjs +14 -15
  11. package/fesm2022/cell.mjs.map +1 -1
  12. package/fesm2022/chart-observer-size.mjs +11 -11
  13. package/fesm2022/count-down.mjs +8 -9
  14. package/fesm2022/count-down.mjs.map +1 -1
  15. package/fesm2022/date-picker.mjs +16 -15
  16. package/fesm2022/date-picker.mjs.map +1 -1
  17. package/fesm2022/down-file.mjs +8 -8
  18. package/fesm2022/ellipsis.mjs +9 -9
  19. package/fesm2022/ellipsis.mjs.map +1 -1
  20. package/fesm2022/error-collect.mjs +15 -15
  21. package/fesm2022/error-collect.mjs.map +1 -1
  22. package/fesm2022/exception.mjs +94 -78
  23. package/fesm2022/exception.mjs.map +1 -1
  24. package/fesm2022/footer-toolbar.mjs +44 -22
  25. package/fesm2022/footer-toolbar.mjs.map +1 -1
  26. package/fesm2022/full-content.mjs +25 -38
  27. package/fesm2022/full-content.mjs.map +1 -1
  28. package/fesm2022/global-footer.mjs +79 -60
  29. package/fesm2022/global-footer.mjs.map +1 -1
  30. package/fesm2022/hotkey.mjs +8 -8
  31. package/fesm2022/loading.mjs +12 -12
  32. package/fesm2022/loading.mjs.map +1 -1
  33. package/fesm2022/lodop.mjs +12 -11
  34. package/fesm2022/lodop.mjs.map +1 -1
  35. package/fesm2022/media.mjs +12 -13
  36. package/fesm2022/media.mjs.map +1 -1
  37. package/fesm2022/notice-icon.mjs +19 -29
  38. package/fesm2022/notice-icon.mjs.map +1 -1
  39. package/fesm2022/onboarding.mjs +14 -14
  40. package/fesm2022/onboarding.mjs.map +1 -1
  41. package/fesm2022/page-header.mjs +22 -27
  42. package/fesm2022/page-header.mjs.map +1 -1
  43. package/fesm2022/pdf.mjs +13 -13
  44. package/fesm2022/pdf.mjs.map +1 -1
  45. package/fesm2022/quick-menu.mjs +9 -9
  46. package/fesm2022/quick-menu.mjs.map +1 -1
  47. package/fesm2022/reuse-tab.mjs +32 -38
  48. package/fesm2022/reuse-tab.mjs.map +1 -1
  49. package/fesm2022/se.mjs +20 -21
  50. package/fesm2022/se.mjs.map +1 -1
  51. package/fesm2022/sg.mjs +17 -18
  52. package/fesm2022/sg.mjs.map +1 -1
  53. package/fesm2022/st.mjs +73 -84
  54. package/fesm2022/st.mjs.map +1 -1
  55. package/fesm2022/sv.mjs +23 -25
  56. package/fesm2022/sv.mjs.map +1 -1
  57. package/fesm2022/tag-select.mjs +13 -29
  58. package/fesm2022/tag-select.mjs.map +1 -1
  59. package/fesm2022/xlsx.mjs +16 -15
  60. package/fesm2022/xlsx.mjs.map +1 -1
  61. package/fesm2022/zip.mjs +8 -7
  62. package/fesm2022/zip.mjs.map +1 -1
  63. package/footer-toolbar/index.d.ts +23 -5
  64. package/full-content/index.d.ts +55 -5
  65. package/global-footer/index.d.ts +44 -5
  66. package/hotkey/index.d.ts +25 -5
  67. package/index.d.ts +2 -5
  68. package/index.less +0 -2
  69. package/loading/index.d.ts +93 -5
  70. package/lodop/index.d.ts +277 -5
  71. package/media/index.d.ts +61 -5
  72. package/notice-icon/index.d.ts +90 -5
  73. package/observers/index.d.ts +34 -5
  74. package/onboarding/index.d.ts +212 -5
  75. package/package.json +5 -13
  76. package/page-header/index.d.ts +83 -5
  77. package/pdf/index.d.ts +142 -5
  78. package/quick-menu/index.d.ts +38 -5
  79. package/reuse-tab/index.d.ts +512 -3
  80. package/se/index.d.ts +129 -5
  81. package/sg/index.d.ts +44 -5
  82. package/st/index.d.ts +1708 -3
  83. package/sv/index.d.ts +96 -5
  84. package/tag-select/index.d.ts +27 -5
  85. package/theme-dark.less +0 -4
  86. package/theme-default.less +0 -8
  87. package/xlsx/index.d.ts +71 -5
  88. package/zip/index.d.ts +65 -5
  89. package/auto-focus/auto-focus.directive.d.ts +0 -10
  90. package/auto-focus/auto-focus.module.d.ts +0 -7
  91. package/avatar-list/avatar-list-item.component.d.ts +0 -9
  92. package/avatar-list/avatar-list.component.d.ts +0 -29
  93. package/avatar-list/avatar-list.module.d.ts +0 -14
  94. package/avatar-list/index.d.ts +0 -5
  95. package/avatar-list/public_api.d.ts +0 -3
  96. package/avatar-list/style/index.less +0 -53
  97. package/avatar-list/style/rtl.less +0 -3
  98. package/cell/cell-host.directive.d.ts +0 -10
  99. package/cell/cell.component.d.ts +0 -30
  100. package/cell/cell.module.d.ts +0 -17
  101. package/cell/cell.service.d.ts +0 -19
  102. package/cell/cell.types.d.ts +0 -234
  103. package/cell/provide.d.ts +0 -10
  104. package/count-down/count-down.component.d.ts +0 -15
  105. package/count-down/count-down.module.d.ts +0 -9
  106. package/count-down/public_api.d.ts +0 -2
  107. package/date-picker/date-picker.module.d.ts +0 -11
  108. package/date-picker/public_api.d.ts +0 -3
  109. package/date-picker/range-shortcut.component.d.ts +0 -10
  110. package/date-picker/range.directive.d.ts +0 -30
  111. package/down-file/down-file.directive.d.ts +0 -23
  112. package/down-file/down-file.module.d.ts +0 -9
  113. package/down-file/public_api.d.ts +0 -2
  114. package/ellipsis/ellipsis.component.d.ts +0 -43
  115. package/ellipsis/ellipsis.module.d.ts +0 -10
  116. package/ellipsis/public_api.d.ts +0 -2
  117. package/error-collect/error-collect.component.d.ts +0 -23
  118. package/error-collect/error-collect.module.d.ts +0 -9
  119. package/error-collect/public_api.d.ts +0 -2
  120. package/exception/exception.component.d.ts +0 -36
  121. package/exception/exception.module.d.ts +0 -12
  122. package/exception/public_api.d.ts +0 -2
  123. package/fesm2022/avatar-list.mjs +0 -132
  124. package/fesm2022/avatar-list.mjs.map +0 -1
  125. package/fesm2022/result.mjs +0 -84
  126. package/fesm2022/result.mjs.map +0 -1
  127. package/footer-toolbar/footer-toolbar.component.d.ts +0 -14
  128. package/footer-toolbar/footer-toolbar.module.d.ts +0 -10
  129. package/footer-toolbar/public_api.d.ts +0 -2
  130. package/full-content/full-content-toggle.directive.d.ts +0 -7
  131. package/full-content/full-content.component.d.ts +0 -32
  132. package/full-content/full-content.module.d.ts +0 -9
  133. package/full-content/full-content.service.d.ts +0 -10
  134. package/full-content/public_api.d.ts +0 -4
  135. package/global-footer/global-footer-item.component.d.ts +0 -10
  136. package/global-footer/global-footer.component.d.ts +0 -22
  137. package/global-footer/global-footer.module.d.ts +0 -10
  138. package/global-footer/global-footer.types.d.ts +0 -7
  139. package/global-footer/public_api.d.ts +0 -4
  140. package/hotkey/hotkey.directive.d.ts +0 -16
  141. package/hotkey/hotkey.module.d.ts +0 -7
  142. package/hotkey/public_api.d.ts +0 -2
  143. package/loading/loading.component.d.ts +0 -11
  144. package/loading/loading.module.d.ts +0 -12
  145. package/loading/loading.service.d.ts +0 -34
  146. package/loading/loading.types.d.ts +0 -35
  147. package/loading/public_api.d.ts +0 -4
  148. package/lodop/lodop.module.d.ts +0 -6
  149. package/lodop/lodop.service.d.ts +0 -74
  150. package/lodop/lodop.types.d.ts +0 -193
  151. package/lodop/public_api.d.ts +0 -3
  152. package/media/media.component.d.ts +0 -33
  153. package/media/media.module.d.ts +0 -8
  154. package/media/media.service.d.ts +0 -17
  155. package/media/public_api.d.ts +0 -3
  156. package/notice-icon/notice-icon-tab.component.d.ts +0 -13
  157. package/notice-icon/notice-icon.component.d.ts +0 -25
  158. package/notice-icon/notice-icon.module.d.ts +0 -18
  159. package/notice-icon/notice-icon.types.d.ts +0 -36
  160. package/notice-icon/public_api.d.ts +0 -4
  161. package/observers/observer-size.d.ts +0 -31
  162. package/observers/public-api.d.ts +0 -1
  163. package/onboarding/onboarding.component.d.ts +0 -35
  164. package/onboarding/onboarding.module.d.ts +0 -13
  165. package/onboarding/onboarding.service.d.ts +0 -58
  166. package/onboarding/onboarding.storage.d.ts +0 -11
  167. package/onboarding/onboarding.types.d.ts +0 -95
  168. package/onboarding/public_api.d.ts +0 -5
  169. package/page-header/page-header.component.d.ts +0 -70
  170. package/page-header/page-header.module.d.ts +0 -14
  171. package/page-header/public_api.d.ts +0 -2
  172. package/pdf/pdf.component.d.ts +0 -101
  173. package/pdf/pdf.config.d.ts +0 -2
  174. package/pdf/pdf.module.d.ts +0 -9
  175. package/pdf/pdf.types.d.ts +0 -29
  176. package/pdf/public_api.d.ts +0 -4
  177. package/public_api.d.ts +0 -2
  178. package/quick-menu/public_api.d.ts +0 -2
  179. package/quick-menu/quick-menu.component.d.ts +0 -26
  180. package/quick-menu/quick-menu.module.d.ts +0 -10
  181. package/result/index.d.ts +0 -5
  182. package/result/public_api.d.ts +0 -2
  183. package/result/result.component.d.ts +0 -21
  184. package/result/result.module.d.ts +0 -13
  185. package/result/style/index.less +0 -66
  186. package/result/style/rtl.less +0 -3
  187. package/reuse-tab/lifecycle_hooks.d.ts +0 -16
  188. package/reuse-tab/provide.d.ts +0 -28
  189. package/reuse-tab/public_api.d.ts +0 -14
  190. package/reuse-tab/reuse-tab-context-menu.component.d.ts +0 -21
  191. package/reuse-tab/reuse-tab-context.component.d.ts +0 -11
  192. package/reuse-tab/reuse-tab-context.directive.d.ts +0 -10
  193. package/reuse-tab/reuse-tab-context.service.d.ts +0 -14
  194. package/reuse-tab/reuse-tab.cache.d.ts +0 -16
  195. package/reuse-tab/reuse-tab.component.d.ts +0 -79
  196. package/reuse-tab/reuse-tab.interfaces.d.ts +0 -110
  197. package/reuse-tab/reuse-tab.module.d.ts +0 -17
  198. package/reuse-tab/reuse-tab.service.d.ts +0 -192
  199. package/reuse-tab/reuse-tab.state.d.ts +0 -14
  200. package/reuse-tab/reuse-tab.strategy.d.ts +0 -10
  201. package/se/public_api.d.ts +0 -4
  202. package/se/se-container.component.d.ts +0 -49
  203. package/se/se.component.d.ts +0 -60
  204. package/se/se.module.d.ts +0 -12
  205. package/se/se.types.d.ts +0 -9
  206. package/sg/public_api.d.ts +0 -3
  207. package/sg/sg-container.component.d.ts +0 -15
  208. package/sg/sg.component.d.ts +0 -19
  209. package/sg/sg.module.d.ts +0 -9
  210. package/st/provide.d.ts +0 -10
  211. package/st/public_api.d.ts +0 -12
  212. package/st/st-column-source.d.ts +0 -47
  213. package/st/st-data-source.d.ts +0 -77
  214. package/st/st-export.d.ts +0 -11
  215. package/st/st-filter.component.d.ts +0 -23
  216. package/st/st-row.directive.d.ts +0 -20
  217. package/st/st-widget-host.directive.d.ts +0 -12
  218. package/st/st-widget.d.ts +0 -11
  219. package/st/st.component.d.ts +0 -295
  220. package/st/st.config.d.ts +0 -2
  221. package/st/st.interfaces.d.ts +0 -1201
  222. package/st/st.module.d.ts +0 -9
  223. package/st/st.types.d.ts +0 -77
  224. package/sv/public_api.d.ts +0 -4
  225. package/sv/sv-container.component.d.ts +0 -39
  226. package/sv/sv-value.component.d.ts +0 -10
  227. package/sv/sv.component.d.ts +0 -34
  228. package/sv/sv.module.d.ts +0 -14
  229. package/tag-select/public_api.d.ts +0 -2
  230. package/tag-select/tag-select.component.d.ts +0 -21
  231. package/tag-select/tag-select.module.d.ts +0 -10
  232. package/xlsx/public_api.d.ts +0 -4
  233. package/xlsx/xlsx.directive.d.ts +0 -9
  234. package/xlsx/xlsx.module.d.ts +0 -7
  235. package/xlsx/xlsx.service.d.ts +0 -27
  236. package/xlsx/xlsx.types.d.ts +0 -27
  237. package/zip/public_api.d.ts +0 -2
  238. package/zip/zip.service.d.ts +0 -34
  239. package/zip/zip.types.d.ts +0 -28
@@ -1,5 +1,514 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, OnInit, OnChanges, TemplateRef, SimpleChange, SimpleChanges, OnDestroy, InjectionToken, Provider, EnvironmentProviders } from '@angular/core';
3
+ import * as i2 from '@angular/router';
4
+ import { ActivatedRouteSnapshot, RouteReuseStrategy } from '@angular/router';
5
+ import { Observable, Subject } from 'rxjs';
6
+ import { NzSafeAny } from 'ng-zorro-antd/core/types';
7
+ import * as _angular_cdk_bidi_module_d_IN1Vp56w from '@angular/cdk/bidi-module.d-IN1Vp56w';
8
+ import * as i1 from '@angular/common';
9
+ import * as i3 from '@delon/theme';
10
+ import * as i4 from 'ng-zorro-antd/menu';
11
+ import * as i5 from 'ng-zorro-antd/tabs';
12
+ import * as i6 from 'ng-zorro-antd/icon';
13
+ import * as i7 from '@angular/cdk/overlay';
14
+
15
+ declare class ReuseTabContextComponent {
16
+ private readonly srv;
17
+ set i18n(value: ReuseContextI18n | undefined);
18
+ readonly change: EventEmitter<ReuseContextCloseEvent>;
19
+ constructor();
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReuseTabContextComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<ReuseTabContextComponent, "reuse-tab-context", never, { "i18n": { "alias": "i18n"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
22
+ }
23
+
1
24
  /**
2
- * Generated bundle index. Do not edit.
25
+ * 复用匹配模式
3
26
  */
4
- /// <amd-module name="@delon/abc/reuse-tab" />
5
- export * from './public_api';
27
+ declare enum ReuseTabMatchMode {
28
+ /**
29
+ * (推荐)按菜单 `Menu` 配置
30
+ *
31
+ * 可复用:
32
+ * - `{ text:'Dashboard' }`
33
+ * - `{ text:'Dashboard', reuse: true }`
34
+ *
35
+ * 不可复用:
36
+ * - `{ text:'Dashboard', reuse: false }`
37
+ */
38
+ Menu = 0,
39
+ /**
40
+ * 按菜单 `Menu` 强制配置
41
+ *
42
+ * 可复用:
43
+ * - `{ text:'Dashboard', reuse: true }`
44
+ *
45
+ * 不可复用:
46
+ * - `{ text:'Dashboard' }`
47
+ * - `{ text:'Dashboard', reuse: false }`
48
+ */
49
+ MenuForce = 1,
50
+ /**
51
+ * 对所有路由有效,可以配合 `excludes` 过滤无须复用路由
52
+ */
53
+ URL = 2
54
+ }
55
+ type ReuseTabRouteParamMatchMode = 'strict' | 'loose';
56
+ interface ReuseTitle {
57
+ text?: string;
58
+ i18n?: string;
59
+ }
60
+ interface ReuseTabCached {
61
+ title: ReuseTitle;
62
+ url: string;
63
+ /** 是否允许关闭,默认:`true` */
64
+ closable?: boolean;
65
+ /** 当前滚动条位置 */
66
+ position?: [number, number] | null;
67
+ _snapshot?: ActivatedRouteSnapshot;
68
+ _handle?: ReuseComponentHandle;
69
+ }
70
+ interface ReuseTabNotify {
71
+ /** 事件类型 */
72
+ active: 'add' | 'override' | 'title' | 'clear' | 'closable' | 'close' | 'closeRight' | 'move' | 'refresh' | 'loadState';
73
+ url?: string;
74
+ title?: ReuseTitle;
75
+ item?: ReuseTabCached;
76
+ list?: ReuseTabCached[];
77
+ [key: string]: NzSafeAny;
78
+ }
79
+ interface ReuseItem {
80
+ url: string;
81
+ title: string;
82
+ closable: boolean;
83
+ index: number;
84
+ active: boolean;
85
+ last: boolean;
86
+ /** 当前滚动条位置 */
87
+ position?: [number, number] | null;
88
+ }
89
+ interface ReuseContextEvent {
90
+ event: MouseEvent;
91
+ item: ReuseItem;
92
+ comp?: ReuseTabContextComponent;
93
+ customContextMenu?: ReuseCustomContextMenu[];
94
+ }
95
+ type CloseType = 'close' | 'closeOther' | 'closeRight' | 'custom' | 'refresh' | null;
96
+ interface ReuseContextCloseEvent {
97
+ type: CloseType;
98
+ item: ReuseItem;
99
+ includeNonCloseable: boolean;
100
+ }
101
+ interface ReuseContextI18n {
102
+ close?: string;
103
+ closeOther?: string;
104
+ closeRight?: string;
105
+ refresh?: string;
106
+ }
107
+ interface ReuseCustomContextMenu {
108
+ id: string;
109
+ title: string;
110
+ fn: (item: ReuseItem, menu: ReuseCustomContextMenu) => void;
111
+ disabled?: (item: ReuseItem) => boolean;
112
+ }
113
+ interface ReuseComponentHandle {
114
+ componentRef: ReuseComponentRef;
115
+ }
116
+ interface ReuseComponentRef {
117
+ instance: ReuseComponentInstance;
118
+ }
119
+ type ReuseHookTypes = '_onReuseInit' | '_onReuseDestroy';
120
+ type ReuseHookOnReuseInitType = 'init' | 'refresh';
121
+ interface ReuseComponentInstance {
122
+ _onReuseInit: (type: ReuseHookOnReuseInitType) => void;
123
+ _onReuseDestroy: () => void;
124
+ destroy: () => void;
125
+ }
126
+ type ReuseCanClose = (options: {
127
+ item: ReuseItem;
128
+ includeNonCloseable: boolean;
129
+ }) => Observable<boolean>;
130
+
131
+ declare class ReuseTabContextMenuComponent implements OnInit {
132
+ private locale;
133
+ private _i18n;
134
+ set i18n(value: ReuseContextI18n);
135
+ get i18n(): ReuseContextI18n;
136
+ item: ReuseItem;
137
+ event: MouseEvent;
138
+ customContextMenu: ReuseCustomContextMenu[];
139
+ readonly close: EventEmitter<ReuseContextCloseEvent>;
140
+ get includeNonCloseable(): boolean;
141
+ private notify;
142
+ ngOnInit(): void;
143
+ click(e: MouseEvent, type: CloseType, custom?: ReuseCustomContextMenu): void;
144
+ isDisabled(custom: ReuseCustomContextMenu): boolean;
145
+ closeMenu(event: MouseEvent): void;
146
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReuseTabContextMenuComponent, never>;
147
+ static ɵcmp: i0.ɵɵComponentDeclaration<ReuseTabContextMenuComponent, "reuse-tab-context-menu", never, { "i18n": { "alias": "i18n"; "required": false; }; "item": { "alias": "item"; "required": false; }; "event": { "alias": "event"; "required": false; }; "customContextMenu": { "alias": "customContextMenu"; "required": false; }; }, { "close": "close"; }, never, never, true, never>;
148
+ }
149
+
150
+ declare class ReuseTabContextDirective {
151
+ private readonly srv;
152
+ item: ReuseItem;
153
+ customContextMenu: ReuseCustomContextMenu[];
154
+ _onContextMenu(event: MouseEvent): void;
155
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReuseTabContextDirective, never>;
156
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ReuseTabContextDirective, "[reuse-tab-context-menu]", ["reuseTabContextMenu"], { "item": { "alias": "reuse-tab-context-menu"; "required": false; }; "customContextMenu": { "alias": "customContextMenu"; "required": false; }; }, {}, never, never, true, never>;
157
+ }
158
+
159
+ declare class ReuseTabContextService {
160
+ private readonly overlay;
161
+ private ref;
162
+ i18n?: ReuseContextI18n;
163
+ show: Subject<ReuseContextEvent>;
164
+ close: Subject<ReuseContextCloseEvent>;
165
+ remove(): void;
166
+ open(context: ReuseContextEvent): void;
167
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReuseTabContextService, never>;
168
+ static ɵprov: i0.ɵɵInjectableDeclaration<ReuseTabContextService>;
169
+ }
170
+
171
+ declare class ReuseTabComponent implements OnInit, OnChanges {
172
+ private readonly srv;
173
+ private readonly cdr;
174
+ private readonly router;
175
+ private readonly route;
176
+ private readonly i18nSrv;
177
+ private readonly doc;
178
+ private readonly platform;
179
+ private readonly stateKey;
180
+ private readonly stateSrv;
181
+ private tabset;
182
+ private destroy$;
183
+ private _keepingScrollContainer?;
184
+ list: ReuseItem[];
185
+ item?: ReuseItem;
186
+ pos: number;
187
+ dir: i0.WritableSignal<_angular_cdk_bidi_module_d_IN1Vp56w.a>;
188
+ mode: ReuseTabMatchMode;
189
+ i18n?: ReuseContextI18n;
190
+ debug: boolean;
191
+ max?: number;
192
+ tabMaxWidth?: number;
193
+ excludes?: RegExp[];
194
+ allowClose: boolean;
195
+ keepingScroll: boolean;
196
+ storageState: boolean;
197
+ set keepingScrollContainer(value: string | Element);
198
+ customContextMenu: ReuseCustomContextMenu[];
199
+ tabBarExtraContent?: TemplateRef<void>;
200
+ tabBarGutter?: number;
201
+ tabBarStyle: Record<string, string> | null;
202
+ tabType: 'line' | 'card';
203
+ routeParamMatchMode: ReuseTabRouteParamMatchMode;
204
+ disabled: boolean;
205
+ titleRender?: TemplateRef<{
206
+ $implicit: ReuseItem;
207
+ }>;
208
+ canClose?: ReuseCanClose;
209
+ readonly change: EventEmitter<ReuseItem>;
210
+ readonly close: EventEmitter<ReuseItem | null>;
211
+ private genTit;
212
+ private get curUrl();
213
+ private genCurItem;
214
+ private genList;
215
+ private updateTitle;
216
+ private refresh;
217
+ private saveState;
218
+ contextMenuChange(res: ReuseContextCloseEvent): void;
219
+ _to(index: number, cb?: () => void): void;
220
+ _close(e: Event | null, idx: number, includeNonCloseable: boolean): boolean;
221
+ /**
222
+ * 设置激活路由的实例,在 `src/app/layout/basic/basic.component.ts` 修改:
223
+ *
224
+ * @example
225
+ * <reuse-tab #reuseTab></reuse-tab>
226
+ * <router-outlet (activate)="reuseTab.activate($event)" (attach)="reuseTab.activate($event)"></router-outlet>
227
+ */
228
+ activate(instance: NzSafeAny): void;
229
+ private updatePos;
230
+ ngOnInit(): void;
231
+ ngOnChanges(changes: {
232
+ [P in keyof this]?: SimpleChange;
233
+ } & SimpleChanges): void;
234
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReuseTabComponent, never>;
235
+ static ɵcmp: i0.ɵɵComponentDeclaration<ReuseTabComponent, "reuse-tab, [reuse-tab]", ["reuseTab"], { "mode": { "alias": "mode"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "max": { "alias": "max"; "required": false; }; "tabMaxWidth": { "alias": "tabMaxWidth"; "required": false; }; "excludes": { "alias": "excludes"; "required": false; }; "allowClose": { "alias": "allowClose"; "required": false; }; "keepingScroll": { "alias": "keepingScroll"; "required": false; }; "storageState": { "alias": "storageState"; "required": false; }; "keepingScrollContainer": { "alias": "keepingScrollContainer"; "required": false; }; "customContextMenu": { "alias": "customContextMenu"; "required": false; }; "tabBarExtraContent": { "alias": "tabBarExtraContent"; "required": false; }; "tabBarGutter": { "alias": "tabBarGutter"; "required": false; }; "tabBarStyle": { "alias": "tabBarStyle"; "required": false; }; "tabType": { "alias": "tabType"; "required": false; }; "routeParamMatchMode": { "alias": "routeParamMatchMode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "titleRender": { "alias": "titleRender"; "required": false; }; "canClose": { "alias": "canClose"; "required": false; }; }, { "change": "change"; "close": "close"; }, never, never, true, never>;
236
+ static ngAcceptInputType_debug: unknown;
237
+ static ngAcceptInputType_max: unknown;
238
+ static ngAcceptInputType_tabMaxWidth: unknown;
239
+ static ngAcceptInputType_allowClose: unknown;
240
+ static ngAcceptInputType_keepingScroll: unknown;
241
+ static ngAcceptInputType_storageState: unknown;
242
+ static ngAcceptInputType_disabled: unknown;
243
+ }
244
+
245
+ declare class ReuseTabService implements OnDestroy {
246
+ private readonly injector;
247
+ private readonly menuService;
248
+ private readonly cached;
249
+ private readonly stateKey;
250
+ private readonly stateSrv;
251
+ private _inited;
252
+ private _max;
253
+ private _keepingScroll;
254
+ private _cachedChange;
255
+ private _router$?;
256
+ private removeUrlBuffer;
257
+ private positionBuffer;
258
+ componentRef?: ReuseComponentRef;
259
+ debug: boolean;
260
+ routeParamMatchMode: ReuseTabRouteParamMatchMode;
261
+ mode: ReuseTabMatchMode;
262
+ /** 排除规则,限 `mode=URL` */
263
+ excludes: RegExp[];
264
+ storageState: boolean;
265
+ private get snapshot();
266
+ /**
267
+ * Get init status
268
+ *
269
+ * 是否已经初始化完成
270
+ */
271
+ get inited(): boolean;
272
+ /**
273
+ * Current routing address
274
+ *
275
+ * 当前路由地址
276
+ */
277
+ get curUrl(): string;
278
+ /**
279
+ * 允许最多复用多少个页面,取值范围 `2-100`,值发生变更时会强制关闭且忽略可关闭条件
280
+ */
281
+ set max(value: number);
282
+ set keepingScroll(value: boolean);
283
+ get keepingScroll(): boolean;
284
+ keepingScrollContainer?: Element | null;
285
+ /** 获取已缓存的路由 */
286
+ get items(): ReuseTabCached[];
287
+ /** 获取当前缓存的路由总数 */
288
+ get count(): number;
289
+ /** 订阅缓存变更通知 */
290
+ get change(): Observable<ReuseTabNotify | null>;
291
+ /** 自定义当前标题 */
292
+ set title(value: string | ReuseTitle);
293
+ /** 获取指定路径缓存所在位置,`-1` 表示无缓存 */
294
+ index(url: string): number;
295
+ /** 获取指定路径缓存是否存在 */
296
+ exists(url: string): boolean;
297
+ /** 获取指定路径缓存 */
298
+ get(url?: string): ReuseTabCached | null;
299
+ private remove;
300
+ /**
301
+ * 根据URL移除标签
302
+ *
303
+ * @param [includeNonCloseable=false] 是否强制包含不可关闭
304
+ */
305
+ close(url: string, includeNonCloseable?: boolean): boolean;
306
+ /**
307
+ * 清除右边
308
+ *
309
+ * @param [includeNonCloseable=false] 是否强制包含不可关闭
310
+ */
311
+ closeRight(url: string, includeNonCloseable?: boolean): boolean;
312
+ /**
313
+ * 清除所有缓存
314
+ *
315
+ * @param [includeNonCloseable=false] 是否强制包含不可关闭
316
+ */
317
+ clear(includeNonCloseable?: boolean): void;
318
+ /**
319
+ * 移动缓存数据
320
+ *
321
+ * @param url 要移动的URL地址
322
+ * @param position 新位置,下标从 `0` 开始
323
+ *
324
+ * @example
325
+ * ```
326
+ * // source
327
+ * [ '/a/1', '/a/2', '/a/3', '/a/4', '/a/5' ]
328
+ * move('/a/1', 2);
329
+ * // output
330
+ * [ '/a/2', '/a/3', '/a/1', '/a/4', '/a/5' ]
331
+ * move('/a/1', -1);
332
+ * // output
333
+ * [ '/a/2', '/a/3', '/a/4', '/a/5', '/a/1' ]
334
+ * ```
335
+ */
336
+ move(url: string, position: number): void;
337
+ /**
338
+ * 强制关闭当前路由(包含不可关闭状态),并重新导航至 `newUrl` 路由
339
+ */
340
+ replace(newUrl: string): void;
341
+ /**
342
+ * 获取标题,顺序如下:
343
+ *
344
+ * 1. 组件内使用 `ReuseTabService.title = 'new title'` 重新指定文本
345
+ * 2. 路由配置中 data 属性中包含 titleI18n > title
346
+ * 3. 菜单数据中 text 属性
347
+ *
348
+ * @param url 指定URL
349
+ * @param route 指定路由快照
350
+ */
351
+ getTitle(url: string, route?: ActivatedRouteSnapshot): ReuseTitle;
352
+ /**
353
+ * 清除标题缓存
354
+ */
355
+ clearTitleCached(): void;
356
+ /** 自定义当前 `closable` 状态 */
357
+ set closable(value: boolean);
358
+ /**
359
+ * 获取 `closable` 状态,顺序如下:
360
+ *
361
+ * 1. 组件内使用 `ReuseTabService.closable = true` 重新指定 `closable` 状态
362
+ * 2. 路由配置中 data 属性中包含 `reuseClosable`
363
+ * 3. 菜单数据中 `reuseClosable` 属性
364
+ *
365
+ * @param url 指定URL
366
+ * @param route 指定路由快照
367
+ */
368
+ getClosable(url: string, route?: ActivatedRouteSnapshot): boolean;
369
+ /**
370
+ * 清空 `closable` 缓存
371
+ */
372
+ clearClosableCached(): void;
373
+ getTruthRoute(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot;
374
+ /**
375
+ * 根据快照获取URL地址
376
+ */
377
+ getUrl(route: ActivatedRouteSnapshot): string;
378
+ /**
379
+ * 检查快照是否允许被复用
380
+ */
381
+ can(route: ActivatedRouteSnapshot): boolean;
382
+ isExclude(url: string): boolean;
383
+ /**
384
+ * 刷新,触发一个 refresh 类型事件
385
+ */
386
+ refresh(data?: NzSafeAny): void;
387
+ private destroy;
388
+ private di;
389
+ constructor();
390
+ init(): void;
391
+ private loadState;
392
+ private getMenu;
393
+ runHook(method: ReuseHookTypes, comp: ReuseComponentRef | number | undefined, type?: ReuseHookOnReuseInitType): void;
394
+ private hasInValidRoute;
395
+ /**
396
+ * 决定是否允许路由复用,若 `true` 会触发 `store`
397
+ */
398
+ shouldDetach(route: ActivatedRouteSnapshot): boolean;
399
+ saveCache(snapshot: ActivatedRouteSnapshot, _handle?: NzSafeAny, pos?: number): void;
400
+ /**
401
+ * 存储
402
+ */
403
+ store(_snapshot: ActivatedRouteSnapshot, _handle: NzSafeAny): void;
404
+ /**
405
+ * 决定是否允许应用缓存数据
406
+ */
407
+ shouldAttach(route: ActivatedRouteSnapshot): boolean;
408
+ /**
409
+ * 提取复用数据
410
+ */
411
+ retrieve(route: ActivatedRouteSnapshot): NzSafeAny | null;
412
+ /**
413
+ * 决定是否应该进行复用路由处理
414
+ */
415
+ shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
416
+ /**
417
+ * 获取 `keepingScroll` 状态,顺序如下:
418
+ *
419
+ * 1. 路由配置中 data 属性中包含 `keepingScroll`
420
+ * 2. 菜单数据中 `keepingScroll` 属性
421
+ * 3. 组件 `keepingScroll` 值
422
+ */
423
+ getKeepingScroll(url: string, route?: ActivatedRouteSnapshot): boolean;
424
+ private get isDisabledInRouter();
425
+ private get ss();
426
+ private initScroll;
427
+ ngOnDestroy(): void;
428
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReuseTabService, never>;
429
+ static ɵprov: i0.ɵɵInjectableDeclaration<ReuseTabService>;
430
+ }
431
+
432
+ declare class ReuseTabStrategy implements RouteReuseStrategy {
433
+ private readonly srv;
434
+ shouldDetach(route: ActivatedRouteSnapshot): boolean;
435
+ store(route: ActivatedRouteSnapshot, handle: unknown): void;
436
+ shouldAttach(route: ActivatedRouteSnapshot): boolean;
437
+ retrieve(route: ActivatedRouteSnapshot): NzSafeAny | null;
438
+ shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
439
+ }
440
+
441
+ declare class ReuseTabModule {
442
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReuseTabModule, never>;
443
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ReuseTabModule, never, [typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.DelonLocaleModule, typeof i4.NzMenuModule, typeof i5.NzTabsModule, typeof i6.NzIconModule, typeof i7.OverlayModule, typeof ReuseTabComponent, typeof ReuseTabContextMenuComponent, typeof ReuseTabContextComponent, typeof ReuseTabContextDirective], [typeof ReuseTabComponent]>;
444
+ static ɵinj: i0.ɵɵInjectorDeclaration<ReuseTabModule>;
445
+ }
446
+
447
+ /**
448
+ * Triggered when the current route is in the reusing process, The values of `type` are:
449
+ *
450
+ * - `init` when routing process 当路由复用时
451
+ * - `refresh` when refresh action via tab 当通过标签刷新时
452
+ */
453
+ interface OnReuseInit {
454
+ _onReuseInit(type?: ReuseHookOnReuseInitType): void;
455
+ }
456
+ /**
457
+ * Triggered when the current route allows reusing and leave route.
458
+ */
459
+ interface OnReuseDestroy {
460
+ _onReuseDestroy(): void;
461
+ }
462
+
463
+ declare const REUSE_TAB_STORAGE_KEY: InjectionToken<string>;
464
+ declare const REUSE_TAB_STORAGE_STATE: InjectionToken<ReuseTabStorageState>;
465
+ interface ReuseTabStorageState {
466
+ get(key: string): ReuseItem[];
467
+ update(key: string, value: ReuseItem[]): boolean;
468
+ remove(key: string): void;
469
+ }
470
+ declare class ReuseTabLocalStorageState implements ReuseTabStorageState {
471
+ get(key: string): ReuseItem[];
472
+ update(key: string, value: ReuseItem[]): boolean;
473
+ remove(key: string): void;
474
+ }
475
+
476
+ /**
477
+ * Storage manager that can change rules by implementing `get`, `set` accessors
478
+ */
479
+ declare const REUSE_TAB_CACHED_MANAGER: InjectionToken<ReuseTabCachedManager>;
480
+ interface ReuseTabCachedManager {
481
+ list: ReuseTabCached[];
482
+ title: Record<string, ReuseTitle>;
483
+ closable: Record<string, boolean>;
484
+ }
485
+
486
+ declare enum ReuseTabFeatureKind {
487
+ CacheManager = 0,
488
+ Store = 1
489
+ }
490
+ interface ReuseTabFeature<KindT extends ReuseTabFeatureKind> {
491
+ ɵkind: KindT;
492
+ ɵproviders: Provider[];
493
+ }
494
+ /**
495
+ * Configures reuse-tab to be available for injection.
496
+ *
497
+ * @see {@link withLocalStorage}
498
+ * @see {@link withCacheManager}
499
+ */
500
+ declare function provideReuseTabConfig(options?: {
501
+ debug?: boolean;
502
+ mode?: ReuseTabMatchMode;
503
+ routeParamMatchMode?: ReuseTabRouteParamMatchMode;
504
+ max?: number;
505
+ excludes?: RegExp[];
506
+ storeKey?: string;
507
+ cacheManager?: ReuseTabFeature<ReuseTabFeatureKind.CacheManager>;
508
+ store?: ReuseTabFeature<ReuseTabFeatureKind.Store>;
509
+ }): EnvironmentProviders;
510
+ declare function withCacheManager(): ReuseTabFeature<ReuseTabFeatureKind.CacheManager>;
511
+ declare function withLocalStorage(): ReuseTabFeature<ReuseTabFeatureKind.Store>;
512
+
513
+ export { REUSE_TAB_CACHED_MANAGER, REUSE_TAB_STORAGE_KEY, REUSE_TAB_STORAGE_STATE, ReuseTabComponent, ReuseTabContextComponent, ReuseTabContextDirective, ReuseTabContextMenuComponent, ReuseTabContextService, ReuseTabFeatureKind, ReuseTabLocalStorageState, ReuseTabMatchMode, ReuseTabModule, ReuseTabService, ReuseTabStrategy, provideReuseTabConfig, withCacheManager, withLocalStorage };
514
+ export type { CloseType, OnReuseDestroy, OnReuseInit, ReuseCanClose, ReuseComponentHandle, ReuseComponentInstance, ReuseComponentRef, ReuseContextCloseEvent, ReuseContextEvent, ReuseContextI18n, ReuseCustomContextMenu, ReuseHookOnReuseInitType, ReuseHookTypes, ReuseItem, ReuseTabCached, ReuseTabCachedManager, ReuseTabFeature, ReuseTabNotify, ReuseTabRouteParamMatchMode, ReuseTabStorageState, ReuseTitle };
package/se/index.d.ts CHANGED
@@ -1,5 +1,129 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@delon/abc/se" />
5
- export * from './public_api';
1
+ import * as i0 from '@angular/core';
2
+ import { TemplateRef, OnInit, OnChanges, AfterContentInit, AfterViewInit } from '@angular/core';
3
+ import { Observable } from 'rxjs';
4
+ import { REP_TYPE } from '@delon/theme';
5
+ import * as i1 from '@angular/common';
6
+ import * as i2 from 'ng-zorro-antd/tooltip';
7
+ import * as i3 from 'ng-zorro-antd/icon';
8
+ import * as i4 from 'ng-zorro-antd/core/outlet';
9
+
10
+ type SELayout = 'horizontal' | 'vertical' | 'inline';
11
+ type SESize = 'default' | 'compact';
12
+ type SEErrorType = string | TemplateRef<void> | SEError;
13
+ type SEError = Record<string, string | TemplateRef<void>>;
14
+ interface SEErrorRefresh {
15
+ name: string;
16
+ error: SEErrorType;
17
+ }
18
+
19
+ declare class SETitleComponent implements OnInit {
20
+ private readonly parentComp;
21
+ private readonly el;
22
+ private readonly ren;
23
+ constructor();
24
+ private setClass;
25
+ ngOnInit(): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<SETitleComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<SETitleComponent, "se-title, [se-title]", ["seTitle"], {}, {}, never, ["*"], true, never>;
28
+ }
29
+ declare class SEContainerComponent {
30
+ private readonly cogSrv;
31
+ private errorNotify$;
32
+ colInCon?: REP_TYPE;
33
+ col: REP_TYPE;
34
+ labelWidth: number;
35
+ noColon: boolean;
36
+ title?: string | TemplateRef<void> | null;
37
+ get gutter(): number;
38
+ set gutter(value: number);
39
+ private _gutter;
40
+ get nzLayout(): SELayout;
41
+ set nzLayout(value: SELayout);
42
+ private _nzLayout;
43
+ size: 'default' | 'compact';
44
+ firstVisual: boolean;
45
+ ingoreDirty: boolean;
46
+ line: boolean;
47
+ set errors(val: SEErrorRefresh[]);
48
+ get margin(): number;
49
+ get errorNotify(): Observable<SEErrorRefresh>;
50
+ constructor();
51
+ setErrors(errors: SEErrorRefresh[]): void;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<SEContainerComponent, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<SEContainerComponent, "se-container, [se-container]", ["seContainer"], { "colInCon": { "alias": "se-container"; "required": false; }; "col": { "alias": "col"; "required": false; }; "labelWidth": { "alias": "labelWidth"; "required": false; }; "noColon": { "alias": "noColon"; "required": false; }; "title": { "alias": "title"; "required": false; }; "gutter": { "alias": "gutter"; "required": false; }; "nzLayout": { "alias": "nzLayout"; "required": false; }; "size": { "alias": "size"; "required": false; }; "firstVisual": { "alias": "firstVisual"; "required": false; }; "ingoreDirty": { "alias": "ingoreDirty"; "required": false; }; "line": { "alias": "line"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; }, {}, never, ["*"], true, never>;
54
+ static ngAcceptInputType_colInCon: unknown;
55
+ static ngAcceptInputType_col: unknown;
56
+ static ngAcceptInputType_labelWidth: unknown;
57
+ static ngAcceptInputType_noColon: unknown;
58
+ static ngAcceptInputType_gutter: unknown;
59
+ static ngAcceptInputType_firstVisual: unknown;
60
+ static ngAcceptInputType_ingoreDirty: unknown;
61
+ static ngAcceptInputType_line: unknown;
62
+ }
63
+
64
+ declare class SEComponent implements OnChanges, AfterContentInit, AfterViewInit {
65
+ private readonly parentComp;
66
+ private readonly el;
67
+ private readonly rep;
68
+ private readonly ren;
69
+ private readonly cdr;
70
+ private readonly statusSrv;
71
+ private readonly destroy$;
72
+ private readonly ngModel?;
73
+ private readonly formControlName?;
74
+ private readonly contentElement;
75
+ private clsMap;
76
+ private inited;
77
+ private onceFlag;
78
+ private errorData;
79
+ private isBindModel;
80
+ invalid: boolean;
81
+ _labelWidth: number | null;
82
+ _noColon: boolean | null;
83
+ _error?: string | TemplateRef<void>;
84
+ optional?: string | TemplateRef<void> | null;
85
+ optionalHelp?: string | TemplateRef<void> | null;
86
+ optionalHelpColor?: string;
87
+ set error(val: SEErrorType);
88
+ extra?: string | TemplateRef<void> | null;
89
+ label?: string | TemplateRef<void> | null;
90
+ col?: number | null;
91
+ required: boolean;
92
+ controlClass?: string | null;
93
+ line?: boolean | null;
94
+ labelWidth?: number | null;
95
+ noColon?: boolean | null;
96
+ hideLabel: boolean;
97
+ set id(value: string);
98
+ _id: string;
99
+ _autoId: boolean;
100
+ get paddingValue(): number;
101
+ get showErr(): boolean;
102
+ get compact(): boolean;
103
+ private get ngControl();
104
+ constructor();
105
+ private setClass;
106
+ private bindModel;
107
+ private updateStatus;
108
+ checkContent(): void;
109
+ ngAfterContentInit(): void;
110
+ ngOnChanges(): void;
111
+ ngAfterViewInit(): void;
112
+ static ɵfac: i0.ɵɵFactoryDeclaration<SEComponent, never>;
113
+ static ɵcmp: i0.ɵɵComponentDeclaration<SEComponent, "se", ["se"], { "optional": { "alias": "optional"; "required": false; }; "optionalHelp": { "alias": "optionalHelp"; "required": false; }; "optionalHelpColor": { "alias": "optionalHelpColor"; "required": false; }; "error": { "alias": "error"; "required": false; }; "extra": { "alias": "extra"; "required": false; }; "label": { "alias": "label"; "required": false; }; "col": { "alias": "col"; "required": false; }; "required": { "alias": "required"; "required": false; }; "controlClass": { "alias": "controlClass"; "required": false; }; "line": { "alias": "line"; "required": false; }; "labelWidth": { "alias": "labelWidth"; "required": false; }; "noColon": { "alias": "noColon"; "required": false; }; "hideLabel": { "alias": "hideLabel"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, ["ngModel", "formControlName"], ["*"], true, never>;
114
+ static ngAcceptInputType_col: unknown;
115
+ static ngAcceptInputType_required: unknown;
116
+ static ngAcceptInputType_line: unknown;
117
+ static ngAcceptInputType_labelWidth: unknown;
118
+ static ngAcceptInputType_noColon: unknown;
119
+ static ngAcceptInputType_hideLabel: unknown;
120
+ }
121
+
122
+ declare class SEModule {
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<SEModule, never>;
124
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SEModule, never, [typeof i1.CommonModule, typeof i2.NzToolTipModule, typeof i3.NzIconModule, typeof i4.NzOutletModule, typeof SEContainerComponent, typeof SEComponent, typeof SETitleComponent], [typeof SEContainerComponent, typeof SEComponent, typeof SETitleComponent]>;
125
+ static ɵinj: i0.ɵɵInjectorDeclaration<SEModule>;
126
+ }
127
+
128
+ export { SEComponent, SEContainerComponent, SEModule, SETitleComponent };
129
+ export type { SEError, SEErrorRefresh, SEErrorType, SELayout, SESize };