ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
2 lines • 23.3 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/keycodes"),require("@angular/common/http"),require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("ng-zorro-antd/core"),require("@angular/animations"),require("@angular/cdk/platform"),require("ng-zorro-antd/i18n"),require("@angular/common"),require("@angular/forms"),require("ng-zorro-antd/icon"),require("ng-zorro-antd/progress"),require("ng-zorro-antd/tooltip")):"function"==typeof define&&define.amd?define("ng-zorro-antd/upload",["exports","@angular/cdk/keycodes","@angular/common/http","@angular/core","rxjs","rxjs/operators","ng-zorro-antd/core","@angular/animations","@angular/cdk/platform","ng-zorro-antd/i18n","@angular/common","@angular/forms","ng-zorro-antd/icon","ng-zorro-antd/progress","ng-zorro-antd/tooltip"],t):t(((e=e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"].upload={}),e.ng.cdk.keycodes,e.ng.common.http,e.ng.core,e.rxjs,e.rxjs.operators,e["ng-zorro-antd"].core,e.ng.animations,e.ng.cdk.platform,e["ng-zorro-antd"].i18n,e.ng.common,e.ng.forms,e["ng-zorro-antd"].icon,e["ng-zorro-antd"].progress,e["ng-zorro-antd"].tooltip)}(this,function(e,t,n,i,o,r,s,a,l,p,c,u,d,f,h){"use strict";var g=function(){return(g=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function m(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}function y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function v(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function z(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}var b=function(){function e(e,t,n){if(this.http=e,this.el=t,this.updateHostClassService=n,this.reqs={},this.inited=!1,this.destroy=!1,this.classes={},this.prefixCls="ant-upload",!e)throw new Error("Not found 'HttpClient', You can import 'HttpClientModule' in your root module.")}return e.prototype.onClick=function(){!this.options.disabled&&this.options.openFileDialogOnClick&&this.file.nativeElement.click()},e.prototype.onKeyDown=function(e){this.options.disabled||"Enter"!==e.key&&e.keyCode!==t.ENTER||this.onClick()},e.prototype.onFileDrop=function(e){var t=this;if(this.options.disabled||"dragover"===e.type)e.preventDefault();else{if(this.options.directory)this.traverseFileTree(e.dataTransfer.items);else{var n=Array.prototype.slice.call(e.dataTransfer.files).filter(function(e){return t.attrAccept(e,t.options.accept)});n.length&&this.uploadFiles(n)}e.preventDefault()}},e.prototype.onChange=function(e){if(!this.options.disabled){var t=e.target;this.uploadFiles(t.files),t.value=""}},e.prototype.traverseFileTree=function(e){var t,n,i=this,o=function(e,t){if(e.isFile)e.file(function(e){i.attrAccept(e,i.options.accept)&&i.uploadFiles([e])});else if(e.isDirectory){e.createReader().readEntries(function(n){var i,r;try{for(var s=v(n),a=s.next();!a.done;a=s.next()){var l=a.value;o(l,""+t+e.name+"/")}}catch(e){i={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}})}};try{for(var r=v(e),s=r.next();!s.done;s=r.next()){var a=s.value;o(a.webkitGetAsEntry(),"")}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.attrAccept=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),i=""+e.name,o=""+e.type,r=o.replace(/\/.*$/,"");return n.some(function(e){var t=e.trim();return"."===t.charAt(0)?-1!==i.toLowerCase().indexOf(t.toLowerCase(),i.toLowerCase().length-t.toLowerCase().length):/\/\*$/.test(t)?r===t.replace(/\/.*$/,""):o===t})}return!0},e.prototype.attachUid=function(e){return e.uid||(e.uid=Math.random().toString(36).substring(2)),e},e.prototype.uploadFiles=function(e){var t=this,n=o.of(Array.prototype.slice.call(e));this.options.filters&&this.options.filters.forEach(function(e){n=n.pipe(r.switchMap(function(t){var n=e.fn(t);return n instanceof o.Observable?n:o.of(n)}))}),n.subscribe(function(e){e.forEach(function(n){t.attachUid(n),t.upload(n,e)})},function(e){s.warn("Unhandled upload filter error",e)})},e.prototype.upload=function(e,t){var n=this;if(!this.options.beforeUpload)return this.post(e);var i=this.options.beforeUpload(e,t);if(i instanceof o.Observable)i.subscribe(function(t){var i=Object.prototype.toString.call(t);"[object File]"===i||"[object Blob]"===i?(n.attachUid(t),n.post(t)):"boolean"==typeof t&&!1!==t&&n.post(e)},function(e){s.warn("Unhandled upload beforeUpload error",e)});else if(!1!==i)return this.post(e)},e.prototype.post=function(e){var t=this;if(!this.destroy){var n=this.options,i=e.uid,r=n.data,a=n.headers;"function"==typeof r&&(r=r(e)),"function"==typeof a&&(a=a(e));var l={action:n.action,name:n.name,headers:a,file:e,data:r,withCredentials:n.withCredentials,onProgress:n.onProgress?function(t){n.onProgress(t,e)}:void 0,onSuccess:function(o,r){t.clean(i),n.onSuccess(o,e,r)},onError:function(o){t.clean(i),n.onError(o,e)}},p=(n.customRequest||this.xhr).call(this,l);p instanceof o.Subscription||s.warn("Must return Subscription type in '[nzCustomRequest]' property"),this.reqs[i]=p,n.onStart(e)}},e.prototype.xhr=function(e){var t=this,i=new FormData;i.append(e.name,e.file),e.data&&Object.keys(e.data).map(function(t){i.append(t,e.data[t])}),e.headers||(e.headers={}),null!==e.headers["X-Requested-With"]?e.headers["X-Requested-With"]="XMLHttpRequest":delete e.headers["X-Requested-With"];var o=new n.HttpRequest("POST",e.action,i,{reportProgress:!0,withCredentials:e.withCredentials,headers:new n.HttpHeaders(e.headers)});return this.http.request(o).subscribe(function(t){t.type===n.HttpEventType.UploadProgress?(t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t,e.file)):t instanceof n.HttpResponse&&e.onSuccess(t.body,e.file,t)},function(n){t.abort(e.file),e.onError(n,e.file)})},e.prototype.clean=function(e){var t=this.reqs[e];t instanceof o.Subscription&&t.unsubscribe(),delete this.reqs[e]},e.prototype.abort=function(e){var t=this;e?this.clean(e&&e.uid):Object.keys(this.reqs).forEach(function(e){return t.clean(e)})},e.prototype.setClassMap=function(){var e,t=g(((e={})[this.prefixCls]=!0,e[this.prefixCls+"-disabled"]=this.options.disabled,e),this.classes);this.updateHostClassService.updateHostClass(this.el.nativeElement,t)},e.prototype.ngOnInit=function(){this.inited=!0,this.setClassMap()},e.prototype.ngOnChanges=function(){this.inited&&this.setClassMap()},e.prototype.ngOnDestroy=function(){this.destroy=!0,this.abort()},e.decorators=[{type:i.Component,args:[{selector:"[nz-upload-btn]",exportAs:"nzUploadBtn",template:'<input type="file" #file (change)="onChange($event)"\n [attr.accept]="options.accept"\n [attr.directory]="options.directory ? \'directory\': null"\n [attr.webkitdirectory]="options.directory ? \'webkitdirectory\': null"\n [multiple]="options.multiple" style="display: none;">\n<ng-content></ng-content>',host:{"[attr.tabindex]":'"0"',"[attr.role]":'"button"'},providers:[s.NzUpdateHostClassService],preserveWhitespaces:!1,encapsulation:i.ViewEncapsulation.None}]}],e.ctorParameters=function(){return[{type:n.HttpClient,decorators:[{type:i.Optional}]},{type:i.ElementRef},{type:s.NzUpdateHostClassService}]},e.propDecorators={file:[{type:i.ViewChild,args:["file",{static:!1}]}],classes:[{type:i.Input}],options:[{type:i.Input}],onClick:[{type:i.HostListener,args:["click"]}],onKeyDown:[{type:i.HostListener,args:["keydown",["$event"]]}],onFileDrop:[{type:i.HostListener,args:["drop",["$event"]]},{type:i.HostListener,args:["dragover",["$event"]]}]},e}();var C=function(){function e(e,t,n,i){this.el=e,this.cdr=t,this.updateHostClassService=n,this.platform=i,this.imageTypes=["image","webp","png","svg","gif","jpg","jpeg","bmp"],this.locale={},this.prefixCls="ant-upload-list"}return Object.defineProperty(e.prototype,"showPic",{get:function(){return"picture"===this.listType||"picture-card"===this.listType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(e){e.forEach(function(e){e.linkProps="string"==typeof e.linkProps?JSON.parse(e.linkProps):e.linkProps}),this._items=e},enumerable:!0,configurable:!0}),e.prototype.setClassMap=function(){var e,t=((e={})[this.prefixCls]=!0,e[this.prefixCls+"-"+this.listType]=!0,e);this.updateHostClassService.updateHostClass(this.el.nativeElement,t)},e.prototype.extname=function(e){var t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^.\/\\]*$/.exec(n)||[""])[0]},e.prototype.isImageUrl=function(e){if(~this.imageTypes.indexOf(e.type))return!0;var t=e.thumbUrl||e.url||"";if(!t)return!1;var n=this.extname(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|bmp)$/i.test(n))||!/^data:/.test(t)&&!n},e.prototype.previewFile=function(e,t){e.type&&-1===this.imageTypes.indexOf(e.type)&&t("");var n=new FileReader;n.onloadend=function(){return t(n.result)},n.readAsDataURL(e)},e.prototype.genThumb=function(){var e=this;if(this.platform.isBrowser){var t=window;this.showPic&&"undefined"!=typeof document&&void 0!==t&&t.FileReader&&t.File&&this.items.filter(function(e){return e.originFileObj instanceof File&&void 0===e.thumbUrl}).forEach(function(t){t.thumbUrl="",e.previewFile(t.originFileObj,function(n){t.thumbUrl=n,e.detectChanges()})})}},e.prototype.showPreview=function(e){var t=this.icons,n=t.showPreviewIcon,i=t.hidePreviewIconInNonImage;return!!n&&(!!this.isImageUrl(e)||!i)},e.prototype.handlePreview=function(e,t){if(this.onPreview)return t.preventDefault(),this.onPreview(e)},e.prototype.handleRemove=function(e,t){t.preventDefault(),this.onRemove&&this.onRemove(e)},e.prototype.detectChanges=function(){this.cdr.detectChanges()},e.prototype.ngOnChanges=function(){this.setClassMap(),this.genThumb()},e.decorators=[{type:i.Component,args:[{selector:"nz-upload-list",exportAs:"nzUploadList",template:'<div *ngFor="let file of items" class="ant-upload-list-item ant-upload-list-item-{{file.status}}" @itemState>\n <ng-template #icon>\n <ng-container *ngIf="showPic; else noPicTpl">\n <div *ngIf="listType === \'picture-card\' && file.status === \'uploading\'; else thumbUrlCheck" class="ant-upload-list-item-uploading-text">{{ locale.uploading }}</div>\n </ng-container>\n <ng-template #thumbUrlCheck>\n <i *ngIf="!file.thumbUrl && !file.url; else thumbTpl"\n class="ant-upload-list-item-thumbnail" nz-icon nzType="picture" nzTheme="twotone"></i>\n </ng-template>\n <ng-template #thumbTpl>\n <a class="ant-upload-list-item-thumbnail" target="_blank" rel="noopener noreferrer"\n [href]="file.thumbUrl || file.url"\n (click)="handlePreview(file, $event)">\n <img *ngIf="isImageUrl(file); else noThumbTpl" [src]="file.thumbUrl || file.url" [attr.alt]="file.name" />\n </a>\n </ng-template>\n <ng-template #noThumbTpl><i class="ant-upload-list-item-icon" nz-icon nzType="file" nzTheme="twotone"></i></ng-template>\n <ng-template #noPicTpl><i nz-icon [nzType]="file.status === \'uploading\' ? \'loading\' : \'paper-clip\'"></i></ng-template>\n </ng-template>\n <ng-template #preview>\n <ng-container *ngIf="file.url; else prevText">\n <a [href]="file.thumbUrl || file.url" target="_blank" rel="noopener noreferrer" [attr.download]="file.linkProps && file.linkProps.download"\n (click)="handlePreview(file, $event)" class="ant-upload-list-item-name" title="{{ file.name }}">{{ file.name }}</a>\n </ng-container>\n <ng-template #prevText>\n <span (click)="handlePreview(file, $event)" class="ant-upload-list-item-name" title="{{ file.name }}">{{ file.name }}</span>\n </ng-template>\n </ng-template>\n <div class="ant-upload-list-item-info">\n <span *ngIf="file.status === \'error\'" nz-tooltip [nzTitle]="file.message">\n <ng-template [ngTemplateOutlet]="icon"></ng-template>\n <ng-template [ngTemplateOutlet]="preview"></ng-template>\n </span>\n <span *ngIf="file.status !== \'error\'">\n <ng-template [ngTemplateOutlet]="icon"></ng-template>\n <ng-template [ngTemplateOutlet]="preview"></ng-template>\n </span>\n </div>\n <ng-container *ngIf="listType === \'picture-card\' && file.status !== \'uploading\'; else close">\n <span class="ant-upload-list-item-actions">\n <a *ngIf="showPreview(file)" [href]="file.thumbUrl || file.url"\n target="_blank" rel="noopener noreferrer"\n title="{{ locale.previewFile }}"\n [ngStyle]="!(file.url || file.thumbUrl) && {\'opacity\': .5, \'pointer-events\': \'none\'}"\n (click)="handlePreview(file, $event)">\n <i nz-icon nzType="eye-o"></i>\n </a>\n <i *ngIf="icons.showRemoveIcon" (click)="handleRemove(file, $event)" nz-icon nzType="delete" title="{{ locale.removeFile }}"></i>\n </span>\n </ng-container>\n <ng-template #close>\n <i *ngIf="icons.showRemoveIcon" (click)="handleRemove(file, $event)" nz-icon nzType="close" title="{{ locale.removeFile }}"></i>\n </ng-template>\n <div *ngIf="file.status === \'uploading\'" class="ant-upload-list-item-progress">\n <nz-progress [nzPercent]="file.percent" [nzShowInfo]="false" [nzStrokeWidth]="2"></nz-progress>\n </div>\n</div>',providers:[s.NzUpdateHostClassService],animations:[a.trigger("itemState",[a.transition(":enter",[a.style({height:"0",width:"0",opacity:0}),a.animate(150,a.style({height:"*",width:"*",opacity:1}))]),a.transition(":leave",[a.animate(150,a.style({height:"0",width:"0",opacity:0}))])])],preserveWhitespaces:!1,encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:i.ChangeDetectorRef},{type:s.NzUpdateHostClassService},{type:l.Platform}]},e.propDecorators={locale:[{type:i.Input}],listType:[{type:i.Input}],items:[{type:i.Input}],icons:[{type:i.Input}],onPreview:[{type:i.Input}],onRemove:[{type:i.Input}]},e}();var w=function(){function e(e,t){var n=this;this.cdr=e,this.i18n=t,this.locale={},this.nzType="select",this.nzLimit=0,this.nzSize=0,this.nzDirectory=!1,this.nzOpenFileDialogOnClick=!0,this.nzFilter=[],this.nzFileList=[],this.nzDisabled=!1,this.nzListType="text",this.nzMultiple=!1,this.nzName="file",this._showUploadList=!0,this.nzShowButton=!0,this.nzWithCredentials=!1,this.nzChange=new i.EventEmitter,this.nzFileListChange=new i.EventEmitter,this.onStart=function(e){n.nzFileList||(n.nzFileList=[]);var t=n.fileToObject(e);t.status="uploading",n.nzFileList=n.nzFileList.concat(t),n.nzFileListChange.emit(n.nzFileList),n.nzChange.emit({file:t,fileList:n.nzFileList,type:"start"}),n.detectChangesList()},this.onProgress=function(e,t){var i=n.nzFileList,o=n.getFileItem(t,i);o.percent=e.percent,n.nzChange.emit({event:e,file:g({},o),fileList:n.nzFileList,type:"progress"}),n.detectChangesList()},this.onSuccess=function(e,t){var i=n.nzFileList,o=n.getFileItem(t,i);o.status="done",o.response=e,n.nzChange.emit({file:g({},o),fileList:i,type:"success"}),n.detectChangesList()},this.onError=function(e,t){var i=n.nzFileList,o=n.getFileItem(t,i);o.error=e,o.status="error",o.message=n.genErr(o),n.nzChange.emit({file:g({},o),fileList:i,type:"error"}),n.detectChangesList()},this.onRemove=function(e){n.uploadComp.abort(e),e.status="removed";var t="function"==typeof n.nzRemove?n.nzRemove(e):null==n.nzRemove||n.nzRemove;(t instanceof o.Observable?t:o.of(t)).pipe(r.filter(function(e){return e})).subscribe(function(){n.nzFileList=n.removeFileItem(e,n.nzFileList),n.nzChange.emit({file:e,fileList:n.nzFileList,type:"removed"}),n.nzFileListChange.emit(n.nzFileList),n.cdr.detectChanges()})},this.prefixCls="ant-upload",this.classList=[]}return Object.defineProperty(e.prototype,"nzShowUploadList",{get:function(){return this._showUploadList},set:function(e){this._showUploadList="boolean"==typeof e?s.toBoolean(e):e},enumerable:!0,configurable:!0}),e.prototype.zipOptions=function(){var e=this;"boolean"==typeof this.nzShowUploadList&&this.nzShowUploadList&&(this.nzShowUploadList={showPreviewIcon:!0,showRemoveIcon:!0,hidePreviewIconInNonImage:!1});var t=this.nzFilter.slice();if(this.nzMultiple&&this.nzLimit>0&&-1===t.findIndex(function(e){return"limit"===e.name})&&t.push({name:"limit",fn:function(t){return t.slice(-e.nzLimit)}}),this.nzSize>0&&-1===t.findIndex(function(e){return"size"===e.name})&&t.push({name:"size",fn:function(t){return t.filter(function(t){return t.size/1024<=e.nzSize})}}),this.nzFileType&&this.nzFileType.length>0&&-1===t.findIndex(function(e){return"type"===e.name})){var n=this.nzFileType.split(",");t.push({name:"type",fn:function(e){return e.filter(function(e){return~n.indexOf(e.type)})}})}return this._btnOptions={disabled:this.nzDisabled,accept:this.nzAccept,action:this.nzAction,directory:this.nzDirectory,openFileDialogOnClick:this.nzOpenFileDialogOnClick,beforeUpload:this.nzBeforeUpload,customRequest:this.nzCustomRequest,data:this.nzData,headers:this.nzHeaders,name:this.nzName,multiple:this.nzMultiple,withCredentials:this.nzWithCredentials,filters:t,onStart:this.onStart,onProgress:this.onProgress,onSuccess:this.onSuccess,onError:this.onError},this},e.prototype.fileToObject=function(e){return{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.filename||e.name,size:e.size,type:e.type,uid:e.uid,response:e.response,error:e.error,percent:0,originFileObj:e}},e.prototype.getFileItem=function(e,t){return t.filter(function(t){return t.uid===e.uid})[0]},e.prototype.removeFileItem=function(e,t){return t.filter(function(t){return t.uid!==e.uid})},e.prototype.genErr=function(e){return e.response&&"string"==typeof e.response?e.response:e.error&&e.error.statusText||this.locale.uploadError},e.prototype.fileDrop=function(e){e.type!==this.dragState&&(this.dragState=e.type,this.setClassMap())},e.prototype.detectChangesList=function(){this.cdr.detectChanges(),this.listComp.detectChanges()},e.prototype.setClassMap=function(){var e=[];"drag"===this.nzType?(this.nzFileList.some(function(e){return"uploading"===e.status})&&e.push(this.prefixCls+"-drag-uploading"),"dragover"===this.dragState&&e.push(this.prefixCls+"-drag-hover")):e=[this.prefixCls+"-select-"+this.nzListType],this.classList=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(z(arguments[t]));return e}([this.prefixCls,this.prefixCls+"-"+this.nzType],e,[this.nzDisabled&&this.prefixCls+"-disabled"||""]).filter(function(e){return!!e}),this.cdr.detectChanges()},e.prototype.ngOnInit=function(){var e=this;this.i18n$=this.i18n.localeChange.subscribe(function(){e.locale=e.i18n.getLocaleData("Upload"),e.detectChangesList()})},e.prototype.ngOnChanges=function(e){var t=this;e.nzFileList&&(this.nzFileList||[]).forEach(function(e){return e.message=t.genErr(e)}),this.zipOptions().setClassMap()},e.prototype.ngOnDestroy=function(){this.i18n$.unsubscribe()},e.decorators=[{type:i.Component,args:[{selector:"nz-upload",exportAs:"nzUpload",template:'<ng-template #list>\n <nz-upload-list #listComp [style.display]="nzShowUploadList ? \'\' : \'none\'"\n [locale]="locale"\n [listType]="nzListType"\n [items]="nzFileList || []"\n [icons]="nzShowUploadList"\n [onPreview]="nzPreview"\n [onRemove]="onRemove"></nz-upload-list>\n</ng-template>\n<ng-template #con><ng-content></ng-content></ng-template>\n<ng-template #btn>\n <div [ngClass]="classList" [style.display]="nzShowButton ? \'\' : \'none\'">\n <div nz-upload-btn #uploadComp [options]="_btnOptions">\n <ng-template [ngTemplateOutlet]="con"></ng-template>\n </div>\n </div>\n</ng-template>\n<ng-container *ngIf="nzType === \'drag\'; else select">\n <div [ngClass]="classList"\n (drop)="fileDrop($event)"\n (dragover)="fileDrop($event)"\n (dragleave)="fileDrop($event)">\n <div nz-upload-btn #uploadComp [options]="_btnOptions" [classes]="{\'ant-upload-btn\': true}">\n <div class="ant-upload-drag-container">\n <ng-template [ngTemplateOutlet]="con"></ng-template>\n </div>\n </div>\n </div>\n <ng-template [ngTemplateOutlet]="list"></ng-template>\n</ng-container>\n<ng-template #select>\n <ng-container *ngIf="nzListType === \'picture-card\'; else pic">\n <ng-template [ngTemplateOutlet]="list"></ng-template>\n <ng-template [ngTemplateOutlet]="btn"></ng-template>\n </ng-container>\n</ng-template>\n<ng-template #pic>\n <ng-template [ngTemplateOutlet]="btn"></ng-template>\n <ng-template [ngTemplateOutlet]="list"></ng-template>\n</ng-template>',preserveWhitespaces:!1,encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,host:{"[class.ant-upload-picture-card-wrapper]":'nzListType === "picture-card"'}}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:p.NzI18nService}]},e.propDecorators={uploadComp:[{type:i.ViewChild,args:["uploadComp",{static:!1}]}],listComp:[{type:i.ViewChild,args:["listComp",{static:!1}]}],nzType:[{type:i.Input}],nzLimit:[{type:i.Input}],nzSize:[{type:i.Input}],nzFileType:[{type:i.Input}],nzAccept:[{type:i.Input}],nzAction:[{type:i.Input}],nzDirectory:[{type:i.Input}],nzOpenFileDialogOnClick:[{type:i.Input}],nzBeforeUpload:[{type:i.Input}],nzCustomRequest:[{type:i.Input}],nzData:[{type:i.Input}],nzFilter:[{type:i.Input}],nzFileList:[{type:i.Input}],nzDisabled:[{type:i.Input}],nzHeaders:[{type:i.Input}],nzListType:[{type:i.Input}],nzMultiple:[{type:i.Input}],nzName:[{type:i.Input}],nzShowUploadList:[{type:i.Input}],nzShowButton:[{type:i.Input}],nzWithCredentials:[{type:i.Input}],nzRemove:[{type:i.Input}],nzPreview:[{type:i.Input}],nzChange:[{type:i.Output}],nzFileListChange:[{type:i.Output}]},m([s.InputNumber(),y("design:type",Object)],e.prototype,"nzLimit",void 0),m([s.InputNumber(),y("design:type",Object)],e.prototype,"nzSize",void 0),m([s.InputBoolean(),y("design:type",Object)],e.prototype,"nzDirectory",void 0),m([s.InputBoolean(),y("design:type",Object)],e.prototype,"nzOpenFileDialogOnClick",void 0),m([s.InputBoolean(),y("design:type",Object)],e.prototype,"nzDisabled",void 0),m([s.InputBoolean(),y("design:type",Object)],e.prototype,"nzMultiple",void 0),m([s.InputBoolean(),y("design:type",Object)],e.prototype,"nzShowButton",void 0),m([s.InputBoolean(),y("design:type",Object)],e.prototype,"nzWithCredentials",void 0),e}();var I=function(){function e(){}return e.decorators=[{type:i.NgModule,args:[{imports:[c.CommonModule,u.FormsModule,l.PlatformModule,h.NzToolTipModule,f.NzProgressModule,p.NzI18nModule,d.NzIconModule],declarations:[w,b,C],exports:[w]}]}],e}();e.NzUploadBtnComponent=b,e.NzUploadComponent=w,e.NzUploadListComponent=C,e.NzUploadModule=I,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng-zorro-antd-upload.umd.min.js.map