Sid Gifari File Manager
🏠 Root
/
home2
/
meumer25
/
www
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
openinghours
/
Editing: main.cd482028.js
import{h as q,m as R,r as z}from"../js/utils.6d965f64.js";import{c as C}from"../js/runtime-dom.esm-bundler.dc49ee3e.js";import{o as S}from"../js/helpers.633a054c.js";import{l as P}from"../js/index.20093c86.js";import{u as D,a as k,e as G,l as J}from"../js/index.317ad629.js";import{B as K}from"../js/Input.f04bee4d.js";import{B as Q}from"../js/Select.69906a74.js";import{B as X}from"../js/Toggle.11571651.js";import"../js/translations.e71e2202.js";import{_ as Y}from"../js/_plugin-vue_export-helper.eefbdd86.js";import{_ as a,a as O}from"../js/default-i18n.65d58dd6.js";import{a6 as L,o as _,c as E,_ as r,$ as i,l as d,a4 as A,a2 as m,a7 as y,h as N}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 x=q` <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9.99999 0.400024C15.304 0.400024 19.6 4.69602 19.6 10C19.6 15.304 15.304 19.6 9.99999 19.6C4.69599 19.6 0.399994 15.304 0.399994 10C0.399994 4.69602 4.69599 0.400024 9.99999 0.400024ZM9.99999 17.2C13.972 17.2 17.2 13.972 17.2 10C17.2 6.02802 13.972 2.80002 9.99999 2.80002C6.02799 2.80002 2.79999 6.02802 2.79999 10C2.79999 13.972 6.02799 17.2 9.99999 17.2ZM9.14799 10.852C9.23199 10.912 9.31599 10.972 9.42399 11.032L9.39999 11.056L14.8 13.6L11.164 9.77202L9.99999 4.00002L8.83599 9.77202H8.84799C8.84799 9.79602 8.83599 9.83202 8.82399 9.88002C8.81199 9.92802 8.79999 9.96402 8.79999 10C8.79999 10.336 8.91999 10.624 9.14799 10.852Z" fill="black"/> </svg> `,ee="https://schemas.wp.org/wp/5.8/block.json",oe="aioseo/openinghours",te="AIOSEO Local - Opening Hours",se="Displays the opening hours info.",ae="aioseo",ne={locationId:{type:"number",default:0},layout:{type:"string",default:"classic"},showTitle:{type:"boolean",default:!0},showIcons:{type:"boolean",default:!0},showMonday:{type:"boolean",default:!0},showTuesday:{type:"boolean",default:!0},showWednesday:{type:"boolean",default:!0},showThursday:{type:"boolean",default:!0},showFriday:{type:"boolean",default:!0},showSaturday:{type:"boolean",default:!0},showSunday:{type:"boolean",default:!0},label:{type:"string",default:null},dataObject:{type:"string",default:null},updated:{type:"string",default:null}},le="all-in-one-seo-pack",re={html:!1},ie={$schema:ee,name:oe,title:te,description:se,category:ae,attributes:ne,textdomain:le,supports:re},p="all-in-one-seo-pack",de={setup(){return{postEditorStore:D(),rootStore:k()}},components:{BaseInput:K,BaseSelect:Q,BaseToggle:X},data(){return{locationsList:[],strings:{selectLocation:this.rootStore.aioseo.localBusiness.postTypeSingleLabel,showTitle:a("Show Title",p),showIcons:a("Show Icons",p),Monday:a("Monday",p),Tuesday:a("Tuesday",p),Wednesday:a("Wednesday",p),Thursday:a("Thursday",p),Friday:a("Friday",p),Saturday:a("Saturday",p),Sunday:a("Sunday",p),label:a("Label",p)}}},methods:{getLocationOptions(e){let o=this.locationsList.find(u=>u.value===e);return!o&&!this.isLocationPostType()&&(o=this.locationsList.find(u=>!!u),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-opening-hours-sidebar"},ce={key:0,class:"sidebar-row"},pe={class:"title"},me={class:"sidebar-row"},ye={class:"sidebar-row"},fe={class:"sidebar-row"},he={class:"sidebar-row"},ge={class:"sidebar-row"},be={class:"sidebar-row"},we={class:"sidebar-row"},$e={class:"sidebar-row"},Se={class:"sidebar-row"},Ve={key:1,class:"sidebar-row labels"};function ve(e,o,u,v,t,n){const T=L("base-select"),l=L("base-toggle"),f=L("base-input");return _(),E("div",ue,[t.locationsList.length&&!n.isLocationPostType()?(_(),E("div",ce,[r("p",pe,i(t.strings.selectLocation),1),d(T,{size:"medium",options:t.locationsList,modelValue:n.getLocationOptions(e.$root.$data.locationId),"onUpdate:modelValue":o[0]||(o[0]=s=>e.$root.$data.locationId=s.value),"track-by":"value"},null,8,["options","modelValue"])])):A("",!0),r("div",me,[d(l,{modelValue:e.$root.$data.showTitle,"onUpdate:modelValue":o[1]||(o[1]=s=>e.$root.$data.showTitle=s)},{default:m(()=>[y(i(t.strings.showTitle),1)]),_:1},8,["modelValue"])]),r("div",ye,[d(l,{modelValue:e.$root.$data.showIcons,"onUpdate:modelValue":o[2]||(o[2]=s=>e.$root.$data.showIcons=s)},{default:m(()=>[y(i(t.strings.showIcons),1)]),_:1},8,["modelValue"])]),r("div",fe,[d(l,{modelValue:e.$root.$data.showMonday,"onUpdate:modelValue":o[3]||(o[3]=s=>e.$root.$data.showMonday=s)},{default:m(()=>[y(i(t.strings.Monday),1)]),_:1},8,["modelValue"])]),r("div",he,[d(l,{modelValue:e.$root.$data.showTuesday,"onUpdate:modelValue":o[4]||(o[4]=s=>e.$root.$data.showTuesday=s)},{default:m(()=>[y(i(t.strings.Tuesday),1)]),_:1},8,["modelValue"])]),r("div",ge,[d(l,{modelValue:e.$root.$data.showWednesday,"onUpdate:modelValue":o[5]||(o[5]=s=>e.$root.$data.showWednesday=s)},{default:m(()=>[y(i(t.strings.Wednesday),1)]),_:1},8,["modelValue"])]),r("div",be,[d(l,{modelValue:e.$root.$data.showThursday,"onUpdate:modelValue":o[6]||(o[6]=s=>e.$root.$data.showThursday=s)},{default:m(()=>[y(i(t.strings.Thursday),1)]),_:1},8,["modelValue"])]),r("div",we,[d(l,{modelValue:e.$root.$data.showFriday,"onUpdate:modelValue":o[7]||(o[7]=s=>e.$root.$data.showFriday=s)},{default:m(()=>[y(i(t.strings.Friday),1)]),_:1},8,["modelValue"])]),r("div",$e,[d(l,{modelValue:e.$root.$data.showSaturday,"onUpdate:modelValue":o[8]||(o[8]=s=>e.$root.$data.showSaturday=s)},{default:m(()=>[y(i(t.strings.Saturday),1)]),_:1},8,["modelValue"])]),r("div",Se,[d(l,{modelValue:e.$root.$data.showSunday,"onUpdate:modelValue":o[9]||(o[9]=s=>e.$root.$data.showSunday=s)},{default:m(()=>[y(i(t.strings.Sunday),1)]),_:1},8,["modelValue"])]),e.$root.$data.showTitle?(_(),E("div",Ve,[r("label",null,i(t.strings.label),1),d(f,{size:"small",modelValue:e.$root.$data.label,"onUpdate:modelValue":o[10]||(o[10]=s=>e.$root.$data.label=s)},null,8,["modelValue"])])):A("",!0)])}const Te=Y(de,[["render",ve]]),g="all-in-one-seo-pack",{name:j,title:Be,description:Le,category:_e,supports:Ee,attributes:ke}=ie,b=window.wp,Ie=b.serverSideRender||b.components.ServerSideRender;var W;const U=((W=b.blockEditor)==null?void 0:W.InspectorControls)||b.editor.InspectorControls,M=b.components.PanelBody,Re=b.data.withSelect,V={},F=[],H=[],Ce={title:Be,description:Le,category:_e,supports:Ee,attributes:ke,icon:x,edit:Re(function(e){const o=k();return{locations:e("core").getEntityRecords("postType",o.aioseo.localBusiness.postTypeName,{per_page:100})}})(function(e){var I;const u=(I=G().options.localBusiness)==null?void 0:I.locations.general.multiple,{setAttributes:v,attributes:t,clientId:n,isSelected:T,toggleSelection:l}=e;let{locations:f}=e;const s=`aioseo-${n}-settings`;if(t.label=t.label||a("Our Opening Hours:",g),t.updated=t.updated||Date.now(),u&&f===null)return React.createElement("div",null,a("Loading...",g));if(f=f===null?[]:f,!u&&t.locationId)return React.createElement("div",null,a("Please enable multiple locations before using this block.",g));const w=k();if(u&&f.length===0)return React.createElement("div",null,O(a("No %1$s found",g),w.aioseo.localBusiness.postTypePluralLabel));const $=D();t.locationId=!t.locationId&&$.currentPost.postType===w.aioseo.localBusiness.postTypeName?$.currentPost.id:t.locationId;const B={id:s,parent:document.querySelector(".block-editor"),subtree:!0,loop:!1,done:function(h){R(n,F);let c=C({name:"Blocks/OpeningHours",data:function(){return V[n]},watch:{$data:{handler:function(Z){v(Z)},deep:!0}},render:()=>N(Te)});c=P(c),J(c),c.mount(h),F.push({id:n,app:c})}};return T&&(V[n]={},Object.keys(t).forEach(h=>{V[n][h]=t[h]}),V[n].locations=f,S(B)),b.data.useSelect(h=>h("core/edit-post").getActiveGeneralSidebarName())==="edit-post/block"&&(typeof l!="function"||l(!0)),$.currentPost.postType===w.aioseo.localBusiness.postTypeName&&S({id:s+"-watcher",parent:document.querySelector(".block-editor"),subtree:!0,done:function(h){R(n,H);let c=C({name:"Blocks/OpeningHoursWatcher",data:function(){return $.currentPost.local_seo.openingHours},watch:{$data:{handler:function(){v({updated:Date.now()})},deep:!0}},render:()=>N("div")});c=P(c),c.mount(h),H.push({id:n,app:c})}}),u&&!t.locationId?React.createElement(React.Fragment,null,React.createElement(U,null,React.createElement(M,{title:a("Block Settings",g),initialOpen:!0,onToggle:S(B)},React.createElement("div",{id:s}))),React.createElement("div",null,O(a("Select a %1$s",g),w.aioseo.localBusiness.postTypeSingleLabel))):React.createElement(React.Fragment,null,React.createElement(U,null,React.createElement(M,{title:a("Block Settings",g),initialOpen:!0,onToggle:S(B)},React.createElement("div",{id:s}))),React.createElement(Ie,{block:j,attributes:{...t}}))}),save:function(){return null}};z({name:j,settings:Ce});
Save
Cancel