• File: 13-es2015.62e972fd6f37f7284b6e.js
  • Full Path: /home/icicle/public_html/test/Publish-20260710231155-20260715025645/wwwroot/13-es2015.62e972fd6f37f7284b6e.js
  • Date Modified: 09/07/2021 12:12 PM
  • File size: 12.79 KB
  • MIME-type: text/plain
  • Charset: utf-8
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{FSVh:function(t,e,n){"use strict";n.r(e),n.d(e,"OthersModule",function(){return m});var o=n("SVse"),i=n("iInd"),r=n("8Y7J"),a=n("Iab2"),s=n("IheW"),c=n("s7LF"),l=n("EApP"),d=n("u47x"),p=n("eZAi");function b(t,e){if(1&t){const t=r.Tb();r.Sb(0,"tr",23),r.Sb(1,"td",24),r.Nb(2,"input",25),r.Rb(),r.Sb(3,"td",26),r.Sb(4,"button",27),r.cc("click",function(){r.zc(t);const n=e.index,o=r.ec();return o.Download(n,o.StaticReportsList.controls[n].get("FILENAME").value)}),r.Nb(5,"i",28),r.Rb(),r.Rb(),r.Sb(6,"td",26),r.Sb(7,"button",29),r.cc("click",function(){r.zc(t);const n=e.index,o=r.ec();return o.Delete(n,o.StaticReportsList.controls[n].get("FILENAME").value)}),r.Nb(8,"i",30),r.Rb(),r.Rb(),r.Rb()}2&t&&r.mc("formGroupName",e.index)}let h=(()=>{class t{constructor(t,e,n,o,i,a,c){this.fb=t,this.router=e,this.http=n,this.toastr=o,this.interactivityChecker=i,this.staticReportsService=a,this.platformId=c,this.onUploadFinished=new r.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"Others","OtherReports").subscribe(t=>{t.type===s.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===s.d.Response&&(this.message="Upload success.",this.onUploadFinished.emit(t.body)),this.GetAllFiles(),this.StaticRports.reset()})},this.CreateOthersForm()}CreateOthersForm(){const t=[];for(let e=0;e<12;e++)t.push(this.StaticReports());this.OthersForm=this.fb.group({StaticRports:this.fb.group({FILENAME:[""]}),StaticReportsList:this.fb.array(t)})}StaticReports(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}get StaticRports(){return this.OthersForm.get("StaticRports")}get StaticReportsList(){return this.OthersForm.get("StaticReportsList")}ngOnInit(){this.GetAllFiles()}GetAllFiles(){this.staticReportsService.StaticReportDetails("Others","OtherReports").subscribe(t=>{if(this.FileName=t,this.FileName.length>0){const t=this.OthersForm.controls.StaticReportsList;for(let e=0;e<this.FileName.length;e++)t.at(+e).get("DOWNLOADFILE").setValue(this.FileName[e].FileNameWithOutExtension),t.at(+e).get("FILENAME").setValue(this.FileName[e].FileName),e>=11&&e<this.FileName.length-1&&this.StaticReportsList.push(this.StaticReports())}})}Delete(t,e){const n=this.OthersForm.controls.StaticReportsList;for(let o=0;o<n.length;o++)if(t==o){e&&this.staticReportsService.Delete("Others","OtherReports",e).subscribe(e=>{null==e&&(this.StaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","Others"),this.StaticReportsList.push(this.StaticReports()))},t=>{console.log(t)});break}}Download(t,e){const n=this.OthersForm.controls.StaticReportsList;for(let o=0;o<n.length;o++)if(t==o){e&&this.staticReportsService.DownloadFile("Others","OtherReports",e).subscribe(t=>{let n=new Blob([t],{type:"application/pdf"});const o=window.URL.createObjectURL(n);"application/pdf"===t.type?window.open(o,"_blank"):a.saveAs(n,e)});break}}keyevent(t){t.preventDefault();const e=Array.prototype.slice.call(document.querySelectorAll("input")),n=[];if(Array.isArray(n)&&!n.length)for(let o=0;o<e.length;o++)this.interactivityChecker.isFocusable(e[o])&&n.push(e[o]);if(13===t.keyCode||40===t.keyCode){const t=n[n.indexOf(document.activeElement)+1];t&&(t.focus(),t.select())}else if(38===t.keyCode){const t=n[n.indexOf(document.activeElement)-1];t&&(t.focus(),t.select())}}basicUpload(t){var e=new FormData;Array.from(t).forEach(t=>e.append("file",t)),this.http.post("https://file.io",e).subscribe(t=>{console.log("done")})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(c.c),r.Mb(i.e),r.Mb(s.b),r.Mb(l.b),r.Mb(d.d),r.Mb(p.a),r.Mb(r.B))},t.\u0275cmp=r.Gb({type:t,selectors:[["othersreport"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.keyevent(t)},!1,r.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:24,vars:3,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-11"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],[1,"row",2,"padding-bottom","0px"],[1,"col-md-12"],["formGroupName","StaticRports"],[1,"row","no-padding","mb-2"],[1,"col-sm-8",2,"padding-right","5px"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","New File Name",1,"form-control","form-control-sm","bg-white"],[1,"col-sm-4","no-padding","text-right"],[1,"upload-button","btn","blue-gradient","btn-block","btn-rounded","px-1","mr-1",3,"disabled"],[1,"fa","fa-upload"],["type","file",3,"change"],["file",""],[1,"shadow-sm","card"],[1,"card-body"],[1,"tableFixHead"],[1,"table-responsive-sm","fix-table"],["formArrayName","StaticReportsList",1,"table","table-sm","table-borderless"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],[1,"no-padding;"],["type","text","formControlName","DOWNLOADFILE",1,"form-control","form-control-sm","no-border",2,"padding-left","15px"],[1,"no-padding;",2,"width","30px"],["type","button",1,"my-btn-height","btn","blue-gradient","btn-block","btn-rounded","px-1",3,"click"],["aria-hidden","true","title","Download",1,"fa","fa-download"],["type","button",1,"my-btn-height","btn","peach-gradient","btn-block","btn-rounded","px-1",3,"click"],["title","Delete",1,"fa","fa-trash"]],template:function(t,e){if(1&t){const t=r.Tb();r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",9),r.Sb(10,"div",10),r.Nb(11,"input",11),r.Rb(),r.Sb(12,"div",12),r.Sb(13,"button",13),r.Nb(14,"i",14),r.Sb(15,"input",15,16),r.cc("change",function(){r.zc(t);const n=r.wc(16);return e.UploadFile(n.files,e.StaticRports.get("FILENAME").value)}),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(17,"div",17),r.Sb(18,"div",18),r.Sb(19,"div",19),r.Sb(20,"div",20),r.Sb(21,"table",21),r.Sb(22,"tbody"),r.Ic(23,b,9,1,"tr",22),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb()}2&t&&(r.yb(1),r.mc("formGroup",e.OthersForm),r.yb(12),r.mc("disabled",""===e.StaticRports.get("FILENAME").value||null===e.StaticRports.get("FILENAME").value),r.yb(10),r.mc("ngForOf",e.StaticReportsList.controls))},directives:[c.t,c.m,c.g,c.h,c.a,c.l,c.e,c.b,o.m],styles:['.row[_ngcontent-%COMP%]{padding:10px}.card[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:10px 0}.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:1px;padding:1px}button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:14px}.action-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:5px}.font-label[_ngcontent-%COMP%]{font-size:12px}.btn-height[_ngcontent-%COMP%]{height:30px;width:100px}.btn-height[_ngcontent-%COMP%], .my-btn-height[_ngcontent-%COMP%]{font-size:12px;padding:0;color:#fff}.my-btn-height[_ngcontent-%COMP%]{height:28px;width:30px;margin-top:0}.upload-button[_ngcontent-%COMP%]{height:30px;overflow:hidden;position:relative;width:120px;color:#fff;padding-top:3px}.upload-button[_ngcontent-%COMP%]:after{content:" Add New File";color:#fff;font-size:14px;text-align:center}.upload-button[_ngcontent-%COMP%]   input[type=file][_ngcontent-%COMP%]{font-size:14px;left:0;opacity:0;position:absolute;top:0;padding-top:0}table[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{font-size:12px;font-weight:700;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;text-transform:uppercase}input[_ngcontent-%COMP%]::-moz-placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}input[_ngcontent-%COMP%]::placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}.fix-table[_ngcontent-%COMP%]{height:350px;overflow-y:auto;width:100%}.tableFixHead[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0}thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding:1px!important;height:32px!important;font-weight:400;vertical-align:middle}.table-borderless[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], tr[_ngcontent-%COMP%]   .table-borderless[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{border:0}tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{height:22px}table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{padding:0!important}.no-padding[_ngcontent-%COMP%]{padding:0}.no-border[_ngcontent-%COMP%]{border:0;border-color:#fff}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}.z-depth-1a[_ngcontent-%COMP%]{box-shadow:0 2px 5px 0 rgba(55,161,255,.26),0 4px 12px 0 rgba(121,155,254,.25)}.btn[_ngcontent-%COMP%]:hover, .z-depth-1-half[_ngcontent-%COMP%]{box-shadow:0 5px 11px 0 rgba(85,182,255,.28),0 4px 15px 0 rgba(36,133,255,.15)}']}),t})();const g=[{path:"",data:{title:"Others"},children:[{path:"",redirectTo:"OthersComponent",pathMatch:"full",data:{title:"Others"}},{path:"",component:(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Gb({type:t,selectors:[["app-others"]],decls:13,vars:0,consts:[[1,"row"],[1,"col-md-10","offset-1"],[1,"shadow-sm","card","h-100"],[1,"card-body"],[1,"mega-ul"],[1,"custom-dropdown",2,"width","330px","text-align","center"],[1,"col-md-8","offset-2"],[1,"d-flex","justify-content-center"],[1,"col-md-6"]],template:function(t,e){1&t&&(r.Sb(0,"div",0),r.Sb(1,"div",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"ul",4),r.Sb(5,"li",5),r.Sb(6,"a"),r.Kc(7,"Others"),r.Rb(),r.Rb(),r.Rb(),r.Sb(8,"div",6),r.Nb(9,"othersreport"),r.Rb(),r.Sb(10,"div",7),r.Sb(11,"div",8),r.Nb(12,"router-outlet"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb())},directives:[h,i.i],styles:[".mega-ul[_ngcontent-%COMP%]{background:#bc1135;padding:1px;font-weight:700;font-size:18px}.row[_ngcontent-%COMP%]{margin-right:10px;margin-left:10px;margin-top:10px}.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:520px;max-height:520px;padding-left:5px;padding-right:5px;padding-bottom:4px}.h-100[_ngcontent-%COMP%]{border:1px dotted #c22}.custom-dropdown[_ngcontent-%COMP%]{display:inline-block;padding:10px;margin-right:10px;border-radius:10px}.custom-dropdown[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#fff;text-decoration:none}.custom-dropdown[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:active{color:#e78080;text-decoration:none}"]}),t})(),data:{title:"Others"}}]}];let f=(()=>{class t{}return t.\u0275mod=r.Kb({type:t}),t.\u0275inj=r.Jb({factory:function(e){return new(e||t)},imports:[[i.h.forChild(g)],i.h]}),t})();var u=n("H8qh");let m=(()=>{class t{}return t.\u0275mod=r.Kb({type:t}),t.\u0275inj=r.Jb({factory:function(e){return new(e||t)},imports:[[o.c,f,u.a]]}),t})()},Iab2:function(t,e,n){var o,i;void 0===(i="function"==typeof(o=function(){"use strict";function e(t,e,n){var o=new XMLHttpRequest;o.open("GET",t),o.responseType="blob",o.onload=function(){a(o.response,e,n)},o.onerror=function(){console.error("could not download file")},o.send()}function n(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,r=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(t,r,a){var s=i.URL||i.webkitURL,c=document.createElement("a");c.download=r=r||t.name||"download",c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?o(c):n(c.href)?e(t,r,a):o(c,c.target="_blank")):(c.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){o(c)},0))}:"msSaveOrOpenBlob"in navigator?function(t,i,r){if(i=i||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,r),i);else if(n(t))e(t,i,r);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){o(a)})}}:function(t,n,o,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,o);var s="application/octet-stream"===t.type,c=/constructor/i.test(i.HTMLElement)||i.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&c||r)&&"undefined"!=typeof FileReader){var d=new FileReader;d.onloadend=function(){var t=d.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},d.readAsDataURL(t)}else{var p=i.URL||i.webkitURL,b=p.createObjectURL(t);a?a.location=b:location.href=b,a=null,setTimeout(function(){p.revokeObjectURL(b)},4e4)}});i.saveAs=a.saveAs=a,t.exports=a})?o.apply(e,[]):o)||(t.exports=i)}}]);