← Back
Editing: Import.6a36c3d7.js
import{J as D,l as B}from"./index.44a18132.js";import{C as V,_ as F}from"./Caret.c1ae0fd1.js";import{C as I}from"./Card.7e975fe9.js";import{S as C}from"./Download.9ba651d1.js";import"./translations.d159963e.js";import{_ as x}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as t,s as b}from"./default-i18n.20001971.js";import{x as n,o as a,l as u,m as r,C as c,a as d,t as i,y as O,b as S,c as w,u as h}from"./runtime-dom.esm-bundler.647fa2bb.js";import{C as M}from"./Blur.3966b67d.js";import{b as A}from"./index.6b623118.js";import{R as $}from"./RequiredPlans.c0eaccf5.js";import{C as U}from"./ProBadge.80b96f47.js";import{C as H}from"./Index.437acb26.js";import{_ as R}from"./Cta.e841e5f4.js";import{u as T}from"./AddonConditions.ba46bc5e.js";import"./helpers.a876ae70.js";import"./Tooltip.e09c91a9.js";import"./Slide.44995a8e.js";import"./addons.95e96e7e.js";import"./upperFirst.a182d36c.js";import"./_stringToArray.f9ddb970.js";import"./toString.98bc71ed.js";import"./license.9147c6fd.js";import"./Row.eec044b7.js";import"./constants.a9947cd8.js";import"./SettingsRow.74286c2c.js";import"./Index.cb9ff477.js";import"./Php.224e3c0c.js";import"./CheckSolid.a71d9642.js";const p="aioseo-pro",W={setup(){return{localSeoStore:D()}},components:{CoreAlert:V,CoreCard:I,SvgDownload:C},data(){return{importSuccess:!1,importError:!1,options:{},plugin:null,loading:!1,strings:{importLocalSeoFromOtherPlugins:t("Import Local SEO From Other Plugins",p),importOthersDescription:b(t("Choose a plugin to import Local SEO directly into %1$s.",p),"AIOSEO"),selectPlugin:t("Select a plugin...",p),import:t("Import",p),notInstalled:t("not installed",p)}}},watch:{plugin(){this.importSuccess=!1,this.importError=!1,this.options={}}},computed:{plugins(){const s=[];return this.localSeoStore.importers.forEach(e=>{s.push({value:e.slug,label:e.name,canImport:e.canImport,version:e.version,$isDisabled:!e.installed,$isDeactivated:!e.activated})}),s},importSuccessful(){return b(t("%1$s was successfully imported!",p),this.plugin.label)},importErrorMessage(){return b(t("An error occurred while importing %1$s. Please try again.",p),this.plugin.label)},pluginMultipleLocationsWarning(){var s;return((s=this.plugin)==null?void 0:s.value)&&["yoast-local-seo"].includes(this.plugin.value)&&this.plugin.$isDeactivated},pluginHasMultipleLocationsWarning(){var s;return b(t("If you want multiple locations imported please make sure %1$s%2$s%3$s is activated before importing.",p),"<strong>",(s=this.plugin)==null?void 0:s.label,"</strong>")}},methods:{processImportPlugin(){this.importSuccess=!1,this.importError=!1,this.loading=!0;const s=[];this.options.all?this.settings.filter(e=>e.value!=="all").forEach(e=>{s.push(e.value)}):Object.keys(this.options).forEach(e=>{this.options[e]&&s.push(e)}),this.localSeoStore.importPlugins([{plugin:this.plugin.value,settings:s}]).then(()=>{this.loading=!1,this.importSuccess=!0,this.options={}}).catch(()=>{this.loading=!1,this.importError=!0,this.options={}})},invalidVersion(s){return b(t("We do not support importing from the currently installed version of %1$s (%2$s). Please upgrade to the latest version and try again.",p),s.label,s.version)}}},z={class:"aioseo-section-description"},N={class:"import-plugin-label"},q={class:"plugin-label"},j={key:0,class:"plugin-status"},J=["innerHTML"];function Y(s,e,L,P,o,l){const g=n("svg-download"),m=n("core-alert"),y=n("base-select"),_=n("base-button"),E=n("core-card");return a(),u(E,{id:"aioseo-local-seo-import-others",class:"aioseo-local-seo-import-others",slug:"importOtherPluginsLocalSeo",toggles:!1,"no-slide":"","header-text":o.strings.importLocalSeoFromOtherPlugins},{"header-icon":r(()=>[c(g)]),default:r(()=>[d("div",z,i(o.strings.importOthersDescription),1),o.importSuccess?(a(),u(m,{key:0,class:"import-success",type:"green"},{default:r(()=>[O(i(l.importSuccessful),1)]),_:1})):S("",!0),o.importError?(a(),u(m,{key:1,class:"import-error",type:"red"},{default:r(()=>[O(i(l.importErrorMessage),1)]),_:1})):S("",!0),c(y,{size:"medium",modelValue:o.plugin,"onUpdate:modelValue":e[0]||(e[0]=v=>o.plugin=v),options:l.plugins,placeholder:o.strings.selectPlugin},{option:r(({option:v})=>[d("div",N,[d("span",q,i(v.label),1),v.$isDisabled?(a(),w("span",j,i(o.strings.notInstalled),1)):S("",!0)])]),_:1},8,["modelValue","options","placeholder"]),l.pluginMultipleLocationsWarning?(a(),u(m,{key:2,type:"blue",class:"multiple-locations-warning"},{default:r(()=>[d("span",{innerHTML:l.pluginHasMultipleLocationsWarning},null,8,J)]),_:1})):S("",!0),c(_,{type:"blue",size:"medium",class:"import",onClick:l.processImportPlugin,disabled:!o.plugin,loading:o.loading},{default:r(()=>[O(i(o.strings.import),1)]),_:1},8,["onClick","disabled","loading"])]),_:1},8,["header-text"])}const G=x(W,[["render",Y]]),k="all-in-one-seo-pack",K={components:{BaseButton:F,BaseSelect:A,CoreBlur:M},data(){return{plugin:null,strings:{importOthersDescription:b(t("Choose a plugin to import Local SEO directly into %1$s.",k),"AIOSEO"),selectPlugin:t("Select a plugin...",k),import:t("Import",k),notInstalled:t("not installed",k)}}},computed:{plugins(){return[{value:"yoast-seo",label:"yoast-seo",canImport:!1,version:"1.0.0",$isDisabled:!1}]}}},Q={class:"aioseo-section-description"},X={class:"import-plugin-label"},Z={class:"plugin-label"};function oo(s,e,L,P,o,l){const g=n("base-select"),m=n("base-button"),y=n("core-blur");return a(),u(y,null,{default:r(()=>[d("div",Q,i(o.strings.importOthersDescription),1),c(g,{size:"medium",modelValue:o.plugin,"onUpdate:modelValue":e[0]||(e[0]=_=>o.plugin=_),options:l.plugins,placeholder:o.strings.selectPlugin},{option:r(({option:_})=>[d("div",X,[d("span",Z,i(_.label),1)])]),_:1},8,["modelValue","options","placeholder"]),c(m,{type:"blue",size:"medium",class:"import"},{default:r(()=>[O(i(o.strings.import),1)]),_:1})]),_:1})}const eo=x(K,[["render",oo]]),f="all-in-one-seo-pack",to={components:{SvgDownload:C,Blur:eo,Cta:H,CoreCard:I,CoreProBadge:U,RequiredPlans:$},data(){return{links:B,importSuccess:!1,importError:!1,options:{},plugin:null,loading:!1,strings:{importLocalSeoFromOtherPlugins:t("Import Local SEO From Other Plugins",f),ctaButtonText:t("Unlock Local SEO",f),ctaHeader:b(t("Local SEO is a %1$s Feature",f),"PRO"),ctaDescription:t("Import your Local SEO settings and locations from other plugins.",f)},features:[t("Yoast SEO",f),t("Rank Math SEO",f),t("SEOPress",f)]}},computed:{plugins(){return[{value:"yoast-seo",label:"yoast-seo",canImport:!1,version:"1.0.0",$isDisabled:!1}]}}};function so(s,e,L,P,o,l){const g=n("svg-download"),m=n("core-pro-badge"),y=n("blur"),_=n("required-plans"),E=n("cta"),v=n("core-card");return a(),u(v,{class:"aioseo-local-seo-import-others-lite",slug:"importOtherPluginsLocalSeo",toggles:!1,"no-slide":""},{"header-icon":r(()=>[c(g)]),header:r(()=>[d("span",null,i(o.strings.importLocalSeoFromOtherPlugins),1),c(m)]),default:r(()=>[c(y),c(E,{"cta-link":o.links.getPricingUrl("local-seo","local-seo-upsell","import"),"button-text":o.strings.ctaButtonText,"learn-more-link":o.links.getUpsellUrl("local-seo",null,"home"),"feature-list":o.features},{"header-text":r(()=>[O(i(o.strings.ctaHeader),1)]),description:r(()=>[c(_,{addon:"aioseo-local-business"}),O(" "+i(o.strings.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])]),_:1})}const ro=x(to,[["render",so]]),Mo={__name:"Import",setup(s){const e="all-in-one-seo-pack",{shouldShowActivate:L,shouldShowLite:P,shouldShowMain:o,shouldShowUpdate:l}=T({addonSlug:"aioseo-local-business"}),g={importLocalSeoFromOtherPlugins:t("Import Local SEO From Other Plugins",e)};return(m,y)=>(a(),w("div",null,[h(o)?(a(),u(h(G),{key:0})):S("",!0),h(l)||h(L)?(a(),u(h(R),{key:1,"card-slug":"localBusinessImport","header-text":g.importLocalSeoFromOtherPlugins},null,8,["header-text"])):S("",!0),h(P)?(a(),u(h(ro),{key:2})):S("",!0)]))}};export{Mo as default};
Save File
Cancel