1import{_ as c,q as l,f as d,g as u,o as f,h,e as m,E as p}from"./index-DXJP4K2g.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"50e60b9b5cae352c567880bcb17486a4d75e1c32"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="dcea2e79-2efd-4ab1-80e0-058de9dae88a",e._sentryDebugIdIdentifier="sentry-dbid-dcea2e79-2efd-4ab1-80e0-058de9dae88a")})()}catch{}const _={props:["authed"],auth(){return this.authed},computed:{filter(){return this.$route.query}},methods:{formatText(e){return e?e.replace(/#/g,"%23").replace(/"/g,"'"):""},async exportCSV(){let e=[];const a={page:1,limit:this.filter.limit?this.filter.limit:2500,order:this.filter.sort?this.filter.sort:"requested_date:desc",search:this.filter.search,group:this.filter.group,status:this.filter.status,publisher:this.filter.publisher,csv:1},s=await p.rmvfy.getTickets(a);if(s.data&&s.data.data){e=s.data.data;const r=[];if(e.length>0){Object.keys(e).forEach(t=>{r.push({subject:`"${this.formatText(e[t].subject)}"`,group_name:e[t].group_name?`"${this.formatText(e[t].group_name)}"`:"-",zendesk_id:`"${this.formatText(e[t].id)}"`,priority:`"${this.formatText(e[t].priority)}"`,status_group:`"${this.formatText(e[t].status_group)}"`,removal_status:`"${this.formatText(e[t].removal_status)}"`,removal_submission_date:e[t].removal_submission_date?`"${this.formatText(e[t].removal_submission_date)}"`:"-",successfully_removed_date:e[t].successfully_removed_date?`"${this.formatText(e[t].successfully_removed_date)}"`:"-",last_activity_date_time:e[t].last_activity?`"${this.formatText(e[t].last_activity)}"`:"-",review_url:`"${this.formatText(e[t].review_url)}"`,screenshots_url:`"${this.formatText(e[t].screenshots_url)}"`})});let i="data:text/csv;charset=utf-8,";i+=[Object.keys(r[0]).join(","),...r.map(t=>Object.values(t).join(","))].join(` 2`).replace(/(^\[)|(\]$)/gm,"");const n=encodeURI(i),o=document.createElement("a");o.setAttribute("href",n),o.setAttribute("download","removals-export.csv"),o.click()}else this.$notify({message:"No data to export!",timeout:5e3,type:"warning",verticalAlign:"bottom",horizontalAlign:"right"})}else this.$notify({message:"There was an issue with the export. Try again later",timeout:5e3,type:"warning",verticalAlign:"bottom",horizontalAlign:"right"})}}};function b(e,a,s,r,i,n){const o=l("base-button"),t=l("el-tooltip");return s.authed?(f(),d(t,{key:0,content:"Click to download CSV"},{default:h(()=>[m(o,{icon:"",type:"primary",class:"bg-white",outline:"","icon-class":"ai ai-download","aria-label":"Export CSV",onClick:n.exportCSV},null,8,["onClick"])]),_:1})):u("",!0)}const y=c(_,[["render",b]]);export{y as default}; 3//# sourceMappingURL=ExportCSV-pQ7sha_j.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.