FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
cozy-addons
/
cozy-blocks
/
dist
/
slide
/
build
Edit File: index.js
(()=>{"use strict";var e,t={842:()=>{const e=window.wp.blocks,t=window.wp.i18n,n=window.wp.blockEditor;function r(e,t){return`\n #${e} {\n background-image: url(${t?.style?.background?.backgroundImage?.url});\n background-repeat: no-repeat;\n background-size: cover;\n background-position: ${100*t?.focalPoint.x}% ${100*t?.focalPoint.y}%;\n }\n `}const o=window.wp.element,i=window.wp.components,s=window.ReactJSXRuntime,l=(0,o.memo)((({attributes:e,setAttributes:t})=>{function r(n){t({...e,focalPoint:n})}return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(n.InspectorControls,{group:"styles",children:e?.style?.background?.backgroundImage?.url&&(0,s.jsx)(i.PanelBody,{children:(0,s.jsx)("div",{className:"components-base-control",children:(0,s.jsx)(i.FocalPointPicker,{url:e?.style?.background?.backgroundImage?.url,value:e?.focalPoint,onDragStart:e=>r(e),onDrag:e=>r(e),onChange:e=>r(e)})})})},"style")})})),a=JSON.parse('{"UU":"cozy-block/slide","DD":"Slide"}');(0,e.registerBlockType)(a.UU,{title:(0,t.__)(a.DD,"cozy-addons"),icon:()=>(0,s.jsxs)("svg",{width:"26",height:"19",viewBox:"0 0 26 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{fill:"white",d:"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H23C24.3807 0.5 25.5 1.61929 25.5 3V16C25.5 17.3807 24.3807 18.5 23 18.5H3C1.61929 18.5 0.5 17.3807 0.5 16V3Z",stroke:"#5566CA"}),(0,s.jsx)("path",{d:"M11.5 13L15.5 7L19.5 13H11.5Z",fill:"#C7CFFC"}),(0,s.jsx)("path",{d:"M6 13L11 5L15.5 13H6Z",fill:"#36CFC6"})]}),edit:function({attributes:e,setAttributes:o,clientId:i}){e.blockClientId=i;const a=`cozyBlock_${i.replace(/-/gi,"_")}`,c=(0,n.useBlockProps)({className:"swiper-slide"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:r(a,e)}}),(0,s.jsx)("div",{...c,children:(0,s.jsx)("div",{id:a,children:(0,s.jsx)(n.InnerBlocks,{template:[["core/cover",{dimRatio:50},[["core/group",{},[["core/heading",{placeholder:(0,t.__)("Slide Title","cozy-addons"),textAlign:"center"}],["core/paragraph",{placeholder:(0,t.__)("Lorem Ipsum is simply dummy text of the printing and typesetting industry.","cozy-addons"),align:"center"}],["core/buttons",{layout:{type:"flex",justifyContent:"center"}}]]]]]]})})}),(0,s.jsx)(l,{attributes:e,setAttributes:o})]})},save:function({attributes:e}){return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(n.InnerBlocks.Content,{})})}})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var s=1/0;for(d=0;d<e.length;d++){for(var[n,o,i]=e[d],l=!0,a=0;a<n.length;a++)(!1&i||s>=i)&&Object.keys(r.O).every((e=>r.O[e](n[a])))?n.splice(a--,1):(l=!1,i<s&&(s=i));if(l){e.splice(d--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[n,o,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[s,l,a]=n,c=0;if(s.some((t=>0!==e[t]))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(a)var d=a(r)}for(t&&t(n);c<s.length;c++)i=s[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(d)},n=globalThis.webpackChunkslide=globalThis.webpackChunkslide||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=r.O(void 0,[350],(()=>r(842)));o=r.O(o)})();
Save
Back