-
Notifications
You must be signed in to change notification settings - Fork 481
/
Copy path22668.9243c280de863aa0.js
1 lines (1 loc) · 3.95 KB
/
22668.9243c280de863aa0.js
1
(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[22668],{22668:(e,t,i)=>{i.r(t),i.d(t,{default:()=>p});var l=i(16727),n=i(75407),o=i(87742),s=i(19908),r=i(56366),f=i(8865),a=i(48032);function c(e,t){if(1&e&&n.nrm(0,"tui-file",7),2&e){const e=t.$implicit,i=n.XpG();n.Y8G("file",e)("showDelete",i.control.enabled)}}function h(e,t){if(1&e&&n.nrm(0,"tui-file",8),2&e){const e=t.$implicit,i=n.XpG();n.Y8G("file",e)("showDelete",i.control.enabled)}}function m(e,t){if(1&e){const e=n.RV6();n.j41(0,"tui-file",9),n.bIt("remove",(function(){n.eBV(e);const t=n.XpG();return n.Njj(t.removeLoading())})),n.k0s()}if(2&e){const e=n.XpG();n.Y8G("file",e.loadingFile)("showDelete",e.control.enabled)}}function u(e,t){if(1&e&&n.nrm(0,"a",10),2&e){const e=n.XpG();n.Y8G("file",e.fileWithLink)("href",e.fileWithLink.src,n.B4B)("showDelete",e.control.enabled)}}function d(e,t){if(1&e){const e=n.RV6();n.j41(0,"tui-file",11)(1,"button",12),n.bIt("click",(function(){const t=n.eBV(e).$implicit,i=n.XpG();return n.Njj(i.restore(t))})),n.EFF(2," Restore "),n.k0s()()}if(2&e){const e=t.$implicit,i=n.XpG();n.Y8G("file",e)("showDelete",i.control.enabled)}}function F(e,t){if(1&e){const e=n.RV6();n.j41(0,"tui-file",13),n.bIt("remove",(function(){const t=n.eBV(e).$implicit,i=n.XpG();return n.Njj(i.remove(t))})),n.k0s()}if(2&e){const e=t.$implicit,i=n.XpG(),l=n.sdS(14);n.Y8G("file",e)("leftContent",l)("showDelete",i.control.enabled)}}function g(e,t){1&e&&n.nrm(0,"tui-icon",14)}const p=(()=>{var e;class t{constructor(){this.isE2E=(0,n.WQX)(s.Hs4),this.control=new o.MJ(null),this.files=[{name:"Loaded.txt"},{name:"A file with a very very long title to check that it can be cut correctly.txt"}],this.loadingFile={name:"Loading file.txt"},this.rejectedFiles=[{name:"File with an error.txt",content:"Something went wrong this time"}],this.fileWithLink={name:"with link.txt",src:"https://tools.ietf.org/html/rfc675"},this.removedFiles=[this.loadingFile],this.restoredFiles=[]}removeLoading(){this.loadingFile=null}restore(e){e&&(this.restoredFiles=[...this.restoredFiles,e],this.removedFiles=this.removedFiles.filter((t=>e.name!==t?.name)))}remove(e){this.removedFiles=[...this.removedFiles,e],this.restoredFiles=this.restoredFiles.filter((t=>e.name!==t?.name))}}return(e=t).ɵfac=function(t){return new(t||e)},e.ɵcmp=n.VBU({type:e,selectors:[["ng-component"]],standalone:!0,exportAs:"Example3",features:[n.aNF],decls:15,vars:5,consts:[["state","normal",3,"file","showDelete",4,"ngFor","ngForOf"],["state","error",3,"file","showDelete",4,"ngFor","ngForOf"],["state","loading",3,"file","showDelete","remove",4,"ngIf"],["rel","noreferrer","state","normal","target","_blank","tuiFile","",3,"file","href","showDelete",4,"tuiItem"],["size","l","state","deleted",3,"file","showDelete",4,"ngFor","ngForOf"],["size","l","state","normal",3,"file","leftContent","showDelete","remove",4,"ngFor","ngForOf"],["icon",""],["state","normal",3,"file","showDelete"],["state","error",3,"file","showDelete"],["state","loading",3,"file","showDelete","remove"],["rel","noreferrer","state","normal","target","_blank","tuiFile","",3,"file","href","showDelete"],["size","l","state","deleted",3,"file","showDelete"],["tuiLink","","type","button",3,"click"],["size","l","state","normal",3,"file","leftContent","showDelete","remove"],["src","@tui.file"]],template:function(e,t){1&e&&(n.j41(0,"tui-files"),n.DNE(1,c,1,2,"tui-file",0),n.DNE(2,h,1,2,"tui-file",1),n.DNE(3,m,1,2,"tui-file",2),n.k0s(),n.j41(4,"h4"),n.EFF(5,"With link"),n.k0s(),n.j41(6,"tui-files"),n.DNE(7,u,1,3,"a",3),n.k0s(),n.j41(8,"h4"),n.EFF(9,"With deleted state"),n.k0s(),n.j41(10,"tui-files"),n.DNE(11,d,3,2,"tui-file",4),n.DNE(12,F,1,3,"tui-file",5),n.k0s(),n.DNE(13,g,1,0,"ng-template",null,6,n.C5r)),2&e&&(n.R7$(1),n.Y8G("ngForOf",t.files),n.R7$(1),n.Y8G("ngForOf",t.rejectedFiles),n.R7$(1),n.Y8G("ngIf",t.loadingFile&&!t.isE2E),n.R7$(8),n.Y8G("ngForOf",t.removedFiles),n.R7$(1),n.Y8G("ngForOf",t.restoredFiles))},dependencies:[l.Sq,l.bT,f.K,a.VbL,a.Z1t,r.qo5,r.Jc3],encapsulation:2,changeDetection:0}),t})()}}]);