@delon/abc 16.2.1 → 16.3.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 (160) hide show
  1. package/cell/cell-host.directive.d.ts +13 -0
  2. package/cell/cell.component.d.ts +45 -0
  3. package/cell/cell.module.d.ts +17 -0
  4. package/cell/cell.service.d.ts +23 -0
  5. package/cell/cell.types.d.ts +238 -0
  6. package/cell/index.d.ts +5 -0
  7. package/cell/style/index.less +63 -0
  8. package/esm2022/auto-focus/auto-focus.directive.mjs +3 -3
  9. package/esm2022/auto-focus/auto-focus.module.mjs +4 -4
  10. package/esm2022/avatar-list/avatar-list-item.component.mjs +3 -3
  11. package/esm2022/avatar-list/avatar-list.component.mjs +3 -3
  12. package/esm2022/avatar-list/avatar-list.module.mjs +4 -4
  13. package/esm2022/cell/cell-host.directive.mjs +34 -0
  14. package/esm2022/cell/cell.component.mjs +270 -0
  15. package/esm2022/cell/cell.mjs +5 -0
  16. package/esm2022/cell/cell.module.mjs +54 -0
  17. package/esm2022/cell/cell.service.mjs +168 -0
  18. package/esm2022/cell/cell.types.mjs +2 -0
  19. package/esm2022/cell/index.mjs +6 -0
  20. package/esm2022/count-down/count-down.component.mjs +3 -3
  21. package/esm2022/count-down/count-down.module.mjs +4 -4
  22. package/esm2022/date-picker/date-picker.module.mjs +4 -4
  23. package/esm2022/date-picker/range-shortcut.component.mjs +3 -3
  24. package/esm2022/date-picker/range.directive.mjs +3 -3
  25. package/esm2022/down-file/down-file.directive.mjs +3 -3
  26. package/esm2022/down-file/down-file.module.mjs +4 -4
  27. package/esm2022/ellipsis/ellipsis.component.mjs +3 -3
  28. package/esm2022/ellipsis/ellipsis.module.mjs +4 -4
  29. package/esm2022/error-collect/error-collect.component.mjs +3 -3
  30. package/esm2022/error-collect/error-collect.module.mjs +4 -4
  31. package/esm2022/exception/exception.component.mjs +3 -3
  32. package/esm2022/exception/exception.module.mjs +4 -4
  33. package/esm2022/footer-toolbar/footer-toolbar.component.mjs +3 -3
  34. package/esm2022/footer-toolbar/footer-toolbar.module.mjs +4 -4
  35. package/esm2022/full-content/full-content-toggle.directive.mjs +3 -3
  36. package/esm2022/full-content/full-content.component.mjs +3 -3
  37. package/esm2022/full-content/full-content.module.mjs +4 -4
  38. package/esm2022/full-content/full-content.service.mjs +3 -3
  39. package/esm2022/global-footer/global-footer-item.component.mjs +3 -3
  40. package/esm2022/global-footer/global-footer.component.mjs +3 -3
  41. package/esm2022/global-footer/global-footer.module.mjs +4 -4
  42. package/esm2022/hotkey/hotkey.directive.mjs +3 -3
  43. package/esm2022/hotkey/hotkey.module.mjs +4 -4
  44. package/esm2022/let/let.directive.mjs +3 -3
  45. package/esm2022/let/let.module.mjs +4 -4
  46. package/esm2022/loading/loading.component.mjs +3 -3
  47. package/esm2022/loading/loading.module.mjs +4 -4
  48. package/esm2022/loading/loading.service.mjs +3 -3
  49. package/esm2022/lodop/lodop.module.mjs +4 -4
  50. package/esm2022/lodop/lodop.service.mjs +3 -3
  51. package/esm2022/media/media.component.mjs +3 -3
  52. package/esm2022/media/media.module.mjs +4 -4
  53. package/esm2022/media/media.service.mjs +3 -3
  54. package/esm2022/notice-icon/notice-icon-tab.component.mjs +3 -3
  55. package/esm2022/notice-icon/notice-icon.component.mjs +3 -3
  56. package/esm2022/notice-icon/notice-icon.module.mjs +4 -4
  57. package/esm2022/observers/observer-size.mjs +10 -10
  58. package/esm2022/onboarding/onboarding.component.mjs +3 -3
  59. package/esm2022/onboarding/onboarding.module.mjs +4 -4
  60. package/esm2022/onboarding/onboarding.service.mjs +3 -3
  61. package/esm2022/page-header/page-header.component.mjs +10 -7
  62. package/esm2022/page-header/page-header.module.mjs +27 -6
  63. package/esm2022/pdf/pdf.component.mjs +5 -5
  64. package/esm2022/pdf/pdf.module.mjs +4 -4
  65. package/esm2022/pdf/pdf.types.mjs +2 -1
  66. package/esm2022/qr/qr.component.mjs +3 -3
  67. package/esm2022/qr/qr.module.mjs +4 -4
  68. package/esm2022/quick-menu/quick-menu.component.mjs +3 -3
  69. package/esm2022/quick-menu/quick-menu.module.mjs +4 -4
  70. package/esm2022/result/result.component.mjs +3 -3
  71. package/esm2022/result/result.module.mjs +4 -4
  72. package/esm2022/reuse-tab/reuse-tab-context-menu.component.mjs +3 -3
  73. package/esm2022/reuse-tab/reuse-tab-context.component.mjs +3 -3
  74. package/esm2022/reuse-tab/reuse-tab-context.directive.mjs +3 -3
  75. package/esm2022/reuse-tab/reuse-tab-context.service.mjs +3 -3
  76. package/esm2022/reuse-tab/reuse-tab.component.mjs +3 -3
  77. package/esm2022/reuse-tab/reuse-tab.module.mjs +4 -4
  78. package/esm2022/reuse-tab/reuse-tab.service.mjs +3 -3
  79. package/esm2022/se/se-container.component.mjs +6 -6
  80. package/esm2022/se/se.component.mjs +3 -3
  81. package/esm2022/se/se.module.mjs +4 -4
  82. package/esm2022/sg/sg-container.component.mjs +3 -3
  83. package/esm2022/sg/sg.component.mjs +3 -3
  84. package/esm2022/sg/sg.module.mjs +4 -4
  85. package/esm2022/st/st-column-source.mjs +8 -4
  86. package/esm2022/st/st-data-source.mjs +14 -7
  87. package/esm2022/st/st-export.mjs +3 -3
  88. package/esm2022/st/st-filter.component.mjs +3 -3
  89. package/esm2022/st/st-row.directive.mjs +6 -6
  90. package/esm2022/st/st-widget-host.directive.mjs +3 -3
  91. package/esm2022/st/st-widget.mjs +3 -3
  92. package/esm2022/st/st.component.mjs +76 -91
  93. package/esm2022/st/st.interfaces.mjs +1 -1
  94. package/esm2022/st/st.module.mjs +9 -5
  95. package/esm2022/st/st.types.mjs +1 -1
  96. package/esm2022/sv/sv-container.component.mjs +19 -9
  97. package/esm2022/sv/sv-value.component.mjs +3 -3
  98. package/esm2022/sv/sv.component.mjs +11 -8
  99. package/esm2022/sv/sv.module.mjs +4 -4
  100. package/esm2022/tag-select/tag-select.component.mjs +3 -3
  101. package/esm2022/tag-select/tag-select.module.mjs +4 -4
  102. package/esm2022/xlsx/xlsx.directive.mjs +3 -3
  103. package/esm2022/xlsx/xlsx.module.mjs +4 -4
  104. package/esm2022/xlsx/xlsx.service.mjs +3 -3
  105. package/esm2022/zip/zip.module.mjs +4 -4
  106. package/esm2022/zip/zip.service.mjs +3 -3
  107. package/fesm2022/auto-focus.mjs +7 -7
  108. package/fesm2022/avatar-list.mjs +10 -10
  109. package/fesm2022/cell.mjs +521 -0
  110. package/fesm2022/cell.mjs.map +1 -0
  111. package/fesm2022/chart-observer-size.mjs +10 -10
  112. package/fesm2022/count-down.mjs +7 -7
  113. package/fesm2022/date-picker.mjs +10 -10
  114. package/fesm2022/down-file.mjs +7 -7
  115. package/fesm2022/ellipsis.mjs +7 -7
  116. package/fesm2022/error-collect.mjs +7 -7
  117. package/fesm2022/exception.mjs +7 -7
  118. package/fesm2022/footer-toolbar.mjs +7 -7
  119. package/fesm2022/full-content.mjs +13 -13
  120. package/fesm2022/global-footer.mjs +10 -10
  121. package/fesm2022/hotkey.mjs +7 -7
  122. package/fesm2022/let.mjs +7 -7
  123. package/fesm2022/loading.mjs +10 -10
  124. package/fesm2022/lodop.mjs +7 -7
  125. package/fesm2022/media.mjs +10 -10
  126. package/fesm2022/notice-icon.mjs +10 -10
  127. package/fesm2022/onboarding.mjs +10 -10
  128. package/fesm2022/page-header.mjs +35 -11
  129. package/fesm2022/page-header.mjs.map +1 -1
  130. package/fesm2022/pdf.mjs +9 -8
  131. package/fesm2022/pdf.mjs.map +1 -1
  132. package/fesm2022/qr.mjs +7 -7
  133. package/fesm2022/quick-menu.mjs +7 -7
  134. package/fesm2022/result.mjs +7 -7
  135. package/fesm2022/reuse-tab.mjs +22 -22
  136. package/fesm2022/se.mjs +13 -13
  137. package/fesm2022/sg.mjs +10 -10
  138. package/fesm2022/st.mjs +119 -119
  139. package/fesm2022/st.mjs.map +1 -1
  140. package/fesm2022/sv.mjs +35 -22
  141. package/fesm2022/sv.mjs.map +1 -1
  142. package/fesm2022/tag-select.mjs +7 -7
  143. package/fesm2022/xlsx.mjs +10 -10
  144. package/fesm2022/zip.mjs +7 -7
  145. package/index.less +1 -0
  146. package/package.json +10 -5
  147. package/page-header/page-header.component.d.ts +2 -1
  148. package/page-header/page-header.module.d.ts +2 -1
  149. package/page-header/style/index.less +1 -0
  150. package/pdf/pdf.component.d.ts +6 -5
  151. package/pdf/pdf.types.d.ts +2 -1
  152. package/st/st-data-source.d.ts +1 -1
  153. package/st/st.component.d.ts +7 -8
  154. package/st/st.interfaces.d.ts +21 -1
  155. package/st/st.module.d.ts +17 -16
  156. package/st/st.types.d.ts +3 -0
  157. package/sv/style/index.less +36 -0
  158. package/sv/sv-container.component.d.ts +7 -2
  159. package/sv/sv.component.d.ts +3 -3
  160. package/theme-default.less +11 -0
@@ -0,0 +1,13 @@
1
+ import { OnInit, ViewContainerRef } from '@angular/core';
2
+ import { CellService } from './cell.service';
3
+ import { CellWidgetData } from './cell.types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CellHostDirective implements OnInit {
6
+ private srv;
7
+ private viewContainerRef;
8
+ data: CellWidgetData;
9
+ constructor(srv: CellService, viewContainerRef: ViewContainerRef);
10
+ ngOnInit(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<CellHostDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CellHostDirective, "[cell-widget-host]", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>;
13
+ }
@@ -0,0 +1,45 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, Renderer2, SimpleChange } from '@angular/core';
2
+ import type { SafeValue } from '@angular/platform-browser';
3
+ import { Router } from '@angular/router';
4
+ import { BooleanInput } from '@delon/util/decorator';
5
+ import type { NzSafeAny } from 'ng-zorro-antd/core/types';
6
+ import { NzImageService } from 'ng-zorro-antd/image';
7
+ import { CellService } from './cell.service';
8
+ import type { CellOptions, CellTextResult, CellValue, CellWidgetData } from './cell.types';
9
+ import * as i0 from "@angular/core";
10
+ export declare class CellComponent implements OnChanges, OnDestroy {
11
+ private srv;
12
+ private router;
13
+ private cdr;
14
+ private el;
15
+ private renderer;
16
+ private imgSrv;
17
+ private win;
18
+ static ngAcceptInputType_loading: BooleanInput;
19
+ static ngAcceptInputType_disabled: BooleanInput;
20
+ private destroy$?;
21
+ _text: string | SafeValue | string[] | number;
22
+ _unit?: string;
23
+ res?: CellTextResult;
24
+ showDefault: boolean;
25
+ value?: CellValue;
26
+ readonly valueChange: EventEmitter<any>;
27
+ options?: CellOptions;
28
+ loading: boolean;
29
+ disabled: boolean;
30
+ get safeOpt(): CellOptions;
31
+ get isText(): boolean;
32
+ get hostData(): CellWidgetData;
33
+ constructor(srv: CellService, router: Router, cdr: ChangeDetectorRef, el: ElementRef<HTMLElement>, renderer: Renderer2, imgSrv: NzImageService, win: any);
34
+ private updateValue;
35
+ private setClass;
36
+ ngOnChanges(changes: {
37
+ [p in keyof CellComponent]?: SimpleChange;
38
+ }): void;
39
+ change(value: NzSafeAny): void;
40
+ _link(e: Event): void;
41
+ _showImg(img: string): void;
42
+ ngOnDestroy(): void;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<CellComponent, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<CellComponent, "cell, [cell]", ["cell"], { "value": { "alias": "value"; "required": false; }; "options": { "alias": "options"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
45
+ }
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./cell.component";
3
+ import * as i2 from "./cell-host.directive";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "ng-zorro-antd/checkbox";
7
+ import * as i6 from "ng-zorro-antd/radio";
8
+ import * as i7 from "ng-zorro-antd/badge";
9
+ import * as i8 from "ng-zorro-antd/tag";
10
+ import * as i9 from "ng-zorro-antd/tooltip";
11
+ import * as i10 from "ng-zorro-antd/icon";
12
+ import * as i11 from "ng-zorro-antd/experimental/image";
13
+ export declare class CellModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<CellModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CellModule, [typeof i1.CellComponent, typeof i2.CellHostDirective], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.NzCheckboxModule, typeof i6.NzRadioModule, typeof i7.NzBadgeModule, typeof i8.NzTagModule, typeof i9.NzToolTipModule, typeof i10.NzIconModule, typeof i11.NzImageModule], [typeof i1.CellComponent]>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<CellModule>;
17
+ }
@@ -0,0 +1,23 @@
1
+ import { Type } from '@angular/core';
2
+ import { DomSanitizer } from '@angular/platform-browser';
3
+ import { Observable } from 'rxjs';
4
+ import { AlainConfigService } from '@delon/util/config';
5
+ import { CurrencyService } from '@delon/util/format';
6
+ import { NzI18nService } from 'ng-zorro-antd/i18n';
7
+ import type { CellOptions, CellTextResult, CellWidget } from './cell.types';
8
+ import * as i0 from "@angular/core";
9
+ export declare class CellService {
10
+ private nzI18n;
11
+ private currency;
12
+ private dom;
13
+ private globalOptions;
14
+ private widgets;
15
+ constructor(configSrv: AlainConfigService, nzI18n: NzI18nService, currency: CurrencyService, dom: DomSanitizer);
16
+ registerWidget(key: string, widget: Type<unknown>): void;
17
+ getWidget(key: string): CellWidget | undefined;
18
+ private genType;
19
+ fixOptions(options?: CellOptions): CellOptions;
20
+ get(value: unknown, options?: CellOptions): Observable<CellTextResult>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<CellService, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<CellService>;
23
+ }
@@ -0,0 +1,238 @@
1
+ import type { Type } from '@angular/core';
2
+ import type { SafeValue } from '@angular/platform-browser';
3
+ import type { Observable } from 'rxjs';
4
+ import type { CurrencyCNYOptions, CurrencyFormatOptions, CurrencyMegaOptions, FormatMaskOption } from '@delon/util/format';
5
+ import type { NzImagePreviewOptions } from 'ng-zorro-antd/image';
6
+ export type CellRenderType = 'primary' | 'success' | 'danger' | 'warning';
7
+ export type CellSize = 'large' | 'small';
8
+ export type CellBaseValue = string | number | boolean | Date | null | undefined | SafeValue;
9
+ export interface CellTextUnit {
10
+ text?: string | SafeValue | string[] | number;
11
+ color?: string;
12
+ unit?: string;
13
+ }
14
+ export interface CellTextResult {
15
+ result: CellTextUnit;
16
+ safeHtml?: 'text' | 'html' | 'safeHtml';
17
+ options: CellOptions;
18
+ }
19
+ export type CellValue = CellBaseValue | CellBaseValue[] | CellTextUnit | CellFuValue;
20
+ export type CellFuValue = (value: unknown, options: CellOptions) => Observable<CellTextUnit>;
21
+ export type CellWidgetFn = (value: unknown, options: CellOptions) => CellTextUnit;
22
+ export interface CellWidget {
23
+ type: 'fn' | 'widget';
24
+ ref: Type<unknown> | CellWidgetFn;
25
+ }
26
+ export type CellType = 'string' | 'number' | 'mega' | 'currency' | 'cny' | 'boolean' | 'date' | 'img' | 'link' | 'html' | 'badge' | 'tag' | 'checkbox' | 'radio' | 'enum' | 'widget';
27
+ export interface CellOptions {
28
+ /**
29
+ * 指定渲染类型,若不指定则根据 `value` 类型自动转换
30
+ */
31
+ type?: CellType;
32
+ tooltip?: string;
33
+ /**
34
+ * Render Type
35
+ *
36
+ * 渲染类型
37
+ */
38
+ renderType?: CellRenderType;
39
+ /**
40
+ * Size
41
+ *
42
+ * 大小
43
+ */
44
+ size?: CellSize;
45
+ /**
46
+ * Default Text
47
+ *
48
+ * 默认文本
49
+ */
50
+ default?: CellDefaultText;
51
+ /**
52
+ * Unit
53
+ *
54
+ * 单位
55
+ */
56
+ unit?: string;
57
+ /**
58
+ * Format mask, [Document](https://ng-alain.com/util/format/en#formatMask)
59
+ *
60
+ * 格式化掩码, 参考[文档](https://ng-alain.com/util/format/zh#formatMask)
61
+ */
62
+ mask?: string | FormatMaskOption;
63
+ widget?: {
64
+ key?: string;
65
+ data?: unknown;
66
+ };
67
+ /**
68
+ * Date config, supports `minutes ago` formatting
69
+ *
70
+ * 日期配置,支持 `几分钟前` 格式化
71
+ */
72
+ date?: {
73
+ /**
74
+ * 格式化字符,默认:`yyyy-MM-dd HH:mm:ss`
75
+ * - 若值为 `fn` 时,渲染为 `几分钟前`
76
+ */
77
+ format?: string;
78
+ };
79
+ /**
80
+ * Large number format filter, [Document](https://ng-alain.com/util/format/en#mega)
81
+ *
82
+ * 大数据格式化,[文档](https://ng-alain.com/util/format/en#mega)
83
+ */
84
+ mega?: CurrencyMegaOptions;
85
+ /**
86
+ * 货币
87
+ */
88
+ currency?: CurrencyFormatOptions;
89
+ /**
90
+ * Converted into RMB notation
91
+ *
92
+ * 转化成人民币表示法
93
+ */
94
+ cny?: CurrencyCNYOptions;
95
+ /**
96
+ * 布尔
97
+ */
98
+ boolean?: {
99
+ yes?: string;
100
+ no?: string;
101
+ mode?: 'full' | 'icon' | 'text';
102
+ };
103
+ /**
104
+ * Image config, support large image preview
105
+ *
106
+ * 图像配置,支持大图预览
107
+ */
108
+ img?: {
109
+ size?: number;
110
+ /**
111
+ * 点击查看大图,若 `true` 表示直接使用当前作为大图
112
+ */
113
+ big?: true | string | ((value: unknown) => string);
114
+ previewOptions?: NzImagePreviewOptions;
115
+ };
116
+ /**
117
+ * Link, if it starts with `/`, it means routing jump
118
+ *
119
+ * 链接,若指定URL是以 `/` 开头视为路由跳转
120
+ */
121
+ link?: {
122
+ /**
123
+ * Link, if it starts with `/`, it means routing jump
124
+ *
125
+ * 链接,若指定URL是以 `/` 开头视为路由跳转
126
+ */
127
+ url?: string;
128
+ /**
129
+ * Open type of the external link
130
+ *
131
+ * 外链的打开方式
132
+ */
133
+ target?: '_blank' | '_self' | '_parent' | '_top';
134
+ };
135
+ /**
136
+ * HTML config
137
+ *
138
+ * HTML 配置
139
+ */
140
+ html?: {
141
+ safe?: 'text' | 'html' | 'safeHtml';
142
+ };
143
+ /**
144
+ * Badge config
145
+ *
146
+ * 徽章配置
147
+ */
148
+ badge?: {
149
+ data?: CellBadge;
150
+ };
151
+ /**
152
+ * Tag config
153
+ *
154
+ * 标签配置
155
+ */
156
+ tag?: {
157
+ data?: CellTag;
158
+ };
159
+ /**
160
+ * Checkbox config
161
+ *
162
+ * 复选框配置
163
+ */
164
+ checkbox?: {
165
+ label?: string;
166
+ };
167
+ /**
168
+ * Radio config
169
+ *
170
+ * 单选框配置
171
+ */
172
+ radio?: {
173
+ label?: string;
174
+ };
175
+ enum?: {
176
+ [key: string]: string;
177
+ [key: number]: string;
178
+ };
179
+ }
180
+ /**
181
+ * 徽标信息
182
+ */
183
+ export interface CellBadge {
184
+ [key: number]: CellBadgeValue;
185
+ [key: string]: CellBadgeValue;
186
+ }
187
+ export interface CellBadgeValue {
188
+ /**
189
+ * 文本
190
+ */
191
+ text?: string;
192
+ /**
193
+ * 徽标颜色值
194
+ */
195
+ color?: 'success' | 'processing' | 'default' | 'error' | 'warning';
196
+ /**
197
+ * Text popup tip
198
+ *
199
+ * 文字提示
200
+ */
201
+ tooltip?: string;
202
+ }
203
+ /**
204
+ * 标签信息
205
+ */
206
+ export interface CellTag {
207
+ [key: number]: CellTagValue;
208
+ [key: string]: CellTagValue;
209
+ }
210
+ export interface CellTagValue {
211
+ /**
212
+ * 文本
213
+ */
214
+ text?: string;
215
+ /**
216
+ * 颜色值,支持预设和色值
217
+ * - 预设:geekblue,blue,purple,success,red,volcano,orange,gold,lime,green,cyan
218
+ * - 色值:#f50,#ff0
219
+ */
220
+ color?: 'geekblue' | 'blue' | 'purple' | 'success' | 'red' | 'volcano' | 'orange' | 'gold' | 'lime' | 'green' | 'cyan' | string;
221
+ /**
222
+ * Text popup tip
223
+ *
224
+ * 文字提示
225
+ */
226
+ tooltip?: string;
227
+ }
228
+ export interface CellDefaultText {
229
+ text?: string;
230
+ condition?: unknown;
231
+ }
232
+ export interface CellWidgetData {
233
+ value?: unknown;
234
+ options?: CellOptions;
235
+ }
236
+ export interface CellWidgetInstance {
237
+ readonly data: CellWidgetData;
238
+ }
@@ -0,0 +1,5 @@
1
+ export * from './cell.component';
2
+ export * from './cell-host.directive';
3
+ export * from './cell.module';
4
+ export * from './cell.service';
5
+ export * from './cell.types';
@@ -0,0 +1,63 @@
1
+ @import '../../../theme/theme-default.less';
2
+ @cell-prefix: ~'.cell';
3
+
4
+ @{cell-prefix} {
5
+ &__has-unit {
6
+ align-items: baseline;
7
+ }
8
+
9
+ &__has-default {
10
+ color: @cell-default-color;
11
+ }
12
+
13
+ &__primary {
14
+ color: @primary-color;
15
+ }
16
+
17
+ &__success {
18
+ color: @success-color;
19
+ }
20
+
21
+ &__danger {
22
+ color: @error-color;
23
+ }
24
+
25
+ &__warning {
26
+ color: @warning-color;
27
+ }
28
+
29
+ &__large {
30
+ font-size: @cell-large;
31
+ }
32
+
33
+ &__small {
34
+ font-size: @cell-small;
35
+ }
36
+
37
+ &[data-type="img"] {
38
+ .img:not(:last-child) {
39
+ margin-right: @cell-img-space;
40
+ }
41
+ }
42
+
43
+ .img {
44
+ vertical-align: middle;
45
+ border-radius: 4px;
46
+ }
47
+
48
+ .unit {
49
+ margin-left: 2px;
50
+ color: @cell-unit-color;
51
+ font-size: @cell-unit-font-size;
52
+ }
53
+
54
+ &__disabled {
55
+ &[data-type="link"] {
56
+ pointer-events: none;
57
+
58
+ > a {
59
+ color: @cell-link-disabled-color;
60
+ }
61
+ }
62
+ }
63
+ }
@@ -27,8 +27,8 @@ export class AutoFocusDirective {
27
27
  this._focusoutTimeout = null;
28
28
  }
29
29
  }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Directive }); }
31
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.8", type: AutoFocusDirective, selector: "[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]", inputs: { enabled: "enabled", delay: "delay" }, exportAs: ["autoFocus"], ngImport: i0 }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Directive }); }
31
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: AutoFocusDirective, selector: "[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]", inputs: { enabled: "enabled", delay: "delay" }, exportAs: ["autoFocus"], ngImport: i0 }); }
32
32
  }
33
33
  __decorate([
34
34
  InputBoolean()
@@ -36,7 +36,7 @@ __decorate([
36
36
  __decorate([
37
37
  InputNumber()
38
38
  ], AutoFocusDirective.prototype, "delay", void 0);
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AutoFocusDirective, decorators: [{
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AutoFocusDirective, decorators: [{
40
40
  type: Directive,
41
41
  args: [{
42
42
  selector: '[auto-focus], input[autofocus="autofocus"], textarea[autofocus="autofocus"]',
@@ -3,11 +3,11 @@ import { AutoFocusDirective } from './auto-focus.directive';
3
3
  import * as i0 from "@angular/core";
4
4
  const COMPONENTS = [AutoFocusDirective];
5
5
  export class AutoFocusModule {
6
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
7
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: AutoFocusModule, declarations: [AutoFocusDirective], exports: [AutoFocusDirective] }); }
8
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AutoFocusModule }); }
6
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
7
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.3", ngImport: i0, type: AutoFocusModule, declarations: [AutoFocusDirective], exports: [AutoFocusDirective] }); }
8
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AutoFocusModule }); }
9
9
  }
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AutoFocusModule, decorators: [{
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AutoFocusModule, decorators: [{
11
11
  type: NgModule,
12
12
  args: [{
13
13
  declarations: COMPONENTS,
@@ -1,10 +1,10 @@
1
1
  import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export class AvatarListItemComponent {
4
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AvatarListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: AvatarListItemComponent, selector: "avatar-list-item, [avatar-list-item]", inputs: { src: "src", text: "text", icon: "icon", tips: "tips" }, exportAs: ["avatarListItem"], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
4
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AvatarListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: AvatarListItemComponent, selector: "avatar-list-item, [avatar-list-item]", inputs: { src: "src", text: "text", icon: "icon", tips: "tips" }, exportAs: ["avatarListItem"], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
6
6
  }
7
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AvatarListItemComponent, decorators: [{
7
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AvatarListItemComponent, decorators: [{
8
8
  type: Component,
9
9
  args: [{
10
10
  selector: 'avatar-list-item, [avatar-list-item]',
@@ -58,13 +58,13 @@ export class AvatarListComponent {
58
58
  this.gen();
59
59
  }
60
60
  }
61
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AvatarListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
62
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: AvatarListComponent, selector: "avatar-list", inputs: { size: "size", maxLength: "maxLength", excessItemsStyle: "excessItemsStyle" }, host: { properties: { "class.avatar-list": "true", "class.avatar-list-rtl": "dir === 'rtl'" } }, queries: [{ propertyName: "_items", predicate: AvatarListItemComponent }], exportAs: ["avatarList"], usesOnChanges: true, ngImport: i0, template: "<ul class=\"avatar-list__wrap\">\n <li *ngFor=\"let i of items\" [ngClass]=\"cls\">\n <nz-avatar\n *ngIf=\"i.tips\"\n nz-tooltip\n [nzTooltipTitle]=\"i.tips\"\n [nzSrc]=\"i.src\"\n [nzText]=\"i.text\"\n [nzIcon]=\"i.icon\"\n [nzSize]=\"avatarSize\"\n />\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\" />\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar [nzSize]=\"avatarSize\" style=\"cursor: auto\" [ngStyle]=\"excessItemsStyle\" [nzText]=\"'+' + exceedCount\" />\n </li>\n</ul>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "directive", type: i4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
61
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AvatarListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
62
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: AvatarListComponent, selector: "avatar-list", inputs: { size: "size", maxLength: "maxLength", excessItemsStyle: "excessItemsStyle" }, host: { properties: { "class.avatar-list": "true", "class.avatar-list-rtl": "dir === 'rtl'" } }, queries: [{ propertyName: "_items", predicate: AvatarListItemComponent }], exportAs: ["avatarList"], usesOnChanges: true, ngImport: i0, template: "<ul class=\"avatar-list__wrap\">\n <li *ngFor=\"let i of items\" [ngClass]=\"cls\">\n <nz-avatar\n *ngIf=\"i.tips\"\n nz-tooltip\n [nzTooltipTitle]=\"i.tips\"\n [nzSrc]=\"i.src\"\n [nzText]=\"i.text\"\n [nzIcon]=\"i.icon\"\n [nzSize]=\"avatarSize\"\n />\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\" />\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar [nzSize]=\"avatarSize\" style=\"cursor: auto\" [ngStyle]=\"excessItemsStyle\" [nzText]=\"'+' + exceedCount\" />\n </li>\n</ul>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "directive", type: i4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
63
63
  }
64
64
  __decorate([
65
65
  InputNumber()
66
66
  ], AvatarListComponent.prototype, "maxLength", void 0);
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AvatarListComponent, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AvatarListComponent, decorators: [{
68
68
  type: Component,
69
69
  args: [{ selector: 'avatar-list', exportAs: 'avatarList', host: {
70
70
  '[class.avatar-list]': 'true',
@@ -7,11 +7,11 @@ import { AvatarListComponent } from './avatar-list.component';
7
7
  import * as i0 from "@angular/core";
8
8
  const COMPONENTS = [AvatarListComponent, AvatarListItemComponent];
9
9
  export class AvatarListModule {
10
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AvatarListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
11
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: AvatarListModule, declarations: [AvatarListComponent, AvatarListItemComponent], imports: [CommonModule, NzAvatarModule, NzToolTipModule], exports: [AvatarListComponent, AvatarListItemComponent] }); }
12
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AvatarListModule, imports: [CommonModule, NzAvatarModule, NzToolTipModule] }); }
10
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AvatarListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
11
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.3", ngImport: i0, type: AvatarListModule, declarations: [AvatarListComponent, AvatarListItemComponent], imports: [CommonModule, NzAvatarModule, NzToolTipModule], exports: [AvatarListComponent, AvatarListItemComponent] }); }
12
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AvatarListModule, imports: [CommonModule, NzAvatarModule, NzToolTipModule] }); }
13
13
  }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AvatarListModule, decorators: [{
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: AvatarListModule, decorators: [{
15
15
  type: NgModule,
16
16
  args: [{
17
17
  imports: [CommonModule, NzAvatarModule, NzToolTipModule],
@@ -0,0 +1,34 @@
1
+ import { Directive, Input } from '@angular/core';
2
+ import { warn } from '@delon/util/other';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./cell.service";
5
+ export class CellHostDirective {
6
+ constructor(srv, viewContainerRef) {
7
+ this.srv = srv;
8
+ this.viewContainerRef = viewContainerRef;
9
+ }
10
+ ngOnInit() {
11
+ const widget = this.data.options.widget;
12
+ const componentType = this.srv.getWidget(widget.key)?.ref;
13
+ if (componentType == null) {
14
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
15
+ warn(`cell: No widget for type "${widget.key}"`);
16
+ }
17
+ return;
18
+ }
19
+ this.viewContainerRef.clear();
20
+ const componentRef = this.viewContainerRef.createComponent(componentType);
21
+ componentRef.instance.data = this.data;
22
+ }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: CellHostDirective, deps: [{ token: i1.CellService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
24
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: CellHostDirective, selector: "[cell-widget-host]", inputs: { data: "data" }, ngImport: i0 }); }
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: CellHostDirective, decorators: [{
27
+ type: Directive,
28
+ args: [{
29
+ selector: '[cell-widget-host]'
30
+ }]
31
+ }], ctorParameters: function () { return [{ type: i1.CellService }, { type: i0.ViewContainerRef }]; }, propDecorators: { data: [{
32
+ type: Input
33
+ }] } });
34
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VsbC1ob3N0LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FiYy9jZWxsL2NlbGwtaG9zdC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQWtDLE1BQU0sZUFBZSxDQUFDO0FBRWpGLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQzs7O0FBUXpDLE1BQU0sT0FBTyxpQkFBaUI7SUFHNUIsWUFDVSxHQUFnQixFQUNoQixnQkFBa0M7UUFEbEMsUUFBRyxHQUFILEdBQUcsQ0FBYTtRQUNoQixxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQWtCO0lBQ3pDLENBQUM7SUFFSixRQUFRO1FBQ04sTUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFRLENBQUMsTUFBTyxDQUFDO1FBQzFDLE1BQU0sYUFBYSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBQyxHQUFJLENBQUMsRUFBRSxHQUFvQixDQUFDO1FBQzVFLElBQUksYUFBYSxJQUFJLElBQUksRUFBRTtZQUN6QixJQUFJLE9BQU8sU0FBUyxLQUFLLFdBQVcsSUFBSSxTQUFTLEVBQUU7Z0JBQ2pELElBQUksQ0FBQyw2QkFBNkIsTUFBTSxDQUFDLEdBQUcsR0FBRyxDQUFDLENBQUM7YUFDbEQ7WUFDRCxPQUFPO1NBQ1I7UUFFRCxJQUFJLENBQUMsZ0JBQWdCLENBQUMsS0FBSyxFQUFFLENBQUM7UUFDOUIsTUFBTSxZQUFZLEdBQUcsSUFBSSxDQUFDLGdCQUFnQixDQUFDLGVBQWUsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUN6RSxZQUFZLENBQUMsUUFBcUMsQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQztJQUN2RSxDQUFDOzhHQXJCVSxpQkFBaUI7a0dBQWpCLGlCQUFpQjs7MkZBQWpCLGlCQUFpQjtrQkFIN0IsU0FBUzttQkFBQztvQkFDVCxRQUFRLEVBQUUsb0JBQW9CO2lCQUMvQjtpSUFFVSxJQUFJO3NCQUFaLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEaXJlY3RpdmUsIElucHV0LCBPbkluaXQsIFR5cGUsIFZpZXdDb250YWluZXJSZWYgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgd2FybiB9IGZyb20gJ0BkZWxvbi91dGlsL290aGVyJztcblxuaW1wb3J0IHsgQ2VsbFNlcnZpY2UgfSBmcm9tICcuL2NlbGwuc2VydmljZSc7XG5pbXBvcnQgeyBDZWxsV2lkZ2V0RGF0YSB9IGZyb20gJy4vY2VsbC50eXBlcyc7XG5cbkBEaXJlY3RpdmUoe1xuICBzZWxlY3RvcjogJ1tjZWxsLXdpZGdldC1ob3N0XSdcbn0pXG5leHBvcnQgY2xhc3MgQ2VsbEhvc3REaXJlY3RpdmUgaW1wbGVtZW50cyBPbkluaXQge1xuICBASW5wdXQoKSBkYXRhITogQ2VsbFdpZGdldERhdGE7XG5cbiAgY29uc3RydWN0b3IoXG4gICAgcHJpdmF0ZSBzcnY6IENlbGxTZXJ2aWNlLFxuICAgIHByaXZhdGUgdmlld0NvbnRhaW5lclJlZjogVmlld0NvbnRhaW5lclJlZlxuICApIHt9XG5cbiAgbmdPbkluaXQoKTogdm9pZCB7XG4gICAgY29uc3Qgd2lkZ2V0ID0gdGhpcy5kYXRhLm9wdGlvbnMhLndpZGdldCE7XG4gICAgY29uc3QgY29tcG9uZW50VHlwZSA9IHRoaXMuc3J2LmdldFdpZGdldCh3aWRnZXQua2V5ISk/LnJlZiBhcyBUeXBlPHVua25vd24+O1xuICAgIGlmIChjb21wb25lbnRUeXBlID09IG51bGwpIHtcbiAgICAgIGlmICh0eXBlb2YgbmdEZXZNb2RlID09PSAndW5kZWZpbmVkJyB8fCBuZ0Rldk1vZGUpIHtcbiAgICAgICAgd2FybihgY2VsbDogTm8gd2lkZ2V0IGZvciB0eXBlIFwiJHt3aWRnZXQua2V5fVwiYCk7XG4gICAgICB9XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgdGhpcy52aWV3Q29udGFpbmVyUmVmLmNsZWFyKCk7XG4gICAgY29uc3QgY29tcG9uZW50UmVmID0gdGhpcy52aWV3Q29udGFpbmVyUmVmLmNyZWF0ZUNvbXBvbmVudChjb21wb25lbnRUeXBlKTtcbiAgICAoY29tcG9uZW50UmVmLmluc3RhbmNlIGFzIHsgZGF0YTogQ2VsbFdpZGdldERhdGEgfSkuZGF0YSA9IHRoaXMuZGF0YTtcbiAgfVxufVxuIl19