UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

2 lines 8.07 kB
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/common"),require("@angular/core"),require("ng-zorro-antd/avatar"),require("ng-zorro-antd/core"),require("ng-zorro-antd/empty"),require("ng-zorro-antd/grid"),require("ng-zorro-antd/spin")):"function"==typeof define&&define.amd?define("ng-zorro-antd/list",["exports","@angular/common","@angular/core","ng-zorro-antd/avatar","ng-zorro-antd/core","ng-zorro-antd/empty","ng-zorro-antd/grid","ng-zorro-antd/spin"],n):n((t["ng-zorro-antd"]=t["ng-zorro-antd"]||{},t["ng-zorro-antd"].list={}),t.ng.common,t.ng.core,t["ng-zorro-antd"].avatar,t["ng-zorro-antd"].core,t["ng-zorro-antd"].empty,t["ng-zorro-antd"].grid,t["ng-zorro-antd"].spin)}(this,function(t,n,e,a,i,r,o,s){"use strict";var l=(Object.defineProperty(p.prototype,"nzAvatar",{set:function(t){t instanceof e.TemplateRef?(this.avatarStr="",this.avatarTpl=t):this.avatarStr=t},enumerable:!0,configurable:!0}),p.decorators=[{type:e.Component,args:[{selector:"nz-list-item-meta",exportAs:"nzListItemMeta",template:'<div *ngIf="avatarStr || avatarTpl" class="ant-list-item-meta-avatar">\n <ng-container *ngIf="avatarStr; else avatarTpl">\n <nz-avatar [nzSrc]="avatarStr"></nz-avatar>\n </ng-container>\n</div>\n<div *ngIf="nzTitle || nzDescription" class="ant-list-item-meta-content">\n <h4 *ngIf="nzTitle" class="ant-list-item-meta-title">\n <ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>\n </h4>\n <div *ngIf="nzDescription" class="ant-list-item-meta-description">\n <ng-container *nzStringTemplateOutlet="nzDescription">{{ nzDescription }}</ng-container>\n </div>\n</div>',preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],p.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},p.propDecorators={nzAvatar:[{type:e.Input}],nzTitle:[{type:e.Input}],nzDescription:[{type:e.Input}]},p);function p(t,n){this.elementRef=t,this.renderer=n,this.avatarStr="",this.renderer.addClass(t.nativeElement,"ant-list-item-meta")}var g=(d.decorators=[{type:e.Component,args:[{selector:"nz-list-item",exportAs:"nzListItem",template:'<ng-template #contentTpl>\n <div *ngIf="nzContent" class="ant-list-item-content" [ngClass]="{\'ant-list-item-content-single\': metas.length < 1}">\n <ng-container *nzStringTemplateOutlet="nzContent">{{ nzContent }}</ng-container>\n </div>\n</ng-template>\n<ng-template #actionsTpl>\n <ul *ngIf="nzActions?.length > 0" class="ant-list-item-action">\n <li *ngFor="let i of nzActions; let last=last;">\n <ng-template [ngTemplateOutlet]="i"></ng-template>\n <em *ngIf="!last" class="ant-list-item-action-split"></em>\n </li>\n </ul>\n</ng-template>\n<ng-template #mainTpl>\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="contentTpl"></ng-template>\n <ng-template [ngTemplateOutlet]="actionsTpl"></ng-template>\n</ng-template>\n<div *ngIf="nzExtra; else mainTpl" class="ant-list-item-extra-wrap">\n <div class="ant-list-item-main">\n <ng-template [ngTemplateOutlet]="mainTpl"></ng-template>\n </div>\n <div class="ant-list-item-extra">\n <ng-template [ngTemplateOutlet]="nzExtra"></ng-template>\n </div>\n</div>',preserveWhitespaces:!1,encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],d.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},d.propDecorators={metas:[{type:e.ContentChildren,args:[l]}],nzActions:[{type:e.Input}],nzContent:[{type:e.Input}],nzExtra:[{type:e.Input}]},d);function d(t,n){this.elementRef=t,this.renderer=n,this.nzActions=[],this.renderer.addClass(this.elementRef.nativeElement,"ant-list-item")}function c(t,n,e,a){var i,r=arguments.length,o=r<3?n:null===a?a=Object.getOwnPropertyDescriptor(n,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,a);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(r<3?i(o):3<r?i(n,e,o):i(n,e))||o);return 3<r&&o&&Object.defineProperty(n,e,o),o}function z(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}var m=(u.prototype._setClassMap=function(){var t,n=((t={})[this.prefixCls]=!0,t[this.prefixCls+"-vertical"]="vertical"===this.nzItemLayout,t[this.prefixCls+"-lg"]="large"===this.nzSize,t[this.prefixCls+"-sm"]="small"===this.nzSize,t[this.prefixCls+"-split"]=this.nzSplit,t[this.prefixCls+"-bordered"]=this.nzBordered,t[this.prefixCls+"-loading"]=this.nzLoading,t[this.prefixCls+"-grid"]=this.nzGrid,t[this.prefixCls+"-something-after-last-item"]=!!(this.nzLoadMore||this.nzPagination||this.nzFooter),t);this.updateHostClassService.updateHostClass(this.el.nativeElement,n)},u.prototype.ngOnInit=function(){this._setClassMap()},u.prototype.ngOnChanges=function(){this._setClassMap()},u.decorators=[{type:e.Component,args:[{selector:"nz-list",exportAs:"nzList",template:'<ng-template #itemsTpl>\n <ng-container *ngFor="let item of nzDataSource; let index = index">\n <ng-template [ngTemplateOutlet]="nzRenderItem" [ngTemplateOutletContext]="{ $implicit: item, index: index }"></ng-template>\n </ng-container>\n</ng-template>\n<div *ngIf="nzHeader" class="ant-list-header">\n <ng-container *nzStringTemplateOutlet="nzHeader">{{ nzHeader }}</ng-container>\n</div>\n<nz-spin [nzSpinning]="nzLoading">\n <ng-container *ngIf="nzDataSource">\n <div *ngIf="nzLoading && nzDataSource.length === 0" [style.min-height.px]="53"></div>\n <div *ngIf="nzGrid; else itemsTpl" nz-row [nzGutter]="nzGrid.gutter">\n <div nz-col [nzSpan]="nzGrid.span" [nzXs]="nzGrid.xs" [nzSm]="nzGrid.sm" [nzMd]="nzGrid.md" [nzLg]="nzGrid.lg" [nzXl]="nzGrid.xl"\n [nzXXl]="nzGrid.xxl" *ngFor="let item of nzDataSource; let index = index">\n <ng-template [ngTemplateOutlet]="nzRenderItem" [ngTemplateOutletContext]="{ $implicit: item, index: index }"></ng-template>\n </div>\n </div>\n <div *ngIf="!nzLoading && nzDataSource.length === 0" class="ant-list-empty-text">\n <nz-embed-empty [nzComponentName]="\'list\'" [specificContent]="nzNoResult"></nz-embed-empty>\n </div>\n </ng-container>\n <ng-content></ng-content>\n</nz-spin>\n<div *ngIf="nzFooter" class="ant-list-footer">\n <ng-container *nzStringTemplateOutlet="nzFooter">{{ nzFooter }}</ng-container>\n</div>\n<ng-template [ngTemplateOutlet]="nzLoadMore"></ng-template>\n<div *ngIf="nzPagination" class="ant-list-pagination">\n <ng-template [ngTemplateOutlet]="nzPagination"></ng-template>\n</div>',providers:[i.NzUpdateHostClassService],preserveWhitespaces:!1,encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["\n nz-list,\n nz-list nz-spin {\n display: block;\n }\n "]}]}],u.ctorParameters=function(){return[{type:e.ElementRef},{type:i.NzUpdateHostClassService}]},u.propDecorators={nzDataSource:[{type:e.Input}],nzBordered:[{type:e.Input}],nzGrid:[{type:e.Input}],nzHeader:[{type:e.Input}],nzFooter:[{type:e.Input}],nzItemLayout:[{type:e.Input}],nzRenderItem:[{type:e.Input}],nzLoading:[{type:e.Input}],nzLoadMore:[{type:e.Input}],nzPagination:[{type:e.Input}],nzSize:[{type:e.Input}],nzSplit:[{type:e.Input}],nzNoResult:[{type:e.Input}]},c([i.InputBoolean(),z("design:type",Object)],u.prototype,"nzBordered",void 0),c([i.InputBoolean(),z("design:type",Object)],u.prototype,"nzLoading",void 0),c([i.InputBoolean(),z("design:type",Object)],u.prototype,"nzSplit",void 0),u);function u(t,n){this.el=t,this.updateHostClassService=n,this.nzBordered=!1,this.nzItemLayout="horizontal",this.nzLoading=!1,this.nzSize="default",this.nzSplit=!0,this.prefixCls="ant-list"}var f=(h.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,s.NzSpinModule,o.NzGridModule,a.NzAvatarModule,i.NzAddOnModule,r.NzEmptyModule],declarations:[m,g,l],exports:[m,g,l]}]}],h);function h(){}t.NzListItemMetaComponent=l,t.NzListItemComponent=g,t.NzListComponent=m,t.NzListModule=f,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=ng-zorro-antd-list.umd.min.js.map