","kadence-blocks")}],onChange:e=>Bt(e,"headerTag")}),(0,n.createElement)(I.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,r.__)("HTML anchor","kadence-blocks"),help:(0,n.createElement)(k.Fragment,null,(0,r.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page.","kadence-blocks"),(0,n.createElement)(I.ExternalLink,{href:(0,r.__)("https://wordpress.org/documentation/article/page-jumps/")},(0,r.__)("Learn more about anchors","kadence-blocks"))),value:Pe,placeholder:(0,r.__)("Add an anchor"),onChange:e=>{e=e.replace(ut,"-"),Bt(e,"anchor")},autoCapitalize:"none",autoComplete:"off"}),(0,n.createElement)(I.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,r.__)("Additional CSS class(es)","kadence-blocks"),value:ze,onChange:e=>{Bt(""!==e?e:void 0,"className")},help:(0,r.__)("Separate multiple classes with spaces.","kadence-blocks")})),(0,n.createElement)(s.BlockContextProvider,{value:Pt},(0,n.createElement)(k.Fragment,{...zt})),(0,n.createElement)("span",{className:"placeholder-ref",ref:T}),f&&(0,n.createElement)(Ve,{...e,headerRef:w}))};function kt({clientId:e,setJustCompletedOnboarding:t,postId:a}){const{setHeaderVisualBuilderOpenId:r}=(0,d.useDispatch)("kadenceblocks/data"),[c,l]=(0,k.useState)(!0),[i,s]=M("kadence_header",a),[u,b,h]=(0,q.useEntityBlockEditor)("postType","kadence_header",{id:a}),[p,g]=ht("title",a),[f,_]=ht("meta",a),y=[{key:"name",name:"Header Name",visualNumber:1,component:R,componentData:{postId:a},containerData:{headerStyle:{position:"unset"}}},{key:"desktop",name:"Desktop Layout",visualNumber:2,component:K},{key:"mobile",name:"Mobile Layout",visualNumber:3,component:Y}];return(0,n.createElement)(m.OnboardingModal,{steps:y,isOpen:c,onRequestClose:e=>{l(!1)},onSubmit:n=>{(async(a,n)=>{const{headerName:r,headerDesktop:c,headerMobile:i,headerDescription:d}=n;try{const n=await s();let u=f;const{templateInnerBlocks:m,templatePostMeta:k}=rt(c,i);n.id&&(m&&"skip"!==c?(u={...f,...k},h(m,e)):h([(0,o.createBlock)("kadence/header",{},Ue)],e),g(r),u._kad_header_description=d,_({...f,...u}),await wp.data.dispatch("core").saveEditedEntityRecord("postType","kadence_header",a).then((()=>{l(!1),t(!0)})))}catch(e){console.error(e),t(!0)}})(a,n),r(e)}})}function bt({commit:e,clientId:t,setJustCompletedOnboarding:a,formData:r,setFormData:c}){const[l,i]=(0,k.useState)(0),{setHeaderVisualBuilderOpenId:s}=(0,d.useDispatch)("kadenceblocks/data"),[u,b]=M("kadence_header",l),[h,p,g]=(0,q.useEntityBlockEditor)("postType","kadence_header",{id:l}),[f,_]=ht("title",l),[y,v]=ht("meta",l),[B,I]=function(e,t="post"){const[a,n]=(0,k.useState)(!1),{receiveEntityRecords:o}=(0,d.useDispatch)(q.store);return[a,async()=>{n(!0);try{const a=await x()({method:"POST",path:`/wp/v2/${e}/auto-draft`,data:{post_type:t}});o("postType",a.type,[a]);const r=a.id;try{const t=await x()({method:"POST",path:`/wp/v2/${e}/${r}`,data:{status:"publish"}});return o("postType",t.type,[t]),t}finally{n(!1)}}finally{n(!1)}}]}("kadence_header","kadence_header"),[D,C]=(0,k.useState)(!0);(0,k.useEffect)((()=>{l&&r&&(async(a,n)=>{const{headerName:r,headerDesktop:c,headerMobile:l,headerDescription:i}=n;try{const n=await b();let d=y;const{templateInnerBlocks:s,templatePostMeta:u}=rt(c,l);n.id&&(s&&"skip"!==c?(d={...y,...u},g(s,t)):g([(0,o.createBlock)("kadence/header",{},Ue)],t),_(r),d._kad_header_description=i,v({...y,...d}),await wp.data.dispatch("core").saveEditedEntityRecord("postType","kadence_header",a).then((()=>{e(a)})))}catch(e){console.error(e)}})(l,r)}),[r,l]);const w=[{key:"select-existing",name:"Header Selection",hideSteps:!0,component:Q},{key:"name",name:"Header Name",visualNumber:1,component:R,containerData:{headerStyle:{position:"unset"}}},{key:"desktop",name:"Desktop Layout",visualNumber:2,component:K},{key:"mobile",name:"Mobile Layout",visualNumber:3,component:Y}];return(0,n.createElement)(m.OnboardingModal,{steps:w,isOpen:D,onRequestClose:e=>{C(!1),e?.complete||wp.data.dispatch("core/block-editor").removeBlock(t)},onSubmit:n=>{n.headerExisting&&Number.isInteger(n.headerExisting)?e(n.headerExisting):"blank"===n.headerExisting&&(async()=>{try{return(await I()).id}catch(e){return console.error(e),!1}})().then((e=>{!1!==e&&(c(n),i(e))})),a(!0),s(t)}})}function ht(e,t){return(0,q.useEntityProp)("postType","kadence_header",e,t)}(0,o.registerBlockType)("kadence/header",{...st,title:(0,r._x)("Header (Adv)","block title","kadence-blocks"),description:(0,r._x)("Create an advanced header or footer for your website.","block description","kadence-blocks"),keywords:[(0,r.__)("header","kadence-blocks"),(0,r.__)("footer","kadence-blocks"),"kb"],icon:{src:c.headerBlockIcon},edit:function(e){const{attributes:t,setAttributes:a,isSelected:o,clientId:l,context:b}=e,{id:h,uniqueID:p}=t,[f,_]=ht("meta",h),[y,v]=(0,k.useState)(!1),[B,D]=(0,k.useState)(!0),[C,w]=(0,k.useState)(null),T={isSticky:f?._kad_header_isSticky,isStickyTablet:f?._kad_header_isStickyTablet,isStickyMobile:f?._kad_header_isStickyMobile,isTransparent:f?._kad_header_isTransparent,isTransparentTablet:f?._kad_header_isTransparentTablet,isTransparentMobile:f?._kad_header_isTransparentMobile},{isSticky:S,isStickyTablet:x,isStickyMobile:M,isTransparent:R,isTransparentTablet:E,isTransparentMobile:H}=T,{post:z,postExists:P,isLoading:L,currentPostType:W,postId:V}=(0,d.useSelect)((e=>({post:h&&e(q.store).getEditedEntityRecord("postType","kadence_header",h),postExists:h&&e(q.store).getEntityRecord("postType","kadence_header",h),isLoading:e(q.store).isResolving("getEntityRecord",["postType","kadence_header",h]),currentPostType:e("core/editor")?.getCurrentPostType()?e("core/editor")?.getCurrentPostType():"",postId:e("core/editor")?.getCurrentPostId()?e("core/editor")?.getCurrentPostId():""})),[h]),{directPostData:U}=(0,d.useSelect)((e=>({directPostData:V?e(q.store).getEditedEntityRecord("postType","kadence_header",V):""})),[]),{addUniqueID:O}=(0,d.useDispatch)("kadenceblocks/data"),{isUniqueID:A,isUniqueBlock:N,parentData:F,previewDevice:K,isPreviewMode:$}=(0,d.useSelect)((e=>({isUniqueID:t=>e("kadenceblocks/data").isUniqueID(t),isUniqueBlock:(t,a)=>e("kadenceblocks/data").isUniqueBlock(t,a),isPreviewMode:e("core/block-editor").getSettings().__unstableIsPreviewMode,previewDevice:e("kadenceblocks/data").getPreviewDeviceType(),parentData:{rootBlock:e("core/block-editor").getBlock(e("core/block-editor").getBlockHierarchyRootClientId(l)),postId:e("core/editor")?.getCurrentPostId()?e("core/editor")?.getCurrentPostId():"",reusableParent:e("core/block-editor").getBlockAttributes(e("core/block-editor").getBlockParentsByBlockName(l,"core/block").slice(-1)[0]),editedPostId:!!e("core/edit-site")&&e("core/edit-site").getEditedPostId()}})),[l]),G=i()({"wp-block-kadence-header":!0,[`wp-block-kadence-header${p}`]:p,"header-desktop-sticky":"1"==S&&(!K||"Desktop"==K),"header-tablet-sticky":"1"==x&&"Tablet"==K,"header-mobile-sticky":"1"==M&&"Mobile"==K,"header-desktop-transparent":"1"==R&&(!K||"Desktop"==K),"header-tablet-transparent":"1"==E&&"Tablet"==K,"header-mobile-transparent":"1"==H&&"Mobile"==K}),j=(0,s.useBlockProps)({className:G}),J=(0,u.getPreviewSize)(K,R,E,H);(0,k.useEffect)((()=>{const n=(0,u.getPostOrFseId)(e,F),o=(0,u.getUniqueId)(p,l,A,N,n);o!==p?(t.uniqueID=o,a({uniqueID:o}),O(o,l)):O(o,l),"kadence_header"===W&&window.wp.data.dispatch("core/block-editor").setTemplateValidity(!0)}),[]),(0,k.useEffect)((()=>{(h&&P||h&&0===P||!h)&&D(!1)}),[P]);let Y=(0,n.createElement)(k.Fragment,null,(0,n.createElement)("div",{...j},(0===h||void 0===P&&!L)&&(0,n.createElement)(bt,{clientId:l,commit:e=>a({id:e}),setJustCompletedOnboarding:v,formData:C,setFormData:w}),h>0&&(0,g.isEmpty)(z)&&void 0===P&&L&&(0,n.createElement)(k.Fragment,null,(0,n.createElement)(I.Placeholder,{className:"kb-select-or-create-placeholder",label:(0,r.__)("Kadence Header","kadence-blocks"),icon:c.headerBlockIcon},(0,n.createElement)(I.Spinner,null)),(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(m.KadencePanelBody,{panelName:"kb-advanced-form-selected-switch",title:(0,r.__)("Selected Header","kadence-blocks")},(0,n.createElement)(m.SelectPostFromPostType,{postType:"kadence_header",label:(0,r.__)("Selected Header","kadence-blocks"),hideLabelFromVision:!0,onChange:e=>{a({id:parseInt(e)})},value:h})))),h>0&&!(0,g.isEmpty)(z)&&"trash"===z.status&&(0,n.createElement)(k.Fragment,null,(0,n.createElement)(I.Placeholder,{className:"kb-select-or-create-placeholder",label:(0,r.__)("Kadence Header","kadence-blocks"),icon:c.headerBlockIcon},(0,r.__)("The selected header is in the trash.","kadence-blocks")),(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(m.KadencePanelBody,{panelName:"kb-advanced-form-selected-switch",title:(0,r.__)("Selected Header","kadence-blocks")},(0,n.createElement)(m.SelectPostFromPostType,{postType:"kadence_header",label:(0,r.__)("Selected Header","kadence-blocks"),hideLabelFromVision:!0,onChange:e=>{a({id:parseInt(e)})},value:h})))),h>0&&!(0,g.isEmpty)(z)&&"trash"!==z.status&&(0,n.createElement)(q.EntityProvider,{kind:"postType",type:"kadence_header",id:h},(0,n.createElement)(mt,{attributes:t,setAttributes:a,clientId:l,context:b,isSelected:o,direct:!1,id:h,justCompletedOnboarding:y,formData:C}))));return"kadence_header"===W&&(Y=(0,n.createElement)(k.Fragment,null,!1===y&&"function"!=typeof U?.content&&(0,g.isEmpty)(U?.content)&&0===h&&(0,n.createElement)(kt,{clientId:l,postId:V,setJustCompletedOnboarding:v}),(0,n.createElement)("div",{...j},(0,n.createElement)(mt,{attributes:t,setAttributes:a,clientId:l,context:b,isSelected:o,direct:!0,id:V,justCompletedOnboarding:y,formData:C})))),B?(0,n.createElement)("div",{...j},(0,n.createElement)(I.Spinner,null)):J?(0,n.createElement)("div",{className:"kb-header-transparent-placeholder"},Y):Y},save:()=>(0,n.createElement)(s.InnerBlocks.Content,null)})},2485:(e,t)=>{var a;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t{if(!a){var c=1/0;for(s=0;s=r)&&Object.keys(n.O).every((e=>n.O[e](a[i])))?a.splice(i--,1):(l=!1,r0&&e[s-1][2]>r;s--)e[s]=e[s-1];e[s]=[a,o,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={9945:0,3690:0};n.O.j=t=>0===e[t];var t=(t,a)=>{var o,r,c=a[0],l=a[1],i=a[2],d=0;if(c.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(i)var s=i(n)}for(t&&t(a);dn(3361)));o=n.O(o),(this.kadence=this.kadence||{})["blocks-header"]=o})(); Πραγματική Νύφη - Τζοάννα - Nyfika-GKalogeropoulou.grSkip to content
This website uses cookies to improve your experience. We'll assume you're ok with our Privacy Policy.Accept
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.