PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.8
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.8
2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 All 108 releases
← All changes | build/pricing-table/view.js +2 -1 2.0.42 → 2.1.8 View file →
@@ -1 +1,2 @@
1 -(()=>{"use strict";var e={5338:(e,t,r)=>{var n=r(5795);t.H=n.createRoot,n.hydrateRoot},5795:e=>{e.exports=window.ReactDOM}},t={};const r=window.React;var n=function r(n){var a=t[n];if(void 0!==a)return a.exports;var c=t[n]={exports:{}};return e[n](c,c.exports,r),c.exports}(5338);const a=(e,t="box")=>{const{hOffset:r="0px",vOffset:n="0px",blur:a="0px",spreed:c="0px",color:s="#7090b0",isInset:l=!1}=e||{},i=`${r} ${n} ${a}`;return("text"===t?`${i} ${s}`:`${i} ${c} ${s} ${l?"inset":""}`)||"none"},c=e=>{const{side:t=2,vertical:r="0px",horizontal:n="0px",top:a="0px",right:c="0px",bottom:s="0px",left:l="0px"}=e||{};return 2===t?`${r} ${n}`:`${a} ${c} ${s} ${l}`},s="bBlocksPricingTable",l=({attributes:e,id:t,isStandard:n})=>{const{pricingTables:l,columnGap:i,rowGap:o,textAlign:m,padding:p,shadow:u}=e,d=`#${t}`,$=`${d} .${s}`;return(0,r.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${$}{\n\t\t\tgrid-gap: ${o} ${i};\n\t\t\ttext-align: ${m};\n\t\t\tpadding: ${n?"30px 0":"0"}\n\t\t}\n\t\t${$} .priceItem{\n\t\t\tpadding: ${c(p)};\n\t\t\tbox-shadow: ${a(u)};\n\t\t}\n\n\t\t${l?.map(((e,t)=>{const{color:r}=e,n=`${$} #priceItem-${t} .priceItem`,a=e=>`${d}.is-style-${e} .${s} #priceItem-${t} .priceItem`;return`\n\t\t\t\t${n} .priceName,\n\t\t\t\t${a("basic")} .priceAmountWrap,\n\t\t\t\t${a("standard")} .priceAmountWrap{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t\t${n} .priceLink,\n\t\t\t\t${a("basic")} .priceName,\n\t\t\t\t${a("standard")}::before,\n\t\t\t\t${a("ultimate")} .priceAmountWrap{\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tbackground-color: ${r};\n\t\t\t\t}\n\t\t\t\t${a("basic")} .priceName::before{\n\t\t\t\t\tborder-top-color: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},i=e=>{try{const t=new URL(e);return["http:","https:"].includes(t.protocol)?t.toString():null}catch(t){return"string"==typeof e&&e.startsWith("/")&&!e.startsWith("//")?e:null}},o=e=>{const t=(new DOMParser).parseFromString(e,"text/html"),r=["b","strong","i","em","span","a","br"],n=["style","href","target","rel","class"];return t.body.querySelectorAll("*").forEach((e=>{r.includes(e.tagName.toLowerCase())?[...e.attributes].forEach((t=>{if(n.includes(t.name)||e.removeAttribute(t.name),"href"===t.name){const r=i(t.value);r?e.setAttribute("href",r):e.removeAttribute("href")}})):e.remove()})),t.body.innerHTML},m=(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512"},(0,r.createElement)("path",{fill:"#01944e",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})),p=(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512"},(0,r.createElement)("path",{fill:"#f00025",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})),u=({features:e})=>(0,r.createElement)("div",{className:"priceFeatures"},e?.map(((e,t)=>{const{isEnable:n,label:a}=e;return(0,r.createElement)("div",{key:t,className:"priceFeature"},n?m:p,(0,r.createElement)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:o(a)}}))}))),d=({attributes:e,id:t,isBasic:n,isStandard:a,isUltimate:c})=>{const{pricingTables:l,columns:m}=e;(0,r.useEffect)((()=>{const e=document.querySelectorAll(`#${t} .priceItem .priceFeatures`),r=[];e?.forEach((e=>{r.push(e?.clientHeight)})),e?.forEach((e=>{e.style.height=Math.max(...r)+"px"}))}),[l]);const p=({priceTable:e,index:t})=>{const{name:s,price:l,priceCurrency:m,period:p,link:d,linkLabel:$,features:b}=e,f=(0,r.useRef)(null),h=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(c){const e=f?.current?.clientHeight/100*82;h.current.style.width=`${e}px`,h.current.style.top=e/2+"px",h.current.style.left=-e/2+60+"px"}}),[]);const g=(0,r.createElement)("span",{className:"priceAmount"},m,l),x=(0,r.createElement)("span",{className:"pricePeriod",dangerouslySetInnerHTML:{__html:o(p)}});return(0,r.createElement)("div",{key:t,id:`priceItem-${t}`},(0,r.createElement)("div",{className:"priceItem",ref:f},(0,r.createElement)("h3",{className:"priceName",dangerouslySetInnerHTML:{__html:o(s)}}),a||c?(0,r.createElement)("div",{className:"priceAmountWrap",ref:h},g,p?" / ":"",x):"",(0,r.createElement)(u,{features:b}),a||c?"":(0,r.createElement)("div",{className:"priceAmountWrap"},g),!n&&(0,r.createElement)("br",null),$&&(0,r.createElement)("a",{className:"priceLink",href:i(d),dangerouslySetInnerHTML:{__html:o($)}})))};return(0,r.createElement)("div",{className:`${s} columns-${m.desktop} columns-tablet-${m.tablet} columns-mobile-${m.mobile}`},l?.map(((e,t)=>(0,r.createElement)(p,{key:t,priceTable:e,index:t}))))};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-pricing-table").forEach((e=>{const t=JSON.parse(e.dataset.attributes),a=e.className.includes("basic"),c=e.className.includes("standard"),s=e.className.includes("ultimate");(0,n.H)(e).render((0,r.createElement)(r.Fragment,null,(0,r.createElement)(l,{attributes:t,id:e.id,isStandard:c}),(0,r.createElement)(d,{attributes:t,id:e.id,isBasic:a,isStandard:c,isUltimate:s}))),e?.removeAttribute("data-attributes")}))}))})();
1 +(()=>{"use strict";const t=window.ReactDOM,e=window.React,r=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}},s=t=>{const e=(new DOMParser).parseFromString(t,"text/html"),s=["b","strong","i","em","span","a","br"],i=["style","href","target","rel","class"];return e.body.querySelectorAll("*").forEach((t=>{s.includes(t.tagName.toLowerCase())?[...t.attributes].forEach((e=>{if(i.includes(e.name)||t.removeAttribute(e.name),"href"===e.name){const s=r(e.value);s?t.setAttribute("href",s):t.removeAttribute("href")}})):t.remove()})),e.body.innerHTML};new class{constructor(t={}){this.defaultOptions={allowedTags:["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","defs","clipPath","mask","linearGradient","radialGradient","stop","style","title","desc"],allowedAttributes:["id","class","style","transform","xmlns","xmlns:xlink","version","baseProfile","xml:space","d","x","y","width","height","cx","cy","r","rx","ry","points","x1","y1","x2","y2","viewBox","preserveAspectRatio","overflow","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","opacity","color","paint-order","vector-effect","shape-rendering","display","visibility","clip-path","clip-rule","clipPathUnits","mask","maskUnits","maskContentUnits","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","fr","dx","dy","text-anchor","dominant-baseline","alignment-baseline","font-family","font-size","font-style","font-weight","letter-spacing","word-spacing","textLength","lengthAdjust","role","focusable","aria-hidden","aria-label","aria-labelledby","aria-describedby"],allowedProtocols:["http","https","data"],removeScripts:!0,removeEvents:!0,removeExternalResources:!0,sanitizeStyle:!0},this.options={...this.defaultOptions,...t},this.allowedTagSet=new Set(this.options.allowedTags.map((t=>t.toLowerCase()))),this.allowedAttributeSet=new Set(this.options.allowedAttributes.map((t=>t.toLowerCase())))}sanitize(t){if("string"!=typeof t||""===t.trim())return"";const e=(new DOMParser).parseFromString(t,"image/svg+xml"),r=e.documentElement;return!r||"svg"!==r.localName.toLowerCase()||e.getElementsByTagName("parsererror").length?"":(this.removeScripts(e),this.sanitizeElements(e),(new XMLSerializer).serializeToString(e.documentElement))}async sanitizeFile(t){const e=await fetch(t),r=await e.text();return this.sanitize(`${r}`)}removeScripts(t){this.options.removeScripts&&Array.from(t.querySelectorAll("*")).forEach((t=>{t.localName.toLowerCase().includes("script")&&t.remove()}))}sanitizeElements(t){Array.from(t.querySelectorAll("*")).forEach((t=>{const e=t.localName.toLowerCase();this.allowedTagSet.has(e)?("style"===e&&this.options.sanitizeStyle&&(t.textContent=this.sanitizeCss(t.textContent)),this.sanitizeAttributes(t)):t.remove()}))}sanitizeAttributes(t){Array.from(t.attributes).forEach((e=>{const r=e.name,s=r.toLowerCase(),i=e.value;if(this.options.removeEvents&&s.startsWith("on"))return void t.removeAttribute(r);if(this.options.removeExternalResources&&("href"===s||s.endsWith(":href"))&&!this.isAllowedUrl(i))return void t.removeAttribute(r);const a=s.replace("xlink:","");this.allowedAttributeSet.has(s)||this.allowedAttributeSet.has(a)?this.options.removeExternalResources&&this.hasExternalUrl(i)?t.removeAttribute(r):"style"===s&&this.options.sanitizeStyle&&t.setAttribute(r,this.sanitizeCss(i)):t.removeAttribute(r)}))}hasExternalUrl(t){return!("string"!=typeof t||!/url\s*\(/i.test(t))&&Array.from(t.matchAll(/url\s*\(\s*['"]?([^'")]*)/gi)).some((([,t])=>!t.trim().startsWith("#")))}isAllowedUrl(t){const e=String(t||"").trim();if(e.startsWith("#"))return!0;if(/^data:/i.test(e))return this.options.allowedProtocols.includes("data")&&/^data:image\/(png|jpe?g|gif|webp);base64,/i.test(e);try{return this.options.allowedProtocols.includes(new URL(e).protocol.replace(":",""))}catch{return!1}}sanitizeCss(t){return String(t||"").replace(/expression\s*\(/gi,"").replace(/javascript:/gi,"").replace(/behavior\s*:/gi,"").replace(/binding\s*:/gi,"").replace(/@import[^;]*;?/gi,"").replace(/url\s*\(\s*(['"]?)(?!#)[^)]*\)/gi,"none")}};const i=(t,e="box")=>{const{hOffset:r="0px",vOffset:s="0px",blur:i="0px",spreed:a="0px",color:n="#7090b0",isInset:l=!1}=t||{},o=`${r} ${s} ${i}`;return("text"===e?`${o} ${n}`:`${o} ${a} ${n} ${l?"inset":""}`)||"none"},a=t=>{const{side:e=2,vertical:r="0px",horizontal:s="0px",top:i="0px",right:a="0px",bottom:n="0px",left:l="0px"}=t||{};return 2===e?`${r} ${s}`:`${i} ${a} ${n} ${l}`},n="bBlocksPricingTable",l=window.ReactJSXRuntime,o=({attributes:t,id:e,isStandard:r})=>{const{pricingTables:s,columnGap:o,rowGap:c,textAlign:p,padding:d,shadow:m}=t,u=`#${e}`,h=`${u} .${n}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${h}{\n\t\t\tgrid-gap: ${c} ${o};\n\t\t\ttext-align: ${p};\n\t\t\tpadding: ${r?"30px 0":"0"}\n\t\t}\n\t\t${h} .priceItem{\n\t\t\tpadding: ${a(d)};\n\t\t\tbox-shadow: ${i(m)};\n\t\t}\n\n\t\t${s?.map(((t,e)=>{const{color:r}=t,s=`${h} #priceItem-${e} .priceItem`,i=t=>`${u}.is-style-${t} .${n} #priceItem-${e} .priceItem`;return`\n\t\t\t\t${s} .priceName,\n\t\t\t\t${i("basic")} .priceAmountWrap,\n\t\t\t\t${i("standard")} .priceAmountWrap{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t\t${s} .priceLink,\n\t\t\t\t${i("basic")} .priceName,\n\t\t\t\t${i("standard")}::before,\n\t\t\t\t${i("ultimate")} .priceAmountWrap{\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tbackground-color: ${r};\n\t\t\t\t}\n\t\t\t\t${i("basic")} .priceName::before{\n\t\t\t\t\tborder-top-color: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},c=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"#01944e",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),p=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512",children:(0,l.jsx)("path",{fill:"#f00025",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),d=({features:t})=>(0,l.jsx)("div",{className:"priceFeatures",children:t?.map(((t,e)=>{const{isEnable:r,label:i}=t;return(0,l.jsxs)("div",{className:"priceFeature",children:[r?c:p,(0,l.jsx)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:s(i)}})]},e)}))}),m=({attributes:t,id:i,isBasic:a,isStandard:o,isUltimate:c})=>{const{pricingTables:p,columns:m}=t;(0,e.useEffect)((()=>{const t=document.querySelectorAll(`#${i} .priceItem .priceFeatures`),e=[];t?.forEach((t=>{e.push(t?.clientHeight)})),t?.forEach((t=>{t.style.height=Math.max(...e)+"px"}))}),[p]);const u=({priceTable:t,index:i})=>{const{name:n,price:p,priceCurrency:m,period:u,link:h,linkLabel:f,features:x}=t,b=(0,e.useRef)(null),g=(0,e.useRef)(null);(0,e.useEffect)((()=>{if(c){const t=b?.current?.clientHeight/100*82;g.current.style.width=`${t}px`,g.current.style.top=t/2+"px",g.current.style.left=-t/2+60+"px"}}),[]);const w=(0,l.jsxs)("span",{className:"priceAmount",children:[m,p]}),y=(0,l.jsx)("span",{className:"pricePeriod",dangerouslySetInnerHTML:{__html:s(u)}});return(0,l.jsx)("div",{id:`priceItem-${i}`,children:(0,l.jsxs)("div",{className:"priceItem",ref:b,children:[(0,l.jsx)("h3",{className:"priceName",
2 +dangerouslySetInnerHTML:{__html:s(n)}}),o||c?(0,l.jsxs)("div",{className:"priceAmountWrap",ref:g,children:[w,u?" / ":"",y]}):"",(0,l.jsx)(d,{features:x}),o||c?"":(0,l.jsx)("div",{className:"priceAmountWrap",children:w}),!a&&(0,l.jsx)("br",{}),f&&(0,l.jsx)("a",{className:"priceLink",href:r(h),dangerouslySetInnerHTML:{__html:s(f)}})]})},i)};return(0,l.jsx)("div",{className:`${n} columns-${m.desktop} columns-tablet-${m.tablet} columns-mobile-${m.mobile}`,children:p?.map(((t,e)=>(0,l.jsx)(u,{priceTable:t,index:e},e)))})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-pricing-table").forEach((e=>{const r=JSON.parse(e.dataset.attributes),s=e.className.includes("basic"),i=e.className.includes("standard"),a=e.className.includes("ultimate");(0,t.createRoot)(e).render((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o,{attributes:r,id:e.id,isStandard:i}),(0,l.jsx)(m,{attributes:r,id:e.id,isBasic:s,isStandard:i,isUltimate:a})]})),e?.removeAttribute("data-attributes")}))}))})();