ng-zorro-antd-list.mjs 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932
  1. import { NgTemplateOutlet } from '@angular/common';
  2. import * as i0 from '@angular/core';
  3. import { ChangeDetectionStrategy, Component, Input, TemplateRef, ContentChild, ViewEncapsulation, ViewChild, ContentChildren, Directive, booleanAttribute, HostBinding, NgModule } from '@angular/core';
  4. import * as i2 from 'ng-zorro-antd/core/outlet';
  5. import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
  6. import * as i1 from 'ng-zorro-antd/avatar';
  7. import { NzAvatarModule } from 'ng-zorro-antd/avatar';
  8. import { Subject, defer, of, merge, BehaviorSubject } from 'rxjs';
  9. import { mergeMap, startWith, takeUntil } from 'rxjs/operators';
  10. import * as i1$1 from 'ng-zorro-antd/core/services';
  11. import { NzDestroyService } from 'ng-zorro-antd/core/services';
  12. import * as i4 from 'ng-zorro-antd/grid';
  13. import { NzGridModule } from 'ng-zorro-antd/grid';
  14. import * as i3 from 'ng-zorro-antd/spin';
  15. import { NzSpinModule } from 'ng-zorro-antd/spin';
  16. import * as i1$2 from 'ng-zorro-antd/empty';
  17. import { NzEmptyModule } from 'ng-zorro-antd/empty';
  18. import * as i1$3 from '@angular/cdk/bidi';
  19. /**
  20. * Use of this source code is governed by an MIT-style license that can be
  21. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  22. */
  23. /**
  24. * Use of this source code is governed by an MIT-style license that can be
  25. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  26. */
  27. class NzListItemMetaTitleComponent {
  28. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  29. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListItemMetaTitleComponent, isStandalone: true, selector: "nz-list-item-meta-title", exportAs: ["nzListItemMetaTitle"], ngImport: i0, template: `
  30. <h4 class="ant-list-item-meta-title">
  31. <ng-content></ng-content>
  32. </h4>
  33. `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
  34. }
  35. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaTitleComponent, decorators: [{
  36. type: Component,
  37. args: [{
  38. selector: 'nz-list-item-meta-title',
  39. exportAs: 'nzListItemMetaTitle',
  40. template: `
  41. <h4 class="ant-list-item-meta-title">
  42. <ng-content></ng-content>
  43. </h4>
  44. `,
  45. changeDetection: ChangeDetectionStrategy.OnPush
  46. }]
  47. }] });
  48. class NzListItemMetaDescriptionComponent {
  49. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  50. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListItemMetaDescriptionComponent, isStandalone: true, selector: "nz-list-item-meta-description", exportAs: ["nzListItemMetaDescription"], ngImport: i0, template: `
  51. <div class="ant-list-item-meta-description">
  52. <ng-content></ng-content>
  53. </div>
  54. `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
  55. }
  56. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaDescriptionComponent, decorators: [{
  57. type: Component,
  58. args: [{
  59. selector: 'nz-list-item-meta-description',
  60. exportAs: 'nzListItemMetaDescription',
  61. template: `
  62. <div class="ant-list-item-meta-description">
  63. <ng-content></ng-content>
  64. </div>
  65. `,
  66. changeDetection: ChangeDetectionStrategy.OnPush
  67. }]
  68. }] });
  69. class NzListItemMetaAvatarComponent {
  70. nzSrc;
  71. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  72. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzListItemMetaAvatarComponent, isStandalone: true, selector: "nz-list-item-meta-avatar", inputs: { nzSrc: "nzSrc" }, exportAs: ["nzListItemMetaAvatar"], ngImport: i0, template: `
  73. <div class="ant-list-item-meta-avatar">
  74. @if (nzSrc) {
  75. <nz-avatar [nzSrc]="nzSrc" />
  76. } @else {
  77. <ng-content />
  78. }
  79. </div>
  80. `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzAvatarModule }, { kind: "component", type: i1.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
  81. }
  82. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaAvatarComponent, decorators: [{
  83. type: Component,
  84. args: [{
  85. selector: 'nz-list-item-meta-avatar',
  86. exportAs: 'nzListItemMetaAvatar',
  87. template: `
  88. <div class="ant-list-item-meta-avatar">
  89. @if (nzSrc) {
  90. <nz-avatar [nzSrc]="nzSrc" />
  91. } @else {
  92. <ng-content />
  93. }
  94. </div>
  95. `,
  96. changeDetection: ChangeDetectionStrategy.OnPush,
  97. imports: [NzAvatarModule]
  98. }]
  99. }], propDecorators: { nzSrc: [{
  100. type: Input
  101. }] } });
  102. /**
  103. * Use of this source code is governed by an MIT-style license that can be
  104. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  105. */
  106. class NzListItemMetaComponent {
  107. elementRef;
  108. avatarStr = '';
  109. avatarTpl;
  110. set nzAvatar(value) {
  111. if (value instanceof TemplateRef) {
  112. this.avatarStr = '';
  113. this.avatarTpl = value;
  114. }
  115. else {
  116. this.avatarStr = value;
  117. }
  118. }
  119. nzTitle;
  120. nzDescription;
  121. descriptionComponent;
  122. titleComponent;
  123. constructor(elementRef) {
  124. this.elementRef = elementRef;
  125. }
  126. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
  127. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzListItemMetaComponent, isStandalone: true, selector: "nz-list-item-meta, [nz-list-item-meta]", inputs: { nzAvatar: "nzAvatar", nzTitle: "nzTitle", nzDescription: "nzDescription" }, host: { classAttribute: "ant-list-item-meta" }, queries: [{ propertyName: "descriptionComponent", first: true, predicate: NzListItemMetaDescriptionComponent, descendants: true }, { propertyName: "titleComponent", first: true, predicate: NzListItemMetaTitleComponent, descendants: true }], exportAs: ["nzListItemMeta"], ngImport: i0, template: `
  128. <!--Old API Start-->
  129. @if (avatarStr) {
  130. <nz-list-item-meta-avatar [nzSrc]="avatarStr" />
  131. }
  132. @if (avatarTpl) {
  133. <nz-list-item-meta-avatar>
  134. <ng-container [ngTemplateOutlet]="avatarTpl" />
  135. </nz-list-item-meta-avatar>
  136. }
  137. <!--Old API End-->
  138. <ng-content select="nz-list-item-meta-avatar" />
  139. @if (nzTitle || nzDescription || descriptionComponent || titleComponent) {
  140. <div class="ant-list-item-meta-content">
  141. <!--Old API Start-->
  142. @if (nzTitle && !titleComponent) {
  143. <nz-list-item-meta-title>
  144. <ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>
  145. </nz-list-item-meta-title>
  146. }
  147. @if (nzDescription && !descriptionComponent) {
  148. <nz-list-item-meta-description>
  149. <ng-container *nzStringTemplateOutlet="nzDescription">{{ nzDescription }}</ng-container>
  150. </nz-list-item-meta-description>
  151. }
  152. <!--Old API End-->
  153. <ng-content select="nz-list-item-meta-title" />
  154. <ng-content select="nz-list-item-meta-description" />
  155. </div>
  156. }
  157. `, isInline: true, dependencies: [{ kind: "component", type: NzListItemMetaAvatarComponent, selector: "nz-list-item-meta-avatar", inputs: ["nzSrc"], exportAs: ["nzListItemMetaAvatar"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzListItemMetaTitleComponent, selector: "nz-list-item-meta-title", exportAs: ["nzListItemMetaTitle"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzListItemMetaDescriptionComponent, selector: "nz-list-item-meta-description", exportAs: ["nzListItemMetaDescription"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
  158. }
  159. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemMetaComponent, decorators: [{
  160. type: Component,
  161. args: [{
  162. selector: 'nz-list-item-meta, [nz-list-item-meta]',
  163. exportAs: 'nzListItemMeta',
  164. template: `
  165. <!--Old API Start-->
  166. @if (avatarStr) {
  167. <nz-list-item-meta-avatar [nzSrc]="avatarStr" />
  168. }
  169. @if (avatarTpl) {
  170. <nz-list-item-meta-avatar>
  171. <ng-container [ngTemplateOutlet]="avatarTpl" />
  172. </nz-list-item-meta-avatar>
  173. }
  174. <!--Old API End-->
  175. <ng-content select="nz-list-item-meta-avatar" />
  176. @if (nzTitle || nzDescription || descriptionComponent || titleComponent) {
  177. <div class="ant-list-item-meta-content">
  178. <!--Old API Start-->
  179. @if (nzTitle && !titleComponent) {
  180. <nz-list-item-meta-title>
  181. <ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>
  182. </nz-list-item-meta-title>
  183. }
  184. @if (nzDescription && !descriptionComponent) {
  185. <nz-list-item-meta-description>
  186. <ng-container *nzStringTemplateOutlet="nzDescription">{{ nzDescription }}</ng-container>
  187. </nz-list-item-meta-description>
  188. }
  189. <!--Old API End-->
  190. <ng-content select="nz-list-item-meta-title" />
  191. <ng-content select="nz-list-item-meta-description" />
  192. </div>
  193. }
  194. `,
  195. preserveWhitespaces: false,
  196. changeDetection: ChangeDetectionStrategy.OnPush,
  197. encapsulation: ViewEncapsulation.None,
  198. host: {
  199. class: 'ant-list-item-meta'
  200. },
  201. imports: [
  202. NzListItemMetaAvatarComponent,
  203. NgTemplateOutlet,
  204. NzListItemMetaTitleComponent,
  205. NzOutletModule,
  206. NzListItemMetaDescriptionComponent
  207. ]
  208. }]
  209. }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { nzAvatar: [{
  210. type: Input
  211. }], nzTitle: [{
  212. type: Input
  213. }], nzDescription: [{
  214. type: Input
  215. }], descriptionComponent: [{
  216. type: ContentChild,
  217. args: [NzListItemMetaDescriptionComponent]
  218. }], titleComponent: [{
  219. type: ContentChild,
  220. args: [NzListItemMetaTitleComponent]
  221. }] } });
  222. /**
  223. * Use of this source code is governed by an MIT-style license that can be
  224. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  225. */
  226. class NzListItemExtraComponent {
  227. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemExtraComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  228. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListItemExtraComponent, isStandalone: true, selector: "nz-list-item-extra, [nz-list-item-extra]", host: { classAttribute: "ant-list-item-extra" }, exportAs: ["nzListItemExtra"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
  229. }
  230. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemExtraComponent, decorators: [{
  231. type: Component,
  232. args: [{
  233. selector: 'nz-list-item-extra, [nz-list-item-extra]',
  234. exportAs: 'nzListItemExtra',
  235. changeDetection: ChangeDetectionStrategy.OnPush,
  236. template: `<ng-content></ng-content>`,
  237. host: {
  238. class: 'ant-list-item-extra'
  239. }
  240. }]
  241. }] });
  242. class NzListItemActionComponent {
  243. templateRef;
  244. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  245. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListItemActionComponent, isStandalone: true, selector: "nz-list-item-action", viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["nzListItemAction"], ngImport: i0, template: `<ng-template><ng-content></ng-content></ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
  246. }
  247. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemActionComponent, decorators: [{
  248. type: Component,
  249. args: [{
  250. selector: 'nz-list-item-action',
  251. exportAs: 'nzListItemAction',
  252. changeDetection: ChangeDetectionStrategy.OnPush,
  253. template: `<ng-template><ng-content></ng-content></ng-template>`
  254. }]
  255. }], propDecorators: { templateRef: [{
  256. type: ViewChild,
  257. args: [TemplateRef, { static: true }]
  258. }] } });
  259. class NzListItemActionsComponent {
  260. nzActions = [];
  261. nzListItemActions;
  262. actions = [];
  263. inputActionChanges$ = new Subject();
  264. contentChildrenChanges$ = defer(() => {
  265. if (this.nzListItemActions) {
  266. return of(null);
  267. }
  268. return this.initialized.pipe(mergeMap(() => this.nzListItemActions.changes.pipe(startWith(this.nzListItemActions))));
  269. });
  270. initialized = new Subject();
  271. constructor(cdr, destroy$) {
  272. merge(this.contentChildrenChanges$, this.inputActionChanges$)
  273. .pipe(takeUntil(destroy$))
  274. .subscribe(() => {
  275. if (this.nzActions.length) {
  276. this.actions = this.nzActions;
  277. }
  278. else {
  279. this.actions = this.nzListItemActions.map(action => action.templateRef);
  280. }
  281. cdr.detectChanges();
  282. });
  283. }
  284. ngOnChanges() {
  285. this.inputActionChanges$.next(null);
  286. }
  287. ngAfterContentInit() {
  288. this.initialized.next();
  289. this.initialized.complete();
  290. }
  291. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemActionsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.NzDestroyService }], target: i0.ɵɵFactoryTarget.Component });
  292. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzListItemActionsComponent, isStandalone: true, selector: "ul[nz-list-item-actions]", inputs: { nzActions: "nzActions" }, host: { classAttribute: "ant-list-item-action" }, providers: [NzDestroyService], queries: [{ propertyName: "nzListItemActions", predicate: NzListItemActionComponent }], exportAs: ["nzListItemActions"], usesOnChanges: true, ngImport: i0, template: `
  293. @for (i of actions; track i) {
  294. <li>
  295. <ng-template [ngTemplateOutlet]="i" />
  296. @if (!$last) {
  297. <em class="ant-list-item-action-split"></em>
  298. }
  299. </li>
  300. }
  301. `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
  302. }
  303. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemActionsComponent, decorators: [{
  304. type: Component,
  305. args: [{
  306. selector: 'ul[nz-list-item-actions]',
  307. exportAs: 'nzListItemActions',
  308. changeDetection: ChangeDetectionStrategy.OnPush,
  309. template: `
  310. @for (i of actions; track i) {
  311. <li>
  312. <ng-template [ngTemplateOutlet]="i" />
  313. @if (!$last) {
  314. <em class="ant-list-item-action-split"></em>
  315. }
  316. </li>
  317. }
  318. `,
  319. host: {
  320. class: 'ant-list-item-action'
  321. },
  322. providers: [NzDestroyService],
  323. imports: [NgTemplateOutlet]
  324. }]
  325. }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.NzDestroyService }], propDecorators: { nzActions: [{
  326. type: Input
  327. }], nzListItemActions: [{
  328. type: ContentChildren,
  329. args: [NzListItemActionComponent]
  330. }] } });
  331. /**
  332. * Use of this source code is governed by an MIT-style license that can be
  333. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  334. */
  335. class NzListEmptyComponent {
  336. nzNoResult;
  337. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  338. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListEmptyComponent, isStandalone: true, selector: "nz-list-empty", inputs: { nzNoResult: "nzNoResult" }, host: { classAttribute: "ant-list-empty-text" }, exportAs: ["nzListHeader"], ngImport: i0, template: `<nz-embed-empty [nzComponentName]="'list'" [specificContent]="nzNoResult"></nz-embed-empty>`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i1$2.NzEmbedEmptyComponent, selector: "nz-embed-empty", inputs: ["nzComponentName", "specificContent"], exportAs: ["nzEmbedEmpty"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
  339. }
  340. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListEmptyComponent, decorators: [{
  341. type: Component,
  342. args: [{
  343. selector: 'nz-list-empty',
  344. exportAs: 'nzListHeader',
  345. changeDetection: ChangeDetectionStrategy.OnPush,
  346. template: `<nz-embed-empty [nzComponentName]="'list'" [specificContent]="nzNoResult"></nz-embed-empty>`,
  347. host: {
  348. class: 'ant-list-empty-text'
  349. },
  350. imports: [NzEmptyModule]
  351. }]
  352. }], propDecorators: { nzNoResult: [{
  353. type: Input
  354. }] } });
  355. class NzListHeaderComponent {
  356. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  357. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListHeaderComponent, isStandalone: true, selector: "nz-list-header", host: { classAttribute: "ant-list-header" }, exportAs: ["nzListHeader"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
  358. }
  359. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListHeaderComponent, decorators: [{
  360. type: Component,
  361. args: [{
  362. selector: 'nz-list-header',
  363. exportAs: 'nzListHeader',
  364. changeDetection: ChangeDetectionStrategy.OnPush,
  365. template: `<ng-content></ng-content>`,
  366. host: {
  367. class: 'ant-list-header'
  368. }
  369. }]
  370. }] });
  371. class NzListFooterComponent {
  372. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  373. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListFooterComponent, isStandalone: true, selector: "nz-list-footer", host: { classAttribute: "ant-list-footer" }, exportAs: ["nzListFooter"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
  374. }
  375. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListFooterComponent, decorators: [{
  376. type: Component,
  377. args: [{
  378. selector: 'nz-list-footer',
  379. exportAs: 'nzListFooter',
  380. changeDetection: ChangeDetectionStrategy.OnPush,
  381. template: `<ng-content></ng-content>`,
  382. host: {
  383. class: 'ant-list-footer'
  384. }
  385. }]
  386. }] });
  387. class NzListPaginationComponent {
  388. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
  389. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NzListPaginationComponent, isStandalone: true, selector: "nz-list-pagination", host: { classAttribute: "ant-list-pagination" }, exportAs: ["nzListPagination"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
  390. }
  391. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListPaginationComponent, decorators: [{
  392. type: Component,
  393. args: [{
  394. selector: 'nz-list-pagination',
  395. exportAs: 'nzListPagination',
  396. changeDetection: ChangeDetectionStrategy.OnPush,
  397. template: `<ng-content></ng-content>`,
  398. host: {
  399. class: 'ant-list-pagination'
  400. }
  401. }]
  402. }] });
  403. class NzListLoadMoreDirective {
  404. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListLoadMoreDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
  405. static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: NzListLoadMoreDirective, isStandalone: true, selector: "nz-list-load-more", exportAs: ["nzListLoadMoreDirective"], ngImport: i0 });
  406. }
  407. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListLoadMoreDirective, decorators: [{
  408. type: Directive,
  409. args: [{
  410. selector: 'nz-list-load-more',
  411. exportAs: 'nzListLoadMoreDirective'
  412. }]
  413. }] });
  414. class NzListGridDirective {
  415. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListGridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
  416. static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: NzListGridDirective, isStandalone: true, selector: "nz-list[nzGrid]", host: { classAttribute: "ant-list-grid" }, ngImport: i0 });
  417. }
  418. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListGridDirective, decorators: [{
  419. type: Directive,
  420. args: [{
  421. selector: 'nz-list[nzGrid]',
  422. host: {
  423. class: 'ant-list-grid'
  424. }
  425. }]
  426. }] });
  427. class NzListComponent {
  428. directionality;
  429. nzDataSource;
  430. nzBordered = false;
  431. nzGrid = '';
  432. nzHeader;
  433. nzFooter;
  434. nzItemLayout = 'horizontal';
  435. nzRenderItem = null;
  436. nzLoading = false;
  437. nzLoadMore = null;
  438. nzPagination;
  439. nzSize = 'default';
  440. nzSplit = true;
  441. nzNoResult;
  442. nzListFooterComponent;
  443. nzListPaginationComponent;
  444. nzListLoadMoreDirective;
  445. hasSomethingAfterLastItem = false;
  446. dir = 'ltr';
  447. itemLayoutNotifySource = new BehaviorSubject(this.nzItemLayout);
  448. destroy$ = new Subject();
  449. get itemLayoutNotify$() {
  450. return this.itemLayoutNotifySource.asObservable();
  451. }
  452. constructor(directionality) {
  453. this.directionality = directionality;
  454. }
  455. ngOnInit() {
  456. this.dir = this.directionality.value;
  457. this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => {
  458. this.dir = direction;
  459. });
  460. }
  461. getSomethingAfterLastItem() {
  462. return !!(this.nzLoadMore ||
  463. this.nzPagination ||
  464. this.nzFooter ||
  465. this.nzListFooterComponent ||
  466. this.nzListPaginationComponent ||
  467. this.nzListLoadMoreDirective);
  468. }
  469. ngOnChanges(changes) {
  470. if (changes.nzItemLayout) {
  471. this.itemLayoutNotifySource.next(this.nzItemLayout);
  472. }
  473. }
  474. ngOnDestroy() {
  475. this.itemLayoutNotifySource.unsubscribe();
  476. this.destroy$.next();
  477. this.destroy$.complete();
  478. }
  479. ngAfterContentInit() {
  480. this.hasSomethingAfterLastItem = this.getSomethingAfterLastItem();
  481. }
  482. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListComponent, deps: [{ token: i1$3.Directionality }], target: i0.ɵɵFactoryTarget.Component });
  483. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzListComponent, isStandalone: true, selector: "nz-list, [nz-list]", inputs: { nzDataSource: "nzDataSource", nzBordered: ["nzBordered", "nzBordered", booleanAttribute], nzGrid: "nzGrid", nzHeader: "nzHeader", nzFooter: "nzFooter", nzItemLayout: "nzItemLayout", nzRenderItem: "nzRenderItem", nzLoading: ["nzLoading", "nzLoading", booleanAttribute], nzLoadMore: "nzLoadMore", nzPagination: "nzPagination", nzSize: "nzSize", nzSplit: ["nzSplit", "nzSplit", booleanAttribute], nzNoResult: "nzNoResult" }, host: { properties: { "class.ant-list-rtl": "dir === 'rtl'", "class.ant-list-vertical": "nzItemLayout === \"vertical\"", "class.ant-list-lg": "nzSize === \"large\"", "class.ant-list-sm": "nzSize === \"small\"", "class.ant-list-split": "nzSplit", "class.ant-list-bordered": "nzBordered", "class.ant-list-loading": "nzLoading", "class.ant-list-something-after-last-item": "hasSomethingAfterLastItem" }, classAttribute: "ant-list" }, queries: [{ propertyName: "nzListFooterComponent", first: true, predicate: NzListFooterComponent, descendants: true }, { propertyName: "nzListPaginationComponent", first: true, predicate: NzListPaginationComponent, descendants: true }, { propertyName: "nzListLoadMoreDirective", first: true, predicate: NzListLoadMoreDirective, descendants: true }], exportAs: ["nzList"], usesOnChanges: true, ngImport: i0, template: `
  484. @if (nzHeader) {
  485. <nz-list-header>
  486. <ng-container *nzStringTemplateOutlet="nzHeader">{{ nzHeader }}</ng-container>
  487. </nz-list-header>
  488. }
  489. <ng-content select="nz-list-header" />
  490. <nz-spin [nzSpinning]="nzLoading">
  491. <ng-container>
  492. @if (nzLoading && nzDataSource && nzDataSource.length === 0) {
  493. <div [style.min-height.px]="53"></div>
  494. }
  495. @if (nzGrid && nzDataSource) {
  496. <div nz-row [nzGutter]="nzGrid.gutter || null">
  497. @for (item of nzDataSource; track item; let index = $index) {
  498. <div
  499. nz-col
  500. [nzSpan]="nzGrid.span || null"
  501. [nzXs]="nzGrid.xs || null"
  502. [nzSm]="nzGrid.sm || null"
  503. [nzMd]="nzGrid.md || null"
  504. [nzLg]="nzGrid.lg || null"
  505. [nzXl]="nzGrid.xl || null"
  506. [nzXXl]="nzGrid.xxl || null"
  507. >
  508. <ng-template
  509. [ngTemplateOutlet]="nzRenderItem"
  510. [ngTemplateOutletContext]="{ $implicit: item, index: index }"
  511. />
  512. </div>
  513. }
  514. </div>
  515. } @else {
  516. <div class="ant-list-items">
  517. @for (item of nzDataSource; track item; let index = $index) {
  518. <ng-container>
  519. <ng-template
  520. [ngTemplateOutlet]="nzRenderItem"
  521. [ngTemplateOutletContext]="{ $implicit: item, index: index }"
  522. />
  523. </ng-container>
  524. }
  525. <ng-content />
  526. </div>
  527. }
  528. @if (!nzLoading && nzDataSource && nzDataSource.length === 0) {
  529. <nz-list-empty [nzNoResult]="nzNoResult" />
  530. }
  531. </ng-container>
  532. </nz-spin>
  533. @if (nzFooter) {
  534. <nz-list-footer>
  535. <ng-container *nzStringTemplateOutlet="nzFooter">{{ nzFooter }}</ng-container>
  536. </nz-list-footer>
  537. }
  538. <ng-content select="nz-list-footer, [nz-list-footer]" />
  539. <ng-template [ngTemplateOutlet]="nzLoadMore"></ng-template>
  540. <ng-content select="nz-list-load-more, [nz-list-load-more]" />
  541. @if (nzPagination) {
  542. <nz-list-pagination>
  543. <ng-template [ngTemplateOutlet]="nzPagination" />
  544. </nz-list-pagination>
  545. }
  546. <ng-content select="nz-list-pagination, [nz-list-pagination]" />
  547. `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzListHeaderComponent, selector: "nz-list-header", exportAs: ["nzListHeader"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i3.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: NzListEmptyComponent, selector: "nz-list-empty", inputs: ["nzNoResult"], exportAs: ["nzListHeader"] }, { kind: "component", type: NzListFooterComponent, selector: "nz-list-footer", exportAs: ["nzListFooter"] }, { kind: "component", type: NzListPaginationComponent, selector: "nz-list-pagination", exportAs: ["nzListPagination"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
  548. }
  549. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListComponent, decorators: [{
  550. type: Component,
  551. args: [{
  552. selector: 'nz-list, [nz-list]',
  553. exportAs: 'nzList',
  554. template: `
  555. @if (nzHeader) {
  556. <nz-list-header>
  557. <ng-container *nzStringTemplateOutlet="nzHeader">{{ nzHeader }}</ng-container>
  558. </nz-list-header>
  559. }
  560. <ng-content select="nz-list-header" />
  561. <nz-spin [nzSpinning]="nzLoading">
  562. <ng-container>
  563. @if (nzLoading && nzDataSource && nzDataSource.length === 0) {
  564. <div [style.min-height.px]="53"></div>
  565. }
  566. @if (nzGrid && nzDataSource) {
  567. <div nz-row [nzGutter]="nzGrid.gutter || null">
  568. @for (item of nzDataSource; track item; let index = $index) {
  569. <div
  570. nz-col
  571. [nzSpan]="nzGrid.span || null"
  572. [nzXs]="nzGrid.xs || null"
  573. [nzSm]="nzGrid.sm || null"
  574. [nzMd]="nzGrid.md || null"
  575. [nzLg]="nzGrid.lg || null"
  576. [nzXl]="nzGrid.xl || null"
  577. [nzXXl]="nzGrid.xxl || null"
  578. >
  579. <ng-template
  580. [ngTemplateOutlet]="nzRenderItem"
  581. [ngTemplateOutletContext]="{ $implicit: item, index: index }"
  582. />
  583. </div>
  584. }
  585. </div>
  586. } @else {
  587. <div class="ant-list-items">
  588. @for (item of nzDataSource; track item; let index = $index) {
  589. <ng-container>
  590. <ng-template
  591. [ngTemplateOutlet]="nzRenderItem"
  592. [ngTemplateOutletContext]="{ $implicit: item, index: index }"
  593. />
  594. </ng-container>
  595. }
  596. <ng-content />
  597. </div>
  598. }
  599. @if (!nzLoading && nzDataSource && nzDataSource.length === 0) {
  600. <nz-list-empty [nzNoResult]="nzNoResult" />
  601. }
  602. </ng-container>
  603. </nz-spin>
  604. @if (nzFooter) {
  605. <nz-list-footer>
  606. <ng-container *nzStringTemplateOutlet="nzFooter">{{ nzFooter }}</ng-container>
  607. </nz-list-footer>
  608. }
  609. <ng-content select="nz-list-footer, [nz-list-footer]" />
  610. <ng-template [ngTemplateOutlet]="nzLoadMore"></ng-template>
  611. <ng-content select="nz-list-load-more, [nz-list-load-more]" />
  612. @if (nzPagination) {
  613. <nz-list-pagination>
  614. <ng-template [ngTemplateOutlet]="nzPagination" />
  615. </nz-list-pagination>
  616. }
  617. <ng-content select="nz-list-pagination, [nz-list-pagination]" />
  618. `,
  619. preserveWhitespaces: false,
  620. encapsulation: ViewEncapsulation.None,
  621. changeDetection: ChangeDetectionStrategy.OnPush,
  622. host: {
  623. class: 'ant-list',
  624. '[class.ant-list-rtl]': `dir === 'rtl'`,
  625. '[class.ant-list-vertical]': 'nzItemLayout === "vertical"',
  626. '[class.ant-list-lg]': 'nzSize === "large"',
  627. '[class.ant-list-sm]': 'nzSize === "small"',
  628. '[class.ant-list-split]': 'nzSplit',
  629. '[class.ant-list-bordered]': 'nzBordered',
  630. '[class.ant-list-loading]': 'nzLoading',
  631. '[class.ant-list-something-after-last-item]': 'hasSomethingAfterLastItem'
  632. },
  633. imports: [
  634. NgTemplateOutlet,
  635. NzListHeaderComponent,
  636. NzOutletModule,
  637. NzSpinModule,
  638. NzGridModule,
  639. NzListEmptyComponent,
  640. NzListFooterComponent,
  641. NzListPaginationComponent
  642. ]
  643. }]
  644. }], ctorParameters: () => [{ type: i1$3.Directionality }], propDecorators: { nzDataSource: [{
  645. type: Input
  646. }], nzBordered: [{
  647. type: Input,
  648. args: [{ transform: booleanAttribute }]
  649. }], nzGrid: [{
  650. type: Input
  651. }], nzHeader: [{
  652. type: Input
  653. }], nzFooter: [{
  654. type: Input
  655. }], nzItemLayout: [{
  656. type: Input
  657. }], nzRenderItem: [{
  658. type: Input
  659. }], nzLoading: [{
  660. type: Input,
  661. args: [{ transform: booleanAttribute }]
  662. }], nzLoadMore: [{
  663. type: Input
  664. }], nzPagination: [{
  665. type: Input
  666. }], nzSize: [{
  667. type: Input
  668. }], nzSplit: [{
  669. type: Input,
  670. args: [{ transform: booleanAttribute }]
  671. }], nzNoResult: [{
  672. type: Input
  673. }], nzListFooterComponent: [{
  674. type: ContentChild,
  675. args: [NzListFooterComponent]
  676. }], nzListPaginationComponent: [{
  677. type: ContentChild,
  678. args: [NzListPaginationComponent]
  679. }], nzListLoadMoreDirective: [{
  680. type: ContentChild,
  681. args: [NzListLoadMoreDirective]
  682. }] } });
  683. /**
  684. * Use of this source code is governed by an MIT-style license that can be
  685. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  686. */
  687. class NzListItemComponent {
  688. parentComp;
  689. cdr;
  690. nzActions = [];
  691. nzContent;
  692. nzExtra = null;
  693. nzNoFlex = false;
  694. listItemExtraDirective;
  695. itemLayout;
  696. itemLayout$;
  697. get isVerticalAndExtra() {
  698. return this.itemLayout === 'vertical' && (!!this.listItemExtraDirective || !!this.nzExtra);
  699. }
  700. constructor(parentComp, cdr) {
  701. this.parentComp = parentComp;
  702. this.cdr = cdr;
  703. }
  704. ngAfterViewInit() {
  705. this.itemLayout$ = this.parentComp.itemLayoutNotify$.subscribe(val => {
  706. this.itemLayout = val;
  707. this.cdr.detectChanges();
  708. });
  709. }
  710. ngOnDestroy() {
  711. if (this.itemLayout$) {
  712. this.itemLayout$.unsubscribe();
  713. }
  714. }
  715. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemComponent, deps: [{ token: NzListComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
  716. static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NzListItemComponent, isStandalone: true, selector: "nz-list-item, [nz-list-item]", inputs: { nzActions: "nzActions", nzContent: "nzContent", nzExtra: "nzExtra", nzNoFlex: ["nzNoFlex", "nzNoFlex", booleanAttribute] }, host: { properties: { "class.ant-list-item-no-flex": "this.nzNoFlex" }, classAttribute: "ant-list-item" }, queries: [{ propertyName: "listItemExtraDirective", first: true, predicate: NzListItemExtraComponent, descendants: true }], exportAs: ["nzListItem"], ngImport: i0, template: `
  717. <ng-template #actionsTpl>
  718. @if (nzActions && nzActions.length > 0) {
  719. <ul nz-list-item-actions [nzActions]="nzActions"></ul>
  720. }
  721. <ng-content select="nz-list-item-actions, [nz-list-item-actions]" />
  722. </ng-template>
  723. <ng-template #contentTpl>
  724. <ng-content select="nz-list-item-meta, [nz-list-item-meta]" />
  725. <ng-content />
  726. @if (nzContent) {
  727. <ng-container *nzStringTemplateOutlet="nzContent">{{ nzContent }}</ng-container>
  728. }
  729. </ng-template>
  730. <ng-template #extraTpl>
  731. <ng-content select="nz-list-item-extra, [nz-list-item-extra]" />
  732. </ng-template>
  733. @if (isVerticalAndExtra) {
  734. <div class="ant-list-item-main">
  735. <ng-template [ngTemplateOutlet]="contentTpl" />
  736. <ng-template [ngTemplateOutlet]="actionsTpl" />
  737. </div>
  738. @if (nzExtra) {
  739. <nz-list-item-extra>
  740. <ng-template [ngTemplateOutlet]="nzExtra" />
  741. </nz-list-item-extra>
  742. }
  743. <ng-template [ngTemplateOutlet]="extraTpl" />
  744. } @else {
  745. <ng-template [ngTemplateOutlet]="contentTpl" />
  746. <ng-template [ngTemplateOutlet]="nzExtra" />
  747. <ng-template [ngTemplateOutlet]="extraTpl" />
  748. <ng-template [ngTemplateOutlet]="actionsTpl" />
  749. }
  750. `, isInline: true, dependencies: [{ kind: "component", type: NzListItemActionsComponent, selector: "ul[nz-list-item-actions]", inputs: ["nzActions"], exportAs: ["nzListItemActions"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzListItemExtraComponent, selector: "nz-list-item-extra, [nz-list-item-extra]", exportAs: ["nzListItemExtra"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
  751. }
  752. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListItemComponent, decorators: [{
  753. type: Component,
  754. args: [{
  755. selector: 'nz-list-item, [nz-list-item]',
  756. exportAs: 'nzListItem',
  757. template: `
  758. <ng-template #actionsTpl>
  759. @if (nzActions && nzActions.length > 0) {
  760. <ul nz-list-item-actions [nzActions]="nzActions"></ul>
  761. }
  762. <ng-content select="nz-list-item-actions, [nz-list-item-actions]" />
  763. </ng-template>
  764. <ng-template #contentTpl>
  765. <ng-content select="nz-list-item-meta, [nz-list-item-meta]" />
  766. <ng-content />
  767. @if (nzContent) {
  768. <ng-container *nzStringTemplateOutlet="nzContent">{{ nzContent }}</ng-container>
  769. }
  770. </ng-template>
  771. <ng-template #extraTpl>
  772. <ng-content select="nz-list-item-extra, [nz-list-item-extra]" />
  773. </ng-template>
  774. @if (isVerticalAndExtra) {
  775. <div class="ant-list-item-main">
  776. <ng-template [ngTemplateOutlet]="contentTpl" />
  777. <ng-template [ngTemplateOutlet]="actionsTpl" />
  778. </div>
  779. @if (nzExtra) {
  780. <nz-list-item-extra>
  781. <ng-template [ngTemplateOutlet]="nzExtra" />
  782. </nz-list-item-extra>
  783. }
  784. <ng-template [ngTemplateOutlet]="extraTpl" />
  785. } @else {
  786. <ng-template [ngTemplateOutlet]="contentTpl" />
  787. <ng-template [ngTemplateOutlet]="nzExtra" />
  788. <ng-template [ngTemplateOutlet]="extraTpl" />
  789. <ng-template [ngTemplateOutlet]="actionsTpl" />
  790. }
  791. `,
  792. preserveWhitespaces: false,
  793. encapsulation: ViewEncapsulation.None,
  794. changeDetection: ChangeDetectionStrategy.OnPush,
  795. host: {
  796. class: 'ant-list-item'
  797. },
  798. imports: [NzListItemActionsComponent, NzOutletModule, NgTemplateOutlet, NzListItemExtraComponent]
  799. }]
  800. }], ctorParameters: () => [{ type: NzListComponent }, { type: i0.ChangeDetectorRef }], propDecorators: { nzActions: [{
  801. type: Input
  802. }], nzContent: [{
  803. type: Input
  804. }], nzExtra: [{
  805. type: Input
  806. }], nzNoFlex: [{
  807. type: Input,
  808. args: [{ transform: booleanAttribute }]
  809. }, {
  810. type: HostBinding,
  811. args: ['class.ant-list-item-no-flex']
  812. }], listItemExtraDirective: [{
  813. type: ContentChild,
  814. args: [NzListItemExtraComponent]
  815. }] } });
  816. /**
  817. * Use of this source code is governed by an MIT-style license that can be
  818. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  819. */
  820. const DIRECTIVES = [
  821. NzListComponent,
  822. NzListHeaderComponent,
  823. NzListFooterComponent,
  824. NzListPaginationComponent,
  825. NzListEmptyComponent,
  826. NzListItemComponent,
  827. NzListItemMetaComponent,
  828. NzListItemMetaTitleComponent,
  829. NzListItemMetaDescriptionComponent,
  830. NzListItemMetaAvatarComponent,
  831. NzListItemActionsComponent,
  832. NzListItemActionComponent,
  833. NzListItemExtraComponent,
  834. NzListLoadMoreDirective,
  835. NzListGridDirective
  836. ];
  837. class NzListModule {
  838. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
  839. static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: NzListModule, imports: [NzListComponent,
  840. NzListHeaderComponent,
  841. NzListFooterComponent,
  842. NzListPaginationComponent,
  843. NzListEmptyComponent,
  844. NzListItemComponent,
  845. NzListItemMetaComponent,
  846. NzListItemMetaTitleComponent,
  847. NzListItemMetaDescriptionComponent,
  848. NzListItemMetaAvatarComponent,
  849. NzListItemActionsComponent,
  850. NzListItemActionComponent,
  851. NzListItemExtraComponent,
  852. NzListLoadMoreDirective,
  853. NzListGridDirective], exports: [NzListComponent,
  854. NzListHeaderComponent,
  855. NzListFooterComponent,
  856. NzListPaginationComponent,
  857. NzListEmptyComponent,
  858. NzListItemComponent,
  859. NzListItemMetaComponent,
  860. NzListItemMetaTitleComponent,
  861. NzListItemMetaDescriptionComponent,
  862. NzListItemMetaAvatarComponent,
  863. NzListItemActionsComponent,
  864. NzListItemActionComponent,
  865. NzListItemExtraComponent,
  866. NzListLoadMoreDirective,
  867. NzListGridDirective] });
  868. static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListModule, imports: [NzListComponent,
  869. NzListEmptyComponent,
  870. NzListItemComponent,
  871. NzListItemMetaComponent,
  872. NzListItemMetaAvatarComponent] });
  873. }
  874. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzListModule, decorators: [{
  875. type: NgModule,
  876. args: [{
  877. imports: [DIRECTIVES],
  878. exports: [DIRECTIVES]
  879. }]
  880. }] });
  881. /**
  882. * Use of this source code is governed by an MIT-style license that can be
  883. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  884. */
  885. /**
  886. * Generated bundle index. Do not edit.
  887. */
  888. export { NzListComponent, NzListEmptyComponent, NzListFooterComponent, NzListGridDirective, NzListHeaderComponent, NzListItemActionComponent, NzListItemActionsComponent, NzListItemComponent, NzListItemExtraComponent, NzListItemMetaAvatarComponent, NzListItemMetaComponent, NzListItemMetaDescriptionComponent, NzListItemMetaTitleComponent, NzListLoadMoreDirective, NzListModule, NzListPaginationComponent };
  889. //# sourceMappingURL=ng-zorro-antd-list.mjs.map