@delon/abc 13.0.0 → 13.2.1

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 (182) hide show
  1. package/README.md +1 -1
  2. package/auto-focus/auto-focus.directive.d.ts +3 -1
  3. package/ellipsis/ellipsis.component.d.ts +1 -0
  4. package/error-collect/error-collect.component.d.ts +4 -2
  5. package/esm2020/auto-focus/auto-focus.directive.mjs +9 -7
  6. package/esm2020/auto-focus/auto-focus.module.mjs +4 -4
  7. package/esm2020/avatar-list/avatar-list-item.component.mjs +3 -3
  8. package/esm2020/avatar-list/avatar-list.component.mjs +3 -3
  9. package/esm2020/avatar-list/avatar-list.module.mjs +4 -4
  10. package/esm2020/count-down/count-down.component.mjs +3 -3
  11. package/esm2020/count-down/count-down.module.mjs +4 -4
  12. package/esm2020/date-picker/date-picker.module.mjs +4 -4
  13. package/esm2020/date-picker/range-shortcut.component.mjs +3 -3
  14. package/esm2020/date-picker/range.directive.mjs +3 -3
  15. package/esm2020/down-file/down-file.directive.mjs +3 -3
  16. package/esm2020/down-file/down-file.module.mjs +4 -4
  17. package/esm2020/ellipsis/ellipsis.component.mjs +8 -5
  18. package/esm2020/ellipsis/ellipsis.module.mjs +4 -4
  19. package/esm2020/error-collect/error-collect.component.mjs +12 -8
  20. package/esm2020/error-collect/error-collect.module.mjs +4 -4
  21. package/esm2020/exception/exception.component.mjs +3 -3
  22. package/esm2020/exception/exception.module.mjs +4 -4
  23. package/esm2020/footer-toolbar/footer-toolbar.component.mjs +3 -3
  24. package/esm2020/footer-toolbar/footer-toolbar.module.mjs +4 -4
  25. package/esm2020/full-content/full-content-toggle.directive.mjs +3 -3
  26. package/esm2020/full-content/full-content.component.mjs +17 -15
  27. package/esm2020/full-content/full-content.module.mjs +4 -4
  28. package/esm2020/full-content/full-content.service.mjs +3 -3
  29. package/esm2020/global-footer/global-footer-item.component.mjs +3 -3
  30. package/esm2020/global-footer/global-footer.component.mjs +3 -3
  31. package/esm2020/global-footer/global-footer.module.mjs +4 -4
  32. package/esm2020/image/image.directive.mjs +3 -3
  33. package/esm2020/image/image.module.mjs +4 -4
  34. package/esm2020/let/let.directive.mjs +3 -3
  35. package/esm2020/let/let.module.mjs +4 -4
  36. package/esm2020/loading/loading.component.mjs +3 -3
  37. package/esm2020/loading/loading.module.mjs +4 -4
  38. package/esm2020/loading/loading.service.mjs +3 -3
  39. package/esm2020/lodop/lodop.module.mjs +4 -4
  40. package/esm2020/lodop/lodop.service.mjs +3 -3
  41. package/esm2020/media/media.component.mjs +25 -13
  42. package/esm2020/media/media.module.mjs +4 -4
  43. package/esm2020/media/media.service.mjs +6 -5
  44. package/esm2020/media/public_api.mjs +1 -2
  45. package/esm2020/notice-icon/notice-icon-tab.component.mjs +3 -3
  46. package/esm2020/notice-icon/notice-icon.component.mjs +3 -3
  47. package/esm2020/notice-icon/notice-icon.module.mjs +4 -4
  48. package/esm2020/onboarding/onboarding.component.mjs +3 -3
  49. package/esm2020/onboarding/onboarding.module.mjs +4 -4
  50. package/esm2020/onboarding/onboarding.service.mjs +3 -3
  51. package/esm2020/page-header/page-header.component.mjs +3 -3
  52. package/esm2020/page-header/page-header.module.mjs +4 -4
  53. package/esm2020/pdf/pdf.component.mjs +27 -13
  54. package/esm2020/pdf/pdf.module.mjs +4 -4
  55. package/esm2020/qr/qr.component.mjs +5 -5
  56. package/esm2020/qr/qr.module.mjs +4 -4
  57. package/esm2020/quick-menu/quick-menu.component.mjs +3 -3
  58. package/esm2020/quick-menu/quick-menu.module.mjs +4 -4
  59. package/esm2020/result/result.component.mjs +3 -3
  60. package/esm2020/result/result.module.mjs +4 -4
  61. package/esm2020/reuse-tab/reuse-tab-context-menu.component.mjs +3 -3
  62. package/esm2020/reuse-tab/reuse-tab-context.component.mjs +3 -3
  63. package/esm2020/reuse-tab/reuse-tab-context.directive.mjs +3 -3
  64. package/esm2020/reuse-tab/reuse-tab-context.service.mjs +3 -3
  65. package/esm2020/reuse-tab/reuse-tab.component.mjs +3 -3
  66. package/esm2020/reuse-tab/reuse-tab.module.mjs +4 -4
  67. package/esm2020/reuse-tab/reuse-tab.service.mjs +3 -3
  68. package/esm2020/se/se-container.component.mjs +6 -6
  69. package/esm2020/se/se.component.mjs +11 -13
  70. package/esm2020/se/se.module.mjs +4 -4
  71. package/esm2020/sg/sg-container.component.mjs +3 -3
  72. package/esm2020/sg/sg.component.mjs +3 -3
  73. package/esm2020/sg/sg.module.mjs +4 -4
  74. package/esm2020/st/st-column-source.mjs +3 -3
  75. package/esm2020/st/st-data-source.mjs +3 -3
  76. package/esm2020/st/st-export.mjs +3 -3
  77. package/esm2020/st/st-filter.component.mjs +3 -3
  78. package/esm2020/st/st-row.directive.mjs +6 -6
  79. package/esm2020/st/st-widget-host.directive.mjs +3 -3
  80. package/esm2020/st/st-widget.mjs +3 -3
  81. package/esm2020/st/st.component.mjs +6 -6
  82. package/esm2020/st/st.module.mjs +4 -4
  83. package/esm2020/sv/sv-container.component.mjs +6 -6
  84. package/esm2020/sv/sv-value.component.mjs +3 -3
  85. package/esm2020/sv/sv.component.mjs +3 -3
  86. package/esm2020/sv/sv.module.mjs +4 -4
  87. package/esm2020/tag-select/tag-select.component.mjs +3 -3
  88. package/esm2020/tag-select/tag-select.module.mjs +4 -4
  89. package/esm2020/xlsx/xlsx.directive.mjs +3 -3
  90. package/esm2020/xlsx/xlsx.module.mjs +4 -4
  91. package/esm2020/xlsx/xlsx.service.mjs +3 -3
  92. package/esm2020/zip/zip.module.mjs +4 -4
  93. package/esm2020/zip/zip.service.mjs +3 -3
  94. package/fesm2015/auto-focus.mjs +12 -10
  95. package/fesm2015/auto-focus.mjs.map +1 -1
  96. package/fesm2015/avatar-list.mjs +10 -10
  97. package/fesm2015/count-down.mjs +7 -7
  98. package/fesm2015/date-picker.mjs +10 -10
  99. package/fesm2015/down-file.mjs +7 -7
  100. package/fesm2015/ellipsis.mjs +11 -8
  101. package/fesm2015/ellipsis.mjs.map +1 -1
  102. package/fesm2015/error-collect.mjs +15 -11
  103. package/fesm2015/error-collect.mjs.map +1 -1
  104. package/fesm2015/exception.mjs +7 -7
  105. package/fesm2015/footer-toolbar.mjs +7 -7
  106. package/fesm2015/full-content.mjs +26 -25
  107. package/fesm2015/full-content.mjs.map +1 -1
  108. package/fesm2015/global-footer.mjs +10 -10
  109. package/fesm2015/image.mjs +7 -7
  110. package/fesm2015/let.mjs +7 -7
  111. package/fesm2015/loading.mjs +10 -10
  112. package/fesm2015/lodop.mjs +7 -7
  113. package/fesm2015/media.mjs +32 -21
  114. package/fesm2015/media.mjs.map +1 -1
  115. package/fesm2015/notice-icon.mjs +10 -10
  116. package/fesm2015/onboarding.mjs +10 -10
  117. package/fesm2015/page-header.mjs +7 -7
  118. package/fesm2015/pdf.mjs +32 -17
  119. package/fesm2015/pdf.mjs.map +1 -1
  120. package/fesm2015/qr.mjs +8 -8
  121. package/fesm2015/qr.mjs.map +1 -1
  122. package/fesm2015/quick-menu.mjs +7 -7
  123. package/fesm2015/result.mjs +7 -7
  124. package/fesm2015/reuse-tab.mjs +22 -22
  125. package/fesm2015/se.mjs +20 -22
  126. package/fesm2015/se.mjs.map +1 -1
  127. package/fesm2015/sg.mjs +10 -10
  128. package/fesm2015/st.mjs +34 -34
  129. package/fesm2015/sv.mjs +16 -16
  130. package/fesm2015/tag-select.mjs +7 -7
  131. package/fesm2015/xlsx.mjs +10 -10
  132. package/fesm2015/zip.mjs +7 -7
  133. package/fesm2020/auto-focus.mjs +12 -10
  134. package/fesm2020/auto-focus.mjs.map +1 -1
  135. package/fesm2020/avatar-list.mjs +10 -10
  136. package/fesm2020/count-down.mjs +7 -7
  137. package/fesm2020/date-picker.mjs +10 -10
  138. package/fesm2020/down-file.mjs +7 -7
  139. package/fesm2020/ellipsis.mjs +11 -8
  140. package/fesm2020/ellipsis.mjs.map +1 -1
  141. package/fesm2020/error-collect.mjs +15 -11
  142. package/fesm2020/error-collect.mjs.map +1 -1
  143. package/fesm2020/exception.mjs +7 -7
  144. package/fesm2020/footer-toolbar.mjs +7 -7
  145. package/fesm2020/full-content.mjs +26 -24
  146. package/fesm2020/full-content.mjs.map +1 -1
  147. package/fesm2020/global-footer.mjs +10 -10
  148. package/fesm2020/image.mjs +7 -7
  149. package/fesm2020/let.mjs +7 -7
  150. package/fesm2020/loading.mjs +10 -10
  151. package/fesm2020/lodop.mjs +7 -7
  152. package/fesm2020/media.mjs +32 -21
  153. package/fesm2020/media.mjs.map +1 -1
  154. package/fesm2020/notice-icon.mjs +10 -10
  155. package/fesm2020/onboarding.mjs +10 -10
  156. package/fesm2020/page-header.mjs +7 -7
  157. package/fesm2020/pdf.mjs +31 -17
  158. package/fesm2020/pdf.mjs.map +1 -1
  159. package/fesm2020/qr.mjs +8 -8
  160. package/fesm2020/qr.mjs.map +1 -1
  161. package/fesm2020/quick-menu.mjs +7 -7
  162. package/fesm2020/result.mjs +7 -7
  163. package/fesm2020/reuse-tab.mjs +22 -22
  164. package/fesm2020/se.mjs +20 -22
  165. package/fesm2020/se.mjs.map +1 -1
  166. package/fesm2020/sg.mjs +10 -10
  167. package/fesm2020/st.mjs +34 -34
  168. package/fesm2020/sv.mjs +16 -16
  169. package/fesm2020/tag-select.mjs +7 -7
  170. package/fesm2020/xlsx.mjs +10 -10
  171. package/fesm2020/zip.mjs +7 -7
  172. package/full-content/full-content.component.d.ts +1 -3
  173. package/media/media.component.d.ts +11 -12
  174. package/media/public_api.d.ts +0 -1
  175. package/package.json +5 -4
  176. package/pdf/pdf.component.d.ts +2 -1
  177. package/pdf/style/index.less +2 -2
  178. package/qr/qr.component.d.ts +1 -1
  179. package/se/se.component.d.ts +1 -1
  180. package/se/style/index.less +2 -0
  181. package/esm2020/media/plyr.types.mjs +0 -2
  182. package/media/plyr.types.d.ts +0 -58
package/fesm2015/xlsx.mjs CHANGED
@@ -112,15 +112,15 @@ class XlsxService {
112
112
  return res;
113
113
  }
114
114
  }
115
- XlsxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxService, deps: [{ token: i1.HttpClient }, { token: i2.LazyService }, { token: i3.AlainConfigService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
116
- XlsxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxService, providedIn: 'root' });
115
+ XlsxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxService, deps: [{ token: i1.HttpClient }, { token: i2.LazyService }, { token: i3.AlainConfigService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
116
+ XlsxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxService, providedIn: 'root' });
117
117
  __decorate([
118
118
  ZoneOutside()
119
119
  ], XlsxService.prototype, "read", null);
120
120
  __decorate([
121
121
  ZoneOutside()
122
122
  ], XlsxService.prototype, "export", null);
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxService, decorators: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxService, decorators: [{
124
124
  type: Injectable,
125
125
  args: [{ providedIn: 'root' }]
126
126
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.LazyService }, { type: i3.AlainConfigService }, { type: i0.NgZone }]; }, propDecorators: { read: [], export: [] } });
@@ -133,9 +133,9 @@ class XlsxDirective {
133
133
  this.srv.export(this.data);
134
134
  }
135
135
  }
136
- XlsxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxDirective, deps: [{ token: XlsxService }], target: i0.ɵɵFactoryTarget.Directive });
137
- XlsxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: XlsxDirective, selector: "[xlsx]", inputs: { data: ["xlsx", "data"] }, host: { listeners: { "click": "_click()" } }, exportAs: ["xlsx"], ngImport: i0 });
138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxDirective, decorators: [{
136
+ XlsxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxDirective, deps: [{ token: XlsxService }], target: i0.ɵɵFactoryTarget.Directive });
137
+ XlsxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: XlsxDirective, selector: "[xlsx]", inputs: { data: ["xlsx", "data"] }, host: { listeners: { "click": "_click()" } }, exportAs: ["xlsx"], ngImport: i0 });
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxDirective, decorators: [{
139
139
  type: Directive,
140
140
  args: [{
141
141
  selector: '[xlsx]',
@@ -152,10 +152,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
152
152
  const COMPONENTS = [XlsxDirective];
153
153
  class XlsxModule {
154
154
  }
155
- XlsxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
- XlsxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxModule, declarations: [XlsxDirective], imports: [CommonModule], exports: [XlsxDirective] });
157
- XlsxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxModule, imports: [[CommonModule]] });
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: XlsxModule, decorators: [{
155
+ XlsxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
+ XlsxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxModule, declarations: [XlsxDirective], imports: [CommonModule], exports: [XlsxDirective] });
157
+ XlsxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxModule, imports: [[CommonModule]] });
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: XlsxModule, decorators: [{
159
159
  type: NgModule,
160
160
  args: [{
161
161
  imports: [CommonModule],
package/fesm2015/zip.mjs CHANGED
@@ -104,22 +104,22 @@ class ZipService {
104
104
  });
105
105
  }
106
106
  }
107
- ZipService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ZipService, deps: [{ token: i1.HttpClient }, { token: i2.LazyService }, { token: i3.AlainConfigService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
108
- ZipService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ZipService, providedIn: 'root' });
107
+ ZipService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ZipService, deps: [{ token: i1.HttpClient }, { token: i2.LazyService }, { token: i3.AlainConfigService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
108
+ ZipService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ZipService, providedIn: 'root' });
109
109
  __decorate([
110
110
  ZoneOutside()
111
111
  ], ZipService.prototype, "read", null);
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ZipService, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ZipService, decorators: [{
113
113
  type: Injectable,
114
114
  args: [{ providedIn: 'root' }]
115
115
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.LazyService }, { type: i3.AlainConfigService }, { type: i0.NgZone }]; }, propDecorators: { read: [] } });
116
116
 
117
117
  class ZipModule {
118
118
  }
119
- ZipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ZipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
120
- ZipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ZipModule, imports: [CommonModule] });
121
- ZipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ZipModule, imports: [[CommonModule]] });
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ZipModule, decorators: [{
119
+ ZipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ZipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
120
+ ZipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ZipModule, imports: [CommonModule] });
121
+ ZipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ZipModule, imports: [[CommonModule]] });
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ZipModule, decorators: [{
123
123
  type: NgModule,
124
124
  args: [{
125
125
  imports: [CommonModule]
@@ -2,17 +2,19 @@ import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Directive, Input, NgModule } from '@angular/core';
4
4
  import { InputBoolean, InputNumber } from '@delon/util/decorator';
5
+ import * as i1 from '@angular/cdk/platform';
5
6
 
6
7
  class AutoFocusDirective {
7
- constructor(el, cdr) {
8
+ constructor(el, cdr, platform) {
8
9
  this.el = el;
9
10
  this.cdr = cdr;
11
+ this.platform = platform;
10
12
  this.enabled = true;
11
13
  this.delay = 300;
12
14
  }
13
15
  ngAfterViewInit() {
14
16
  const el = this.el.nativeElement;
15
- if (!(el instanceof HTMLElement) || !this.enabled) {
17
+ if (!this.platform.isBrowser || !(el instanceof HTMLElement) || !this.enabled) {
16
18
  return;
17
19
  }
18
20
  this._focusoutTimeout = setTimeout(() => {
@@ -27,21 +29,21 @@ class AutoFocusDirective {
27
29
  }
28
30
  }
29
31
  }
30
- AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
31
- AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: AutoFocusDirective, selector: "[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]", inputs: { enabled: "enabled", delay: "delay" }, exportAs: ["autoFocus"], ngImport: i0 });
32
+ AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Directive });
33
+ AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: AutoFocusDirective, selector: "[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]", inputs: { enabled: "enabled", delay: "delay" }, exportAs: ["autoFocus"], ngImport: i0 });
32
34
  __decorate([
33
35
  InputBoolean()
34
36
  ], AutoFocusDirective.prototype, "enabled", void 0);
35
37
  __decorate([
36
38
  InputNumber()
37
39
  ], AutoFocusDirective.prototype, "delay", void 0);
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusDirective, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AutoFocusDirective, decorators: [{
39
41
  type: Directive,
40
42
  args: [{
41
43
  selector: '[auto-focus], input[autofocus="autofocus"], textarea[autofocus="autofocus"]',
42
44
  exportAs: 'autoFocus'
43
45
  }]
44
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { enabled: [{
46
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Platform }]; }, propDecorators: { enabled: [{
45
47
  type: Input
46
48
  }], delay: [{
47
49
  type: Input
@@ -50,10 +52,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
50
52
  const COMPONENTS = [AutoFocusDirective];
51
53
  class AutoFocusModule {
52
54
  }
53
- AutoFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
54
- AutoFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule, declarations: [AutoFocusDirective], exports: [AutoFocusDirective] });
55
- AutoFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule });
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule, decorators: [{
55
+ AutoFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
56
+ AutoFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AutoFocusModule, declarations: [AutoFocusDirective], exports: [AutoFocusDirective] });
57
+ AutoFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AutoFocusModule });
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AutoFocusModule, decorators: [{
57
59
  type: NgModule,
58
60
  args: [{
59
61
  declarations: COMPONENTS,
@@ -1 +1 @@
1
- {"version":3,"file":"auto-focus.mjs","sources":["../../../../packages/abc/auto-focus/auto-focus.directive.ts","../../../../packages/abc/auto-focus/auto-focus.module.ts","../../../../packages/abc/auto-focus/auto-focus.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectorRef, Directive, ElementRef, Input, OnDestroy } from '@angular/core';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n selector: '[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]',\n exportAs: 'autoFocus'\n})\nexport class AutoFocusDirective implements AfterViewInit, OnDestroy {\n static ngAcceptInputType_enabled: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n\n private _focusoutTimeout: NzSafeAny;\n @Input() @InputBoolean() enabled = true;\n @Input() @InputNumber() delay = 300;\n\n constructor(private el: ElementRef<HTMLElement>, private cdr: ChangeDetectorRef) {}\n\n ngAfterViewInit(): void {\n const el = this.el.nativeElement;\n if (!(el instanceof HTMLElement) || !this.enabled) {\n return;\n }\n this._focusoutTimeout = setTimeout(() => {\n el.focus({ preventScroll: false });\n this.cdr.markForCheck();\n }, this.delay);\n }\n\n ngOnDestroy(): void {\n if (this._focusoutTimeout) {\n clearTimeout(this._focusoutTimeout);\n this._focusoutTimeout = null;\n }\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { AutoFocusDirective } from './auto-focus.directive';\n\nconst COMPONENTS = [AutoFocusDirective];\n\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class AutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MASa,kBAAkB;IAQ7B,YAAoB,EAA2B,EAAU,GAAsB;QAA3D,OAAE,GAAF,EAAE,CAAyB;QAAU,QAAG,GAAH,GAAG,CAAmB;QAHtD,YAAO,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,GAAG,CAAC;KAE+C;IAEnF,eAAe;QACb,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QACjC,IAAI,EAAE,EAAE,YAAY,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjD,OAAO;SACR;QACD,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC;YACjC,EAAE,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;YACnC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;SACzB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAChB;IAED,WAAW;QACT,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;SAC9B;KACF;;+GA1BU,kBAAkB;mGAAlB,kBAAkB;AAKJ;IAAf,YAAY,EAAE;mDAAgB;AAChB;IAAd,WAAW,EAAE;iDAAa;2FANzB,kBAAkB;kBAJ9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,6EAA6E;oBACvF,QAAQ,EAAE,WAAW;iBACtB;iIAM0B,OAAO;sBAA/B,KAAK;gBACkB,KAAK;sBAA5B,KAAK;;;ACXR,MAAM,UAAU,GAAG,CAAC,kBAAkB,CAAC,CAAC;MAM3B,eAAe;;4GAAf,eAAe;6GAAf,eAAe,iBANR,kBAAkB,aAAlB,kBAAkB;6GAMzB,eAAe;2FAAf,eAAe;kBAJ3B,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACTD;;;;;;"}
1
+ {"version":3,"file":"auto-focus.mjs","sources":["../../../../packages/abc/auto-focus/auto-focus.directive.ts","../../../../packages/abc/auto-focus/auto-focus.module.ts","../../../../packages/abc/auto-focus/auto-focus.ts"],"sourcesContent":["import { Platform } from '@angular/cdk/platform';\nimport { AfterViewInit, ChangeDetectorRef, Directive, ElementRef, Input, OnDestroy } from '@angular/core';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n selector: '[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]',\n exportAs: 'autoFocus'\n})\nexport class AutoFocusDirective implements AfterViewInit, OnDestroy {\n static ngAcceptInputType_enabled: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n\n private _focusoutTimeout: NzSafeAny;\n @Input() @InputBoolean() enabled = true;\n @Input() @InputNumber() delay = 300;\n\n constructor(private el: ElementRef<HTMLElement>, private cdr: ChangeDetectorRef, private platform: Platform) {}\n\n ngAfterViewInit(): void {\n const el = this.el.nativeElement;\n if (!this.platform.isBrowser || !(el instanceof HTMLElement) || !this.enabled) {\n return;\n }\n this._focusoutTimeout = setTimeout(() => {\n el.focus({ preventScroll: false });\n this.cdr.markForCheck();\n }, this.delay);\n }\n\n ngOnDestroy(): void {\n if (this._focusoutTimeout) {\n clearTimeout(this._focusoutTimeout);\n this._focusoutTimeout = null;\n }\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { AutoFocusDirective } from './auto-focus.directive';\n\nconst COMPONENTS = [AutoFocusDirective];\n\n@NgModule({\n declarations: COMPONENTS,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;;4GAAf,eAAe;6GAAf,eAAe,iBANR,kBAAkB,aAAlB,kBAAkB;6GAMzB,eAAe;2FAAf,eAAe;kBAJ3B,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACTD;;;;;;"}
@@ -14,9 +14,9 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
14
14
 
15
15
  class AvatarListItemComponent {
16
16
  }
17
- AvatarListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- AvatarListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListItemComponent, decorators: [{
17
+ AvatarListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
+ AvatarListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", 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></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListItemComponent, decorators: [{
20
20
  type: Component,
21
21
  args: [{
22
22
  selector: 'avatar-list-item, [avatar-list-item]',
@@ -90,12 +90,12 @@ class AvatarListComponent {
90
90
  this.destroy$.complete();
91
91
  }
92
92
  }
93
- AvatarListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
94
- AvatarListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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 ></nz-avatar>\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\"></nz-avatar>\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar\n [nzSize]=\"avatarSize\"\n style=\"cursor: auto\"\n [ngStyle]=\"excessItemsStyle\"\n [nzText]=\"'+' + exceedCount\"\n ></nz-avatar>\n </li>\n</ul>\n", components: [{ type: i2.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
93
+ AvatarListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
94
+ AvatarListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", 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 ></nz-avatar>\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\"></nz-avatar>\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar\n [nzSize]=\"avatarSize\"\n style=\"cursor: auto\"\n [ngStyle]=\"excessItemsStyle\"\n [nzText]=\"'+' + exceedCount\"\n ></nz-avatar>\n </li>\n</ul>\n", components: [{ type: i2.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
95
95
  __decorate([
96
96
  InputNumber()
97
97
  ], AvatarListComponent.prototype, "maxLength", void 0);
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListComponent, decorators: [{
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListComponent, decorators: [{
99
99
  type: Component,
100
100
  args: [{ selector: 'avatar-list', exportAs: 'avatarList', host: {
101
101
  '[class.avatar-list]': 'true',
@@ -117,10 +117,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
117
117
  const COMPONENTS = [AvatarListComponent, AvatarListItemComponent];
118
118
  class AvatarListModule {
119
119
  }
120
- AvatarListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
121
- AvatarListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, declarations: [AvatarListComponent, AvatarListItemComponent], imports: [CommonModule, NzAvatarModule, NzToolTipModule], exports: [AvatarListComponent, AvatarListItemComponent] });
122
- AvatarListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, imports: [[CommonModule, NzAvatarModule, NzToolTipModule]] });
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, decorators: [{
120
+ AvatarListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
121
+ AvatarListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListModule, declarations: [AvatarListComponent, AvatarListItemComponent], imports: [CommonModule, NzAvatarModule, NzToolTipModule], exports: [AvatarListComponent, AvatarListItemComponent] });
122
+ AvatarListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListModule, imports: [[CommonModule, NzAvatarModule, NzToolTipModule]] });
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AvatarListModule, decorators: [{
124
124
  type: NgModule,
125
125
  args: [{
126
126
  imports: [CommonModule, NzAvatarModule, NzToolTipModule],
@@ -23,9 +23,9 @@ class CountDownComponent {
23
23
  this.event.emit(e);
24
24
  }
25
25
  }
26
- CountDownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
- CountDownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: CountDownComponent, selector: "count-down", inputs: { config: "config", target: "target" }, outputs: { event: "event" }, viewQueries: [{ propertyName: "instance", first: true, predicate: ["cd"], descendants: true }], exportAs: ["countDown"], ngImport: i0, template: ` <countdown #cd *ngIf="config" [config]="config" (event)="handleEvent($event)"></countdown> `, isInline: true, components: [{ type: i1.CountdownComponent, selector: "countdown", inputs: ["config", "render"], outputs: ["event"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownComponent, decorators: [{
26
+ CountDownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CountDownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
+ CountDownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: CountDownComponent, selector: "count-down", inputs: { config: "config", target: "target" }, outputs: { event: "event" }, viewQueries: [{ propertyName: "instance", first: true, predicate: ["cd"], descendants: true }], exportAs: ["countDown"], ngImport: i0, template: ` <countdown #cd *ngIf="config" [config]="config" (event)="handleEvent($event)"></countdown> `, isInline: true, components: [{ type: i1.CountdownComponent, selector: "countdown", inputs: ["config", "render"], outputs: ["event"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CountDownComponent, decorators: [{
29
29
  type: Component,
30
30
  args: [{
31
31
  selector: 'count-down',
@@ -49,10 +49,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
49
49
  const COMPONENTS = [CountDownComponent];
50
50
  class CountDownModule {
51
51
  }
52
- CountDownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
53
- CountDownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, declarations: [CountDownComponent], imports: [CommonModule, CountdownModule], exports: [CountDownComponent] });
54
- CountDownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, imports: [[CommonModule, CountdownModule]] });
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, decorators: [{
52
+ CountDownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CountDownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
53
+ CountDownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CountDownModule, declarations: [CountDownComponent], imports: [CommonModule, CountdownModule], exports: [CountDownComponent] });
54
+ CountDownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CountDownModule, imports: [[CommonModule, CountdownModule]] });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CountDownModule, decorators: [{
56
56
  type: NgModule,
57
57
  args: [{
58
58
  imports: [CommonModule, CountdownModule],
@@ -17,8 +17,8 @@ class RangePickerShortcutTplComponent {
17
17
  }
18
18
  click(_) { }
19
19
  }
20
- RangePickerShortcutTplComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerShortcutTplComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
- RangePickerShortcutTplComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: RangePickerShortcutTplComponent, selector: "ng-component", viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, static: true }], ngImport: i0, template: `
20
+ RangePickerShortcutTplComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: RangePickerShortcutTplComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
+ RangePickerShortcutTplComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: RangePickerShortcutTplComponent, selector: "ng-component", viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, static: true }], ngImport: i0, template: `
22
22
  <ng-template #tpl>
23
23
  <a
24
24
  *ngFor="let i of list; let first = first"
@@ -28,7 +28,7 @@ RangePickerShortcutTplComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
28
28
  ></a>
29
29
  </ng-template>
30
30
  `, isInline: true, directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerShortcutTplComponent, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: RangePickerShortcutTplComponent, decorators: [{
32
32
  type: Component,
33
33
  args: [{
34
34
  selector: '',
@@ -193,9 +193,9 @@ class RangePickerDirective {
193
193
  this.destroy$.complete();
194
194
  }
195
195
  }
196
- RangePickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerDirective, deps: [{ token: i1$1.DomSanitizer }, { token: i2.AlainConfigService }, { token: i3.NzRangePickerComponent, host: true, optional: true }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
197
- RangePickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: RangePickerDirective, selector: "nz-range-picker[extend]", inputs: { shortcut: "shortcut", ngModelEnd: "ngModelEnd" }, outputs: { ngModelEndChange: "ngModelEndChange" }, exportAs: ["extendRangePicker"], ngImport: i0 });
198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerDirective, decorators: [{
196
+ RangePickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: RangePickerDirective, deps: [{ token: i1$1.DomSanitizer }, { token: i2.AlainConfigService }, { token: i3.NzRangePickerComponent, host: true, optional: true }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
197
+ RangePickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: RangePickerDirective, selector: "nz-range-picker[extend]", inputs: { shortcut: "shortcut", ngModelEnd: "ngModelEnd" }, outputs: { ngModelEndChange: "ngModelEndChange" }, exportAs: ["extendRangePicker"], ngImport: i0 });
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: RangePickerDirective, decorators: [{
199
199
  type: Directive,
200
200
  args: [{
201
201
  selector: 'nz-range-picker[extend]',
@@ -216,10 +216,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
216
216
  const COMPONENTS = [RangePickerDirective, RangePickerShortcutTplComponent];
217
217
  class DatePickerModule {
218
218
  }
219
- DatePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
220
- DatePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, declarations: [RangePickerDirective, RangePickerShortcutTplComponent], imports: [CommonModule, FormsModule, NzDatePickerModule], exports: [RangePickerDirective, RangePickerShortcutTplComponent] });
221
- DatePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, imports: [[CommonModule, FormsModule, NzDatePickerModule]] });
222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, decorators: [{
219
+ DatePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
220
+ DatePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DatePickerModule, declarations: [RangePickerDirective, RangePickerShortcutTplComponent], imports: [CommonModule, FormsModule, NzDatePickerModule], exports: [RangePickerDirective, RangePickerShortcutTplComponent] });
221
+ DatePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DatePickerModule, imports: [[CommonModule, FormsModule, NzDatePickerModule]] });
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DatePickerModule, decorators: [{
223
223
  type: NgModule,
224
224
  args: [{
225
225
  imports: [CommonModule, FormsModule, NzDatePickerModule],
@@ -81,9 +81,9 @@ class DownFileDirective {
81
81
  });
82
82
  }
83
83
  }
84
- DownFileDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DownFileDirective, deps: [{ token: i0.ElementRef }, { token: i1._HttpClient }], target: i0.ɵɵFactoryTarget.Directive });
85
- DownFileDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: DownFileDirective, selector: "[down-file]", inputs: { httpData: ["http-data", "httpData"], httpBody: ["http-body", "httpBody"], httpMethod: ["http-method", "httpMethod"], httpUrl: ["http-url", "httpUrl"], fileName: ["file-name", "fileName"], pre: "pre" }, outputs: { success: "success", error: "error" }, host: { listeners: { "click": "_click($event)" } }, exportAs: ["downFile"], ngImport: i0 });
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DownFileDirective, decorators: [{
84
+ DownFileDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DownFileDirective, deps: [{ token: i0.ElementRef }, { token: i1._HttpClient }], target: i0.ɵɵFactoryTarget.Directive });
85
+ DownFileDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: DownFileDirective, selector: "[down-file]", inputs: { httpData: ["http-data", "httpData"], httpBody: ["http-body", "httpBody"], httpMethod: ["http-method", "httpMethod"], httpUrl: ["http-url", "httpUrl"], fileName: ["file-name", "fileName"], pre: "pre" }, outputs: { success: "success", error: "error" }, host: { listeners: { "click": "_click($event)" } }, exportAs: ["downFile"], ngImport: i0 });
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DownFileDirective, decorators: [{
87
87
  type: Directive,
88
88
  args: [{
89
89
  selector: '[down-file]',
@@ -118,10 +118,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
118
118
  const DIRECTIVES = [DownFileDirective];
119
119
  class DownFileModule {
120
120
  }
121
- DownFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DownFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
122
- DownFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DownFileModule, declarations: [DownFileDirective], imports: [CommonModule, AlainThemeModule], exports: [DownFileDirective] });
123
- DownFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DownFileModule, imports: [[CommonModule, AlainThemeModule]] });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DownFileModule, decorators: [{
121
+ DownFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DownFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
122
+ DownFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DownFileModule, declarations: [DownFileDirective], imports: [CommonModule, AlainThemeModule], exports: [DownFileDirective] });
123
+ DownFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DownFileModule, imports: [[CommonModule, AlainThemeModule]] });
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DownFileModule, decorators: [{
125
125
  type: NgModule,
126
126
  args: [{
127
127
  imports: [CommonModule, AlainThemeModule],
@@ -33,6 +33,9 @@ class EllipsisComponent {
33
33
  return ((targetCount > 0 ? text.substring(0, targetCount) : '') +
34
34
  (targetCount > 0 && targetCount < text.length ? tail : ''));
35
35
  }
36
+ get win() {
37
+ return this.doc.defaultView || window;
38
+ }
36
39
  getStrFullLength(str) {
37
40
  return str.split('').reduce((pre, cur) => {
38
41
  const charCode = cur.charCodeAt(0);
@@ -134,7 +137,7 @@ class EllipsisComponent {
134
137
  const { shadowOrgEl, shadowTextEl } = this;
135
138
  const orgNode = shadowOrgEl.nativeElement;
136
139
  const lineText = orgNode.innerText || orgNode.textContent;
137
- const lineHeight = parseInt(getComputedStyle(this.getEl('.ellipsis')).lineHeight, 10);
140
+ const lineHeight = parseInt(this.win.getComputedStyle(this.getEl('.ellipsis')).lineHeight, 10);
138
141
  const targetHeight = lines * lineHeight;
139
142
  this.getEl('.ellipsis__handle').style.height = `${targetHeight}px`;
140
143
  if (orgNode.offsetHeight <= targetHeight) {
@@ -189,8 +192,8 @@ class EllipsisComponent {
189
192
  }
190
193
  }
191
194
  }
192
- EllipsisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EllipsisComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.DomSanitizer }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
193
- EllipsisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: EllipsisComponent, selector: "ellipsis", inputs: { tooltip: "tooltip", length: "length", lines: "lines", fullWidthRecognition: "fullWidthRecognition", tail: "tail" }, viewQueries: [{ propertyName: "orgEl", first: true, predicate: ["orgEl"], descendants: true }, { propertyName: "shadowOrgEl", first: true, predicate: ["shadowOrgEl"], descendants: true }, { propertyName: "shadowTextEl", first: true, predicate: ["shadowTextEl"], descendants: true }], exportAs: ["ellipsis"], usesOnChanges: true, ngImport: i0, template: "<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\n <ng-template #lineTpl>{{ linsWord }}</ng-template>\n <div class=\"ellipsis__shadow\" #shadowOrgEl [innerHTML]=\"orgHtml\"></div>\n <div class=\"ellipsis__shadow\" #shadowTextEl>\n <span>{{ text }}</span>\n </div>\n </div>\n </div>\n</ng-container>\n", directives: [{ type: i2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
195
+ EllipsisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: EllipsisComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.DomSanitizer }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
196
+ EllipsisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: EllipsisComponent, selector: "ellipsis", inputs: { tooltip: "tooltip", length: "length", lines: "lines", fullWidthRecognition: "fullWidthRecognition", tail: "tail" }, viewQueries: [{ propertyName: "orgEl", first: true, predicate: ["orgEl"], descendants: true }, { propertyName: "shadowOrgEl", first: true, predicate: ["shadowOrgEl"], descendants: true }, { propertyName: "shadowTextEl", first: true, predicate: ["shadowTextEl"], descendants: true }], exportAs: ["ellipsis"], usesOnChanges: true, ngImport: i0, template: "<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\n <ng-template #lineTpl>{{ linsWord }}</ng-template>\n <div class=\"ellipsis__shadow\" #shadowOrgEl [innerHTML]=\"orgHtml\"></div>\n <div class=\"ellipsis__shadow\" #shadowTextEl>\n <span>{{ text }}</span>\n </div>\n </div>\n </div>\n</ng-container>\n", directives: [{ type: i2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
194
197
  __decorate([
195
198
  InputBoolean()
196
199
  ], EllipsisComponent.prototype, "tooltip", void 0);
@@ -203,7 +206,7 @@ __decorate([
203
206
  __decorate([
204
207
  InputBoolean()
205
208
  ], EllipsisComponent.prototype, "fullWidthRecognition", void 0);
206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EllipsisComponent, decorators: [{
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: EllipsisComponent, decorators: [{
207
210
  type: Component,
208
211
  args: [{ selector: 'ellipsis', exportAs: 'ellipsis', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\n <ng-template #lineTpl>{{ linsWord }}</ng-template>\n <div class=\"ellipsis__shadow\" #shadowOrgEl [innerHTML]=\"orgHtml\"></div>\n <div class=\"ellipsis__shadow\" #shadowTextEl>\n <span>{{ text }}</span>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
209
212
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.DomSanitizer }, { type: undefined, decorators: [{
@@ -233,10 +236,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
233
236
  const COMPONENTS = [EllipsisComponent];
234
237
  class EllipsisModule {
235
238
  }
236
- EllipsisModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EllipsisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
237
- EllipsisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EllipsisModule, declarations: [EllipsisComponent], imports: [CommonModule, ObserversModule, NzToolTipModule], exports: [EllipsisComponent] });
238
- EllipsisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EllipsisModule, imports: [[CommonModule, ObserversModule, NzToolTipModule]] });
239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EllipsisModule, decorators: [{
239
+ EllipsisModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: EllipsisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
240
+ EllipsisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: EllipsisModule, declarations: [EllipsisComponent], imports: [CommonModule, ObserversModule, NzToolTipModule], exports: [EllipsisComponent] });
241
+ EllipsisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: EllipsisModule, imports: [[CommonModule, ObserversModule, NzToolTipModule]] });
242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: EllipsisModule, decorators: [{
240
243
  type: NgModule,
241
244
  args: [{
242
245
  imports: [CommonModule, ObserversModule, NzToolTipModule],
@@ -1 +1 @@
1
- {"version":3,"file":"ellipsis.mjs","sources":["../../../../packages/abc/ellipsis/ellipsis.component.ts","../../../../packages/abc/ellipsis/ellipsis.component.html","../../../../packages/abc/ellipsis/ellipsis.module.ts","../../../../packages/abc/ellipsis/ellipsis.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { take } from 'rxjs/operators';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'ellipsis',\n exportAs: 'ellipsis',\n templateUrl: './ellipsis.component.html',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class EllipsisComponent implements AfterViewInit, OnChanges {\n static ngAcceptInputType_tooltip: BooleanInput;\n static ngAcceptInputType_length: NumberInput;\n static ngAcceptInputType_lines: NumberInput;\n static ngAcceptInputType_fullWidthRecognition: BooleanInput;\n\n private isSupportLineClamp = this.doc.body.style['webkitLineClamp'] !== undefined;\n @ViewChild('orgEl', { static: false }) private orgEl!: ElementRef;\n @ViewChild('shadowOrgEl', { static: false }) private shadowOrgEl!: ElementRef;\n @ViewChild('shadowTextEl', { static: false }) private shadowTextEl!: ElementRef;\n private inited = false;\n orgHtml!: SafeHtml;\n type = 'default';\n cls = {};\n text = '';\n targetCount = 0;\n\n @Input() @InputBoolean() tooltip = false;\n @Input() @InputNumber(null) length?: number;\n @Input() @InputNumber(null) lines?: number;\n @Input() @InputBoolean() fullWidthRecognition = false;\n @Input() tail = '...';\n\n get linsWord(): string {\n const { targetCount, text, tail } = this;\n return (\n (targetCount > 0 ? text.substring(0, targetCount) : '') +\n (targetCount > 0 && targetCount < text.length ? tail : '')\n );\n }\n\n constructor(\n private el: ElementRef,\n private ngZone: NgZone,\n private dom: DomSanitizer,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n private cdr: ChangeDetectorRef\n ) {}\n\n private getStrFullLength(str: string): number {\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n return pre + 1;\n }\n return pre + 2;\n }, 0);\n }\n\n private cutStrByFullLength(str: string, maxLength: number): string {\n let showLength = 0;\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n showLength += 1;\n } else {\n showLength += 2;\n }\n if (showLength <= maxLength) {\n return pre + cur;\n }\n return pre;\n }, '');\n }\n\n private bisection(\n targetHeight: number,\n mid: number,\n begin: number,\n end: number,\n text: string,\n node: HTMLElement\n ): number {\n const suffix = this.tail;\n node.innerHTML = text.substring(0, mid) + suffix;\n let sh = node.offsetHeight;\n\n if (sh <= targetHeight) {\n node.innerHTML = text.substring(0, mid + 1) + suffix;\n sh = node.offsetHeight;\n if (sh > targetHeight || mid === begin) {\n return mid;\n }\n begin = mid;\n mid = end - begin === 1 ? begin + 1 : Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n if (mid - 1 < 0) {\n return mid;\n }\n node.innerHTML = text.substring(0, mid - 1) + suffix;\n sh = node.offsetHeight;\n if (sh <= targetHeight) {\n return mid - 1;\n }\n end = mid;\n mid = Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n\n private genType(): void {\n const { lines, length, isSupportLineClamp } = this;\n this.cls = {\n ellipsis: true,\n ellipsis__lines: lines && !isSupportLineClamp,\n 'ellipsis__line-clamp': lines && isSupportLineClamp\n };\n if (!lines && !length) {\n this.type = 'default';\n } else if (!lines) {\n this.type = 'length';\n } else if (isSupportLineClamp) {\n this.type = 'line-clamp';\n } else {\n this.type = 'line';\n }\n }\n\n private gen(): void {\n const { type, lines, length, fullWidthRecognition, tail, orgEl, cdr, ngZone } = this;\n if (type === 'length') {\n const el = orgEl.nativeElement as HTMLElement;\n if (el.children.length > 0) {\n throw new Error('Ellipsis content must be string.');\n }\n const lengthText = el.textContent!;\n const textLength = fullWidthRecognition ? this.getStrFullLength(lengthText) : lengthText.length;\n if (textLength <= length! || length! < 0) {\n this.text = lengthText;\n } else {\n let displayText: string;\n if (length! - tail.length <= 0) {\n displayText = '';\n } else {\n displayText = fullWidthRecognition\n ? this.cutStrByFullLength(lengthText, length!)\n : lengthText.slice(0, length);\n }\n this.text = displayText + tail;\n }\n ngZone.run(() => cdr.detectChanges());\n } else if (type === 'line') {\n const { shadowOrgEl, shadowTextEl } = this;\n const orgNode = shadowOrgEl.nativeElement as HTMLElement;\n const lineText = orgNode.innerText || orgNode.textContent!;\n const lineHeight = parseInt(getComputedStyle(this.getEl('.ellipsis')).lineHeight!, 10);\n const targetHeight = lines! * lineHeight;\n this.getEl('.ellipsis__handle').style.height = `${targetHeight}px`;\n\n if (orgNode.offsetHeight <= targetHeight) {\n this.text = lineText;\n this.targetCount = lineText.length;\n } else {\n // bisection\n const len = lineText.length;\n const mid = Math.ceil(len / 2);\n\n const count = this.bisection(targetHeight, mid, 0, len, lineText, shadowTextEl.nativeElement.firstChild);\n this.text = lineText;\n this.targetCount = count;\n }\n ngZone.run(() => cdr.detectChanges());\n }\n }\n\n private getEl(cls: string): HTMLElement {\n return this.el.nativeElement.querySelector(cls);\n }\n\n private executeOnStable(fn: () => void): void {\n if (this.ngZone.isStable) {\n fn();\n } else {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(fn);\n }\n }\n\n refresh(): void {\n this.genType();\n const { type, dom, orgEl, cdr } = this;\n const html = orgEl.nativeElement.innerHTML;\n this.orgHtml = dom.bypassSecurityTrustHtml(html);\n cdr.detectChanges();\n this.executeOnStable(() => {\n this.gen();\n if (type !== 'line') {\n const el = this.getEl('.ellipsis');\n if (el) {\n el.innerHTML = html;\n }\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.inited = true;\n this.refresh();\n }\n\n ngOnChanges(): void {\n if (this.inited) {\n this.refresh();\n }\n }\n}\n","<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\n <ng-template #lineTpl>{{ linsWord }}</ng-template>\n <div class=\"ellipsis__shadow\" #shadowOrgEl [innerHTML]=\"orgHtml\"></div>\n <div class=\"ellipsis__shadow\" #shadowTextEl>\n <span>{{ text }}</span>\n </div>\n </div>\n </div>\n</ng-container>\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { EllipsisComponent } from './ellipsis.component';\n\nconst COMPONENTS = [EllipsisComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, NzToolTipModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class EllipsisModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MA4Ba,iBAAiB;IA+B5B,YACU,EAAc,EACd,MAAc,EACd,GAAiB,EACC,GAAc,EAChC,GAAsB;QAJtB,OAAE,GAAF,EAAE,CAAY;QACd,WAAM,GAAN,MAAM,CAAQ;QACd,QAAG,GAAH,GAAG,CAAc;QACC,QAAG,GAAH,GAAG,CAAW;QAChC,QAAG,GAAH,GAAG,CAAmB;QA9BxB,uBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,SAAS,CAAC;QAI1E,WAAM,GAAG,KAAK,CAAC;QAEvB,SAAI,GAAG,SAAS,CAAC;QACjB,QAAG,GAAG,EAAE,CAAC;QACT,SAAI,GAAG,EAAE,CAAC;QACV,gBAAW,GAAG,CAAC,CAAC;QAES,YAAO,GAAG,KAAK,CAAC;QAGhB,yBAAoB,GAAG,KAAK,CAAC;QAC7C,SAAI,GAAG,KAAK,CAAC;KAgBlB;IAdJ,IAAI,QAAQ;QACV,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACzC,QACE,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,EAAE;aACrD,WAAW,GAAG,CAAC,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC,EAC1D;KACH;IAUO,gBAAgB,CAAC,GAAW;QAClC,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG;YACnC,MAAM,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AAChB;IAAlB,WAAW,CAAC,IAAI,CAAC;gDAAgB;AAClB;IAAf,YAAY,EAAE;+DAA8B;2FApB3C,iBAAiB;kBAR7B,SAAS;+BACE,UAAU,YACV,UAAU,uBAEC,KAAK,mBACT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;0BAqClC,MAAM;2BAAC,QAAQ;4EA5B6B,KAAK;sBAAnD,SAAS;uBAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBACgB,WAAW;sBAA/D,SAAS;uBAAC,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBACW,YAAY;sBAAjE,SAAS;uBAAC,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBAQnB,OAAO;sBAA/B,KAAK;gBACsB,MAAM;sBAAjC,KAAK;gBACsB,KAAK;sBAAhC,KAAK;gBACmB,oBAAoB;sBAA5C,KAAK;gBACG,IAAI;sBAAZ,KAAK;;;AEzCR,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAO1B,cAAc;;2GAAd,cAAc;4GAAd,cAAc,iBAPP,iBAAiB,aAGzB,YAAY,EAAE,eAAe,EAAE,eAAe,aAHtC,iBAAiB;4GAOxB,cAAc,YAJhB,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;2FAI9C,cAAc;kBAL1B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
1
+ {"version":3,"file":"ellipsis.mjs","sources":["../../../../packages/abc/ellipsis/ellipsis.component.ts","../../../../packages/abc/ellipsis/ellipsis.component.html","../../../../packages/abc/ellipsis/ellipsis.module.ts","../../../../packages/abc/ellipsis/ellipsis.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { take } from 'rxjs/operators';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'ellipsis',\n exportAs: 'ellipsis',\n templateUrl: './ellipsis.component.html',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class EllipsisComponent implements AfterViewInit, OnChanges {\n static ngAcceptInputType_tooltip: BooleanInput;\n static ngAcceptInputType_length: NumberInput;\n static ngAcceptInputType_lines: NumberInput;\n static ngAcceptInputType_fullWidthRecognition: BooleanInput;\n\n private isSupportLineClamp = this.doc.body.style['webkitLineClamp'] !== undefined;\n @ViewChild('orgEl', { static: false }) private orgEl!: ElementRef;\n @ViewChild('shadowOrgEl', { static: false }) private shadowOrgEl!: ElementRef;\n @ViewChild('shadowTextEl', { static: false }) private shadowTextEl!: ElementRef;\n private inited = false;\n orgHtml!: SafeHtml;\n type = 'default';\n cls = {};\n text = '';\n targetCount = 0;\n\n @Input() @InputBoolean() tooltip = false;\n @Input() @InputNumber(null) length?: number;\n @Input() @InputNumber(null) lines?: number;\n @Input() @InputBoolean() fullWidthRecognition = false;\n @Input() tail = '...';\n\n get linsWord(): string {\n const { targetCount, text, tail } = this;\n return (\n (targetCount > 0 ? text.substring(0, targetCount) : '') +\n (targetCount > 0 && targetCount < text.length ? tail : '')\n );\n }\n\n private get win(): NzSafeAny {\n return this.doc.defaultView || window;\n }\n\n constructor(\n private el: ElementRef,\n private ngZone: NgZone,\n private dom: DomSanitizer,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n private cdr: ChangeDetectorRef\n ) {}\n\n private getStrFullLength(str: string): number {\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n return pre + 1;\n }\n return pre + 2;\n }, 0);\n }\n\n private cutStrByFullLength(str: string, maxLength: number): string {\n let showLength = 0;\n return str.split('').reduce((pre, cur) => {\n const charCode = cur.charCodeAt(0);\n if (charCode >= 0 && charCode <= 128) {\n showLength += 1;\n } else {\n showLength += 2;\n }\n if (showLength <= maxLength) {\n return pre + cur;\n }\n return pre;\n }, '');\n }\n\n private bisection(\n targetHeight: number,\n mid: number,\n begin: number,\n end: number,\n text: string,\n node: HTMLElement\n ): number {\n const suffix = this.tail;\n node.innerHTML = text.substring(0, mid) + suffix;\n let sh = node.offsetHeight;\n\n if (sh <= targetHeight) {\n node.innerHTML = text.substring(0, mid + 1) + suffix;\n sh = node.offsetHeight;\n if (sh > targetHeight || mid === begin) {\n return mid;\n }\n begin = mid;\n mid = end - begin === 1 ? begin + 1 : Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n if (mid - 1 < 0) {\n return mid;\n }\n node.innerHTML = text.substring(0, mid - 1) + suffix;\n sh = node.offsetHeight;\n if (sh <= targetHeight) {\n return mid - 1;\n }\n end = mid;\n mid = Math.floor((end - begin) / 2) + begin;\n return this.bisection(targetHeight, mid, begin, end, text, node);\n }\n\n private genType(): void {\n const { lines, length, isSupportLineClamp } = this;\n this.cls = {\n ellipsis: true,\n ellipsis__lines: lines && !isSupportLineClamp,\n 'ellipsis__line-clamp': lines && isSupportLineClamp\n };\n if (!lines && !length) {\n this.type = 'default';\n } else if (!lines) {\n this.type = 'length';\n } else if (isSupportLineClamp) {\n this.type = 'line-clamp';\n } else {\n this.type = 'line';\n }\n }\n\n private gen(): void {\n const { type, lines, length, fullWidthRecognition, tail, orgEl, cdr, ngZone } = this;\n if (type === 'length') {\n const el = orgEl.nativeElement as HTMLElement;\n if (el.children.length > 0) {\n throw new Error('Ellipsis content must be string.');\n }\n const lengthText = el.textContent!;\n const textLength = fullWidthRecognition ? this.getStrFullLength(lengthText) : lengthText.length;\n if (textLength <= length! || length! < 0) {\n this.text = lengthText;\n } else {\n let displayText: string;\n if (length! - tail.length <= 0) {\n displayText = '';\n } else {\n displayText = fullWidthRecognition\n ? this.cutStrByFullLength(lengthText, length!)\n : lengthText.slice(0, length);\n }\n this.text = displayText + tail;\n }\n ngZone.run(() => cdr.detectChanges());\n } else if (type === 'line') {\n const { shadowOrgEl, shadowTextEl } = this;\n const orgNode = shadowOrgEl.nativeElement as HTMLElement;\n const lineText = orgNode.innerText || orgNode.textContent!;\n const lineHeight = parseInt(this.win.getComputedStyle(this.getEl('.ellipsis')).lineHeight!, 10);\n const targetHeight = lines! * lineHeight;\n this.getEl('.ellipsis__handle').style.height = `${targetHeight}px`;\n\n if (orgNode.offsetHeight <= targetHeight) {\n this.text = lineText;\n this.targetCount = lineText.length;\n } else {\n // bisection\n const len = lineText.length;\n const mid = Math.ceil(len / 2);\n\n const count = this.bisection(targetHeight, mid, 0, len, lineText, shadowTextEl.nativeElement.firstChild);\n this.text = lineText;\n this.targetCount = count;\n }\n ngZone.run(() => cdr.detectChanges());\n }\n }\n\n private getEl(cls: string): HTMLElement {\n return this.el.nativeElement.querySelector(cls);\n }\n\n private executeOnStable(fn: () => void): void {\n if (this.ngZone.isStable) {\n fn();\n } else {\n this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(fn);\n }\n }\n\n refresh(): void {\n this.genType();\n const { type, dom, orgEl, cdr } = this;\n const html = orgEl.nativeElement.innerHTML;\n this.orgHtml = dom.bypassSecurityTrustHtml(html);\n cdr.detectChanges();\n this.executeOnStable(() => {\n this.gen();\n if (type !== 'line') {\n const el = this.getEl('.ellipsis');\n if (el) {\n el.innerHTML = html;\n }\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.inited = true;\n this.refresh();\n }\n\n ngOnChanges(): void {\n if (this.inited) {\n this.refresh();\n }\n }\n}\n","<div (cdkObserveContent)=\"refresh()\" #orgEl style=\"display: none\"><ng-content></ng-content></div>\n<ng-template #tooltipTpl let-con>\n <span\n *ngIf=\"tooltip; else con\"\n nz-tooltip\n [nzTooltipTitle]=\"titleTpl\"\n [nzTooltipOverlayStyle]=\"{ 'overflow-wrap': 'break-word', 'word-wrap': 'break-word' }\"\n >\n <ng-container *ngTemplateOutlet=\"con\"></ng-container>\n <ng-template #titleTpl><div [innerHTML]=\"orgHtml\"></div></ng-template>\n </span>\n</ng-template>\n<ng-container [ngSwitch]=\"type\">\n <span *ngSwitchCase=\"'default'\" [ngClass]=\"cls\"></span>\n <ng-container *ngSwitchCase=\"'length'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lengthTpl }\"></ng-template>\n <ng-template #lengthTpl>{{ text }}</ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'line-clamp'\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineClampTpl }\"></ng-template>\n <ng-template #lineClampTpl>\n <div [ngClass]=\"cls\" [ngStyle]=\"{ '-webkit-line-clamp': lines, '-webkit-box-orient': 'vertical' }\"></div>\n </ng-template>\n </ng-container>\n <div *ngSwitchCase=\"'line'\" [ngClass]=\"cls\">\n <div class=\"ellipsis__handle\">\n <ng-template [ngTemplateOutlet]=\"tooltipTpl\" [ngTemplateOutletContext]=\"{ $implicit: lineTpl }\"></ng-template>\n <ng-template #lineTpl>{{ linsWord }}</ng-template>\n <div class=\"ellipsis__shadow\" #shadowOrgEl [innerHTML]=\"orgHtml\"></div>\n <div class=\"ellipsis__shadow\" #shadowTextEl>\n <span>{{ text }}</span>\n </div>\n </div>\n </div>\n</ng-container>\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { EllipsisComponent } from './ellipsis.component';\n\nconst COMPONENTS = [EllipsisComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, NzToolTipModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class EllipsisModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MA4Ba,iBAAiB;IAmC5B,YACU,EAAc,EACd,MAAc,EACd,GAAiB,EACC,GAAc,EAChC,GAAsB;QAJtB,OAAE,GAAF,EAAE,CAAY;QACd,WAAM,GAAN,MAAM,CAAQ;QACd,QAAG,GAAH,GAAG,CAAc;QACC,QAAG,GAAH,GAAG,CAAW;QAChC,QAAG,GAAH,GAAG,CAAmB;QAlCxB,uBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,SAAS,CAAC;QAI1E,WAAM,GAAG,KAAK,CAAC;QAEvB,SAAI,GAAG,SAAS,CAAC;QACjB,QAAG,GAAG,EAAE,CAAC;QACT,SAAI,GAAG,EAAE,CAAC;QACV,gBAAW,GAAG,CAAC,CAAC;QAES,YAAO,GAAG,KAAK,CAAC;QAGhB,yBAAoB,GAAG,KAAK,CAAC;QAC7C,SAAI,GAAG,KAAK,CAAC;KAoBlB;IAlBJ,IAAI,QAAQ;QACV,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACzC,QACE,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,EAAE;aACrD,WAAW,GAAG,CAAC,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC,EAC1D;KACH;IAED,IAAY,GAAG;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,MAAM,CAAC;KACvC;IAUO,gBAAgB,CAAC,GAAW;QAClC,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,C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EAAE;kDAAiB;AACb;IAAlB,WAAW,CAAC,IAAI,CAAC;iDAAiB;AAChB;IAAlB,WAAW,CAAC,IAAI,CAAC;gDAAgB;AAClB;IAAf,YAAY,EAAE;+DAA8B;2FApB3C,iBAAiB;kBAR7B,SAAS;+BACE,UAAU,YACV,UAAU,uBAEC,KAAK,mBACT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;0BAyClC,MAAM;2BAAC,QAAQ;4EAhC6B,KAAK;sBAAnD,SAAS;uBAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBACgB,WAAW;sBAA/D,SAAS;uBAAC,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBACW,YAAY;sBAAjE,SAAS;uBAAC,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBAQnB,OAAO;sBAA/B,KAAK;gBACsB,MAAM;sBAAjC,KAAK;gBACsB,KAAK;sBAAhC,KAAK;gBACmB,oBAAoB;sBAA5C,KAAK;gBACG,IAAI;sBAAZ,KAAK;;;AEzCR,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAO1B,cAAc;;2GAAd,cAAc;4GAAd,cAAc,iBAPP,iBAAiB,aAGzB,YAAY,EAAE,eAAe,EAAE,eAAe,aAHtC,iBAAiB;4GAOxB,cAAc,YAJhB,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;2FAI9C,cAAc;kBAL1B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
@@ -7,15 +7,17 @@ import { takeUntil } from 'rxjs/operators';
7
7
  import { InputNumber } from '@delon/util/decorator';
8
8
  import * as i1 from '@delon/util/config';
9
9
  import * as i2 from '@angular/cdk/bidi';
10
- import * as i3 from 'ng-zorro-antd/icon';
10
+ import * as i3 from '@angular/cdk/platform';
11
+ import * as i4 from 'ng-zorro-antd/icon';
11
12
  import { NzIconModule } from 'ng-zorro-antd/icon';
12
13
 
13
14
  class ErrorCollectComponent {
14
- constructor(el, cdr, doc, configSrv, directionality) {
15
+ constructor(el, cdr, doc, configSrv, directionality, platform) {
15
16
  this.el = el;
16
17
  this.cdr = cdr;
17
18
  this.doc = doc;
18
19
  this.directionality = directionality;
20
+ this.platform = platform;
19
21
  this.formEl = null;
20
22
  this.destroy$ = new Subject();
21
23
  this._hiden = true;
@@ -67,6 +69,8 @@ class ErrorCollectComponent {
67
69
  return retEl;
68
70
  }
69
71
  ngOnInit() {
72
+ if (!this.platform.isBrowser)
73
+ return;
70
74
  this.formEl = this.findParent(this.el.nativeElement, 'form');
71
75
  if (this.formEl === null)
72
76
  throw new Error('No found form element');
@@ -77,18 +81,18 @@ class ErrorCollectComponent {
77
81
  this.destroy$.complete();
78
82
  }
79
83
  }
80
- ErrorCollectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorCollectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }, { token: i1.AlainConfigService }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
81
- ErrorCollectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ErrorCollectComponent, selector: "error-collect, [error-collect]", inputs: { freq: "freq", offsetTop: "offsetTop" }, host: { listeners: { "click": "_click()" }, properties: { "class.error-collect": "true", "class.error-collect-rtl": "dir === 'rtl'", "class.d-none": "_hiden" } }, exportAs: ["errorCollect"], ngImport: i0, template: `
84
+ ErrorCollectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ErrorCollectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }, { token: i1.AlainConfigService }, { token: i2.Directionality, optional: true }, { token: i3.Platform }], target: i0.ɵɵFactoryTarget.Component });
85
+ ErrorCollectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ErrorCollectComponent, selector: "error-collect, [error-collect]", inputs: { freq: "freq", offsetTop: "offsetTop" }, host: { listeners: { "click": "_click()" }, properties: { "class.error-collect": "true", "class.error-collect-rtl": "dir === 'rtl'", "class.d-none": "_hiden" } }, exportAs: ["errorCollect"], ngImport: i0, template: `
82
86
  <i nz-icon nzType="exclamation-circle"></i>
83
87
  <span class="error-collect__count">{{ count }}</span>
84
- `, isInline: true, directives: [{ type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
88
+ `, isInline: true, directives: [{ type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
85
89
  __decorate([
86
90
  InputNumber()
87
91
  ], ErrorCollectComponent.prototype, "freq", void 0);
88
92
  __decorate([
89
93
  InputNumber()
90
94
  ], ErrorCollectComponent.prototype, "offsetTop", void 0);
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorCollectComponent, decorators: [{
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ErrorCollectComponent, decorators: [{
92
96
  type: Component,
93
97
  args: [{
94
98
  selector: 'error-collect, [error-collect]',
@@ -112,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
112
116
  args: [DOCUMENT]
113
117
  }] }, { type: i1.AlainConfigService }, { type: i2.Directionality, decorators: [{
114
118
  type: Optional
115
- }] }]; }, propDecorators: { freq: [{
119
+ }] }, { type: i3.Platform }]; }, propDecorators: { freq: [{
116
120
  type: Input
117
121
  }], offsetTop: [{
118
122
  type: Input
@@ -121,10 +125,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
121
125
  const COMPONENTS = [ErrorCollectComponent];
122
126
  class ErrorCollectModule {
123
127
  }
124
- ErrorCollectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorCollectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
125
- ErrorCollectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorCollectModule, declarations: [ErrorCollectComponent], imports: [CommonModule, NzIconModule], exports: [ErrorCollectComponent] });
126
- ErrorCollectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorCollectModule, imports: [[CommonModule, NzIconModule]] });
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorCollectModule, decorators: [{
128
+ ErrorCollectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ErrorCollectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
129
+ ErrorCollectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ErrorCollectModule, declarations: [ErrorCollectComponent], imports: [CommonModule, NzIconModule], exports: [ErrorCollectComponent] });
130
+ ErrorCollectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ErrorCollectModule, imports: [[CommonModule, NzIconModule]] });
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ErrorCollectModule, decorators: [{
128
132
  type: NgModule,
129
133
  args: [{
130
134
  imports: [CommonModule, NzIconModule],