TitleDescription.c68bfb15.js 9.94 KB
import{a as l,c}from"./vuex.esm.8fdeb4b6.js";import{T as d}from"./WpTable.ee9185a7.js";import"./default-i18n.3a91e0e5.js";import"./constants.0d8c074c.js";import{n}from"./_plugin-vue2_normalizer.61652a7c.js";import"./index.ec9852b3.js";import{J as p}from"./JsonValues.870a4901.js";import{M as a}from"./MaxCounts.12b45bab.js";import"./SaveChanges.e40a9083.js";import{B as i}from"./RadioToggle.e6e54396.js";import{C as u}from"./RobotsMeta.5a1b6c31.js";import{C as r}from"./SettingsRow.edbb3005.js";import{C as h}from"./index.3c70e00e.js";import{C as _}from"./GoogleSearchPreview.853cda22.js";import{C as m}from"./HtmlTagsEditor.16842e9d.js";const g={components:{BaseRadioToggle:i,CoreRobotsMeta:u,CoreSettingsRow:r},mixins:[p,a],props:{type:{type:String,required:!0},object:{type:Object,required:!0},options:{type:Object,required:!0},showBulk:Boolean,noMetaBox:Boolean,includeKeywords:Boolean},data(){return{titleCount:0,descriptionCount:0,strings:{robotsSetting:this.$t.__("Robots Meta Settings",this.$td),bulkEditing:this.$t.__("Bulk Editing",this.$td),readOnly:this.$t.__("Read Only",this.$td),otherOptions:this.$t.__("Other Options",this.$td),showDateInGooglePreview:this.$t.__("Show Date in Google Preview",this.$td),keywords:this.$t.__("Keywords",this.$td),removeCatBase:this.$t.__("Remove Category Base Prefix",this.$td),removeCatBaseUpsell:this.$t.sprintf(this.$t.__("This feature is only for licensed %1$s users. %2$s",this.$td),"<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("search-appearance-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"remove-category-base-prefix",!0))}}},computed:{...l({mainOptions:"options"}),...c(["isUnlicensed"]),removeCatBase:{get(){return this.$isPro?this.mainOptions.searchAppearance.advanced.removeCatBase:!1},set(o){this.mainOptions.searchAppearance.advanced.removeCatBase=o}},title(){return this.$t.sprintf(this.$t.__("%1$s Title",this.$td),this.object.singular)},showPostThumbnailInSearch(){return this.$t.sprintf(this.$t.__("Show %1$s Thumbnail in Google Custom Search",this.$td),this.object.singular)},showMetaBox(){return this.$t.sprintf(this.$t.__("Show %1$s Meta Box",this.$td),"AIOSEO")}}};var f=function(){var t=this,e=t._self._c;return e("div",{staticClass:"aioseo-sa-ct-advanced"},[e("core-settings-row",{attrs:{name:t.strings.robotsSetting},scopedSlots:t._u([{key:"content",fn:function(){return[e("core-robots-meta",{attrs:{options:t.options.advanced.robotsMeta,mainOptions:t.options}})]},proxy:!0}])}),t.showBulk?e("core-settings-row",{attrs:{name:t.strings.bulkEditing,align:""},scopedSlots:t._u([{key:"content",fn:function(){return[e("base-radio-toggle",{attrs:{name:`${t.object.name}BulkEditing`,options:[{label:t.$constants.GLOBAL_STRINGS.disabled,value:"disabled"},{label:t.$constants.GLOBAL_STRINGS.enabled,value:"enabled"},{label:t.strings.readOnly,value:"read-only"}]},model:{value:t.options.advanced.bulkEditing,callback:function(s){t.$set(t.options.advanced,"bulkEditing",s)},expression:"options.advanced.bulkEditing"}})]},proxy:!0}],null,!1,3216224115)}):t._e(),t.type==="taxonomies"&&t.object.name==="category"?e("core-settings-row",{attrs:{align:""},scopedSlots:t._u([{key:"name",fn:function(){return[t._v(" "+t._s(t.strings.removeCatBase)+" "),t.isUnlicensed?e("core-pro-badge"):t._e()]},proxy:!0},{key:"content",fn:function(){return[e("base-radio-toggle",{attrs:{disabled:t.isUnlicensed,name:"removeCatBase",options:[{label:t.$constants.GLOBAL_STRINGS.no,value:!1,activeClass:"dark"},{label:t.$constants.GLOBAL_STRINGS.yes,value:!0}]},model:{value:t.removeCatBase,callback:function(s){t.removeCatBase=s},expression:"removeCatBase"}}),t.isUnlicensed?e("core-alert",{staticClass:"inline-upsell",attrs:{type:"blue"}},[e("div",{domProps:{innerHTML:t._s(t.strings.removeCatBaseUpsell)}})]):t._e()]},proxy:!0}],null,!1,3605449182)}):t._e(),!t.noMetaBox&&(!t.isUnlicensed||t.type!=="taxonomies")?e("core-settings-row",{attrs:{name:t.strings.otherOptions},scopedSlots:t._u([{key:"content",fn:function(){return[e("div",{staticClass:"other-options"},[e("base-toggle",{model:{value:t.options.advanced.showMetaBox,callback:function(s){t.$set(t.options.advanced,"showMetaBox",s)},expression:"options.advanced.showMetaBox"}},[t._v(" "+t._s(t.showMetaBox)+" ")])],1)]},proxy:!0}],null,!1,430458522)}):t._e(),t.mainOptions.searchAppearance.advanced.useKeywords&&t.includeKeywords?e("core-settings-row",{attrs:{name:t.strings.keywords,align:""},scopedSlots:t._u([{key:"content",fn:function(){return[e("base-select",{attrs:{multiple:"",taggable:"",options:t.getJsonValue(t.options.advanced.keywords)||[],value:t.getJsonValue(t.options.advanced.keywords)||[],"tag-placeholder":t.strings.tagPlaceholder},on:{input:s=>t.options.advanced.keywords=t.setJsonValue(s)}})]},proxy:!0}],null,!1,4182382651)}):t._e()],1)},v=[],b=n(g,f,v,!1,null,null,null,null);const N=b.exports,$={components:{BaseRadioToggle:i,CoreAlert:h,CoreGoogleSearchPreview:_,CoreHtmlTagsEditor:m,CoreSettingsRow:r},mixins:[a,d],props:{type:{type:String,required:!0},object:{type:Object,required:!0},separator:{type:String,required:!0},options:{type:Object,required:!0},edit:{type:Boolean,default(){return!0}}},data(){return{titleCount:0,descriptionCount:0,strings:{showInSearchResults:this.$t.__("Show in Search Results",this.$td),clickToAddTitle:this.$t.__("Click on the tags below to insert variables into your title.",this.$td),metaDescription:this.$t.__("Meta Description",this.$td),clickToAddDescription:this.$t.__("Click on the tags below to insert variables into your meta description.",this.$td)}}},watch:{show(o){if(o){this.options.advanced.robotsMeta.noindex=!1,this.options.advanced.robotsMeta.nofollow===!1&&this.options.advanced.robotsMeta.noarchive===!1&&this.options.advanced.robotsMeta.notranslate===!1&&this.options.advanced.robotsMeta.noimageindex===!1&&this.options.advanced.robotsMeta.nosnippet===!1&&this.options.advanced.robotsMeta.noodp===!1&&parseInt(this.options.advanced.robotsMeta.maxSnippet)===-1&&parseInt(this.options.advanced.robotsMeta.maxVideoPreview)===-1&&this.options.advanced.robotsMeta.maxImagePreview.toLowerCase()==="large"&&(this.options.advanced.robotsMeta.default=!0);return}this.options.advanced.robotsMeta.default=!1,this.options.advanced.robotsMeta.noindex=!0}},computed:{title(){return this.$t.sprintf(this.$t.__("%1$s Title",this.$td),this.object.singular)},show(){return this.options.show},noIndexDescription(){return this.$t.sprintf(this.$t.__('Choose whether your %1$s should be included in search results. If you select "No", then your %1$s will be noindexed and excluded from the sitemap so that search engines ignore them.',this.$td),this.object.label)},noindexAlertDescription(){return this.$t.sprintf(this.$t.__("Your %1$s will be noindexed and excluded from the sitemap so that search engines ignore them. You can still control how their page title looks like below.",this.$td),this.object.label)}},methods:{}};var y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"aioseo-sa-ct-title-description"},[e("core-settings-row",{attrs:{name:t.strings.showInSearchResults,align:""},scopedSlots:t._u([{key:"content",fn:function(){return[t.edit?e("base-radio-toggle",{attrs:{name:`${t.object.name}ShowInSearch`,options:[{label:t.$constants.GLOBAL_STRINGS.no,value:!1,activeClass:"dark"},{label:t.$constants.GLOBAL_STRINGS.yes,value:!0}]},model:{value:t.options.show,callback:function(s){t.$set(t.options,"show",s)},expression:"options.show"}}):t._e(),t.edit?t._e():e("base-radio-toggle",{attrs:{value:!0,name:`${t.object.name}ShowInSearch`,options:[{label:t.$constants.GLOBAL_STRINGS.no,value:!1,activeClass:"dark"},{label:t.$constants.GLOBAL_STRINGS.yes,value:!0}]}}),e("div",{staticClass:"aioseo-description"},[t.options.show?e("span",[t._v(t._s(t.noIndexDescription))]):t._e(),t.options.show?t._e():e("core-alert",{attrs:{type:"blue"}},[t._v(" "+t._s(t.noindexAlertDescription)+" ")])],1)]},proxy:!0}])}),t.edit?e("core-settings-row",{attrs:{name:t.$constants.GLOBAL_STRINGS.preview},scopedSlots:t._u([{key:"content",fn:function(){return[e("core-google-search-preview",{attrs:{title:t.parseTags(t.options.title),separator:t.separator,description:t.parseTags(t.options.metaDescription)}})]},proxy:!0}],null,!1,3259382955)}):t._e(),e("core-settings-row",{attrs:{name:t.title},scopedSlots:t._u([{key:"content",fn:function(){return[t.edit?e("core-html-tags-editor",{attrs:{"line-numbers":!1,single:"","tags-context":`${t.object.name}Title`,"default-tags":t.$tags.getDefaultTags(t.type,t.object.name,"title")},scopedSlots:t._u([{key:"tags-description",fn:function(){return[t._v(" "+t._s(t.strings.clickToAddTitle)+" ")]},proxy:!0}],null,!1,3106947238),model:{value:t.options.title,callback:function(s){t.$set(t.options,"title",s)},expression:"options.title"}}):t._e(),t.edit?t._e():e("core-html-tags-editor",{attrs:{"line-numbers":!1,single:"","tags-context":`${t.object.name}Title`,"default-tags":t.$tags.getDefaultTags(t.type,t.object.name,"title")},scopedSlots:t._u([{key:"tags-description",fn:function(){return[t._v(" "+t._s(t.strings.clickToAddTitle)+" ")]},proxy:!0}],null,!1,3106947238)})]},proxy:!0}])}),t.options.show?e("core-settings-row",{attrs:{name:t.strings.metaDescription},scopedSlots:t._u([{key:"content",fn:function(){return[t.edit?e("core-html-tags-editor",{attrs:{"line-numbers":!1,description:"","tags-context":`${t.object.name}Description`,"default-tags":t.$tags.getDefaultTags(t.type,t.object.name,"description")},scopedSlots:t._u([{key:"tags-description",fn:function(){return[t._v(" "+t._s(t.strings.clickToAddDescription)+" ")]},proxy:!0}],null,!1,1726597184),model:{value:t.options.metaDescription,callback:function(s){t.$set(t.options,"metaDescription",s)},expression:"options.metaDescription"}}):t._e(),t.edit?t._e():e("core-html-tags-editor",{attrs:{"line-numbers":!1,"tags-context":`${t.object.name}Description`,"default-tags":t.$tags.getDefaultTags(t.type,t.object.name,"description")},scopedSlots:t._u([{key:"tags-description",fn:function(){return[t._v(" "+t._s(t.strings.clickToAddDescription)+" ")]},proxy:!0}],null,!1,1726597184)})]},proxy:!0}],null,!1,2372372956)}):t._e()],1)},w=[],x=n($,y,w,!1,null,null,null,null);const E=x.exports;export{N as A,E as T};