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.1.3 → 2.1.8 View file →
@@ -1 +1,2 @@
1 -(()=>{"use strict";const t=window.ReactDOM,e=window.React,r=(t,e="box")=>{const{hOffset:r="0px",vOffset:s="0px",blur:n="0px",spreed:a="0px",color:i="#7090b0",isInset:c=!1}=t||{},l=`${r} ${s} ${n}`;return("text"===e?`${l} ${i}`:`${l} ${a} ${i} ${c?"inset":""}`)||"none"},s=t=>{const{side:e=2,vertical:r="0px",horizontal:s="0px",top:n="0px",right:a="0px",bottom:i="0px",left:c="0px"}=t||{};return 2===e?`${r} ${s}`:`${n} ${a} ${i} ${c}`},n="bBlocksPricingTable",a=window.ReactJSXRuntime,i=({attributes:t,id:e,isStandard:i})=>{const{pricingTables:c,columnGap:l,rowGap:o,textAlign:d,padding:p,shadow:u}=t,m=`#${e}`,x=`${m} .${n}`;return(0,a.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${x}{\n\t\t\tgrid-gap: ${o} ${l};\n\t\t\ttext-align: ${d};\n\t\t\tpadding: ${i?"30px 0":"0"}\n\t\t}\n\t\t${x} .priceItem{\n\t\t\tpadding: ${s(p)};\n\t\t\tbox-shadow: ${r(u)};\n\t\t}\n\n\t\t${c?.map(((t,e)=>{const{color:r}=t,s=`${x} #priceItem-${e} .priceItem`,a=t=>`${m}.is-style-${t} .${n} #priceItem-${e} .priceItem`;return`\n\t\t\t\t${s} .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${s} .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," ")}})},c=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}},l=t=>{const e=(new DOMParser).parseFromString(t,"text/html"),r=["b","strong","i","em","span","a","br"],s=["style","href","target","rel","class"];return e.body.querySelectorAll("*").forEach((t=>{r.includes(t.tagName.toLowerCase())?[...t.attributes].forEach((e=>{if(s.includes(e.name)||t.removeAttribute(e.name),"href"===e.name){const r=c(e.value);r?t.setAttribute("href",r):t.removeAttribute("href")}})):t.remove()})),e.body.innerHTML},o=(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512",children:(0,a.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"})}),d=(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512",children:(0,a.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"})}),p=({features:t})=>(0,a.jsx)("div",{className:"priceFeatures",children:t?.map(((t,e)=>{const{isEnable:r,label:s}=t;return(0,a.jsxs)("div",{className:"priceFeature",children:[r?o:d,(0,a.jsx)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:l(s)}})]},e)}))}),u=({attributes:t,id:r,isBasic:s,isStandard:i,isUltimate:o})=>{const{pricingTables:d,columns:u}=t;(0,e.useEffect)((()=>{const t=document.querySelectorAll(`#${r} .priceItem .priceFeatures`),e=[];t?.forEach((t=>{e.push(t?.clientHeight)})),t?.forEach((t=>{t.style.height=Math.max(...e)+"px"}))}),[d]);const m=({priceTable:t,index:r})=>{const{name:n,price:d,priceCurrency:u,period:m,link:x,linkLabel:$,features:b}=t,h=(0,e.useRef)(null),f=(0,e.useRef)(null);(0,e.useEffect)((()=>{if(o){const t=h?.current?.clientHeight/100*82;f.current.style.width=`${t}px`,f.current.style.top=t/2+"px",f.current.style.left=-t/2+60+"px"}}),[]);const g=(0,a.jsxs)("span",{className:"priceAmount",children:[u,d]}),j=(0,a.jsx)("span",{className:"pricePeriod",dangerouslySetInnerHTML:{__html:l(m)}});return(0,a.jsx)("div",{id:`priceItem-${r}`,children:(0,a.jsxs)("div",{className:"priceItem",ref:h,children:[(0,a.jsx)("h3",{className:"priceName",dangerouslySetInnerHTML:{__html:l(n)}}),i||o?(0,a.jsxs)("div",{className:"priceAmountWrap",ref:f,children:[g,m?" / ":"",j]}):"",(0,a.jsx)(p,{features:b}),i||o?"":(0,a.jsx)("div",{className:"priceAmountWrap",children:g}),!s&&(0,a.jsx)("br",{}),$&&(0,a.jsx)("a",{className:"priceLink",href:c(x),dangerouslySetInnerHTML:{__html:l($)}})]})},r)};return(0,a.jsx)("div",{className:`${n} columns-${u.desktop} columns-tablet-${u.tablet} columns-mobile-${u.mobile}`,children:d?.map(((t,e)=>(0,a.jsx)(m,{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"),n=e.className.includes("standard"),c=e.className.includes("ultimate");(0,t.createRoot)(e).render((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i,{attributes:r,id:e.id,isStandard:n}),(0,a.jsx)(u,{attributes:r,id:e.id,isBasic:s,isStandard:n,isUltimate:c})]})),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")}))}))})();