Sid Gifari File Manager
🏠 Root
/
home2
/
meumer25
/
public_html
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
businessinfo
/
Editing: main.d364c5da.js
import{h as q,m as A,r as x}from"../js/utils.6d965f64.js";import{c as R}from"../js/runtime-dom.esm-bundler.dc49ee3e.js";import{o as B}from"../js/helpers.633a054c.js";import{l as _}from"../js/index.20093c86.js";import{u as H,a as P,e as W,l as G}from"../js/index.317ad629.js";import{B as J}from"../js/Input.f04bee4d.js";import{B as K}from"../js/Select.69906a74.js";import{B as Q}from"../js/Toggle.11571651.js";import"../js/translations.e71e2202.js";import{_ as X}from"../js/_plugin-vue_export-helper.eefbdd86.js";import{_ as s,a as U}from"../js/default-i18n.65d58dd6.js";import{a6 as k,o as c,c as b,_ as n,$ as i,l as u,a4 as w,a2 as h,a7 as f,h as C}from"../js/runtime-core.esm-bundler.ce5add0b.js";import"../js/Index.2a391835.js";import"../js/Close.ccd53ef3.js";import"../js/Pencil.d82df6a1.js";import"../js/Trash.87a7d946.js";import"../js/Caret.cd869c5d.js";const Y=q` <svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.2001 7.2L19.0361 9.036L17.7641 10.308L10.0001 2.544L2.23611 10.308L0.964111 9.036L10.0001 0L14.8001 4.8V2.4H17.2001V7.2ZM10.0001 4.248L17.2001 11.436V18.6H2.80011V11.436L10.0001 4.248ZM12.4001 17.4V11.4H7.60011V17.4H12.4001Z" fill="black"/> </svg> `,ee="https://schemas.wp.org/wp/5.8/block.json",oe="aioseo/businessinfo",te="AIOSEO Local - Business Info",se="Displays the business info.",ae="aioseo",le={locationId:{type:"number",default:0},showLabels:{type:"boolean",default:!0},addressLabel:{type:"string",default:null},vatIdLabel:{type:"string",default:null},taxIdLabel:{type:"string",default:null},phoneLabel:{type:"string",default:null},faxLabel:{type:"string",default:null},emailLabel:{type:"string",default:null},showIcons:{type:"boolean",default:!0},showName:{type:"boolean",default:!0},showAddress:{type:"boolean",default:!0},showPhone:{type:"boolean",default:!0},showFax:{type:"boolean",default:!0},showCountryCode:{type:"boolean",default:!0},showEmail:{type:"boolean",default:!0},showVat:{type:"boolean",default:!0},showTax:{type:"boolean",default:!0},dataObject:{type:"string",default:null},updated:{type:"string",default:null}},ne="all-in-one-seo-pack",re={html:!1},ie={$schema:ee,name:oe,title:te,description:se,category:ae,attributes:le,textdomain:ne,supports:re},d="all-in-one-seo-pack",de={setup(){return{postEditorStore:H(),rootStore:P()}},components:{BaseInput:J,BaseSelect:K,BaseToggle:Q},data(){return{locationsList:[],strings:{selectLocation:this.rootStore.aioseo.localBusiness.postTypeSingleLabel,showLabels:s("Show labels",d),showIcons:s("Show icons",d),businessInfo:s("Business Info",d),showName:s("Name",d),address:s("Address",d),phoneNumber:s("Phone Number",d),faxNumber:s("Fax Number",d),emailAddress:s("Email Address",d),showVat:s("Show VAT ID",d),showTax:s("Show Tax ID",d),countryCode:s("Phone/Fax Country Code",d),labels:s("Labels",d),addressLabel:s("Address",d),vatIdLabel:s("Vat ID",d),taxIdLabel:s("Tax ID",d),phoneLabel:s("Phone",d),faxLabel:s("Fax",d),emailLabel:s("Email",d)}}},methods:{getLocationOptions(e){let o=this.locationsList.find(g=>g.value===e);return!o&&!this.isLocationPostType()&&(o=this.locationsList.find(g=>!!g),o&&(this.$root.$data.locationId=o.value)),o},isLocationPostType(){return this.postEditorStore.currentPost.postType===this.rootStore.aioseo.localBusiness.postTypeName}},created(){this.$root.$data.locations&&this.$root.$data.locations.forEach(e=>{this.locationsList.push({value:e.id,label:e.title.rendered})})}},ue={class:"aioseo-business-info-sidebar"},pe={key:0,class:"sidebar-row"},me={class:"title"},ce={class:"sidebar-row"},be={class:"sidebar-row"},he={class:"sidebar-row"},fe={class:"title"},we={class:"sidebar-row"},$e={class:"sidebar-row"},Le={class:"sidebar-row"},ge={class:"sidebar-row"},ye={key:1,class:"sidebar-row"},Ve={class:"sidebar-row"},ve={class:"sidebar-row"},Ie={class:"sidebar-row"},Se={key:2},Be={class:"sidebar-row"},Ee={class:"title"},Te={class:"labels"},ke={key:0,class:"sidebar-row"},Pe={key:1,class:"sidebar-row"},Ne={key:2,class:"sidebar-row"},Ae={key:3,class:"sidebar-row"},Re={key:4,class:"sidebar-row"},_e={key:5,class:"sidebar-row"};function Ue(e,o,g,y,a,I){const l=k("base-select"),r=k("base-toggle"),$=k("base-input");return c(),b("div",ue,[a.locationsList.length&&!I.isLocationPostType()?(c(),b("div",pe,[n("p",me,i(a.strings.selectLocation),1),u(l,{size:"medium",options:a.locationsList,modelValue:I.getLocationOptions(e.$root.$data.locationId),"onUpdate:modelValue":o[0]||(o[0]=t=>e.$root.$data.locationId=t.value),"track-by":"value"},null,8,["options","modelValue"])])):w("",!0),n("div",ce,[u(r,{modelValue:e.$root.$data.showLabels,"onUpdate:modelValue":o[1]||(o[1]=t=>e.$root.$data.showLabels=t)},{default:h(()=>[f(i(a.strings.showLabels),1)]),_:1},8,["modelValue"])]),n("div",be,[u(r,{modelValue:e.$root.$data.showIcons,"onUpdate:modelValue":o[2]||(o[2]=t=>e.$root.$data.showIcons=t)},{default:h(()=>[f(i(a.strings.showIcons),1)]),_:1},8,["modelValue"])]),n("div",he,[n("p",fe,i(a.strings.businessInfo),1)]),n("div",we,[u(r,{modelValue:e.$root.$data.showName,"onUpdate:modelValue":o[3]||(o[3]=t=>e.$root.$data.showName=t)},{default:h(()=>[f(i(a.strings.showName),1)]),_:1},8,["modelValue"])]),n("div",$e,[u(r,{modelValue:e.$root.$data.showAddress,"onUpdate:modelValue":o[4]||(o[4]=t=>e.$root.$data.showAddress=t)},{default:h(()=>[f(i(a.strings.address),1)]),_:1},8,["modelValue"])]),n("div",Le,[u(r,{modelValue:e.$root.$data.showPhone,"onUpdate:modelValue":o[5]||(o[5]=t=>e.$root.$data.showPhone=t)},{default:h(()=>[f(i(a.strings.phoneNumber),1)]),_:1},8,["modelValue"])]),n("div",ge,[u(r,{modelValue:e.$root.$data.showFax,"onUpdate:modelValue":o[6]||(o[6]=t=>e.$root.$data.showFax=t)},{default:h(()=>[f(i(a.strings.faxNumber),1)]),_:1},8,["modelValue"])]),e.$root.$data.showPhone||e.$root.$data.showFax?(c(),b("div",ye,[u(r,{modelValue:e.$root.$data.showCountryCode,"onUpdate:modelValue":o[7]||(o[7]=t=>e.$root.$data.showCountryCode=t)},{default:h(()=>[f(i(a.strings.countryCode),1)]),_:1},8,["modelValue"])])):w("",!0),n("div",Ve,[u(r,{modelValue:e.$root.$data.showEmail,"onUpdate:modelValue":o[8]||(o[8]=t=>e.$root.$data.showEmail=t)},{default:h(()=>[f(i(a.strings.emailAddress),1)]),_:1},8,["modelValue"])]),n("div",ve,[u(r,{modelValue:e.$root.$data.showVat,"onUpdate:modelValue":o[9]||(o[9]=t=>e.$root.$data.showVat=t)},{default:h(()=>[f(i(a.strings.showVat),1)]),_:1},8,["modelValue"])]),n("div",Ie,[u(r,{modelValue:e.$root.$data.showTax,"onUpdate:modelValue":o[10]||(o[10]=t=>e.$root.$data.showTax=t)},{default:h(()=>[f(i(a.strings.showTax),1)]),_:1},8,["modelValue"])]),e.$root.$data.showLabels?(c(),b("div",Se,[n("div",Be,[n("p",Ee,i(a.strings.labels),1)]),n("div",Te,[e.$root.$data.showAddress?(c(),b("div",ke,[n("label",null,i(a.strings.addressLabel),1),u($,{size:"small",modelValue:e.$root.$data.addressLabel,"onUpdate:modelValue":o[11]||(o[11]=t=>e.$root.$data.addressLabel=t)},null,8,["modelValue"])])):w("",!0),e.$root.$data.showVat?(c(),b("div",Pe,[n("label",null,i(a.strings.vatIdLabel),1),u($,{size:"small",modelValue:e.$root.$data.vatIdLabel,"onUpdate:modelValue":o[12]||(o[12]=t=>e.$root.$data.vatIdLabel=t)},null,8,["modelValue"])])):w("",!0),e.$root.$data.showTax?(c(),b("div",Ne,[n("label",null,i(a.strings.taxIdLabel),1),u($,{size:"small",modelValue:e.$root.$data.taxIdLabel,"onUpdate:modelValue":o[13]||(o[13]=t=>e.$root.$data.taxIdLabel=t)},null,8,["modelValue"])])):w("",!0),e.$root.$data.showPhone?(c(),b("div",Ae,[n("label",null,i(a.strings.phoneLabel),1),u($,{size:"small",modelValue:e.$root.$data.phoneLabel,"onUpdate:modelValue":o[14]||(o[14]=t=>e.$root.$data.phoneLabel=t)},null,8,["modelValue"])])):w("",!0),e.$root.$data.showFax?(c(),b("div",Re,[n("label",null,i(a.strings.faxLabel),1),u($,{size:"small",modelValue:e.$root.$data.faxLabel,"onUpdate:modelValue":o[15]||(o[15]=t=>e.$root.$data.faxLabel=t)},null,8,["modelValue"])])):w("",!0),e.$root.$data.showEmail?(c(),b("div",_e,[n("label",null,i(a.strings.emailLabel),1),u($,{size:"small",modelValue:e.$root.$data.emailLabel,"onUpdate:modelValue":o[16]||(o[16]=t=>e.$root.$data.emailLabel=t)},null,8,["modelValue"])])):w("",!0)])])):w("",!0)])}const Ce=X(de,[["render",Ue]]),p="all-in-one-seo-pack",{name:M,title:Oe,description:De,category:Fe,supports:ze,attributes:je}=ie,V=window.wp,He=V.serverSideRender||V.components.ServerSideRender;var j;const O=((j=V.blockEditor)==null?void 0:j.InspectorControls)||V.editor.InspectorControls,D=V.components.PanelBody,Me=V.data.withSelect,E={},F=[],z=[],Ze={title:Oe,description:De,category:Fe,supports:ze,attributes:je,icon:Y,edit:Me(function(e){const o=P();return{locations:e("core").getEntityRecords("postType",o.aioseo.localBusiness.postTypeName,{per_page:100})}})(function(e){var N;const o=P(),g=W(),y=H(),a=(N=g.options.localBusiness)==null?void 0:N.locations.general.multiple,{setAttributes:I,attributes:l,clientId:r,isSelected:$,toggleSelection:t}=e;let{locations:v}=e;const S="aioseo-"+r;if(l.addressLabel=l.addressLabel||s("Address",p),l.vatIdLabel=l.vatIdLabel||s("VAT ID",p),l.taxIdLabel=l.taxIdLabel||s("Tax ID",p),l.phoneLabel=l.phoneLabel||s("Phone",p),l.faxLabel=l.faxLabel||s("Fax",p),l.emailLabel=l.emailLabel||s("Email",p),l.updated=l.updated||Date.now(),l.dataObject=y.currentPost.postType===o.aioseo.localBusiness.postTypeName?JSON.stringify(y.currentPost.local_seo.locations.business):null,V.data.useSelect(L=>L("core/edit-post").getActiveGeneralSidebarName())==="edit-post/block"&&(typeof t!="function"||t(!0)),a&&v===null)return React.createElement("div",null,s("Loading...",p));if(v=v===null?[]:v,!a&&l.locationId)return React.createElement("div",null,s("Please enable multiple locations before using this block.",p));if(a&&v.length===0)return React.createElement("div",null,U(s("No %1$s found",p),o.aioseo.localBusiness.postTypePluralLabel));l.locationId=!l.locationId&&y.currentPost.postType===o.aioseo.localBusiness.postTypeName?y.currentPost.id:l.locationId;const T={id:S,parent:document.querySelector(".block-editor"),subtree:!0,done:function(L){A(r,F);let m=R({name:"Blocks/BusinessInfo",data:function(){return E[r]},watch:{$data:{handler:function(Z){I(Z)},deep:!0}},render:()=>C(Ce)});m=_(m),G(m),m.mount(L),F.push({id:r,app:m})}};return $&&(E[r]={},Object.keys(l).forEach(L=>{E[r][L]=l[L]}),E[r].locations=v,B(T)),y.currentPost.postType===o.aioseo.localBusiness.postTypeName&&B({id:S+"-watcher",parent:document.querySelector(".block-editor"),subtree:!0,done:function(L){A(r,z);let m=R({name:"Blocks/BusinessInfoWatcher",data:function(){return y.currentPost.local_seo.locations.business},watch:{$data:{handler:function(){I({updated:Date.now()})},deep:!0}},render:()=>C("div")});m=_(m),m.mount(L),z.push({id:r,app:m})}}),a&&!l.locationId?React.createElement(React.Fragment,null,React.createElement(O,null,React.createElement(D,{title:s("Block Settings",p),initialOpen:!0,onToggle:B(T)},React.createElement("div",{id:S}))),React.createElement("div",null,U(s("Select a %1$s",p),o.aioseo.localBusiness.postTypeSingleLabel))):React.createElement(React.Fragment,null,React.createElement(O,null,React.createElement(D,{title:s("Block Settings",p),initialOpen:!0,onToggle:B(T)},React.createElement("div",{id:S}))),React.createElement(He,{block:M,attributes:{...l}}))}),save:function(){return null}};x({name:M,settings:Ze});
Save
Cancel