ng-zorro-antd-empty.mjs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. import * as i2$1 from '@angular/cdk/portal';
  2. import { TemplatePortal, ComponentPortal, PortalModule } from '@angular/cdk/portal';
  3. import * as i0 from '@angular/core';
  4. import { InjectionToken, ViewEncapsulation, ChangeDetectionStrategy, Component, Input, TemplateRef, Type, Injector, NgModule } from '@angular/core';
  5. import { Subject } from 'rxjs';
  6. import { takeUntil, startWith } from 'rxjs/operators';
  7. import * as i2 from 'ng-zorro-antd/core/outlet';
  8. import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
  9. import * as i1 from 'ng-zorro-antd/i18n';
  10. import * as i1$1 from 'ng-zorro-antd/core/config';
  11. /**
  12. * Use of this source code is governed by an MIT-style license that can be
  13. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  14. */
  15. /**
  16. * Use of this source code is governed by an MIT-style license that can be
  17. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  18. */
  19. const NZ_EMPTY_COMPONENT_NAME = new InjectionToken('nz-empty-component-name');
  20. /**
  21. * Use of this source code is governed by an MIT-style license that can be
  22. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  23. */
  24. class NzEmptyDefaultComponent {
  25. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyDefaultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  26. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzEmptyDefaultComponent, isStandalone: true, selector: "nz-empty-default", exportAs: ["nzEmptyDefault"], ngImport: i0, template: `
  27. <svg
  28. class="ant-empty-img-default"
  29. width="184"
  30. height="152"
  31. viewBox="0 0 184 152"
  32. xmlns="http://www.w3.org/2000/svg"
  33. >
  34. <g fill="none" fill-rule="evenodd">
  35. <g transform="translate(24 31.67)">
  36. <ellipse class="ant-empty-img-default-ellipse" cx="67.797" cy="106.89" rx="67.797" ry="12.668" />
  37. <path
  38. class="ant-empty-img-default-path-1"
  39. d="M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
  40. />
  41. <path
  42. class="ant-empty-img-default-path-2"
  43. d="M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z"
  44. transform="translate(13.56)"
  45. />
  46. <path
  47. class="ant-empty-img-default-path-3"
  48. d="M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
  49. />
  50. <path
  51. class="ant-empty-img-default-path-4"
  52. d="M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
  53. />
  54. </g>
  55. <path
  56. class="ant-empty-img-default-path-5"
  57. d="M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
  58. />
  59. <g class="ant-empty-img-default-g" transform="translate(149.65 15.383)">
  60. <ellipse cx="20.654" cy="3.167" rx="2.849" ry="2.815" />
  61. <path d="M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" />
  62. </g>
  63. </g>
  64. </svg>
  65. `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
  66. }
  67. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyDefaultComponent, decorators: [{
  68. type: Component,
  69. args: [{
  70. changeDetection: ChangeDetectionStrategy.OnPush,
  71. encapsulation: ViewEncapsulation.None,
  72. selector: 'nz-empty-default',
  73. exportAs: 'nzEmptyDefault',
  74. template: `
  75. <svg
  76. class="ant-empty-img-default"
  77. width="184"
  78. height="152"
  79. viewBox="0 0 184 152"
  80. xmlns="http://www.w3.org/2000/svg"
  81. >
  82. <g fill="none" fill-rule="evenodd">
  83. <g transform="translate(24 31.67)">
  84. <ellipse class="ant-empty-img-default-ellipse" cx="67.797" cy="106.89" rx="67.797" ry="12.668" />
  85. <path
  86. class="ant-empty-img-default-path-1"
  87. d="M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
  88. />
  89. <path
  90. class="ant-empty-img-default-path-2"
  91. d="M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z"
  92. transform="translate(13.56)"
  93. />
  94. <path
  95. class="ant-empty-img-default-path-3"
  96. d="M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
  97. />
  98. <path
  99. class="ant-empty-img-default-path-4"
  100. d="M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
  101. />
  102. </g>
  103. <path
  104. class="ant-empty-img-default-path-5"
  105. d="M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
  106. />
  107. <g class="ant-empty-img-default-g" transform="translate(149.65 15.383)">
  108. <ellipse cx="20.654" cy="3.167" rx="2.849" ry="2.815" />
  109. <path d="M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" />
  110. </g>
  111. </g>
  112. </svg>
  113. `
  114. }]
  115. }] });
  116. /**
  117. * Use of this source code is governed by an MIT-style license that can be
  118. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  119. */
  120. class NzEmptySimpleComponent {
  121. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptySimpleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  122. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzEmptySimpleComponent, isStandalone: true, selector: "nz-empty-simple", exportAs: ["nzEmptySimple"], ngImport: i0, template: `
  123. <svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
  124. <g transform="translate(0 1)" fill="none" fill-rule="evenodd">
  125. <ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7" />
  126. <g class="ant-empty-img-simple-g" fill-rule="nonzero">
  127. <path
  128. d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
  129. />
  130. <path
  131. d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
  132. class="ant-empty-img-simple-path"
  133. />
  134. </g>
  135. </g>
  136. </svg>
  137. `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
  138. }
  139. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptySimpleComponent, decorators: [{
  140. type: Component,
  141. args: [{
  142. changeDetection: ChangeDetectionStrategy.OnPush,
  143. encapsulation: ViewEncapsulation.None,
  144. selector: 'nz-empty-simple',
  145. exportAs: 'nzEmptySimple',
  146. template: `
  147. <svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
  148. <g transform="translate(0 1)" fill="none" fill-rule="evenodd">
  149. <ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7" />
  150. <g class="ant-empty-img-simple-g" fill-rule="nonzero">
  151. <path
  152. d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
  153. />
  154. <path
  155. d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
  156. class="ant-empty-img-simple-path"
  157. />
  158. </g>
  159. </g>
  160. </svg>
  161. `
  162. }]
  163. }] });
  164. /**
  165. * Use of this source code is governed by an MIT-style license that can be
  166. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  167. */
  168. const NzEmptyDefaultImages = ['default', 'simple'];
  169. class NzEmptyComponent {
  170. i18n;
  171. cdr;
  172. nzNotFoundImage = 'default';
  173. nzNotFoundContent;
  174. nzNotFoundFooter;
  175. isContentString = false;
  176. isImageBuildIn = true;
  177. locale;
  178. destroy$ = new Subject();
  179. constructor(i18n, cdr) {
  180. this.i18n = i18n;
  181. this.cdr = cdr;
  182. }
  183. ngOnChanges(changes) {
  184. const { nzNotFoundContent, nzNotFoundImage } = changes;
  185. if (nzNotFoundContent) {
  186. const content = nzNotFoundContent.currentValue;
  187. this.isContentString = typeof content === 'string';
  188. }
  189. if (nzNotFoundImage) {
  190. const image = nzNotFoundImage.currentValue || 'default';
  191. this.isImageBuildIn = NzEmptyDefaultImages.findIndex(i => i === image) > -1;
  192. }
  193. }
  194. ngOnInit() {
  195. this.i18n.localeChange.pipe(takeUntil(this.destroy$)).subscribe(() => {
  196. this.locale = this.i18n.getLocaleData('Empty');
  197. this.cdr.markForCheck();
  198. });
  199. }
  200. ngOnDestroy() {
  201. this.destroy$.next();
  202. this.destroy$.complete();
  203. }
  204. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyComponent, deps: [{ token: i1.NzI18nService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
  205. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzEmptyComponent, isStandalone: true, selector: "nz-empty", inputs: { nzNotFoundImage: "nzNotFoundImage", nzNotFoundContent: "nzNotFoundContent", nzNotFoundFooter: "nzNotFoundFooter" }, host: { classAttribute: "ant-empty" }, exportAs: ["nzEmpty"], usesOnChanges: true, ngImport: i0, template: `
  206. <div class="ant-empty-image">
  207. @if (!isImageBuildIn) {
  208. <ng-container *nzStringTemplateOutlet="nzNotFoundImage">
  209. <img [src]="nzNotFoundImage" [alt]="isContentString ? nzNotFoundContent : 'empty'" />
  210. </ng-container>
  211. } @else {
  212. @if (nzNotFoundImage === 'simple') {
  213. <nz-empty-simple />
  214. } @else {
  215. <nz-empty-default />
  216. }
  217. }
  218. </div>
  219. @if (nzNotFoundContent !== null) {
  220. <p class="ant-empty-description">
  221. <ng-container *nzStringTemplateOutlet="nzNotFoundContent">
  222. {{ isContentString ? nzNotFoundContent : locale['description'] }}
  223. </ng-container>
  224. </p>
  225. }
  226. @if (nzNotFoundFooter) {
  227. <div class="ant-empty-footer">
  228. <ng-container *nzStringTemplateOutlet="nzNotFoundFooter">
  229. {{ nzNotFoundFooter }}
  230. </ng-container>
  231. </div>
  232. }
  233. `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzEmptyDefaultComponent, selector: "nz-empty-default", exportAs: ["nzEmptyDefault"] }, { kind: "component", type: NzEmptySimpleComponent, selector: "nz-empty-simple", exportAs: ["nzEmptySimple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
  234. }
  235. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyComponent, decorators: [{
  236. type: Component,
  237. args: [{
  238. changeDetection: ChangeDetectionStrategy.OnPush,
  239. encapsulation: ViewEncapsulation.None,
  240. selector: 'nz-empty',
  241. exportAs: 'nzEmpty',
  242. template: `
  243. <div class="ant-empty-image">
  244. @if (!isImageBuildIn) {
  245. <ng-container *nzStringTemplateOutlet="nzNotFoundImage">
  246. <img [src]="nzNotFoundImage" [alt]="isContentString ? nzNotFoundContent : 'empty'" />
  247. </ng-container>
  248. } @else {
  249. @if (nzNotFoundImage === 'simple') {
  250. <nz-empty-simple />
  251. } @else {
  252. <nz-empty-default />
  253. }
  254. }
  255. </div>
  256. @if (nzNotFoundContent !== null) {
  257. <p class="ant-empty-description">
  258. <ng-container *nzStringTemplateOutlet="nzNotFoundContent">
  259. {{ isContentString ? nzNotFoundContent : locale['description'] }}
  260. </ng-container>
  261. </p>
  262. }
  263. @if (nzNotFoundFooter) {
  264. <div class="ant-empty-footer">
  265. <ng-container *nzStringTemplateOutlet="nzNotFoundFooter">
  266. {{ nzNotFoundFooter }}
  267. </ng-container>
  268. </div>
  269. }
  270. `,
  271. host: {
  272. class: 'ant-empty'
  273. },
  274. imports: [NzOutletModule, NzEmptyDefaultComponent, NzEmptySimpleComponent]
  275. }]
  276. }], ctorParameters: () => [{ type: i1.NzI18nService }, { type: i0.ChangeDetectorRef }], propDecorators: { nzNotFoundImage: [{
  277. type: Input
  278. }], nzNotFoundContent: [{
  279. type: Input
  280. }], nzNotFoundFooter: [{
  281. type: Input
  282. }] } });
  283. /**
  284. * Use of this source code is governed by an MIT-style license that can be
  285. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  286. */
  287. function getEmptySize(componentName) {
  288. switch (componentName) {
  289. case 'table':
  290. case 'list':
  291. return 'normal';
  292. case 'select':
  293. case 'tree-select':
  294. case 'cascader':
  295. case 'transfer':
  296. return 'small';
  297. default:
  298. return '';
  299. }
  300. }
  301. class NzEmbedEmptyComponent {
  302. configService;
  303. viewContainerRef;
  304. cdr;
  305. injector;
  306. nzComponentName;
  307. specificContent;
  308. content;
  309. contentType = 'string';
  310. contentPortal;
  311. size = '';
  312. destroy$ = new Subject();
  313. constructor(configService, viewContainerRef, cdr, injector) {
  314. this.configService = configService;
  315. this.viewContainerRef = viewContainerRef;
  316. this.cdr = cdr;
  317. this.injector = injector;
  318. }
  319. ngOnChanges(changes) {
  320. if (changes.nzComponentName) {
  321. this.size = getEmptySize(changes.nzComponentName.currentValue);
  322. }
  323. if (changes.specificContent && !changes.specificContent.isFirstChange()) {
  324. this.content = changes.specificContent.currentValue;
  325. this.renderEmpty();
  326. }
  327. }
  328. ngOnInit() {
  329. this.subscribeDefaultEmptyContentChange();
  330. }
  331. ngOnDestroy() {
  332. this.destroy$.next();
  333. this.destroy$.complete();
  334. }
  335. renderEmpty() {
  336. const content = this.content;
  337. if (typeof content === 'string') {
  338. this.contentType = 'string';
  339. }
  340. else if (content instanceof TemplateRef) {
  341. const context = { $implicit: this.nzComponentName };
  342. this.contentType = 'template';
  343. this.contentPortal = new TemplatePortal(content, this.viewContainerRef, context);
  344. }
  345. else if (content instanceof Type) {
  346. const injector = Injector.create({
  347. parent: this.injector,
  348. providers: [{ provide: NZ_EMPTY_COMPONENT_NAME, useValue: this.nzComponentName }]
  349. });
  350. this.contentType = 'component';
  351. this.contentPortal = new ComponentPortal(content, this.viewContainerRef, injector);
  352. }
  353. else {
  354. this.contentType = 'string';
  355. this.contentPortal = undefined;
  356. }
  357. this.cdr.detectChanges();
  358. }
  359. subscribeDefaultEmptyContentChange() {
  360. this.configService
  361. .getConfigChangeEventForComponent('empty')
  362. .pipe(startWith(true), takeUntil(this.destroy$))
  363. .subscribe(() => {
  364. this.content = this.specificContent || this.getUserDefaultEmptyContent();
  365. this.renderEmpty();
  366. });
  367. }
  368. getUserDefaultEmptyContent() {
  369. return (this.configService.getConfigForComponent('empty') || {}).nzDefaultEmptyContent;
  370. }
  371. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmbedEmptyComponent, deps: [{ token: i1$1.NzConfigService }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
  372. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzEmbedEmptyComponent, isStandalone: true, selector: "nz-embed-empty", inputs: { nzComponentName: "nzComponentName", specificContent: "specificContent" }, exportAs: ["nzEmbedEmpty"], usesOnChanges: true, ngImport: i0, template: `
  373. @if (content) {
  374. @if (contentType === 'string') {
  375. {{ content }}
  376. } @else {
  377. <ng-template [cdkPortalOutlet]="contentPortal" />
  378. }
  379. } @else {
  380. @if (specificContent !== null) {
  381. @switch (size) {
  382. @case ('normal') {
  383. <nz-empty class="ant-empty-normal" nzNotFoundImage="simple" />
  384. }
  385. @case ('small') {
  386. <nz-empty class="ant-empty-small" nzNotFoundImage="simple" />
  387. }
  388. @default {
  389. <nz-empty />
  390. }
  391. }
  392. }
  393. }
  394. `, isInline: true, dependencies: [{ kind: "component", type: NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
  395. }
  396. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmbedEmptyComponent, decorators: [{
  397. type: Component,
  398. args: [{
  399. changeDetection: ChangeDetectionStrategy.OnPush,
  400. encapsulation: ViewEncapsulation.None,
  401. selector: 'nz-embed-empty',
  402. exportAs: 'nzEmbedEmpty',
  403. template: `
  404. @if (content) {
  405. @if (contentType === 'string') {
  406. {{ content }}
  407. } @else {
  408. <ng-template [cdkPortalOutlet]="contentPortal" />
  409. }
  410. } @else {
  411. @if (specificContent !== null) {
  412. @switch (size) {
  413. @case ('normal') {
  414. <nz-empty class="ant-empty-normal" nzNotFoundImage="simple" />
  415. }
  416. @case ('small') {
  417. <nz-empty class="ant-empty-small" nzNotFoundImage="simple" />
  418. }
  419. @default {
  420. <nz-empty />
  421. }
  422. }
  423. }
  424. }
  425. `,
  426. imports: [NzEmptyComponent, PortalModule]
  427. }]
  428. }], ctorParameters: () => [{ type: i1$1.NzConfigService }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { nzComponentName: [{
  429. type: Input
  430. }], specificContent: [{
  431. type: Input
  432. }] } });
  433. /**
  434. * Use of this source code is governed by an MIT-style license that can be
  435. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  436. */
  437. class NzEmptyModule {
  438. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
  439. static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyModule, imports: [NzEmptyComponent, NzEmbedEmptyComponent, NzEmptyDefaultComponent, NzEmptySimpleComponent], exports: [NzEmptyComponent, NzEmbedEmptyComponent] });
  440. static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyModule, imports: [NzEmptyComponent, NzEmbedEmptyComponent] });
  441. }
  442. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzEmptyModule, decorators: [{
  443. type: NgModule,
  444. args: [{
  445. imports: [NzEmptyComponent, NzEmbedEmptyComponent, NzEmptyDefaultComponent, NzEmptySimpleComponent],
  446. exports: [NzEmptyComponent, NzEmbedEmptyComponent]
  447. }]
  448. }] });
  449. /**
  450. * Use of this source code is governed by an MIT-style license that can be
  451. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  452. */
  453. /**
  454. * Generated bundle index. Do not edit.
  455. */
  456. export { NZ_EMPTY_COMPONENT_NAME, NzEmbedEmptyComponent, NzEmptyComponent, NzEmptyDefaultComponent, NzEmptyModule, NzEmptySimpleComponent };
  457. //# sourceMappingURL=ng-zorro-antd-empty.mjs.map