Sid Gifari File Manager
🏠 Root
/
home
/
caldereriajp
/
www
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
js
/
Editing: PostsTable.ecbf6727.js
import{D as S,e as v,z as B,f as D}from"./links.96235554.js";import{n as P}from"./numbers.8fa607e7.js";import{r as p,o as n,c as d,e as u,t as a,b as f,w as i,a as c,i as C,g as h,d as g}from"./vue.runtime.esm-bundler.a49acf4f.js";import{_ as b}from"./_plugin-vue_export-helper.bd508f36.js";import"./index.c885ab17.js";import{C as F}from"./Index.86dc50d3.js";import"./default-i18n.cc9dbff0.js";import"./constants.c7984802.js";/* empty css */import{W as T}from"./WpTable.cbf26363.js";import{P as A}from"./PostTypes.9ab32454.js";import{V as O,S as U,T as I,c as L}from"./Statistic.d98c0aaa.js";import{C as V}from"./ScoreButton.d532fab3.js";import{C as N}from"./Table.9ab1ff6b.js";const j={components:{apexchart:O},props:{points:{type:Object,required:!0},peak:{type:Number,default(){return 0}},recovering:{type:Boolean,default(){return!1}},height:{type:Number,default(){return 50}}},data(){return{strings:{recovering:this.$t.__("Slowly Recovering",this.$td),peak:this.$t.__("Peak",this.$td)}}},computed:{getSeries(){const e=this.points,o=[];return Object.keys(e).forEach(s=>{o.push({x:s,y:e[s]})}),[{data:o}]},chartOptions(){const e=this.peak;return{colors:[function({value:o}){return o===e?"#005AE0":"#99C2FF"}],chart:{type:"bar",sparkline:{enabled:!0},zoom:{enabled:!1},toolbar:{show:!1},parentHeightOffset:0,background:"#fff"},grid:{show:!1,padding:{top:2,right:2,bottom:0,left:2}},plotOptions:{bar:{columnWidth:"85%",barHeight:"100%"}},fill:{type:"solid"},tooltip:{enabled:!0,x:{show:!0,formatter:o=>S.fromFormat(o,"yyyy-MM").setZone(S.zone).toLocaleString({month:"long",year:"numeric"})},y:{formatter:o=>{const s=this.$t.sprintf(this.$t.__("%1$s points",this.$td),P.numberFormat(o,0));let l="";return o===e&&(l=`<span class="peak">${this.strings.peak}</span>`),s+l}},marker:{show:!1}}}}}},H={class:"aioseo-graph-decay"},M={key:0,class:"aioseo-graph-decay-recovering"};function E(e,o,s,l,r,m){const y=p("apexchart");return n(),d("div",H,[u(y,{width:"100%",height:s.height,ref:"apexchart",options:m.chartOptions,series:m.getSeries,class:"aioseo-graph-decay-chart"},null,8,["height","options","series"]),s.recovering?(n(),d("div",M,a(r.strings.recovering),1)):f("",!0)])}const W=b(j,[["render",E]]),z={};function Z(e,o){return n(),d("div")}const G=b(z,[["render",Z]]);const R={setup(){return{licenseStore:v(),searchStatisticsStore:B(),settingsStore:D()}},components:{CoreScoreButton:V,CoreWpTable:N,Cta:F,GraphDecay:W,PostActions:G,Statistic:U},mixins:[A,T,I],data(){return{numbers:P,tableId:"aioseo-search-statistics-post-table",changeItemsPerPageSlug:"searchStatisticsSeoStatistics",showUpsell:!1,strings:{position:this.$t.__("Position",this.$td),ctaButtonText:this.$t.__("Upgrade to Pro and Unlock Access Control",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Access Control is only available for licensed %1$s %2$s users.",this.$td),"AIOSEO","Pro")}}},props:{posts:Object,isLoading:Boolean,showHeader:{type:Boolean,default(){return!0}},showTableFooter:Boolean,showItemsPerPage:Boolean,disableSorting:Boolean,columns:{type:Array,default(){return["post_title","seo_score","clicks","impressions","position"]}},appendColumns:{type:Object,default(){return{}}},defaultSorting:{type:Object,default(){return{}}},initialFilter:{type:String,default(){return""}},updateAction:{type:String,default(){return"updateSeoStatistics"}}},computed:{allColumns(){var s,l;const e=L(this.columns),o=((l=(s=this.posts)==null?void 0:s.filters)==null?void 0:l.find(r=>r.active))||{};return this.appendColumns[o.slug||"all"]&&e.push(this.appendColumns[o.slug||"all"]),e},tableColumns(){return[{slug:"row",label:"#",width:"40px"},{slug:"post_title",label:this.$t.__("Title",this.$td),width:"100%",sortDir:this.orderBy==="post_title"?this.orderDir:"asc",sorted:this.orderBy==="post_title"},{slug:"seo_score",label:this.$t.__("TruSEO Score",this.$td),width:"130px",sortDir:this.orderBy==="seo_score"?this.orderDir:"asc",sorted:this.orderBy==="seo_score"},{slug:"clicks",label:this.$t.__("Clicks",this.$td),width:"80px",sortable:this.isSortable,sortDir:this.orderBy==="clicks"?this.orderDir:"asc",sorted:this.orderBy==="clicks"},{slug:"impressions",label:this.$t.__("Impressions",this.$td),width:"110px",sortable:this.isSortable,sortDir:this.orderBy==="impressions"?this.orderDir:"asc",sorted:this.orderBy==="impressions"},{slug:"position",label:this.$t.__("Position",this.$td),width:"90px",sortable:this.isSortable,sortDir:this.orderBy==="position"?this.orderDir:"asc",sorted:this.orderBy==="position"},{slug:"lastUpdated",label:this.$t.__("Last Updated On",this.$td),width:"160px",sortDir:this.orderBy==="lastUpdated"?this.orderDir:"asc",sorted:this.orderBy==="lastUpdated"},{slug:"decay",label:this.$t.__("Loss",this.$td),width:"140px",sortable:this.isSortable,sortDir:this.orderBy==="decay"?this.orderDir:"asc",sorted:this.orderBy==="decay"},{slug:"decayPercent",label:this.$t.__("Drop (%)",this.$td),width:"120px",sortable:this.isSortable,sortDir:this.orderBy==="decayPercent"?this.orderDir:"asc",sorted:this.orderBy==="decayPercent"},{slug:"performance",label:this.$t.__("Performance Score",this.$td),width:"150px"},{slug:"diffDecay",label:this.$t.__("Diff",this.$td),width:"95px"},{slug:"diffPosition",label:this.$t.__("Diff",this.$td),width:"80px"}].filter(e=>this.allColumns.includes(e.slug))},isSortable(){return this.disableSorting?!1:this.filter==="all"&&this.$isPro&&!this.licenseStore.isUnlicensed}},methods:{resetSelectedFilters(){this.selectedFilters.postType="",this.processAdditionaFilterOptionSelected({name:"postType",selectedValue:""})},fetchData(e){if(typeof this.searchStatisticsStore[this.updateAction]=="function")return this.searchStatisticsStore[this.updateAction](e)}},mounted(){this.initialFilter&&this.processFilter({slug:this.initialFilter})}},q={class:"aioseo-search-statistics-post-table"},J={class:"post-row"},K={class:"post-title"},Q=["onClick"],X={key:1,class:"post-title"},Y={key:0,class:"row-actions"},tt=["href"],et=["href"];function st(e,o,s,l,r,m){const y=p("post-actions"),k=p("core-score-button"),_=p("statistic"),w=p("graph-decay"),$=p("cta"),x=p("core-wp-table");return n(),d("div",q,[u(x,{ref:"table",class:"posts-table",id:r.tableId,columns:m.tableColumns,rows:Object.values(s.posts.rows),totals:s.posts.totals,filters:s.posts.filters,"additional-filters":s.posts.additionalFilters,"selected-filters":e.selectedFilters,loading:s.isLoading||l.searchStatisticsStore.loading.seoStatistics,"initial-page-number":e.pageNumber,"initial-search-term":e.searchTerm,"initial-items-per-page":l.settingsStore.settings.tablePagination[r.changeItemsPerPageSlug],"show-header":s.showHeader,"show-bulk-actions":!1,"show-table-footer":s.showTableFooter,"show-items-per-page":s.showItemsPerPage,"show-pagination":"","blur-rows":r.showUpsell,onFilterTable:e.processFilter,onProcessAdditionalFilters:e.processAdditionalFilters,onAdditionalFilterOptionSelected:e.processAdditionaFilterOptionSelected,onPaginate:e.processPagination,onProcessChangeItemsPerPage:e.processChangeItemsPerPage,onSearch:e.processSearch,onSortColumn:e.processSort},{row:i(({index:t})=>[c("div",J,a(t+1),1)]),post_title:i(({row:t})=>[c("div",K,[t.postId?(n(),d("a",{key:0,href:"#",onClick:C(ot=>e.openPostDetail(t),["prevent"])},a(t.postTitle),9,Q)):(n(),d("span",X,a(t.postTitle),1))]),u(y,{row:t},null,8,["row"]),t.postId?(n(),d("div",Y,[c("span",null,[c("a",{class:"view",href:t.context.permalink,target:"_blank"},[c("span",null,a(e.viewPost(t.context.postType.singular)),1)],8,tt),h(" | ")]),c("span",null,[c("a",{class:"edit",href:t.context.editLink,target:"_blank"},[c("span",null,a(e.editPost(t.context.postType.singular)),1)],8,et)])])):f("",!0)]),seo_score:i(({row:t})=>[t.seoScore?(n(),g(k,{key:0,class:"table-score-button",score:t.seoScore},null,8,["score"])):f("",!0)]),clicks:i(({row:t})=>[h(a(r.numbers.compactNumber(t.clicks)),1)]),impressions:i(({row:t})=>[h(a(r.numbers.compactNumber(t.impressions)),1)]),position:i(({row:t})=>[h(a(Math.round(t.position).toFixed(0)),1)]),lastUpdated:i(({row:t})=>[h(a(t.context.lastUpdated||"-"),1)]),decay:i(({row:t})=>[u(_,{type:"decay","show-difference":!1,total:t.decay,showZeroValues:!0,class:"no-margin"},null,8,["total"])]),decayPercent:i(({row:t})=>[u(_,{type:"decayPercent","show-difference":!1,total:t.decayPercent,showZeroValues:!0,class:"no-margin"},null,8,["total"])]),performance:i(({row:t})=>[u(w,{points:t.points,peak:t.peak,recovering:t.recovering,height:38},null,8,["points","peak","recovering"])]),diffPosition:i(({row:t})=>[t.difference.comparison?(n(),g(_,{key:0,type:"position","show-original":!1,difference:t.difference.position,"tooltip-offset":"-100px,0"},null,8,["difference"])):f("",!0)]),diffDecay:i(({row:t})=>[t.difference.comparison?(n(),g(_,{key:0,type:"diffDecay","show-original":!1,difference:t.difference.decay,"tooltip-offset":"-100px,0"},null,8,["difference"])):f("",!0)]),cta:i(()=>[r.showUpsell?(n(),g($,{key:0,"cta-link":e.$links.getPricingUrl("search-statistics","search-statistics-upsell"),"button-text":r.strings.ctaButtonText,"learn-more-link":e.$links.getUpsellUrl("search-statistics","search-statistics-upsell","home")},{"header-text":i(()=>[h(a(r.strings.ctaHeader),1)]),_:1},8,["cta-link","button-text","learn-more-link"])):f("",!0)]),_:1},8,["id","columns","rows","totals","filters","additional-filters","selected-filters","loading","initial-page-number","initial-search-term","initial-items-per-page","show-header","show-table-footer","show-items-per-page","blur-rows","onFilterTable","onProcessAdditionalFilters","onAdditionalFilterOptionSelected","onPaginate","onProcessChangeItemsPerPage","onSearch","onSortColumn"])])}const yt=b(R,[["render",st]]);export{yt as P};
Save
Cancel