Changeset 3102517
- Timestamp:
- 06/13/2024 09:35:47 PM (22 months ago)
- Location:
- coblocks
- Files:
-
- 16 edited
- 1 copied
-
tags/3.1.11 (copied) (copied from coblocks/trunk)
-
tags/3.1.11/class-coblocks.php (modified) (2 diffs)
-
tags/3.1.11/dist/blocks/services/block.json (modified) (1 diff)
-
tags/3.1.11/dist/blocks/services/service/block.json (modified) (1 diff)
-
tags/3.1.11/dist/coblocks-6.asset.php (modified) (1 diff)
-
tags/3.1.11/dist/coblocks-6.js (modified) (3 diffs)
-
tags/3.1.11/readme.txt (modified) (2 diffs)
-
tags/3.1.11/src/blocks/services/block.json (modified) (1 diff)
-
tags/3.1.11/src/blocks/services/service/block.json (modified) (1 diff)
-
trunk/class-coblocks.php (modified) (2 diffs)
-
trunk/dist/blocks/services/block.json (modified) (1 diff)
-
trunk/dist/blocks/services/service/block.json (modified) (1 diff)
-
trunk/dist/coblocks-6.asset.php (modified) (1 diff)
-
trunk/dist/coblocks-6.js (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/blocks/services/block.json (modified) (1 diff)
-
trunk/src/blocks/services/service/block.json (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
coblocks/tags/3.1.11/class-coblocks.php
r3095285 r3102517 5 5 * Author: GoDaddy 6 6 * Author URI: https://www.godaddy.com 7 * Version: 3.1.1 07 * Version: 3.1.11 8 8 * Text Domain: coblocks 9 9 * Domain Path: /languages … … 27 27 } 28 28 29 define( 'COBLOCKS_VERSION', '3.1.1 0' );29 define( 'COBLOCKS_VERSION', '3.1.11' ); 30 30 define( 'COBLOCKS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 31 31 define( 'COBLOCKS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
coblocks/tags/3.1.11/dist/blocks/services/block.json
r2949408 r3102517 14 14 "type": "integer", 15 15 "default": 3 16 },17 "buttons": {18 "type": "boolean",19 "default": false20 16 } 21 17 }, -
coblocks/tags/3.1.11/dist/blocks/services/service/block.json
r2949408 r3102517 6 6 "type": "integer", 7 7 "default": 3 8 },9 "showCta": {10 "type": "boolean",11 "default": false12 8 }, 13 9 "imageUrl": { -
coblocks/tags/3.1.11/dist/coblocks-6.asset.php
r2990233 r3102517 1 <?php return array('dependencies' => array('lodash', 'react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-token-list'), 'version' => ' 62403b1b0940ba914bc6');1 <?php return array('dependencies' => array('lodash', 'react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-token-list'), 'version' => '5e94232315605646ceb4'); -
coblocks/tags/3.1.11/dist/coblocks-6.js
r2990233 r3102517 54 54 description:(0,x.__)("Add pricing tables to help visitors compare products and plans.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.CRh}),keywords:["coblocks",/* translators: block keyword */ 55 55 (0,x.__)("landing","coblocks"),/* translators: block keyword */ 56 (0,x.__)("comparison","coblocks")],supports:{align:["wide","full"],html:!1,gutter:{default:"medium",customDefault:3}},example:T,attributes:A,transforms:N,edit:R,save:({attributes:e})=>{const{contentAlign:t,count:n}=e,r=m()({[`has-text-align-${t}`]:t}),l=m()("wp-block-coblocks-pricing-table__inner",{"has-columns":n>1,[`has-${n}-columns`]:n,"has-responsive-columns":n>1});return(0,a.createElement)("div",{className:r},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:l},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:d};var O=(0,h.withColors)("backgroundColor",{backgroundColor:"background-color"},{textColor:"color"}), I=l(4333);const{getComputedStyle:H}=window,$=(0,k.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t.attributes,l=e.querySelector('[contenteditable="true"]'),c=l?H(l):null;return{fallbackBackgroundColor:n||!c?void 0:c.backgroundColor,fallbackTextColor:r||!c?void 0:c.color}}));var W=(0,I.compose)([O,$])((e=>{const{fallbackBackgroundColor:t,fallbackTextColor:n,setBackgroundColor:r,setTextColor:l,backgroundColor:c,textColor:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(h.PanelColorSettings,{title:(0,x.__)("Color settings","coblocks"),colorSettings:[{value:c.color,onChange:r,label:(0,x.__)("Background color","coblocks")},{value:o.color,onChange:l,label:(0,x.__)("Text color","coblocks"),initialOpen:!1}]},(0,a.createElement)(h.ContrastChecker,{textColor:o.color,backgroundColor:c.color,fallbackTextColor:n,fallbackBackgroundColor:t}))))})),F=(0,I.compose)([O])((e=>{const{attributes:t,className:n,isSelected:r,setAttributes:l,backgroundColor:c,textColor:o}=e,{amount:i,currency:s,title:u,placeholder:v,features:d}=t,f=["bold","italic","strikethrough"],w=[["core/list",{className:"wp-block-coblocks-pricing-table-item__features"},[["core/list-item",{content:d,placeholder:(0,x.__)("Add features","coblocks")},[]]]],["core/button",{placeholder:(0,x.__)("Buy Now","coblocks")}]];return(0,a.createElement)(a.Fragment,null,r&&(0,a.createElement)(W,{...e}),(0,a.createElement)("div",{className:m()(n,{"has-background":c.color,"has-text-color":o.color,[c.class]:c.class,[o.class]:o.class}),style:{backgroundColor:c.color,color:o.color}},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",onChange:e=>l({title:e}),value:u,placeholder:v||(0,x.__)("Plan A","coblocks"),allowedFormats:f}),(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",onChange:e=>l({currency:e}),value:s,placeholder:(0,x.__)("$","coblocks"),allowedFormats:f}),(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",onChange:e=>l({amount:e}),value:i,placeholder:"99",allowedFormats:f})),(0,a.createElement)(h.InnerBlocks,{template:w,templateLock:!1,templateInsertUpdatesSelection:!1,renderAppender:h.InnerBlocks.ButtonBlockAppender})))})),U=JSON.parse('{"name":"coblocks/pricing-table-item","category":"layout","attributes":{"title":{"source":"children","selector":".wp-block-coblocks-pricing-table-item__title"},"currency":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__currency"},"amount":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__amount"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"placeholder":{"type":"string"}},"title":"Pricing Table Item","textdomain":"coblocks","description":"A pricing table to help visitors compare products and plans.","editorScript":["coblocks-6"],"parent":["coblocks/pricing-table"]}'),D=l(3769),q=l(6553),Q={from:[{type:"raw",selector:".wp-block-coblocks-pricing-table-item",transform(e){return(0,B.createBlock)(U.name,{...(0,B.getBlockAttributes)(U.name,e.outerHTML)})}}]};const J=[{migrate:(e,t)=>{const{features:n}=e,r=n.map((e=>(0,B.createBlock)("core/list-item",{content:e?.props?.children.map((e=>e))},[]))),l=(0,B.createBlock)("core/list",{className:"wp-block-coblocks-pricing-table-item__features"},r);return delete e.features,[e,t=[l,...t]]},attributes:{title:{source:"children",selector:".wp-block-coblocks-pricing-table-item__title"},features:{source:"children",selector:".wp-block-coblocks-pricing-table-item__features"},currency:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__currency"},amount:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__amount"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},placeholder:{type:"string"}},save:({attributes:e})=>{const{amount:t,currency:n,customBackgroundColor:r,customTextColor:l,features:c,backgroundColor:o,textColor:i,title:s}=e,u=(0,h.getColorClassName)("background-color",o),v=(0,h.getColorClassName)("color",i),d=m()({"has-background":o||r,[u]:u,"has-text-color":i||l,[v]:v}),f={backgroundColor:u?void 0:r,color:v?void 0:l};return(0,z.isEmpty)(e)?null:(0,a.createElement)("div",{className:d,style:f},!h.RichText.isEmpty(s)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",value:s}),!h.RichText.isEmpty(t)&&(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},!h.RichText.isEmpty(n)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",value:n}),(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",value:t})),!h.RichText.isEmpty(c)&&(0,a.createElement)(h.RichText.Content,{tagName:"ul",multiline:"li",className:"wp-block-coblocks-pricing-table-item__features",value:c}),(0,a.createElement)(h.InnerBlocks.Content,null))}}];var K=J;const{name:Y,category:X,attributes:ee}=U,te={56 (0,x.__)("comparison","coblocks")],supports:{align:["wide","full"],html:!1,gutter:{default:"medium",customDefault:3}},example:T,attributes:A,transforms:N,edit:R,save:({attributes:e})=>{const{contentAlign:t,count:n}=e,r=m()({[`has-text-align-${t}`]:t}),l=m()("wp-block-coblocks-pricing-table__inner",{"has-columns":n>1,[`has-${n}-columns`]:n,"has-responsive-columns":n>1});return(0,a.createElement)("div",{className:r},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:l},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:d};var O=(0,h.withColors)("backgroundColor",{backgroundColor:"background-color"},{textColor:"color"}),H=l(4333);const{getComputedStyle:I}=window,$=(0,k.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t.attributes,l=e.querySelector('[contenteditable="true"]'),c=l?I(l):null;return{fallbackBackgroundColor:n||!c?void 0:c.backgroundColor,fallbackTextColor:r||!c?void 0:c.color}}));var W=(0,H.compose)([O,$])((e=>{const{fallbackBackgroundColor:t,fallbackTextColor:n,setBackgroundColor:r,setTextColor:l,backgroundColor:c,textColor:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(h.PanelColorSettings,{title:(0,x.__)("Color settings","coblocks"),colorSettings:[{value:c.color,onChange:r,label:(0,x.__)("Background color","coblocks")},{value:o.color,onChange:l,label:(0,x.__)("Text color","coblocks"),initialOpen:!1}]},(0,a.createElement)(h.ContrastChecker,{textColor:o.color,backgroundColor:c.color,fallbackTextColor:n,fallbackBackgroundColor:t}))))})),F=(0,H.compose)([O])((e=>{const{attributes:t,className:n,isSelected:r,setAttributes:l,backgroundColor:c,textColor:o}=e,{amount:i,currency:s,title:u,placeholder:v,features:d}=t,f=["bold","italic","strikethrough"],w=[["core/list",{className:"wp-block-coblocks-pricing-table-item__features"},[["core/list-item",{content:d,placeholder:(0,x.__)("Add features","coblocks")},[]]]],["core/button",{placeholder:(0,x.__)("Buy Now","coblocks")}]];return(0,a.createElement)(a.Fragment,null,r&&(0,a.createElement)(W,{...e}),(0,a.createElement)("div",{className:m()(n,{"has-background":c.color,"has-text-color":o.color,[c.class]:c.class,[o.class]:o.class}),style:{backgroundColor:c.color,color:o.color}},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",onChange:e=>l({title:e}),value:u,placeholder:v||(0,x.__)("Plan A","coblocks"),allowedFormats:f}),(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",onChange:e=>l({currency:e}),value:s,placeholder:(0,x.__)("$","coblocks"),allowedFormats:f}),(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",onChange:e=>l({amount:e}),value:i,placeholder:"99",allowedFormats:f})),(0,a.createElement)(h.InnerBlocks,{template:w,templateLock:!1,templateInsertUpdatesSelection:!1,renderAppender:h.InnerBlocks.ButtonBlockAppender})))})),U=JSON.parse('{"name":"coblocks/pricing-table-item","category":"layout","attributes":{"title":{"source":"children","selector":".wp-block-coblocks-pricing-table-item__title"},"currency":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__currency"},"amount":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__amount"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"placeholder":{"type":"string"}},"title":"Pricing Table Item","textdomain":"coblocks","description":"A pricing table to help visitors compare products and plans.","editorScript":["coblocks-6"],"parent":["coblocks/pricing-table"]}'),D=l(3769),q=l(6553),Q={from:[{type:"raw",selector:".wp-block-coblocks-pricing-table-item",transform(e){return(0,B.createBlock)(U.name,{...(0,B.getBlockAttributes)(U.name,e.outerHTML)})}}]};const J=[{migrate:(e,t)=>{const{features:n}=e,r=n.map((e=>(0,B.createBlock)("core/list-item",{content:e?.props?.children.map((e=>e))},[]))),l=(0,B.createBlock)("core/list",{className:"wp-block-coblocks-pricing-table-item__features"},r);return delete e.features,[e,t=[l,...t]]},attributes:{title:{source:"children",selector:".wp-block-coblocks-pricing-table-item__title"},features:{source:"children",selector:".wp-block-coblocks-pricing-table-item__features"},currency:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__currency"},amount:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__amount"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},placeholder:{type:"string"}},save:({attributes:e})=>{const{amount:t,currency:n,customBackgroundColor:r,customTextColor:l,features:c,backgroundColor:o,textColor:i,title:s}=e,u=(0,h.getColorClassName)("background-color",o),v=(0,h.getColorClassName)("color",i),d=m()({"has-background":o||r,[u]:u,"has-text-color":i||l,[v]:v}),f={backgroundColor:u?void 0:r,color:v?void 0:l};return(0,z.isEmpty)(e)?null:(0,a.createElement)("div",{className:d,style:f},!h.RichText.isEmpty(s)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",value:s}),!h.RichText.isEmpty(t)&&(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},!h.RichText.isEmpty(n)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",value:n}),(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",value:t})),!h.RichText.isEmpty(c)&&(0,a.createElement)(h.RichText.Content,{tagName:"ul",multiline:"li",className:"wp-block-coblocks-pricing-table-item__features",value:c}),(0,a.createElement)(h.InnerBlocks.Content,null))}}];var K=J;const{name:Y,category:X,attributes:ee}=U,te={ 57 57 /* translators: block name */ 58 58 title:(0,x.__)("Pricing Table Item","coblocks"), … … 67 67 (0,x.__)("rows","coblocks"),/* translators: block keyword */ 68 68 (0,x.__)("columns","coblocks"),/* translators: block keyword */ 69 (0,x.__)("layouts","coblocks")],supports:{align:["wide","full"],anchor:!0,gutter:{default:"medium",customDefault:.8},stackedOnMobile:!0,coBlocksSpacing:!0},attributes:we,variations:ue,transforms:me,edit:e=>(0,a.createElement)(ne.Suspense,{fallback:(0,a.createElement)(k.Spinner,null)},(0,a.createElement)(ve,{...e})),example:{attributes:{}},getEditWrapperProps:ie.qF,save:function({attributes:e}){const{coblocks:t,backgroundColor:n,backgroundImg:r,columns:l,customBackgroundColor:c,customTextColor:o,id:i,layout:s,isStackedOnMobile:u,marginSize:v,paddingSize:d,textColor:f,focalPoint:w,hasParallax:g,backgroundType:p,verticalAlignment:b}=e,E=(0,h.getColorClassName)("color",f),z=(0,h.getColorClassName)("background-color",n);let x=m()({[`coblocks-row--${i}`]:i});t&&void 0!==t.id&&(x=m()(x,`coblocks-row-${t.id}`));const k=["wp-block-coblocks-row__inner",...(0,re.Ro)(e),{"has-text-color":f||o},{[E]:E},{"has-padding":d&&"no"!==d},{[`has-${d}-padding`]:!["advanced"].includes(d)},{"has-margin":v&&"no"!==v},{[`has-${v}-margin`]:!["advanced"].includes(v)},{"is-stacked-on-mobile":u},{[`are-vertically-aligned-${b}`]:b}],y={backgroundColor:z?void 0:c,backgroundImage:r&&"image"===p?`url(${r})`:void 0,backgroundPosition:w&&!g?`${100*w.x}% ${100*w.y}%`:void 0,color:E?void 0:o};return(0,a.createElement)("div",{className:x,"data-id":i,"data-columns":l,"data-layout":s},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:m()(k),style:y},(0,re.QF)(e),(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:ae},pe={};pe.service43=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 28h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{d:"m32 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 28h16v.8785807 1.1214193h-16z"}))),pe.service169=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 5h24v14h-24z"}),(0,a.createElement)(k.Path,{d:"m32 5h24v14h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 25h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 25h16v.8785807 1.1214193h-16z"}))),pe.serviceSquare=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 0h24v24h-24z"}),(0,a.createElement)(k.Path,{d:"m32 0h24v24h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}))),pe.serviceCircle=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"12"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)("circle",{cx:"44",cy:"12",r:"12"})));var be=pe,Ee=l(9512),ze=l.n(Ee);const xe=["coblocks/service"],ke=[["coblocks/service"]],ye=["core/heading","core/buttons","core/paragraph"],Ce=[{name:"threebyfour",label:"4:3",icon:be.service43,isDefault:!0},{name:"sixbynine",label:"16:9",icon:be.service169},{name:"square",label:(0,x.__)("Square","coblocks"),icon:be.serviceSquare},{name:"circle",label:(0,x.__)("Circle","coblocks"),icon:be.serviceCircle,defaultAlign:"center"}];function Pe(e,t){for(const n of new(ze())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,z.find)(e,{name:t});if(r)return r}return(0,z.find)(e,"isDefault")}const _e=e=>{const t=["columns","buttons"],n=Object.entries(e).filter((([e])=>t.includes(e)));return(0,D.T1)((0,q.Z)(n))},Se=e=>{const t=["content"];let n=!0;return e.forEach((e=>{const r=Object.entries(e.attributes).filter((([e])=>t.includes(e)));(0,D.T1)((0,q.Z)(r))||(n=!1)})),n};var Ve=e=>{const{attributes:t,setAttributes:n ,onToggleCta:r}=e;return(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Service settings","coblocks")},(0,a.createElement)(k.ToggleControl,{label:(0,x.__)("Display button","coblocks"),help:t.showCta?(0,x.__)("Showing the call to action button.","coblocks"):(0,x.__)("Toggle to show a call to action button.","coblocks"),checked:t.showCta,onChange:r})),t.imageUrl&&(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Image settings","coblocks"),initialOpen:!1},(0,a.createElement)(k.TextareaControl,{label:(0,x.__)("Alt text (alternative text)","coblocks"),value:t.imageAlt,onChange:e=>n({imageAlt:e}),help:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,x.__)("Describe the purpose of the image","coblocks")),(0,x.__)("Leave empty if the image is purely decorative.","coblocks"))}),(0,a.createElement)(k.FocalPointPicker,{label:(0,x.__)("Focal point","coblocks"),url:t.imageUrl,value:t.focalPoint,onChange:e=>n({focalPoint:e})})))},Be=l(444),Ge=(0,a.createElement)(Be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Be.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Me=l(1313),Re=JSON.parse('{"name":"coblocks/service","category":"layout","attributes":{"headingLevel":{"type":"integer","default":3},"showCta":{"type":"boolean","default":false},"imageUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"imageId":{"type":"number"},"focalPoint":{"type":"object"},"alignment":{"type":"string","default":"none"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"anchor":true},"title":"Service","textdomain":"coblocks","description":"A single service item within a services block.","viewScript":["coblocks-services-script"],"editorScript":["coblocks-6"],"parent":["coblocks/services"]}');const{name:Te,category:Ne,attributes:Le}=Re,je={69 (0,x.__)("layouts","coblocks")],supports:{align:["wide","full"],anchor:!0,gutter:{default:"medium",customDefault:.8},stackedOnMobile:!0,coBlocksSpacing:!0},attributes:we,variations:ue,transforms:me,edit:e=>(0,a.createElement)(ne.Suspense,{fallback:(0,a.createElement)(k.Spinner,null)},(0,a.createElement)(ve,{...e})),example:{attributes:{}},getEditWrapperProps:ie.qF,save:function({attributes:e}){const{coblocks:t,backgroundColor:n,backgroundImg:r,columns:l,customBackgroundColor:c,customTextColor:o,id:i,layout:s,isStackedOnMobile:u,marginSize:v,paddingSize:d,textColor:f,focalPoint:w,hasParallax:g,backgroundType:p,verticalAlignment:b}=e,E=(0,h.getColorClassName)("color",f),z=(0,h.getColorClassName)("background-color",n);let x=m()({[`coblocks-row--${i}`]:i});t&&void 0!==t.id&&(x=m()(x,`coblocks-row-${t.id}`));const k=["wp-block-coblocks-row__inner",...(0,re.Ro)(e),{"has-text-color":f||o},{[E]:E},{"has-padding":d&&"no"!==d},{[`has-${d}-padding`]:!["advanced"].includes(d)},{"has-margin":v&&"no"!==v},{[`has-${v}-margin`]:!["advanced"].includes(v)},{"is-stacked-on-mobile":u},{[`are-vertically-aligned-${b}`]:b}],y={backgroundColor:z?void 0:c,backgroundImage:r&&"image"===p?`url(${r})`:void 0,backgroundPosition:w&&!g?`${100*w.x}% ${100*w.y}%`:void 0,color:E?void 0:o};return(0,a.createElement)("div",{className:x,"data-id":i,"data-columns":l,"data-layout":s},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:m()(k),style:y},(0,re.QF)(e),(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:ae},pe={};pe.service43=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 28h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{d:"m32 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 28h16v.8785807 1.1214193h-16z"}))),pe.service169=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 5h24v14h-24z"}),(0,a.createElement)(k.Path,{d:"m32 5h24v14h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 25h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 25h16v.8785807 1.1214193h-16z"}))),pe.serviceSquare=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 0h24v24h-24z"}),(0,a.createElement)(k.Path,{d:"m32 0h24v24h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}))),pe.serviceCircle=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"12"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)("circle",{cx:"44",cy:"12",r:"12"})));var be=pe,Ee=l(9512),ze=l.n(Ee);const xe=["coblocks/service"],ke=[["coblocks/service"]],ye=["core/heading","core/buttons","core/paragraph"],Ce=[{name:"threebyfour",label:"4:3",icon:be.service43,isDefault:!0},{name:"sixbynine",label:"16:9",icon:be.service169},{name:"square",label:(0,x.__)("Square","coblocks"),icon:be.serviceSquare},{name:"circle",label:(0,x.__)("Circle","coblocks"),icon:be.serviceCircle,defaultAlign:"center"}];function Pe(e,t){for(const n of new(ze())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,z.find)(e,{name:t});if(r)return r}return(0,z.find)(e,"isDefault")}const _e=e=>{const t=["columns","buttons"],n=Object.entries(e).filter((([e])=>t.includes(e)));return(0,D.T1)((0,q.Z)(n))},Se=e=>{const t=["content"];let n=!0;return e.forEach((e=>{const r=Object.entries(e.attributes).filter((([e])=>t.includes(e)));(0,D.T1)((0,q.Z)(r))||(n=!1)})),n};var Ve=e=>{const{attributes:t,setAttributes:n}=e;return(0,a.createElement)(h.InspectorControls,null,t.imageUrl&&(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Image settings","coblocks"),initialOpen:!1},(0,a.createElement)(k.TextareaControl,{label:(0,x.__)("Alt text (alternative text)","coblocks"),value:t.imageAlt,onChange:e=>n({imageAlt:e}),help:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,x.__)("Describe the purpose of the image","coblocks")),(0,x.__)("Leave empty if the image is purely decorative.","coblocks"))}),(0,a.createElement)(k.FocalPointPicker,{label:(0,x.__)("Focal point","coblocks"),url:t.imageUrl,value:t.focalPoint,onChange:e=>n({focalPoint:e})})))},Be=l(444),Ge=(0,a.createElement)(Be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Be.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Me=l(1313),Re=JSON.parse('{"name":"coblocks/service","category":"layout","attributes":{"headingLevel":{"type":"integer","default":3},"imageUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"imageId":{"type":"number"},"focalPoint":{"type":"object"},"alignment":{"type":"string","default":"none"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"anchor":true},"title":"Service","textdomain":"coblocks","description":"A single service item within a services block.","viewScript":["coblocks-services-script"],"editorScript":["coblocks-6"],"parent":["coblocks/services"]}');const{name:Te,category:Ne,attributes:Le}=Re,je={ 70 70 /* translators: block name */ 71 71 title:(0,x.__)("Service","coblocks"), 72 72 /* translators: block description */ 73 description:(0,x.__)("A single service item within a services block.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.VK1}),keywords:[],supports:{reusable:!1,html:!1,inserter:!1},example:{attributes:{}},attributes:Le,edit:e=>{const{attributes:t,clientId:n,isSelected:r,setAttributes:l}=e,c=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(n)),[]),o=(0,V.useSelect)((e=>e("core").getMedia(t.imageId)),[]),i=(0,V.useSelect)((e=>{const{getBlockHierarchyRootClientId:t,getSelectedBlockClientId:l}=e("core/block-editor"),c=t(n),o=t(l());return r||c===o})),{updateBlockAttributes:s ,insertBlock:u,removeBlocks:v}=(0,V.useDispatch)("core/block-editor"),d=(e,t)=>{c.forEach((n=>{n.name===e&&s(n.clientId,t)}))};(0,ne.useEffect)((()=>{d("core/heading",{level:t.headingLevel})}),[t.headingLevel]),(0,ne.useEffect)((()=>{d("core/buttons",{contentJustification:t.alignment})}),[t.alignment]),(0,ne.useEffect)((()=>{((e,t,r=!0)=>{const l=c.filter((e=>"core/button"===e.name));if(l.length){v(l.map((e=>e.clientId)),!1);const r=(0,B.createBlock)(e,t,l);return void u(r,c.length,n,!1)}const o=c.filter((t=>t.name===e));if(!o.length&&r){const r=(0,B.createBlock)("core/button",{}),l=(0,B.createBlock)(e,t,[r]);u(l,c.length,n,!1)}o.length&&!r&&v(o.map((e=>e.clientId)),!1)})("core/buttons",{contentJustification:t.alignment},t.showCta)}),[t.showCta]);const f=e=>{l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})},{className:w}=e,{headingLevel:g,href:p,imageUrl:b,linkClass:E,linkDestination:z,linkTarget:y,rel:C,showCta:P,alignment:_}=t,S=[["core/heading",{level:g,placeholder:/* translators: placeholder text for input box */(0,x.__)("Write title…","coblocks"),textAlign:_}],["core/paragraph",{align:_,73 description:(0,x.__)("A single service item within a services block.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.VK1}),keywords:[],supports:{reusable:!1,html:!1,inserter:!1},example:{attributes:{}},attributes:Le,edit:e=>{const{attributes:t,clientId:n,isSelected:r,setAttributes:l}=e,c=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(n)),[]),o=(0,V.useSelect)((e=>e("core").getMedia(t.imageId)),[]),i=(0,V.useSelect)((e=>{const{getBlockHierarchyRootClientId:t,getSelectedBlockClientId:l}=e("core/block-editor"),c=t(n),o=t(l());return r||c===o})),{updateBlockAttributes:s}=(0,V.useDispatch)("core/block-editor"),u=(e,t)=>{c.forEach((n=>{n.name===e&&s(n.clientId,t)}))};(0,ne.useEffect)((()=>{u("core/heading",{level:t.headingLevel})}),[t.headingLevel]),(0,ne.useEffect)((()=>{u("core/buttons",{contentJustification:t.alignment})}),[t.alignment]);const v=e=>{l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})},{className:d}=e,{headingLevel:f,href:w,imageUrl:g,linkClass:p,linkDestination:b,linkTarget:E,rel:z,alignment:y}=t,C=[["core/heading",{level:f,placeholder:/* translators: placeholder text for input box */(0,x.__)("Write title…","coblocks"),textAlign:y}],["core/paragraph",{align:y, 74 74 /* translators: content placeholder */ 75 placeholder:(0,x.__)("Write description…","coblocks")}]];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(h.MediaReplaceFlow,{allowedTypes:["image"],mediaUrl:null,onSelect:e=>{ f(e)}}),b&&(0,a.createElement)(h.__experimentalImageURLInputUI,{linkClass:E,linkDestination:z,linkTarget:y,mediaLink:o&&o.link,mediaUrl:b,onChangeUrl:({href:e,...t})=>{const n={...t};void 0!==e&&(n.href=e),l(n)},rel:C,url:p||""})),(0,a.createElement)(Ve,{attributes:t,onToggleCta:()=>{l({showCta:!P})},setAttributes:l}),(0,a.createElement)("div",{className:w},b?(()=>{const e=m()("wp-block-coblocks-service__figure",{"is-selected":i,"is-transient":(0,Me.isBlobURL)(t.imageUrl)}),n=(0,a.createElement)(k.DropZone,{label:(0,x.__)("Drop image to replace","coblocks"),onFilesDrop:f});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("figure",{className:e},i&&(0,a.createElement)(k.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right is-visible"},(0,a.createElement)(h.MediaUploadCheck,null,(0,a.createElement)(h.MediaUpload,{allowedTypes:["image"],onSelect:e=>f(e),render:({open:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button",disabled:!i,icon:Ge,label:(0,x.__)("Remove image","coblocks"),onClick:()=>l({imageAlt:"",imageId:null,imageUrl:""})}),(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button-replace",label:(0,x.__)("Replace Image","coblocks"),onClick:e},(0,x.__)("Replace","coblocks"))),value:o?.url}))),n,(0,Me.isBlobURL)(t.imageUrl)&&(0,a.createElement)(k.Spinner,null),(0,a.createElement)("img",{alt:t.imageAlt,src:t.imageUrl,style:{objectPosition:t.focalPoint?`${100*t.focalPoint.x}% ${100*t.focalPoint.y}%`:void 0}})))})():(0,a.createElement)(h.MediaPlaceholder,{accept:"image/*",allowedTypes:["image"],className:"wp-block-coblocks-service__figure",icon:"format-image",labels:{title:" "},multiple:!1,onSelect:e=>l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})}),(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:ye,template:S,templateInsertUpdatesSelection:!1,templateLock:!1}))))},save:function({className:e,attributes:t}){const{focalPoint:n,href:r,imageAlt:l,imageUrl:c,linkClass:o,linkTarget:i,rel:s}=t,m=(0,a.createElement)("img",{src:c,alt:l,style:{objectPosition:n?`${100*n.x}% ${100*n.y}%`:void 0}}),u=(0,a.createElement)("figure",{className:"wp-block-coblocks-service__figure"},r?(0,a.createElement)("a",{className:o,href:r,target:i,rel:null!=s?s:void 0},m):m);return(0,a.createElement)("div",{className:e},c&&u,(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks.Content,null)))}};var Ae=JSON.parse('{"name":"coblocks/services","category":"layout","attributes":{"columns":{"type":"integer","default":2},"alignment":{"type":"string","default":"none"},"headingLevel":{"type":"integer","default":3},"buttons":{"type":"boolean","default":false}},"title":"Services","textdomain":"coblocks","editorScript":["coblocks-6"],"description":"Add up to four columns of services to display."}');const Ze=[{attributes:{...Ae.attributes},save({attributes:e,className:t}){return(0,a.createElement)("div",{className:t,"data-columns":e.columns},(0,a.createElement)(h.InnerBlocks.Content,null))}}];var Oe=Ze,Ie=window.wp.keycodes,He=e=>{const{attributes:t,setAttributes:n,activeStyle:r,layoutOptions:l,onToggleCtas:c,onUpdateStyle:o}=e;return(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Styles","coblocks"),initialOpen:!1},(0,a.createElement)("div",{className:m()("block-editor-block-styles","coblocks-editor-block-styles")},l.map((e=>(0,a.createElement)("div",{key:`style-${e.name}`,className:m()("block-editor-block-styles__item",{"is-active":r===e},`align-${void 0===t.alignment||"none"===t.alignment?e.defaultAlign:t.alignment}`),onClick:()=>o(e),onKeyDown:t=>{Ie.ENTER!==t.keyCode&&Ie.SPACE!==t.keyCode||(t.preventDefault(),o(e))},role:"button",tabIndex:"0","aria-label":e.label||e.name},(0,a.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.icon),(0,a.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label||e.name)))))),(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Services settings","coblocks")},(0,a.createElement)(k.RangeControl,{label:(0,x.__)("Columns","coblocks"),value:t.columns,min:1,max:4,onChange:e=>n({columns:e})}),t.columns>=2&&(0,a.createElement)(_.Z,{...e}),(0,a.createElement)(k.ToggleControl,{label:(0,x.__)("Display buttons","coblocks"),className:"components-toggle-control--services-action-button",help:t.buttons?(0,x.__)("Showing the call to action buttons.","coblocks"):(0,x.__)("Toggle to show call to action buttons.","coblocks"),checked:t.buttons,onChange:c})))},$e=l(5697),We=l.n($e);function Fe({level:e,isPressed:t=!1}){const n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4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.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(e)?(0,a.createElement)(k.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:t},(0,a.createElement)(k.Path,{d:n[e]})):null}class Ue extends ne.Component{createLevelControl(e,t,n){const r=e===t;return{icon:(0,a.createElement)(Fe,{isPressed:r,level:e}),isActive:r,onClick:()=>n(e)75 placeholder:(0,x.__)("Write description…","coblocks")}]];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(h.MediaReplaceFlow,{allowedTypes:["image"],mediaUrl:null,onSelect:e=>{v(e)}}),g&&(0,a.createElement)(h.__experimentalImageURLInputUI,{linkClass:p,linkDestination:b,linkTarget:E,mediaLink:o&&o.link,mediaUrl:g,onChangeUrl:({href:e,...t})=>{const n={...t};void 0!==e&&(n.href=e),l(n)},rel:z,url:w||""})),(0,a.createElement)(Ve,{attributes:t,setAttributes:l}),(0,a.createElement)("div",{className:d},g?(()=>{const e=m()("wp-block-coblocks-service__figure",{"is-selected":i,"is-transient":(0,Me.isBlobURL)(t.imageUrl)}),n=(0,a.createElement)(k.DropZone,{label:(0,x.__)("Drop image to replace","coblocks"),onFilesDrop:v});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("figure",{className:e},i&&(0,a.createElement)(k.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right is-visible"},(0,a.createElement)(h.MediaUploadCheck,null,(0,a.createElement)(h.MediaUpload,{allowedTypes:["image"],onSelect:e=>v(e),render:({open:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button",disabled:!i,icon:Ge,label:(0,x.__)("Remove image","coblocks"),onClick:()=>l({imageAlt:"",imageId:null,imageUrl:""})}),(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button-replace",label:(0,x.__)("Replace Image","coblocks"),onClick:e},(0,x.__)("Replace","coblocks"))),value:o?.url}))),n,(0,Me.isBlobURL)(t.imageUrl)&&(0,a.createElement)(k.Spinner,null),(0,a.createElement)("img",{alt:t.imageAlt,src:t.imageUrl,style:{objectPosition:t.focalPoint?`${100*t.focalPoint.x}% ${100*t.focalPoint.y}%`:void 0}})))})():(0,a.createElement)(h.MediaPlaceholder,{accept:"image/*",allowedTypes:["image"],className:"wp-block-coblocks-service__figure",icon:"format-image",labels:{title:" "},multiple:!1,onSelect:e=>l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})}),(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:ye,template:C,templateInsertUpdatesSelection:!1,templateLock:!1}))))},save:function({className:e,attributes:t}){const{focalPoint:n,href:r,imageAlt:l,imageUrl:c,linkClass:o,linkTarget:i,rel:s}=t,m=(0,a.createElement)("img",{src:c,alt:l,style:{objectPosition:n?`${100*n.x}% ${100*n.y}%`:void 0}}),u=(0,a.createElement)("figure",{className:"wp-block-coblocks-service__figure"},r?(0,a.createElement)("a",{className:o,href:r,target:i,rel:null!=s?s:void 0},m):m);return(0,a.createElement)("div",{className:e},c&&u,(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks.Content,null)))}};var Ae=JSON.parse('{"name":"coblocks/services","category":"layout","attributes":{"columns":{"type":"integer","default":2},"alignment":{"type":"string","default":"none"},"headingLevel":{"type":"integer","default":3}},"title":"Services","textdomain":"coblocks","editorScript":["coblocks-6"],"description":"Add up to four columns of services to display."}');const Ze=[{attributes:{...Ae.attributes},save({attributes:e,className:t}){return(0,a.createElement)("div",{className:t,"data-columns":e.columns},(0,a.createElement)(h.InnerBlocks.Content,null))}}];var Oe=Ze,He=window.wp.keycodes,Ie=e=>{const{attributes:t,setAttributes:n,activeStyle:r,layoutOptions:l,onUpdateStyle:c}=e;return(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Styles","coblocks"),initialOpen:!1},(0,a.createElement)("div",{className:m()("block-editor-block-styles","coblocks-editor-block-styles")},l.map((e=>(0,a.createElement)("div",{key:`style-${e.name}`,className:m()("block-editor-block-styles__item",{"is-active":r===e},`align-${void 0===t.alignment||"none"===t.alignment?e.defaultAlign:t.alignment}`),onClick:()=>c(e),onKeyDown:t=>{He.ENTER!==t.keyCode&&He.SPACE!==t.keyCode||(t.preventDefault(),c(e))},role:"button",tabIndex:"0","aria-label":e.label||e.name},(0,a.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.icon),(0,a.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label||e.name)))))),(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Services settings","coblocks")},(0,a.createElement)(k.RangeControl,{label:(0,x.__)("Columns","coblocks"),value:t.columns,min:1,max:4,onChange:e=>n({columns:e})}),t.columns>=2&&(0,a.createElement)(_.Z,{...e})))},$e=l(5697),We=l.n($e);function Fe({level:e,isPressed:t=!1}){const n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V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6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(e)?(0,a.createElement)(k.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:t},(0,a.createElement)(k.Path,{d:n[e]})):null}class Ue extends ne.Component{createLevelControl(e,t,n){const r=e===t;return{icon:(0,a.createElement)(Fe,{isPressed:r,level:e}),isActive:r,onClick:()=>n(e) 76 76 // translators: %s: heading level e.g: "1", "2", "3" 77 77 ,title:(0,x.sprintf)((0,x.__)("Heading %d","coblocks"),e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:n,selectedLevel:r,onChange:l}=this.props;return(0,a.createElement)(k.ToolbarGroup,{controls:(0,z.range)(t,n).map((e=>this.createLevelControl(e,r,l))),icon:(0,a.createElement)(Fe,{level:r}),isCollapsed:e,label:(0,x.__)("Change heading level","coblocks")})}}var De=Ue;Ue.propTypes={isCollapsed:We().bool.isRequired,maxLevel:We().number,minLevel:We().number,onChange:We().func,selectedLevel:We().number},Ue.defaultProps={isCollapsed:!0};var qe={attributes:{},innerBlocks:[{name:"coblocks/service",attributes:{imageUrl:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"},innerBlocks:[{name:"core/heading",attributes:{content:(0,x.__)("Design","coblocks")}},{name:"core/paragraph",attributes:{content:(0,x.__)("We allow beautiful design to unfold as a reflection of a project’s unique vision, desires, and place in the landscape.","coblocks")}}]},{name:"coblocks/service",attributes:{imageUrl:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/heading",attributes:{content:(0,x.__)("Landscape","coblocks")}},{name:"core/paragraph",attributes:{content:(0,x.__)("We believe that the best innovative landscape architecture is a blend of both art and science, with a touch of wild.","coblocks")}}]}]};const{name:Qe,category:Je,attributes:Ke}=Ae,Ye={ … … 80 80 /* translators: block description */ 81 81 description:(0,x.__)("Add up to four columns of services to display.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.Tl$}),keywords:["coblocks",/* translators: block keyword */ 82 (0,x.__)("features","coblocks")],supports:{align:["wide","full"],gutter:{default:"medium",customDefault:1.6},reusable:!1,html:!1},example:qe,attributes:Ke,edit:e=>{const{className:t,attributes:n,setAttributes:r,clientId:l}=e,{updateBlockAttributes:c,insertBlock:o,removeBlocks:i}=(0,V.useDispatch)("core/block-editor"),s=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(l)),[]),u=(e,t)=>{s.forEach((n=>{n.name===e&&c(n.clientId,t)}))},v=e=>{r({alignment:e}),u("coblocks/service",{alignment:e})};(0,ne.useEffect)((()=>{"circle"!==Pe(Ce,n.className).name||void 0!==n.alignment&&"none"!==n.alignment||v("center")}),[n.className]),(0,ne.useEffect)((()=>{const{ buttons:t,headingLevel:n,alignment:r}=e;d("coblocks/service",{showCta:t,headingLevel:n,alignment:r})}),[n.columns,s]);const d=(e,t={})=>{const n=s.filter((e=>!_e(e.attributes)||!Se(e.innerBlocks))),r=s.filter((e=>_e(e.attributes)&&Se(e.innerBlocks)));if(r.length+n.length>w&&i(r.filter(((e,t)=>0!==t)).map((e=>e.clientId)),!1),0===r.length||r.length+n.length<w){const n=(0,B.createBlock)(e,t);o(n,s.length,l,!1)}},{alignment:f,columns:w}=n,g=m()("has-columns",{[`has-${w}-columns`]:w,"has-responsive-columns":w>1}),p=Pe(Ce,t);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(De,{minLevel:2,maxLevel:6,selectedLevel:n.headingLevel,onChange:e=>{r({headingLevel:e}),u("coblocks/service",{headingLevel:e})}}),(0,a.createElement)(h.AlignmentToolbar,{value:f,onChange:v})),(0,a.createElement)(He,{attributes:n,setAttributes:r,activeStyle:p,layoutOptions:Ce,onToggleCtas:()=>{const e=!n.buttons;r({buttons:e}),u("coblocks/service",{showCta:e})},onUpdateStyle:e=>{const l=Pe(Ce,t),c=function(e,t,n){const r=new(ze())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(n.className,l,e);r({className:c})},onSetColumns:e=>{r({columns:parseInt(e)})}}),(0,a.createElement)("div",{className:t},(0,a.createElement)(P.Z,{...n},(0,a.createElement)("div",{className:g},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:xe,template:ke,orientation:n.columns>1?"horizontal":"vertical",templateInsertUpdatesSelection:!1,__experimentalCaptureToolbars:!0})))))},save:function({className:e,attributes:t}){const n=m()("has-columns",{[`has-${t.columns}-columns`]:t.columns,"has-responsive-columns":t.columns>1});return(0,a.createElement)("div",{className:e},(0,a.createElement)(P.Z,{...t},(0,a.createElement)("div",{className:n},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:Oe};[e,t,n,r,c].forEach(o.qt)}()}();82 (0,x.__)("features","coblocks")],supports:{align:["wide","full"],gutter:{default:"medium",customDefault:1.6},reusable:!1,html:!1},example:qe,attributes:Ke,edit:e=>{const{className:t,attributes:n,setAttributes:r,clientId:l}=e,{updateBlockAttributes:c,insertBlock:o,removeBlocks:i}=(0,V.useDispatch)("core/block-editor"),s=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(l)),[]),u=(e,t)=>{s.forEach((n=>{n.name===e&&c(n.clientId,t)}))},v=e=>{r({alignment:e}),u("coblocks/service",{alignment:e})};(0,ne.useEffect)((()=>{"circle"!==Pe(Ce,n.className).name||void 0!==n.alignment&&"none"!==n.alignment||v("center")}),[n.className]),(0,ne.useEffect)((()=>{const{headingLevel:t,alignment:n}=e;d("coblocks/service",{headingLevel:t,alignment:n})}),[n.columns,s]);const d=(e,t={})=>{const n=s.filter((e=>!_e(e.attributes)||!Se(e.innerBlocks))),r=s.filter((e=>_e(e.attributes)&&Se(e.innerBlocks)));if(r.length+n.length>w&&i(r.filter(((e,t)=>0!==t)).map((e=>e.clientId)),!1),0===r.length||r.length+n.length<w){const n=(0,B.createBlock)(e,t);o(n,s.length,l,!1)}},{alignment:f,columns:w}=n,g=m()("has-columns",{[`has-${w}-columns`]:w,"has-responsive-columns":w>1}),p=Pe(Ce,t);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(De,{minLevel:2,maxLevel:6,selectedLevel:n.headingLevel,onChange:e=>{r({headingLevel:e}),u("coblocks/service",{headingLevel:e})}}),(0,a.createElement)(h.AlignmentToolbar,{value:f,onChange:v})),(0,a.createElement)(Ie,{attributes:n,setAttributes:r,activeStyle:p,layoutOptions:Ce,onUpdateStyle:e=>{const l=Pe(Ce,t),c=function(e,t,n){const r=new(ze())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(n.className,l,e);r({className:c})},onSetColumns:e=>{r({columns:parseInt(e)})}}),(0,a.createElement)("div",{className:t},(0,a.createElement)(P.Z,{...n},(0,a.createElement)("div",{className:g},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:xe,template:ke,orientation:n.columns>1?"horizontal":"vertical",templateInsertUpdatesSelection:!1,__experimentalCaptureToolbars:!0})))))},save:function({className:e,attributes:t}){const n=m()("has-columns",{[`has-${t.columns}-columns`]:t.columns,"has-responsive-columns":t.columns>1});return(0,a.createElement)("div",{className:e},(0,a.createElement)(P.Z,{...t},(0,a.createElement)("div",{className:n},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:Oe};[e,t,n,r,c].forEach(o.qt)}()}(); -
coblocks/tags/3.1.11/readme.txt
r3095285 r3102517 6 6 Tested up to: 6.5 7 7 Requires PHP: 7.4 8 Stable tag: 3.1.1 08 Stable tag: 3.1.11 9 9 License: GPL-2.0 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 126 126 == Changelog == 127 127 128 = 3.1.11 / 2024-06-13 = 129 # Bug fix 130 * Fix disappearing buttons in Services block [#2613](https://github.com/godaddy-wordpress/coblocks/pull/2613) 131 132 133 = 3.1.10 / 2024-05-30 = 134 # Bug fix 135 * Fix a possible XSS vector [#2612](https://github.com/godaddy-wordpress/coblocks/pull/2612) 136 128 137 = 3.1.9 / 2024-04-30 = 129 138 # Bug fix -
coblocks/tags/3.1.11/src/blocks/services/block.json
r2949408 r3102517 14 14 "type": "integer", 15 15 "default": 3 16 },17 "buttons": {18 "type": "boolean",19 "default": false20 16 } 21 17 }, -
coblocks/tags/3.1.11/src/blocks/services/service/block.json
r2949408 r3102517 6 6 "type": "integer", 7 7 "default": 3 8 },9 "showCta": {10 "type": "boolean",11 "default": false12 8 }, 13 9 "imageUrl": { -
coblocks/trunk/class-coblocks.php
r3095285 r3102517 5 5 * Author: GoDaddy 6 6 * Author URI: https://www.godaddy.com 7 * Version: 3.1.1 07 * Version: 3.1.11 8 8 * Text Domain: coblocks 9 9 * Domain Path: /languages … … 27 27 } 28 28 29 define( 'COBLOCKS_VERSION', '3.1.1 0' );29 define( 'COBLOCKS_VERSION', '3.1.11' ); 30 30 define( 'COBLOCKS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 31 31 define( 'COBLOCKS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
coblocks/trunk/dist/blocks/services/block.json
r2949408 r3102517 14 14 "type": "integer", 15 15 "default": 3 16 },17 "buttons": {18 "type": "boolean",19 "default": false20 16 } 21 17 }, -
coblocks/trunk/dist/blocks/services/service/block.json
r2949408 r3102517 6 6 "type": "integer", 7 7 "default": 3 8 },9 "showCta": {10 "type": "boolean",11 "default": false12 8 }, 13 9 "imageUrl": { -
coblocks/trunk/dist/coblocks-6.asset.php
r2990233 r3102517 1 <?php return array('dependencies' => array('lodash', 'react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-token-list'), 'version' => ' 62403b1b0940ba914bc6');1 <?php return array('dependencies' => array('lodash', 'react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-token-list'), 'version' => '5e94232315605646ceb4'); -
coblocks/trunk/dist/coblocks-6.js
r2990233 r3102517 54 54 description:(0,x.__)("Add pricing tables to help visitors compare products and plans.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.CRh}),keywords:["coblocks",/* translators: block keyword */ 55 55 (0,x.__)("landing","coblocks"),/* translators: block keyword */ 56 (0,x.__)("comparison","coblocks")],supports:{align:["wide","full"],html:!1,gutter:{default:"medium",customDefault:3}},example:T,attributes:A,transforms:N,edit:R,save:({attributes:e})=>{const{contentAlign:t,count:n}=e,r=m()({[`has-text-align-${t}`]:t}),l=m()("wp-block-coblocks-pricing-table__inner",{"has-columns":n>1,[`has-${n}-columns`]:n,"has-responsive-columns":n>1});return(0,a.createElement)("div",{className:r},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:l},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:d};var O=(0,h.withColors)("backgroundColor",{backgroundColor:"background-color"},{textColor:"color"}), I=l(4333);const{getComputedStyle:H}=window,$=(0,k.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t.attributes,l=e.querySelector('[contenteditable="true"]'),c=l?H(l):null;return{fallbackBackgroundColor:n||!c?void 0:c.backgroundColor,fallbackTextColor:r||!c?void 0:c.color}}));var W=(0,I.compose)([O,$])((e=>{const{fallbackBackgroundColor:t,fallbackTextColor:n,setBackgroundColor:r,setTextColor:l,backgroundColor:c,textColor:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(h.PanelColorSettings,{title:(0,x.__)("Color settings","coblocks"),colorSettings:[{value:c.color,onChange:r,label:(0,x.__)("Background color","coblocks")},{value:o.color,onChange:l,label:(0,x.__)("Text color","coblocks"),initialOpen:!1}]},(0,a.createElement)(h.ContrastChecker,{textColor:o.color,backgroundColor:c.color,fallbackTextColor:n,fallbackBackgroundColor:t}))))})),F=(0,I.compose)([O])((e=>{const{attributes:t,className:n,isSelected:r,setAttributes:l,backgroundColor:c,textColor:o}=e,{amount:i,currency:s,title:u,placeholder:v,features:d}=t,f=["bold","italic","strikethrough"],w=[["core/list",{className:"wp-block-coblocks-pricing-table-item__features"},[["core/list-item",{content:d,placeholder:(0,x.__)("Add features","coblocks")},[]]]],["core/button",{placeholder:(0,x.__)("Buy Now","coblocks")}]];return(0,a.createElement)(a.Fragment,null,r&&(0,a.createElement)(W,{...e}),(0,a.createElement)("div",{className:m()(n,{"has-background":c.color,"has-text-color":o.color,[c.class]:c.class,[o.class]:o.class}),style:{backgroundColor:c.color,color:o.color}},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",onChange:e=>l({title:e}),value:u,placeholder:v||(0,x.__)("Plan A","coblocks"),allowedFormats:f}),(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",onChange:e=>l({currency:e}),value:s,placeholder:(0,x.__)("$","coblocks"),allowedFormats:f}),(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",onChange:e=>l({amount:e}),value:i,placeholder:"99",allowedFormats:f})),(0,a.createElement)(h.InnerBlocks,{template:w,templateLock:!1,templateInsertUpdatesSelection:!1,renderAppender:h.InnerBlocks.ButtonBlockAppender})))})),U=JSON.parse('{"name":"coblocks/pricing-table-item","category":"layout","attributes":{"title":{"source":"children","selector":".wp-block-coblocks-pricing-table-item__title"},"currency":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__currency"},"amount":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__amount"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"placeholder":{"type":"string"}},"title":"Pricing Table Item","textdomain":"coblocks","description":"A pricing table to help visitors compare products and plans.","editorScript":["coblocks-6"],"parent":["coblocks/pricing-table"]}'),D=l(3769),q=l(6553),Q={from:[{type:"raw",selector:".wp-block-coblocks-pricing-table-item",transform(e){return(0,B.createBlock)(U.name,{...(0,B.getBlockAttributes)(U.name,e.outerHTML)})}}]};const J=[{migrate:(e,t)=>{const{features:n}=e,r=n.map((e=>(0,B.createBlock)("core/list-item",{content:e?.props?.children.map((e=>e))},[]))),l=(0,B.createBlock)("core/list",{className:"wp-block-coblocks-pricing-table-item__features"},r);return delete e.features,[e,t=[l,...t]]},attributes:{title:{source:"children",selector:".wp-block-coblocks-pricing-table-item__title"},features:{source:"children",selector:".wp-block-coblocks-pricing-table-item__features"},currency:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__currency"},amount:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__amount"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},placeholder:{type:"string"}},save:({attributes:e})=>{const{amount:t,currency:n,customBackgroundColor:r,customTextColor:l,features:c,backgroundColor:o,textColor:i,title:s}=e,u=(0,h.getColorClassName)("background-color",o),v=(0,h.getColorClassName)("color",i),d=m()({"has-background":o||r,[u]:u,"has-text-color":i||l,[v]:v}),f={backgroundColor:u?void 0:r,color:v?void 0:l};return(0,z.isEmpty)(e)?null:(0,a.createElement)("div",{className:d,style:f},!h.RichText.isEmpty(s)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",value:s}),!h.RichText.isEmpty(t)&&(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},!h.RichText.isEmpty(n)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",value:n}),(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",value:t})),!h.RichText.isEmpty(c)&&(0,a.createElement)(h.RichText.Content,{tagName:"ul",multiline:"li",className:"wp-block-coblocks-pricing-table-item__features",value:c}),(0,a.createElement)(h.InnerBlocks.Content,null))}}];var K=J;const{name:Y,category:X,attributes:ee}=U,te={56 (0,x.__)("comparison","coblocks")],supports:{align:["wide","full"],html:!1,gutter:{default:"medium",customDefault:3}},example:T,attributes:A,transforms:N,edit:R,save:({attributes:e})=>{const{contentAlign:t,count:n}=e,r=m()({[`has-text-align-${t}`]:t}),l=m()("wp-block-coblocks-pricing-table__inner",{"has-columns":n>1,[`has-${n}-columns`]:n,"has-responsive-columns":n>1});return(0,a.createElement)("div",{className:r},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:l},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:d};var O=(0,h.withColors)("backgroundColor",{backgroundColor:"background-color"},{textColor:"color"}),H=l(4333);const{getComputedStyle:I}=window,$=(0,k.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t.attributes,l=e.querySelector('[contenteditable="true"]'),c=l?I(l):null;return{fallbackBackgroundColor:n||!c?void 0:c.backgroundColor,fallbackTextColor:r||!c?void 0:c.color}}));var W=(0,H.compose)([O,$])((e=>{const{fallbackBackgroundColor:t,fallbackTextColor:n,setBackgroundColor:r,setTextColor:l,backgroundColor:c,textColor:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(h.PanelColorSettings,{title:(0,x.__)("Color settings","coblocks"),colorSettings:[{value:c.color,onChange:r,label:(0,x.__)("Background color","coblocks")},{value:o.color,onChange:l,label:(0,x.__)("Text color","coblocks"),initialOpen:!1}]},(0,a.createElement)(h.ContrastChecker,{textColor:o.color,backgroundColor:c.color,fallbackTextColor:n,fallbackBackgroundColor:t}))))})),F=(0,H.compose)([O])((e=>{const{attributes:t,className:n,isSelected:r,setAttributes:l,backgroundColor:c,textColor:o}=e,{amount:i,currency:s,title:u,placeholder:v,features:d}=t,f=["bold","italic","strikethrough"],w=[["core/list",{className:"wp-block-coblocks-pricing-table-item__features"},[["core/list-item",{content:d,placeholder:(0,x.__)("Add features","coblocks")},[]]]],["core/button",{placeholder:(0,x.__)("Buy Now","coblocks")}]];return(0,a.createElement)(a.Fragment,null,r&&(0,a.createElement)(W,{...e}),(0,a.createElement)("div",{className:m()(n,{"has-background":c.color,"has-text-color":o.color,[c.class]:c.class,[o.class]:o.class}),style:{backgroundColor:c.color,color:o.color}},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",onChange:e=>l({title:e}),value:u,placeholder:v||(0,x.__)("Plan A","coblocks"),allowedFormats:f}),(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",onChange:e=>l({currency:e}),value:s,placeholder:(0,x.__)("$","coblocks"),allowedFormats:f}),(0,a.createElement)(h.RichText,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",onChange:e=>l({amount:e}),value:i,placeholder:"99",allowedFormats:f})),(0,a.createElement)(h.InnerBlocks,{template:w,templateLock:!1,templateInsertUpdatesSelection:!1,renderAppender:h.InnerBlocks.ButtonBlockAppender})))})),U=JSON.parse('{"name":"coblocks/pricing-table-item","category":"layout","attributes":{"title":{"source":"children","selector":".wp-block-coblocks-pricing-table-item__title"},"currency":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__currency"},"amount":{"type":"array","source":"children","selector":".wp-block-coblocks-pricing-table-item__amount"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"placeholder":{"type":"string"}},"title":"Pricing Table Item","textdomain":"coblocks","description":"A pricing table to help visitors compare products and plans.","editorScript":["coblocks-6"],"parent":["coblocks/pricing-table"]}'),D=l(3769),q=l(6553),Q={from:[{type:"raw",selector:".wp-block-coblocks-pricing-table-item",transform(e){return(0,B.createBlock)(U.name,{...(0,B.getBlockAttributes)(U.name,e.outerHTML)})}}]};const J=[{migrate:(e,t)=>{const{features:n}=e,r=n.map((e=>(0,B.createBlock)("core/list-item",{content:e?.props?.children.map((e=>e))},[]))),l=(0,B.createBlock)("core/list",{className:"wp-block-coblocks-pricing-table-item__features"},r);return delete e.features,[e,t=[l,...t]]},attributes:{title:{source:"children",selector:".wp-block-coblocks-pricing-table-item__title"},features:{source:"children",selector:".wp-block-coblocks-pricing-table-item__features"},currency:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__currency"},amount:{type:"array",source:"children",selector:".wp-block-coblocks-pricing-table-item__amount"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},placeholder:{type:"string"}},save:({attributes:e})=>{const{amount:t,currency:n,customBackgroundColor:r,customTextColor:l,features:c,backgroundColor:o,textColor:i,title:s}=e,u=(0,h.getColorClassName)("background-color",o),v=(0,h.getColorClassName)("color",i),d=m()({"has-background":o||r,[u]:u,"has-text-color":i||l,[v]:v}),f={backgroundColor:u?void 0:r,color:v?void 0:l};return(0,z.isEmpty)(e)?null:(0,a.createElement)("div",{className:d,style:f},!h.RichText.isEmpty(s)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__title",value:s}),!h.RichText.isEmpty(t)&&(0,a.createElement)("div",{className:"wp-block-coblocks-pricing-table-item__price-wrapper"},!h.RichText.isEmpty(n)&&(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__currency",value:n}),(0,a.createElement)(h.RichText.Content,{tagName:"span",className:"wp-block-coblocks-pricing-table-item__amount",value:t})),!h.RichText.isEmpty(c)&&(0,a.createElement)(h.RichText.Content,{tagName:"ul",multiline:"li",className:"wp-block-coblocks-pricing-table-item__features",value:c}),(0,a.createElement)(h.InnerBlocks.Content,null))}}];var K=J;const{name:Y,category:X,attributes:ee}=U,te={ 57 57 /* translators: block name */ 58 58 title:(0,x.__)("Pricing Table Item","coblocks"), … … 67 67 (0,x.__)("rows","coblocks"),/* translators: block keyword */ 68 68 (0,x.__)("columns","coblocks"),/* translators: block keyword */ 69 (0,x.__)("layouts","coblocks")],supports:{align:["wide","full"],anchor:!0,gutter:{default:"medium",customDefault:.8},stackedOnMobile:!0,coBlocksSpacing:!0},attributes:we,variations:ue,transforms:me,edit:e=>(0,a.createElement)(ne.Suspense,{fallback:(0,a.createElement)(k.Spinner,null)},(0,a.createElement)(ve,{...e})),example:{attributes:{}},getEditWrapperProps:ie.qF,save:function({attributes:e}){const{coblocks:t,backgroundColor:n,backgroundImg:r,columns:l,customBackgroundColor:c,customTextColor:o,id:i,layout:s,isStackedOnMobile:u,marginSize:v,paddingSize:d,textColor:f,focalPoint:w,hasParallax:g,backgroundType:p,verticalAlignment:b}=e,E=(0,h.getColorClassName)("color",f),z=(0,h.getColorClassName)("background-color",n);let x=m()({[`coblocks-row--${i}`]:i});t&&void 0!==t.id&&(x=m()(x,`coblocks-row-${t.id}`));const k=["wp-block-coblocks-row__inner",...(0,re.Ro)(e),{"has-text-color":f||o},{[E]:E},{"has-padding":d&&"no"!==d},{[`has-${d}-padding`]:!["advanced"].includes(d)},{"has-margin":v&&"no"!==v},{[`has-${v}-margin`]:!["advanced"].includes(v)},{"is-stacked-on-mobile":u},{[`are-vertically-aligned-${b}`]:b}],y={backgroundColor:z?void 0:c,backgroundImage:r&&"image"===p?`url(${r})`:void 0,backgroundPosition:w&&!g?`${100*w.x}% ${100*w.y}%`:void 0,color:E?void 0:o};return(0,a.createElement)("div",{className:x,"data-id":i,"data-columns":l,"data-layout":s},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:m()(k),style:y},(0,re.QF)(e),(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:ae},pe={};pe.service43=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 28h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{d:"m32 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 28h16v.8785807 1.1214193h-16z"}))),pe.service169=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 5h24v14h-24z"}),(0,a.createElement)(k.Path,{d:"m32 5h24v14h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 25h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 25h16v.8785807 1.1214193h-16z"}))),pe.serviceSquare=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 0h24v24h-24z"}),(0,a.createElement)(k.Path,{d:"m32 0h24v24h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}))),pe.serviceCircle=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"12"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)("circle",{cx:"44",cy:"12",r:"12"})));var be=pe,Ee=l(9512),ze=l.n(Ee);const xe=["coblocks/service"],ke=[["coblocks/service"]],ye=["core/heading","core/buttons","core/paragraph"],Ce=[{name:"threebyfour",label:"4:3",icon:be.service43,isDefault:!0},{name:"sixbynine",label:"16:9",icon:be.service169},{name:"square",label:(0,x.__)("Square","coblocks"),icon:be.serviceSquare},{name:"circle",label:(0,x.__)("Circle","coblocks"),icon:be.serviceCircle,defaultAlign:"center"}];function Pe(e,t){for(const n of new(ze())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,z.find)(e,{name:t});if(r)return r}return(0,z.find)(e,"isDefault")}const _e=e=>{const t=["columns","buttons"],n=Object.entries(e).filter((([e])=>t.includes(e)));return(0,D.T1)((0,q.Z)(n))},Se=e=>{const t=["content"];let n=!0;return e.forEach((e=>{const r=Object.entries(e.attributes).filter((([e])=>t.includes(e)));(0,D.T1)((0,q.Z)(r))||(n=!1)})),n};var Ve=e=>{const{attributes:t,setAttributes:n ,onToggleCta:r}=e;return(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Service settings","coblocks")},(0,a.createElement)(k.ToggleControl,{label:(0,x.__)("Display button","coblocks"),help:t.showCta?(0,x.__)("Showing the call to action button.","coblocks"):(0,x.__)("Toggle to show a call to action button.","coblocks"),checked:t.showCta,onChange:r})),t.imageUrl&&(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Image settings","coblocks"),initialOpen:!1},(0,a.createElement)(k.TextareaControl,{label:(0,x.__)("Alt text (alternative text)","coblocks"),value:t.imageAlt,onChange:e=>n({imageAlt:e}),help:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,x.__)("Describe the purpose of the image","coblocks")),(0,x.__)("Leave empty if the image is purely decorative.","coblocks"))}),(0,a.createElement)(k.FocalPointPicker,{label:(0,x.__)("Focal point","coblocks"),url:t.imageUrl,value:t.focalPoint,onChange:e=>n({focalPoint:e})})))},Be=l(444),Ge=(0,a.createElement)(Be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Be.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Me=l(1313),Re=JSON.parse('{"name":"coblocks/service","category":"layout","attributes":{"headingLevel":{"type":"integer","default":3},"showCta":{"type":"boolean","default":false},"imageUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"imageId":{"type":"number"},"focalPoint":{"type":"object"},"alignment":{"type":"string","default":"none"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"anchor":true},"title":"Service","textdomain":"coblocks","description":"A single service item within a services block.","viewScript":["coblocks-services-script"],"editorScript":["coblocks-6"],"parent":["coblocks/services"]}');const{name:Te,category:Ne,attributes:Le}=Re,je={69 (0,x.__)("layouts","coblocks")],supports:{align:["wide","full"],anchor:!0,gutter:{default:"medium",customDefault:.8},stackedOnMobile:!0,coBlocksSpacing:!0},attributes:we,variations:ue,transforms:me,edit:e=>(0,a.createElement)(ne.Suspense,{fallback:(0,a.createElement)(k.Spinner,null)},(0,a.createElement)(ve,{...e})),example:{attributes:{}},getEditWrapperProps:ie.qF,save:function({attributes:e}){const{coblocks:t,backgroundColor:n,backgroundImg:r,columns:l,customBackgroundColor:c,customTextColor:o,id:i,layout:s,isStackedOnMobile:u,marginSize:v,paddingSize:d,textColor:f,focalPoint:w,hasParallax:g,backgroundType:p,verticalAlignment:b}=e,E=(0,h.getColorClassName)("color",f),z=(0,h.getColorClassName)("background-color",n);let x=m()({[`coblocks-row--${i}`]:i});t&&void 0!==t.id&&(x=m()(x,`coblocks-row-${t.id}`));const k=["wp-block-coblocks-row__inner",...(0,re.Ro)(e),{"has-text-color":f||o},{[E]:E},{"has-padding":d&&"no"!==d},{[`has-${d}-padding`]:!["advanced"].includes(d)},{"has-margin":v&&"no"!==v},{[`has-${v}-margin`]:!["advanced"].includes(v)},{"is-stacked-on-mobile":u},{[`are-vertically-aligned-${b}`]:b}],y={backgroundColor:z?void 0:c,backgroundImage:r&&"image"===p?`url(${r})`:void 0,backgroundPosition:w&&!g?`${100*w.x}% ${100*w.y}%`:void 0,color:E?void 0:o};return(0,a.createElement)("div",{className:x,"data-id":i,"data-columns":l,"data-layout":s},(0,a.createElement)(P.Z,{...e},(0,a.createElement)("div",{className:m()(k),style:y},(0,re.QF)(e),(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:ae},pe={};pe.service43=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 28h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{d:"m32 3h24v19.253906h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 24h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 28h16v.8785807 1.1214193h-16z"}))),pe.service169=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 5h24v14h-24z"}),(0,a.createElement)(k.Path,{d:"m32 5h24v14h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 21h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 25h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 25h16v.8785807 1.1214193h-16z"}))),pe.serviceSquare=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)(k.Path,{d:"m0 0h24v24h-24z"}),(0,a.createElement)(k.Path,{d:"m32 0h24v24h-24z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}))),pe.serviceCircle=(0,a.createElement)(k.SVG,{height:"32",viewBox:"0 0 56 32",width:"56",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(k.G,{fill:"currentColor",fillRule:"evenodd"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"12"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 26h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m0 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)(k.Path,{className:"service-svg-moving-path",d:"m32 30h16v.8785807 1.1214193h-16z"}),(0,a.createElement)("circle",{cx:"44",cy:"12",r:"12"})));var be=pe,Ee=l(9512),ze=l.n(Ee);const xe=["coblocks/service"],ke=[["coblocks/service"]],ye=["core/heading","core/buttons","core/paragraph"],Ce=[{name:"threebyfour",label:"4:3",icon:be.service43,isDefault:!0},{name:"sixbynine",label:"16:9",icon:be.service169},{name:"square",label:(0,x.__)("Square","coblocks"),icon:be.serviceSquare},{name:"circle",label:(0,x.__)("Circle","coblocks"),icon:be.serviceCircle,defaultAlign:"center"}];function Pe(e,t){for(const n of new(ze())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,z.find)(e,{name:t});if(r)return r}return(0,z.find)(e,"isDefault")}const _e=e=>{const t=["columns","buttons"],n=Object.entries(e).filter((([e])=>t.includes(e)));return(0,D.T1)((0,q.Z)(n))},Se=e=>{const t=["content"];let n=!0;return e.forEach((e=>{const r=Object.entries(e.attributes).filter((([e])=>t.includes(e)));(0,D.T1)((0,q.Z)(r))||(n=!1)})),n};var Ve=e=>{const{attributes:t,setAttributes:n}=e;return(0,a.createElement)(h.InspectorControls,null,t.imageUrl&&(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Image settings","coblocks"),initialOpen:!1},(0,a.createElement)(k.TextareaControl,{label:(0,x.__)("Alt text (alternative text)","coblocks"),value:t.imageAlt,onChange:e=>n({imageAlt:e}),help:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,x.__)("Describe the purpose of the image","coblocks")),(0,x.__)("Leave empty if the image is purely decorative.","coblocks"))}),(0,a.createElement)(k.FocalPointPicker,{label:(0,x.__)("Focal point","coblocks"),url:t.imageUrl,value:t.focalPoint,onChange:e=>n({focalPoint:e})})))},Be=l(444),Ge=(0,a.createElement)(Be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Be.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Me=l(1313),Re=JSON.parse('{"name":"coblocks/service","category":"layout","attributes":{"headingLevel":{"type":"integer","default":3},"imageUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src","default":""},"imageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"imageId":{"type":"number"},"focalPoint":{"type":"object"},"alignment":{"type":"string","default":"none"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"anchor":true},"title":"Service","textdomain":"coblocks","description":"A single service item within a services block.","viewScript":["coblocks-services-script"],"editorScript":["coblocks-6"],"parent":["coblocks/services"]}');const{name:Te,category:Ne,attributes:Le}=Re,je={ 70 70 /* translators: block name */ 71 71 title:(0,x.__)("Service","coblocks"), 72 72 /* translators: block description */ 73 description:(0,x.__)("A single service item within a services block.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.VK1}),keywords:[],supports:{reusable:!1,html:!1,inserter:!1},example:{attributes:{}},attributes:Le,edit:e=>{const{attributes:t,clientId:n,isSelected:r,setAttributes:l}=e,c=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(n)),[]),o=(0,V.useSelect)((e=>e("core").getMedia(t.imageId)),[]),i=(0,V.useSelect)((e=>{const{getBlockHierarchyRootClientId:t,getSelectedBlockClientId:l}=e("core/block-editor"),c=t(n),o=t(l());return r||c===o})),{updateBlockAttributes:s ,insertBlock:u,removeBlocks:v}=(0,V.useDispatch)("core/block-editor"),d=(e,t)=>{c.forEach((n=>{n.name===e&&s(n.clientId,t)}))};(0,ne.useEffect)((()=>{d("core/heading",{level:t.headingLevel})}),[t.headingLevel]),(0,ne.useEffect)((()=>{d("core/buttons",{contentJustification:t.alignment})}),[t.alignment]),(0,ne.useEffect)((()=>{((e,t,r=!0)=>{const l=c.filter((e=>"core/button"===e.name));if(l.length){v(l.map((e=>e.clientId)),!1);const r=(0,B.createBlock)(e,t,l);return void u(r,c.length,n,!1)}const o=c.filter((t=>t.name===e));if(!o.length&&r){const r=(0,B.createBlock)("core/button",{}),l=(0,B.createBlock)(e,t,[r]);u(l,c.length,n,!1)}o.length&&!r&&v(o.map((e=>e.clientId)),!1)})("core/buttons",{contentJustification:t.alignment},t.showCta)}),[t.showCta]);const f=e=>{l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})},{className:w}=e,{headingLevel:g,href:p,imageUrl:b,linkClass:E,linkDestination:z,linkTarget:y,rel:C,showCta:P,alignment:_}=t,S=[["core/heading",{level:g,placeholder:/* translators: placeholder text for input box */(0,x.__)("Write title…","coblocks"),textAlign:_}],["core/paragraph",{align:_,73 description:(0,x.__)("A single service item within a services block.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.VK1}),keywords:[],supports:{reusable:!1,html:!1,inserter:!1},example:{attributes:{}},attributes:Le,edit:e=>{const{attributes:t,clientId:n,isSelected:r,setAttributes:l}=e,c=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(n)),[]),o=(0,V.useSelect)((e=>e("core").getMedia(t.imageId)),[]),i=(0,V.useSelect)((e=>{const{getBlockHierarchyRootClientId:t,getSelectedBlockClientId:l}=e("core/block-editor"),c=t(n),o=t(l());return r||c===o})),{updateBlockAttributes:s}=(0,V.useDispatch)("core/block-editor"),u=(e,t)=>{c.forEach((n=>{n.name===e&&s(n.clientId,t)}))};(0,ne.useEffect)((()=>{u("core/heading",{level:t.headingLevel})}),[t.headingLevel]),(0,ne.useEffect)((()=>{u("core/buttons",{contentJustification:t.alignment})}),[t.alignment]);const v=e=>{l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})},{className:d}=e,{headingLevel:f,href:w,imageUrl:g,linkClass:p,linkDestination:b,linkTarget:E,rel:z,alignment:y}=t,C=[["core/heading",{level:f,placeholder:/* translators: placeholder text for input box */(0,x.__)("Write title…","coblocks"),textAlign:y}],["core/paragraph",{align:y, 74 74 /* translators: content placeholder */ 75 placeholder:(0,x.__)("Write description…","coblocks")}]];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(h.MediaReplaceFlow,{allowedTypes:["image"],mediaUrl:null,onSelect:e=>{ f(e)}}),b&&(0,a.createElement)(h.__experimentalImageURLInputUI,{linkClass:E,linkDestination:z,linkTarget:y,mediaLink:o&&o.link,mediaUrl:b,onChangeUrl:({href:e,...t})=>{const n={...t};void 0!==e&&(n.href=e),l(n)},rel:C,url:p||""})),(0,a.createElement)(Ve,{attributes:t,onToggleCta:()=>{l({showCta:!P})},setAttributes:l}),(0,a.createElement)("div",{className:w},b?(()=>{const e=m()("wp-block-coblocks-service__figure",{"is-selected":i,"is-transient":(0,Me.isBlobURL)(t.imageUrl)}),n=(0,a.createElement)(k.DropZone,{label:(0,x.__)("Drop image to replace","coblocks"),onFilesDrop:f});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("figure",{className:e},i&&(0,a.createElement)(k.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right is-visible"},(0,a.createElement)(h.MediaUploadCheck,null,(0,a.createElement)(h.MediaUpload,{allowedTypes:["image"],onSelect:e=>f(e),render:({open:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button",disabled:!i,icon:Ge,label:(0,x.__)("Remove image","coblocks"),onClick:()=>l({imageAlt:"",imageId:null,imageUrl:""})}),(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button-replace",label:(0,x.__)("Replace Image","coblocks"),onClick:e},(0,x.__)("Replace","coblocks"))),value:o?.url}))),n,(0,Me.isBlobURL)(t.imageUrl)&&(0,a.createElement)(k.Spinner,null),(0,a.createElement)("img",{alt:t.imageAlt,src:t.imageUrl,style:{objectPosition:t.focalPoint?`${100*t.focalPoint.x}% ${100*t.focalPoint.y}%`:void 0}})))})():(0,a.createElement)(h.MediaPlaceholder,{accept:"image/*",allowedTypes:["image"],className:"wp-block-coblocks-service__figure",icon:"format-image",labels:{title:" "},multiple:!1,onSelect:e=>l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})}),(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:ye,template:S,templateInsertUpdatesSelection:!1,templateLock:!1}))))},save:function({className:e,attributes:t}){const{focalPoint:n,href:r,imageAlt:l,imageUrl:c,linkClass:o,linkTarget:i,rel:s}=t,m=(0,a.createElement)("img",{src:c,alt:l,style:{objectPosition:n?`${100*n.x}% ${100*n.y}%`:void 0}}),u=(0,a.createElement)("figure",{className:"wp-block-coblocks-service__figure"},r?(0,a.createElement)("a",{className:o,href:r,target:i,rel:null!=s?s:void 0},m):m);return(0,a.createElement)("div",{className:e},c&&u,(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks.Content,null)))}};var Ae=JSON.parse('{"name":"coblocks/services","category":"layout","attributes":{"columns":{"type":"integer","default":2},"alignment":{"type":"string","default":"none"},"headingLevel":{"type":"integer","default":3},"buttons":{"type":"boolean","default":false}},"title":"Services","textdomain":"coblocks","editorScript":["coblocks-6"],"description":"Add up to four columns of services to display."}');const Ze=[{attributes:{...Ae.attributes},save({attributes:e,className:t}){return(0,a.createElement)("div",{className:t,"data-columns":e.columns},(0,a.createElement)(h.InnerBlocks.Content,null))}}];var Oe=Ze,Ie=window.wp.keycodes,He=e=>{const{attributes:t,setAttributes:n,activeStyle:r,layoutOptions:l,onToggleCtas:c,onUpdateStyle:o}=e;return(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Styles","coblocks"),initialOpen:!1},(0,a.createElement)("div",{className:m()("block-editor-block-styles","coblocks-editor-block-styles")},l.map((e=>(0,a.createElement)("div",{key:`style-${e.name}`,className:m()("block-editor-block-styles__item",{"is-active":r===e},`align-${void 0===t.alignment||"none"===t.alignment?e.defaultAlign:t.alignment}`),onClick:()=>o(e),onKeyDown:t=>{Ie.ENTER!==t.keyCode&&Ie.SPACE!==t.keyCode||(t.preventDefault(),o(e))},role:"button",tabIndex:"0","aria-label":e.label||e.name},(0,a.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.icon),(0,a.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label||e.name)))))),(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Services settings","coblocks")},(0,a.createElement)(k.RangeControl,{label:(0,x.__)("Columns","coblocks"),value:t.columns,min:1,max:4,onChange:e=>n({columns:e})}),t.columns>=2&&(0,a.createElement)(_.Z,{...e}),(0,a.createElement)(k.ToggleControl,{label:(0,x.__)("Display buttons","coblocks"),className:"components-toggle-control--services-action-button",help:t.buttons?(0,x.__)("Showing the call to action buttons.","coblocks"):(0,x.__)("Toggle to show call to action buttons.","coblocks"),checked:t.buttons,onChange:c})))},$e=l(5697),We=l.n($e);function Fe({level:e,isPressed:t=!1}){const n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.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.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(e)?(0,a.createElement)(k.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:t},(0,a.createElement)(k.Path,{d:n[e]})):null}class Ue extends ne.Component{createLevelControl(e,t,n){const r=e===t;return{icon:(0,a.createElement)(Fe,{isPressed:r,level:e}),isActive:r,onClick:()=>n(e)75 placeholder:(0,x.__)("Write description…","coblocks")}]];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(h.MediaReplaceFlow,{allowedTypes:["image"],mediaUrl:null,onSelect:e=>{v(e)}}),g&&(0,a.createElement)(h.__experimentalImageURLInputUI,{linkClass:p,linkDestination:b,linkTarget:E,mediaLink:o&&o.link,mediaUrl:g,onChangeUrl:({href:e,...t})=>{const n={...t};void 0!==e&&(n.href=e),l(n)},rel:z,url:w||""})),(0,a.createElement)(Ve,{attributes:t,setAttributes:l}),(0,a.createElement)("div",{className:d},g?(()=>{const e=m()("wp-block-coblocks-service__figure",{"is-selected":i,"is-transient":(0,Me.isBlobURL)(t.imageUrl)}),n=(0,a.createElement)(k.DropZone,{label:(0,x.__)("Drop image to replace","coblocks"),onFilesDrop:v});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("figure",{className:e},i&&(0,a.createElement)(k.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right is-visible"},(0,a.createElement)(h.MediaUploadCheck,null,(0,a.createElement)(h.MediaUpload,{allowedTypes:["image"],onSelect:e=>v(e),render:({open:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button",disabled:!i,icon:Ge,label:(0,x.__)("Remove image","coblocks"),onClick:()=>l({imageAlt:"",imageId:null,imageUrl:""})}),(0,a.createElement)(k.Button,{className:"coblocks-gallery-item__button-replace",label:(0,x.__)("Replace Image","coblocks"),onClick:e},(0,x.__)("Replace","coblocks"))),value:o?.url}))),n,(0,Me.isBlobURL)(t.imageUrl)&&(0,a.createElement)(k.Spinner,null),(0,a.createElement)("img",{alt:t.imageAlt,src:t.imageUrl,style:{objectPosition:t.focalPoint?`${100*t.focalPoint.x}% ${100*t.focalPoint.y}%`:void 0}})))})():(0,a.createElement)(h.MediaPlaceholder,{accept:"image/*",allowedTypes:["image"],className:"wp-block-coblocks-service__figure",icon:"format-image",labels:{title:" "},multiple:!1,onSelect:e=>l({imageAlt:e.alt,imageId:e.id,imageUrl:e.url})}),(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:ye,template:C,templateInsertUpdatesSelection:!1,templateLock:!1}))))},save:function({className:e,attributes:t}){const{focalPoint:n,href:r,imageAlt:l,imageUrl:c,linkClass:o,linkTarget:i,rel:s}=t,m=(0,a.createElement)("img",{src:c,alt:l,style:{objectPosition:n?`${100*n.x}% ${100*n.y}%`:void 0}}),u=(0,a.createElement)("figure",{className:"wp-block-coblocks-service__figure"},r?(0,a.createElement)("a",{className:o,href:r,target:i,rel:null!=s?s:void 0},m):m);return(0,a.createElement)("div",{className:e},c&&u,(0,a.createElement)("div",{className:"wp-block-coblocks-service__content"},(0,a.createElement)(h.InnerBlocks.Content,null)))}};var Ae=JSON.parse('{"name":"coblocks/services","category":"layout","attributes":{"columns":{"type":"integer","default":2},"alignment":{"type":"string","default":"none"},"headingLevel":{"type":"integer","default":3}},"title":"Services","textdomain":"coblocks","editorScript":["coblocks-6"],"description":"Add up to four columns of services to display."}');const Ze=[{attributes:{...Ae.attributes},save({attributes:e,className:t}){return(0,a.createElement)("div",{className:t,"data-columns":e.columns},(0,a.createElement)(h.InnerBlocks.Content,null))}}];var Oe=Ze,He=window.wp.keycodes,Ie=e=>{const{attributes:t,setAttributes:n,activeStyle:r,layoutOptions:l,onUpdateStyle:c}=e;return(0,a.createElement)(h.InspectorControls,null,(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Styles","coblocks"),initialOpen:!1},(0,a.createElement)("div",{className:m()("block-editor-block-styles","coblocks-editor-block-styles")},l.map((e=>(0,a.createElement)("div",{key:`style-${e.name}`,className:m()("block-editor-block-styles__item",{"is-active":r===e},`align-${void 0===t.alignment||"none"===t.alignment?e.defaultAlign:t.alignment}`),onClick:()=>c(e),onKeyDown:t=>{He.ENTER!==t.keyCode&&He.SPACE!==t.keyCode||(t.preventDefault(),c(e))},role:"button",tabIndex:"0","aria-label":e.label||e.name},(0,a.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.icon),(0,a.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label||e.name)))))),(0,a.createElement)(k.PanelBody,{title:(0,x.__)("Services settings","coblocks")},(0,a.createElement)(k.RangeControl,{label:(0,x.__)("Columns","coblocks"),value:t.columns,min:1,max:4,onChange:e=>n({columns:e})}),t.columns>=2&&(0,a.createElement)(_.Z,{...e})))},$e=l(5697),We=l.n($e);function Fe({level:e,isPressed:t=!1}){const n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 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-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(e)?(0,a.createElement)(k.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:t},(0,a.createElement)(k.Path,{d:n[e]})):null}class Ue extends ne.Component{createLevelControl(e,t,n){const r=e===t;return{icon:(0,a.createElement)(Fe,{isPressed:r,level:e}),isActive:r,onClick:()=>n(e) 76 76 // translators: %s: heading level e.g: "1", "2", "3" 77 77 ,title:(0,x.sprintf)((0,x.__)("Heading %d","coblocks"),e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:n,selectedLevel:r,onChange:l}=this.props;return(0,a.createElement)(k.ToolbarGroup,{controls:(0,z.range)(t,n).map((e=>this.createLevelControl(e,r,l))),icon:(0,a.createElement)(Fe,{level:r}),isCollapsed:e,label:(0,x.__)("Change heading level","coblocks")})}}var De=Ue;Ue.propTypes={isCollapsed:We().bool.isRequired,maxLevel:We().number,minLevel:We().number,onChange:We().func,selectedLevel:We().number},Ue.defaultProps={isCollapsed:!0};var qe={attributes:{},innerBlocks:[{name:"coblocks/service",attributes:{imageUrl:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"},innerBlocks:[{name:"core/heading",attributes:{content:(0,x.__)("Design","coblocks")}},{name:"core/paragraph",attributes:{content:(0,x.__)("We allow beautiful design to unfold as a reflection of a project’s unique vision, desires, and place in the landscape.","coblocks")}}]},{name:"coblocks/service",attributes:{imageUrl:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/heading",attributes:{content:(0,x.__)("Landscape","coblocks")}},{name:"core/paragraph",attributes:{content:(0,x.__)("We believe that the best innovative landscape architecture is a blend of both art and science, with a touch of wild.","coblocks")}}]}]};const{name:Qe,category:Je,attributes:Ke}=Ae,Ye={ … … 80 80 /* translators: block description */ 81 81 description:(0,x.__)("Add up to four columns of services to display.","coblocks"),icon:(0,a.createElement)(k.Icon,{icon:i.Tl$}),keywords:["coblocks",/* translators: block keyword */ 82 (0,x.__)("features","coblocks")],supports:{align:["wide","full"],gutter:{default:"medium",customDefault:1.6},reusable:!1,html:!1},example:qe,attributes:Ke,edit:e=>{const{className:t,attributes:n,setAttributes:r,clientId:l}=e,{updateBlockAttributes:c,insertBlock:o,removeBlocks:i}=(0,V.useDispatch)("core/block-editor"),s=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(l)),[]),u=(e,t)=>{s.forEach((n=>{n.name===e&&c(n.clientId,t)}))},v=e=>{r({alignment:e}),u("coblocks/service",{alignment:e})};(0,ne.useEffect)((()=>{"circle"!==Pe(Ce,n.className).name||void 0!==n.alignment&&"none"!==n.alignment||v("center")}),[n.className]),(0,ne.useEffect)((()=>{const{ buttons:t,headingLevel:n,alignment:r}=e;d("coblocks/service",{showCta:t,headingLevel:n,alignment:r})}),[n.columns,s]);const d=(e,t={})=>{const n=s.filter((e=>!_e(e.attributes)||!Se(e.innerBlocks))),r=s.filter((e=>_e(e.attributes)&&Se(e.innerBlocks)));if(r.length+n.length>w&&i(r.filter(((e,t)=>0!==t)).map((e=>e.clientId)),!1),0===r.length||r.length+n.length<w){const n=(0,B.createBlock)(e,t);o(n,s.length,l,!1)}},{alignment:f,columns:w}=n,g=m()("has-columns",{[`has-${w}-columns`]:w,"has-responsive-columns":w>1}),p=Pe(Ce,t);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(De,{minLevel:2,maxLevel:6,selectedLevel:n.headingLevel,onChange:e=>{r({headingLevel:e}),u("coblocks/service",{headingLevel:e})}}),(0,a.createElement)(h.AlignmentToolbar,{value:f,onChange:v})),(0,a.createElement)(He,{attributes:n,setAttributes:r,activeStyle:p,layoutOptions:Ce,onToggleCtas:()=>{const e=!n.buttons;r({buttons:e}),u("coblocks/service",{showCta:e})},onUpdateStyle:e=>{const l=Pe(Ce,t),c=function(e,t,n){const r=new(ze())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(n.className,l,e);r({className:c})},onSetColumns:e=>{r({columns:parseInt(e)})}}),(0,a.createElement)("div",{className:t},(0,a.createElement)(P.Z,{...n},(0,a.createElement)("div",{className:g},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:xe,template:ke,orientation:n.columns>1?"horizontal":"vertical",templateInsertUpdatesSelection:!1,__experimentalCaptureToolbars:!0})))))},save:function({className:e,attributes:t}){const n=m()("has-columns",{[`has-${t.columns}-columns`]:t.columns,"has-responsive-columns":t.columns>1});return(0,a.createElement)("div",{className:e},(0,a.createElement)(P.Z,{...t},(0,a.createElement)("div",{className:n},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:Oe};[e,t,n,r,c].forEach(o.qt)}()}();82 (0,x.__)("features","coblocks")],supports:{align:["wide","full"],gutter:{default:"medium",customDefault:1.6},reusable:!1,html:!1},example:qe,attributes:Ke,edit:e=>{const{className:t,attributes:n,setAttributes:r,clientId:l}=e,{updateBlockAttributes:c,insertBlock:o,removeBlocks:i}=(0,V.useDispatch)("core/block-editor"),s=(0,V.useSelect)((e=>e("core/block-editor").getBlocks(l)),[]),u=(e,t)=>{s.forEach((n=>{n.name===e&&c(n.clientId,t)}))},v=e=>{r({alignment:e}),u("coblocks/service",{alignment:e})};(0,ne.useEffect)((()=>{"circle"!==Pe(Ce,n.className).name||void 0!==n.alignment&&"none"!==n.alignment||v("center")}),[n.className]),(0,ne.useEffect)((()=>{const{headingLevel:t,alignment:n}=e;d("coblocks/service",{headingLevel:t,alignment:n})}),[n.columns,s]);const d=(e,t={})=>{const n=s.filter((e=>!_e(e.attributes)||!Se(e.innerBlocks))),r=s.filter((e=>_e(e.attributes)&&Se(e.innerBlocks)));if(r.length+n.length>w&&i(r.filter(((e,t)=>0!==t)).map((e=>e.clientId)),!1),0===r.length||r.length+n.length<w){const n=(0,B.createBlock)(e,t);o(n,s.length,l,!1)}},{alignment:f,columns:w}=n,g=m()("has-columns",{[`has-${w}-columns`]:w,"has-responsive-columns":w>1}),p=Pe(Ce,t);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BlockControls,null,(0,a.createElement)(De,{minLevel:2,maxLevel:6,selectedLevel:n.headingLevel,onChange:e=>{r({headingLevel:e}),u("coblocks/service",{headingLevel:e})}}),(0,a.createElement)(h.AlignmentToolbar,{value:f,onChange:v})),(0,a.createElement)(Ie,{attributes:n,setAttributes:r,activeStyle:p,layoutOptions:Ce,onUpdateStyle:e=>{const l=Pe(Ce,t),c=function(e,t,n){const r=new(ze())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(n.className,l,e);r({className:c})},onSetColumns:e=>{r({columns:parseInt(e)})}}),(0,a.createElement)("div",{className:t},(0,a.createElement)(P.Z,{...n},(0,a.createElement)("div",{className:g},(0,a.createElement)(h.InnerBlocks,{allowedBlocks:xe,template:ke,orientation:n.columns>1?"horizontal":"vertical",templateInsertUpdatesSelection:!1,__experimentalCaptureToolbars:!0})))))},save:function({className:e,attributes:t}){const n=m()("has-columns",{[`has-${t.columns}-columns`]:t.columns,"has-responsive-columns":t.columns>1});return(0,a.createElement)("div",{className:e},(0,a.createElement)(P.Z,{...t},(0,a.createElement)("div",{className:n},(0,a.createElement)(h.InnerBlocks.Content,null))))},deprecated:Oe};[e,t,n,r,c].forEach(o.qt)}()}(); -
coblocks/trunk/readme.txt
r3095285 r3102517 6 6 Tested up to: 6.5 7 7 Requires PHP: 7.4 8 Stable tag: 3.1.1 08 Stable tag: 3.1.11 9 9 License: GPL-2.0 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 126 126 == Changelog == 127 127 128 = 3.1.11 / 2024-06-13 = 129 # Bug fix 130 * Fix disappearing buttons in Services block [#2613](https://github.com/godaddy-wordpress/coblocks/pull/2613) 131 132 133 = 3.1.10 / 2024-05-30 = 134 # Bug fix 135 * Fix a possible XSS vector [#2612](https://github.com/godaddy-wordpress/coblocks/pull/2612) 136 128 137 = 3.1.9 / 2024-04-30 = 129 138 # Bug fix -
coblocks/trunk/src/blocks/services/block.json
r2949408 r3102517 14 14 "type": "integer", 15 15 "default": 3 16 },17 "buttons": {18 "type": "boolean",19 "default": false20 16 } 21 17 }, -
coblocks/trunk/src/blocks/services/service/block.json
r2949408 r3102517 6 6 "type": "integer", 7 7 "default": 3 8 },9 "showCta": {10 "type": "boolean",11 "default": false12 8 }, 13 9 "imageUrl": {
Note: See TracChangeset
for help on using the changeset viewer.