From df18c11cbc67130220a2bd0fbd6b3a3783c1fddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bu=C4=9Fra=20SARI?= <118730284+bugrasari-jf@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:01:47 +0300 Subject: [PATCH] Version 2.1.2: New release --- build/block.json | 2 +- build/index.asset.php | 2 +- build/index.js | 2 +- jotform-wordpress-store-plugin.php | 2 +- package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 6 +++++- src/block.json | 2 +- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/build/block.json b/build/block.json index 1e1a769..2a2b40d 100644 --- a/build/block.json +++ b/build/block.json @@ -1,6 +1,6 @@ { "title": "Jotform Shopping Cart", - "version": "2.1.1", + "version": "2.1.2", "description": "Create an online store and embed it in your site.", "category": "embed", "attributes": { diff --git a/build/index.asset.php b/build/index.asset.php index 9709d7f..b7e590f 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-primitives'), 'version' => 'c1f29fff3560e928875e'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-primitives'), 'version' => '4d313ca2b4587cb51e20'); diff --git a/build/index.js b/build/index.js index aab697d..a978740 100644 --- a/build/index.js +++ b/build/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={209:(e,t,s)=>{const r=window.wp.blocks,i=window.wp.components,o=window.wp.blockEditor,l=window.wp.element,n=window.wp.primitives,a=window.ReactJSXRuntime,c=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),h=(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,a.jsx)("rect",{width:"20",height:"20",fill:"white"}),(0,a.jsx)("path",{d:"M5.98181 19.0068C6.35941 19.3728 6.09257 20 5.55638 20H2.20077C1.53871 20 1 19.4778 1 18.836V15.583C1 15.0632 1.64696 14.8045 2.02456 15.1705L5.98181 19.0068Z",fill:"#0A1551"}),(0,a.jsx)("path",{d:"M11.2274 19.2597C10.2341 18.2729 10.2341 16.673 11.2274 15.6862L14.8121 12.1249C15.8054 11.1381 17.4158 11.1381 18.409 12.1249C19.4023 13.1117 19.4023 14.7116 18.409 15.6984L14.8243 19.2597C13.8311 20.2465 12.2206 20.2465 11.2274 19.2597Z",fill:"#FFB629"}),(0,a.jsx)("path",{d:"M1.75716 10.3112C0.763889 9.32441 0.763889 7.72449 1.75716 6.73769L7.78986 0.7401C8.78313 -0.246699 10.3935 -0.2467 11.3868 0.740099C12.3801 1.7269 12.3801 3.32682 11.3868 4.31362L5.35412 10.3112C4.36085 11.298 2.75043 11.298 1.75716 10.3112Z",fill:"#0099FF"}),(0,a.jsx)("path",{d:"M6.68929 14.586C5.69602 13.5992 5.69602 11.9992 6.68929 11.0124L14.8406 2.91429C15.8338 1.9275 17.4442 1.92749 18.4375 2.91429C19.4308 3.90109 19.4308 5.50101 18.4375 6.48781L10.2862 14.586C9.29298 15.5728 7.68256 15.5728 6.68929 14.586Z",fill:"#FF6100"})]}),d=(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{width:"20",height:"4",rx:"2"}),(0,a.jsx)("rect",{y:"8",width:"20",height:"4",rx:"2"}),(0,a.jsx)("rect",{y:"16",width:"20",height:"4",rx:"2"})]}),p=(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("rect",{width:"20",height:"20",rx:"2"})}),u=(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"})]}),g=(0,a.jsxs)("svg",{width:"31",height:"20",viewBox:"0 0 31 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"21.334",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"21.334",y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"})]}),m=s.p+"images/jotform-store-plugin-preview.9afd3e6d.png",w=(0,l.forwardRef)((({onStoreSelect:e},t)=>{const[s,r]=(0,l.useState)(!1);(0,l.useImperativeHandle)(t,(()=>({openModal:()=>{o()}})));const o=()=>{window.addEventListener("message",c),r(!0)},n=()=>{window.removeEventListener("message",c),r(!1)},c=(0,l.useCallback)((t=>{if(!t||!t.data||!t.origin.includes("jotform.com"))return;const{type:s,data:r}=t.data;switch(s){case"resourcePickerClosed":n();break;case"resourcePicked":e(r),n()}}),[]);return s?(0,a.jsx)(i.Modal,{className:"jf-store-picker-modal",children:(0,a.jsx)("iframe",{src:"https://www.jotform.com/resource-picker/wrapper.php?picker=store",title:"Jotform Store Picker",className:"jf-store-picker-frame"})}):null})),x=({attributes:e,forEdit:t})=>{const{storeId:s,storeTitle:r,height:i,headerVisibility:o,productListLayout:l}=e,n=`https://www.jotform.com/app/${s}?appEmbedded=1&openAppHeader=${o?"1":"0"}&_productListLayout=${l}`;return(0,a.jsxs)("div",{className:"wp-block-embed__wrapper",style:{height:i},children:[(0,a.jsx)("iframe",{id:`JotFormIFrame-${s}`,className:"jf-app-frame",title:r,src:n,style:{width:"100%",height:"100%"}}),t&&(0,a.jsx)("div",{className:"block-library-embed__interactive-overlay"})]})},j=[{name:"None (max 650px)",key:"none",className:"for-align-none"},{name:"Wide width (max 1000px)",key:"wide",className:"for-align-wide"},{name:"Full width",key:"full",className:"for-align-full-width"},{name:"Align left",key:"left",className:"for-align-left"},{name:"Align center",key:"center",className:"for-align-center"},{name:"Align right",key:"right",className:"for-align-right"}],f=({attributes:e,setAttributes:t})=>{const{height:s,align:r}=e,o=j.find((e=>e.key===r));return(0,a.jsxs)(i.PanelBody,{title:"Layout Settings",children:[(0,a.jsx)("div",{className:"jf-right-panel-setting",children:(0,a.jsx)(i.CustomSelectControl,{label:"Width & Alignment",value:o,onChange:({selectedItem:e})=>{t({align:e.key})},options:j,className:"jf-custom-select-control"})}),(0,a.jsx)("div",{className:"jf-right-panel-setting",children:(0,a.jsx)(i.__experimentalUnitControl,{label:"Height",value:s,onChange:e=>{t({height:e})},className:"jf-custom-unit-control"})})]})},v=({attributes:e,setAttributes:t})=>{const[s,r]=(0,l.useState)(!1),{align:n,headerVisibility:c,productListLayout:h}=e,{id:m}=(0,o.useBlockProps)(),w=[{value:"HR",icon:d},{value:"V2C",icon:u},{value:"V3C",icon:s?p:g}];return(0,l.useEffect)((()=>{const e=document.getElementById(m);if(e){const t=e.offsetWidth;r(t<769)}}),[n]),(0,a.jsxs)(i.PanelBody,{title:"App Settings",children:[(0,a.jsxs)("div",{className:"jf-header-visibility-setting-section jf-right-panel-setting",children:[(0,a.jsx)("div",{children:"Show App Header"}),(0,a.jsx)(i.ToggleControl,{checked:c,onChange:e=>{t({headerVisibility:e})}})]}),(0,a.jsxs)("div",{className:"jf-product-list-layout-setting-section jf-right-panel-setting",children:[(0,a.jsx)("div",{className:"jf-right-panel-setting-label",children:"Product List Layout"}),(0,a.jsx)("div",{className:"jf-desc",children:"Select the default layout of the product list"}),(0,a.jsx)("div",{className:"jf-pllss-options-container",children:w.map(((e,s)=>{const r=e.value===h?"jf-pllss-option jf-is-select":"jf-pllss-option";return(0,a.jsx)("button",{className:r,onClick:()=>{return s=e.value,void t({productListLayout:s});var s},children:(0,a.jsx)(i.Icon,{icon:e.icon})},s)}))})]})]})};(0,r.registerBlockType)("jotform/wordpress-store-plugin",{icon:h,edit:({attributes:e,setAttributes:t})=>{const{align:s,storeId:r,storeTitle:n,storeIcon:d,blockPreview:p}=e,u=!!(r&&n&&d),{className:g,...j}=(0,o.useBlockProps)(),b=(0,l.useRef)(null),y=e=>{e&&t({storeId:e.id,storeTitle:e.title,storeIcon:e.icon,headerVisibility:e.openAppHeader,productListLayout:e.productListLayout})},k=()=>{b&&b.current&&b.current.openModal()};return p?(0,a.jsx)("img",{src:m,alt:"Jotform Store Plugin Preview",style:{width:"100%"}}):u?(0,a.jsxs)("div",{className:`${g} align${s}`,...j,children:[(0,a.jsx)(o.BlockControls,{children:(0,a.jsx)(i.ToolbarGroup,{children:(0,a.jsx)(i.ToolbarButton,{className:"components-toolbar__control",label:"Change Store",icon:c,onClick:k})})}),(0,a.jsxs)(o.InspectorControls,{children:[(0,a.jsx)(f,{attributes:e,setAttributes:t}),(0,a.jsx)(v,{attributes:e,setAttributes:t})]}),(0,a.jsx)(x,{attributes:e,forEdit:!0}),(0,a.jsx)(w,{ref:b,onStoreSelect:y})]}):(0,a.jsxs)("div",{className:`${g} align${s}`,...j,children:[(0,a.jsxs)("div",{className:"components-placeholder wp-block-embed is-large",children:[(0,a.jsxs)("div",{className:"components-placeholder__label",children:[(0,a.jsx)("span",{className:"block-editor-block-icon has-colors",children:(0,a.jsx)(i.Icon,{icon:h})}),"Jotform Shopping Cart"]}),(0,a.jsx)("div",{className:"components-placeholder__instructions",children:"Select a store app to embed in your site."}),(0,a.jsxs)("div",{className:"components-placeholder__fieldset",children:[(0,a.jsx)(i.Button,{variant:"primary",onClick:k,className:"jf-store-picker-button",children:"Select Store"}),(0,a.jsx)(i.ExternalLink,{href:"https://www.jotform.com/products/store-builder/?utm_source=wordpress&utm_medium=shopping-cart-plugin",children:"Learn more about Jotform Store Builder"})]})]}),(0,a.jsx)(w,{ref:b,onStoreSelect:y})]})},save:({attributes:e})=>e&&e.storeId?(0,a.jsx)("div",{...o.useBlockProps.save(),children:(0,a.jsx)(x,{attributes:e})}):null})}},s={};function r(e){var i=s[e];if(void 0!==i)return i.exports;var o=s[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,s,i,o)=>{if(!s){var l=1/0;for(h=0;h=o)&&Object.keys(r.O).every((e=>r.O[e](s[a])))?s.splice(a--,1):(n=!1,o0&&e[h-1][2]>o;h--)e[h]=e[h-1];e[h]=[s,i,o]},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");if(s.length)for(var i=s.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=s[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={57:0,350:0};r.O.j=t=>0===e[t];var t=(t,s)=>{var i,o,l=s[0],n=s[1],a=s[2],c=0;if(l.some((t=>0!==e[t]))){for(i in n)r.o(n,i)&&(r.m[i]=n[i]);if(a)var h=a(r)}for(t&&t(s);cr(209)));i=r.O(i)})(); \ No newline at end of file +(()=>{"use strict";var e,t={209:(e,t,s)=>{const r=window.wp.blocks,i=window.wp.components,o=window.wp.blockEditor,l=window.wp.element,n=window.wp.primitives,a=window.ReactJSXRuntime,c=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),d=(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,a.jsx)("rect",{width:"20",height:"20",fill:"white"}),(0,a.jsx)("path",{d:"M5.98181 19.0068C6.35941 19.3728 6.09257 20 5.55638 20H2.20077C1.53871 20 1 19.4778 1 18.836V15.583C1 15.0632 1.64696 14.8045 2.02456 15.1705L5.98181 19.0068Z",fill:"#0A1551"}),(0,a.jsx)("path",{d:"M11.2274 19.2597C10.2341 18.2729 10.2341 16.673 11.2274 15.6862L14.8121 12.1249C15.8054 11.1381 17.4158 11.1381 18.409 12.1249C19.4023 13.1117 19.4023 14.7116 18.409 15.6984L14.8243 19.2597C13.8311 20.2465 12.2206 20.2465 11.2274 19.2597Z",fill:"#FFB629"}),(0,a.jsx)("path",{d:"M1.75716 10.3112C0.763889 9.32441 0.763889 7.72449 1.75716 6.73769L7.78986 0.7401C8.78313 -0.246699 10.3935 -0.2467 11.3868 0.740099C12.3801 1.7269 12.3801 3.32682 11.3868 4.31362L5.35412 10.3112C4.36085 11.298 2.75043 11.298 1.75716 10.3112Z",fill:"#0099FF"}),(0,a.jsx)("path",{d:"M6.68929 14.586C5.69602 13.5992 5.69602 11.9992 6.68929 11.0124L14.8406 2.91429C15.8338 1.9275 17.4442 1.92749 18.4375 2.91429C19.4308 3.90109 19.4308 5.50101 18.4375 6.48781L10.2862 14.586C9.29298 15.5728 7.68256 15.5728 6.68929 14.586Z",fill:"#FF6100"})]}),h=(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{width:"20",height:"4",rx:"2"}),(0,a.jsx)("rect",{y:"8",width:"20",height:"4",rx:"2"}),(0,a.jsx)("rect",{y:"16",width:"20",height:"4",rx:"2"})]}),p=(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("rect",{width:"20",height:"20",rx:"2"})}),u=(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"})]}),g=(0,a.jsxs)("svg",{width:"31",height:"20",viewBox:"0 0 31 20",fill:"#BBBFD7",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"21.334",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"10.666",y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"}),(0,a.jsx)("rect",{x:"21.334",y:"10.6665",width:"9.33333",height:"9.33333",rx:"2"})]}),m=s.p+"images/jotform-store-plugin-preview.9afd3e6d.png",w=(0,l.forwardRef)((({onStoreSelect:e},t)=>{const[s,r]=(0,l.useState)(!1);(0,l.useImperativeHandle)(t,(()=>({openModal:()=>{o()}})));const o=()=>{window.addEventListener("message",c),r(!0)},n=()=>{window.removeEventListener("message",c),r(!1)},c=(0,l.useCallback)((t=>{if(!t||!t.data||!t.origin.includes("jotform.com"))return;const{type:s,data:r}=t.data;switch(s){case"resourcePickerClosed":n();break;case"resourcePicked":e(r),n()}}),[]);return s?(0,a.jsx)(i.Modal,{className:"jf-store-picker-modal",shouldCloseOnClickOutside:!1,children:(0,a.jsx)("iframe",{src:"https://www.jotform.com/resource-picker/wrapper.php?picker=store",title:"Jotform Store Picker",className:"jf-store-picker-frame"})}):null})),x=({attributes:e,forEdit:t})=>{const{storeId:s,storeTitle:r,height:i,headerVisibility:o,productListLayout:l}=e,n=`https://www.jotform.com/app/${s}?appEmbedded=1&openAppHeader=${o?"1":"0"}&_productListLayout=${l}`;return(0,a.jsxs)("div",{className:"wp-block-embed__wrapper",style:{height:i},children:[(0,a.jsx)("iframe",{id:`JotFormIFrame-${s}`,className:"jf-app-frame",title:r,src:n,style:{width:"100%",height:"100%"}}),t&&(0,a.jsx)("div",{className:"block-library-embed__interactive-overlay"})]})},j=[{name:"None (max 650px)",key:"none",className:"for-align-none"},{name:"Wide width (max 1000px)",key:"wide",className:"for-align-wide"},{name:"Full width",key:"full",className:"for-align-full-width"},{name:"Align left",key:"left",className:"for-align-left"},{name:"Align center",key:"center",className:"for-align-center"},{name:"Align right",key:"right",className:"for-align-right"}],f=({attributes:e,setAttributes:t})=>{const{height:s,align:r}=e,o=j.find((e=>e.key===r));return(0,a.jsxs)(i.PanelBody,{title:"Layout Settings",children:[(0,a.jsx)("div",{className:"jf-right-panel-setting",children:(0,a.jsx)(i.CustomSelectControl,{label:"Width & Alignment",value:o,onChange:({selectedItem:e})=>{t({align:e.key})},options:j,className:"jf-custom-select-control"})}),(0,a.jsx)("div",{className:"jf-right-panel-setting",children:(0,a.jsx)(i.__experimentalUnitControl,{label:"Height",value:s,onChange:e=>{t({height:e})},className:"jf-custom-unit-control"})})]})},v=({attributes:e,setAttributes:t})=>{const[s,r]=(0,l.useState)(!1),{align:n,headerVisibility:c,productListLayout:d}=e,{id:m}=(0,o.useBlockProps)(),w=[{value:"HR",icon:h},{value:"V2C",icon:u},{value:"V3C",icon:s?p:g}];return(0,l.useEffect)((()=>{const e=document.getElementById(m);if(e){const t=e.offsetWidth;r(t<769)}}),[n]),(0,a.jsxs)(i.PanelBody,{title:"App Settings",children:[(0,a.jsxs)("div",{className:"jf-header-visibility-setting-section jf-right-panel-setting",children:[(0,a.jsx)("div",{children:"Show App Header"}),(0,a.jsx)(i.ToggleControl,{checked:c,onChange:e=>{t({headerVisibility:e})}})]}),(0,a.jsxs)("div",{className:"jf-product-list-layout-setting-section jf-right-panel-setting",children:[(0,a.jsx)("div",{className:"jf-right-panel-setting-label",children:"Product List Layout"}),(0,a.jsx)("div",{className:"jf-desc",children:"Select the default layout of the product list"}),(0,a.jsx)("div",{className:"jf-pllss-options-container",children:w.map(((e,s)=>{const r=e.value===d?"jf-pllss-option jf-is-select":"jf-pllss-option";return(0,a.jsx)("button",{className:r,onClick:()=>{return s=e.value,void t({productListLayout:s});var s},children:(0,a.jsx)(i.Icon,{icon:e.icon})},s)}))})]})]})};(0,r.registerBlockType)("jotform/wordpress-store-plugin",{icon:d,edit:({attributes:e,setAttributes:t})=>{const{align:s,storeId:r,storeTitle:n,storeIcon:h,blockPreview:p}=e,u=!!(r&&n&&h),{className:g,...j}=(0,o.useBlockProps)(),b=(0,l.useRef)(null),y=e=>{e&&t({storeId:e.id,storeTitle:e.title,storeIcon:e.icon,headerVisibility:e.openAppHeader,productListLayout:e.productListLayout})},k=()=>{b&&b.current&&b.current.openModal()};return p?(0,a.jsx)("img",{src:m,alt:"Jotform Store Plugin Preview",style:{width:"100%"}}):u?(0,a.jsxs)("div",{className:`${g} align${s}`,...j,children:[(0,a.jsx)(o.BlockControls,{children:(0,a.jsx)(i.ToolbarGroup,{children:(0,a.jsx)(i.ToolbarButton,{className:"components-toolbar__control",label:"Change Store",icon:c,onClick:k})})}),(0,a.jsxs)(o.InspectorControls,{children:[(0,a.jsx)(f,{attributes:e,setAttributes:t}),(0,a.jsx)(v,{attributes:e,setAttributes:t})]}),(0,a.jsx)(x,{attributes:e,forEdit:!0}),(0,a.jsx)(w,{ref:b,onStoreSelect:y})]}):(0,a.jsxs)("div",{className:`${g} align${s}`,...j,children:[(0,a.jsxs)("div",{className:"components-placeholder wp-block-embed is-large",children:[(0,a.jsxs)("div",{className:"components-placeholder__label",children:[(0,a.jsx)("span",{className:"block-editor-block-icon has-colors",children:(0,a.jsx)(i.Icon,{icon:d})}),"Jotform Shopping Cart"]}),(0,a.jsx)("div",{className:"components-placeholder__instructions",children:"Select a store app to embed in your site."}),(0,a.jsxs)("div",{className:"components-placeholder__fieldset",children:[(0,a.jsx)(i.Button,{variant:"primary",onClick:k,className:"jf-store-picker-button",children:"Select Store"}),(0,a.jsx)(i.ExternalLink,{href:"https://www.jotform.com/products/store-builder/?utm_source=wordpress&utm_medium=shopping-cart-plugin",children:"Learn more about Jotform Store Builder"})]})]}),(0,a.jsx)(w,{ref:b,onStoreSelect:y})]})},save:({attributes:e})=>e&&e.storeId?(0,a.jsx)("div",{...o.useBlockProps.save(),children:(0,a.jsx)(x,{attributes:e})}):null})}},s={};function r(e){var i=s[e];if(void 0!==i)return i.exports;var o=s[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,s,i,o)=>{if(!s){var l=1/0;for(d=0;d=o)&&Object.keys(r.O).every((e=>r.O[e](s[a])))?s.splice(a--,1):(n=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[s,i,o]},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");if(s.length)for(var i=s.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=s[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={57:0,350:0};r.O.j=t=>0===e[t];var t=(t,s)=>{var i,o,l=s[0],n=s[1],a=s[2],c=0;if(l.some((t=>0!==e[t]))){for(i in n)r.o(n,i)&&(r.m[i]=n[i]);if(a)var d=a(r)}for(t&&t(s);cr(209)));i=r.O(i)})(); \ No newline at end of file diff --git a/jotform-wordpress-store-plugin.php b/jotform-wordpress-store-plugin.php index 7ff0768..7375dac 100644 --- a/jotform-wordpress-store-plugin.php +++ b/jotform-wordpress-store-plugin.php @@ -4,7 +4,7 @@ * Description: Create an online store and embed it in your site. * Requires at least: 5.8 * Requires PHP: 7.4 - * Version: 2.1.1 + * Version: 2.1.2 * Author: Jotform * Author URI: https://www.jotform.com * License: GNU General Public License v3 diff --git a/package-lock.json b/package-lock.json index dcc8c12..fefc23a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jotform-wordpress-store-plugin", - "version": "2.1.1", + "version": "2.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "jotform-wordpress-store-plugin", - "version": "2.1.1", + "version": "2.1.2", "license": "GNU General Public License v3", "dependencies": { "@wordpress/components": "^28.10.0", diff --git a/package.json b/package.json index e1ab5c7..4c4376e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jotform-wordpress-store-plugin", - "version": "2.1.1", + "version": "2.1.2", "description": "Create an online store and embed it in your site.", "author": "Jotform", "license": "GNU General Public License v3", diff --git a/readme.txt b/readme.txt index add6cf1..48b5807 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: block, e-commerce, online store, sell, product catalog, shopp Requires at least: 5.8 Requires PHP: 7.4 Tested up to: 6.7 -Stable tag: 2.1.1 +Stable tag: 2.1.2 License: GNU General Public License v3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -69,6 +69,10 @@ Other plugins of Jotform allow you to embed your forms to websites. However, wit == Changelog == += 2.1.2 = +* fix: prevent the modal from closing on outside clicks +* docs: update description + = 2.1.1 = * update dependency versions diff --git a/src/block.json b/src/block.json index 27c4250..2bb67fa 100644 --- a/src/block.json +++ b/src/block.json @@ -1,6 +1,6 @@ { "title": "Jotform Shopping Cart", - "version": "2.1.1", + "version": "2.1.2", "description": "Create an online store and embed it in your site.", "category": "embed", "attributes": {