initial
This commit is contained in:
commit
9883323161
17470 files changed
+4470592
No files matched your search
Vendored
+108
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "jetpack/simple-payments",
|
||||
"title": "Pay with PayPal",
|
||||
"description": "Add credit and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.",
|
||||
"keywords": [
|
||||
"buy",
|
||||
"commerce",
|
||||
"credit card",
|
||||
"debit card",
|
||||
"monetize",
|
||||
"earn",
|
||||
"ecommerce",
|
||||
"money",
|
||||
"paid",
|
||||
"payments",
|
||||
"products",
|
||||
"purchase",
|
||||
"sell",
|
||||
"shop",
|
||||
"square",
|
||||
"payments"
|
||||
],
|
||||
"version": "12.5.0",
|
||||
"textdomain": "jetpack-paypal-payments",
|
||||
"category": "monetize",
|
||||
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path fill='none' d='M0 0h24v24H0V0z' /><path d='M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z' /></svg>",
|
||||
"supports": {
|
||||
"align": false,
|
||||
"className": false,
|
||||
"customClassName": false,
|
||||
"html": false,
|
||||
"inserter": false,
|
||||
"reusable": false
|
||||
},
|
||||
"attributes": {
|
||||
"currency": {
|
||||
"type": "string",
|
||||
"default": "USD"
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"selector": ".jetpack-simple-payments-description p",
|
||||
"default": ""
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"featuredMediaId": {
|
||||
"type": "number",
|
||||
"default": 0
|
||||
},
|
||||
"featuredMediaUrl": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": ".jetpack-simple-payments-image img",
|
||||
"attribute": "src",
|
||||
"default": null
|
||||
},
|
||||
"featuredMediaTitle": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": ".jetpack-simple-payments-image img",
|
||||
"attribute": "alt",
|
||||
"default": null
|
||||
},
|
||||
"multiple": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"postLinkUrl": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": ".jetpack-simple-payments-purchase",
|
||||
"attribute": "href"
|
||||
},
|
||||
"postLinkText": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"selector": ".jetpack-simple-payments-purchase",
|
||||
"default": "Click here to purchase."
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"productId": {
|
||||
"type": "number"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"selector": ".jetpack-simple-payments-title p",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"attributes": {
|
||||
"price": 25.0,
|
||||
"title": "Jetpack t-shirt",
|
||||
"content": "Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.",
|
||||
"email": "jetpack@jetpack.com",
|
||||
"featuredMediaUrl": "./simple-payments_example-1.jpg"
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jetpack-script-data', 'jetpack-shared-stores', 'lodash', 'react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-url', 'wp-widgets'), 'version' => '55440f151c75f99a4460');
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
.help-message{display:flex;font-size:13px;line-height:1.4em;margin-bottom:1em;margin-top:-.5em}.help-message svg{margin-right:5px;min-width:24px}.help-message>span{margin-top:2px}.help-message.help-message-is-error{color:var(--color-error)}.help-message.help-message-is-error svg{fill:var(--color-error)}.simple-payments__loading{animation:simple-payments-loading 1.6s ease-in-out infinite}@keyframes simple-payments-loading{0%{opacity:.5}50%{opacity:.7}to{opacity:.5}}.jetpack-simple-payments-wrapper{margin-bottom:1.5em}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-details p{margin:0 0 1.5em;padding:0}.jetpack-simple-payments-description{white-space:pre-wrap}.jetpack-simple-payments-product{display:flex;flex-direction:column}.jetpack-simple-payments-product-image{flex:0 0 30%;margin-bottom:1.5em}.jetpack-simple-payments-image{box-sizing:border-box;min-width:70px;padding-top:100%;position:relative}.jetpack-simple-payments-image img{border:0;border-radius:0;height:auto;left:50%;margin:0;max-height:100%;max-width:100%;padding:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:auto}.jetpack-simple-payments-price p,.jetpack-simple-payments-title p{font-weight:700}.jetpack-simple-payments-purchase-box{align-items:flex-start;display:flex}.jetpack-simple-payments-items{flex:0 0 auto;margin-right:10px}input[type=number].jetpack-simple-payments-items-number{background:#fff;font-size:16px;line-height:1;max-width:60px;padding:4px 8px!important}input[type=number].jetpack-simple-payments-items-number::-webkit-inner-spin-button,input[type=number].jetpack-simple-payments-items-number::-webkit-outer-spin-button{opacity:1}@media screen and (min-width:400px){.jetpack-simple-payments-product{flex-direction:row}.jetpack-simple-payments-product-image+.jetpack-simple-payments-details{flex-basis:70%;padding-left:1em}}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}.wp-block-jetpack-simple-payments .simple-payments__wrapper{-moz-column-gap:10px;column-gap:10px;display:grid;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;grid-template-columns:200px auto}.wp-block-jetpack-simple-payments .simple-payments__field .components-base-control__field{margin-bottom:1em}.wp-block-jetpack-simple-payments .simple-payments__field textarea{display:block}.wp-block-jetpack-simple-payments .simple-payments__field input,.wp-block-jetpack-simple-payments .simple-payments__field textarea{font:inherit}.wp-block-jetpack-simple-payments img{max-width:100%}.wp-block-jetpack-simple-payments .simple-payments__field.simple-payments__field-content .components-base-control__label,.wp-block-jetpack-simple-payments .simple-payments__field.simple-payments__field-email .components-base-control__label,.wp-block-jetpack-simple-payments .simple-payments__field.simple-payments__field-title .components-base-control__label{clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.wp-block-jetpack-simple-payments .simple-payments__field-has-error .components-text-control__input,.wp-block-jetpack-simple-payments .simple-payments__field-has-error .components-textarea-control__input{border-color:var(--color-error)}.wp-block-jetpack-simple-payments .simple-payments__price-container{display:flex;flex-wrap:wrap}.wp-block-jetpack-simple-payments .simple-payments__price-container select.components-select-control__input{-webkit-appearance:none;-moz-appearance:none;height:auto;max-width:none;padding:3px 8px 1px}.wp-block-jetpack-simple-payments .simple-payments__price-container div.components-input-control__container{position:relative}.wp-block-jetpack-simple-payments .simple-payments__price-container .simple-payments__field-currency{margin-right:5px}.wp-block-jetpack-simple-payments .simple-payments__price-container .simple-payments__field-currency .components-input-control__container{width:calc(100% - 5px)}.wp-block-jetpack-simple-payments .simple-payments__price-container .simple-payments__field-price .components-base-control__field{display:flex;flex-direction:column}.wp-block-jetpack-simple-payments .simple-payments__price-container .help-message{flex:1 1 100%;margin-top:0}.wp-block-jetpack-simple-payments .simple-payments__price-container .components-input-control__suffix>div{align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;right:0;top:0}.wp-block-jetpack-simple-payments .simple-payments__field-email .components-text-control__input{max-width:400px}.wp-block-jetpack-simple-payments .simple-payments__field-multiple{margin-bottom:5px}.wp-block-jetpack-simple-payments .simple-payments__field-multiple .components-toggle-control__label{Line truncated
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
(()=>{var e={9904(e,t){"use strict";var i=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.t=function(e){if(!e)return!1;if(e.length>254)return!1;if(!i.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some(function(e){return e.length>63})}},3371(){},4129(){},293(){},9011(){},4997(e){var t=1e3,i=60*t,r=60*i,a=24*r,n=7*a,s=365.25*a;function o(e,t,i,r){var a=t>=1.5*i;return Math.round(e/i)+" "+r+(a?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!o)return;var c=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*n;case"days":case"day":case"d":return c*a;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var n=Math.abs(e);if(n>=a)return o(e,n,a,"day");if(n>=r)return o(e,n,r,"hour");if(n>=i)return o(e,n,i,"minute");if(n>=t)return o(e,n,t,"second");return e+" ms"}(e):function(e){var n=Math.abs(e);if(n>=a)return Math.round(e/a)+"d";if(n>=r)return Math.round(e/r)+"h";if(n>=i)return Math.round(e/i)+"m";if(n>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},372(e,t,i){"use strict";i.d(t,{A:()=>c});var r=i(67);const a=i.n(r)()("dops:analytics");let n,s;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const o={initialize:function(e,t,i){o.setUser(e,t),o.setSuperProps(i),o.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){s={ID:e,username:t}},setSuperProps:function(e){n=e},assignSuperProps:function(e){n=Object.assign(n||{},e)},mc:{bumpStat:function(e,t){const i=function(e,t){let i="";if("object"==typeof e){for(const t in e)i+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Bumping stats %o",e)}else i="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Bumping stat "%s" in group "%s"',t,e);return i}(e,t);o.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+i+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const i=function(e,t){let i="";if("object"==typeof e){for(const t in e)i+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Built stats %o",e)}else i="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Built stat "%s" in group "%s"',t,e);return i}(e,t);o.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+i+"&t="+Math.random())}},pageView:{record:function(e,t){o.tracks.recordPageView(e),o.ga.recordPageView(e,t)}},purchase:{record:function(e,t,i,r,a,n,s){o.ga.recordPurchase(e,t,i,r,a,n,s)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(!t.blog_id&&"object"==typeof window.jpTracksContext&&window.jpTracksContext.blog_id&&(t.blog_id=window.jpTracksContext.blog_id),n&&(a("- Super Props: %o",n),t=Object.assign(t,n)),a('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):a('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};o.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){o.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){a("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};o.ga.initialized||(s&&(e={userId:"u-"+s.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),o.ga.initialized=!0)},recordPageView:function(e,t){o.ga.initialize(),a("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,i,r){o.ga.initialize();let n="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==i&&(n+=" [Option Label: "+i+"]"),void 0!==r&&(n+=" [Option Value: "+r+"]"),a(n),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,i,r)},recordPurchase:function(e,t,i,r,a,n,s){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:s}),window.ga("ecommerce:addItem",{id:e,name:t,sku:i,price:a,quantity:n}),window.gaLine truncated
|
||||
__("%s is not a valid email address.","jetpack-paypal-payments"),i):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack-paypal-payments"):null})}).finally(()=>{this.setState({isSavingProduct:!1})})})}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),i=this.validateEmail(),r=this.validateCurrency();return e&&t&&i&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;return m.oU.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes;if(!t||0===parseFloat(t))return this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack-paypal-payments")}),!1;if(Number.isNaN(parseFloat(t)))return this.setState({fieldPriceError:__("Invalid price","jetpack-paypal-payments")}),!1;if(parseFloat(t)<0)return this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack-paypal-payments")}),!1;const{precision:i}=(0,h.iV)(e);return(0,h.w1)(t)>i?0===i?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack-paypal-payments")}),!1):(this.setState({fieldPriceError:(0,c.sprintf)(/* translators: %d: the number of decimals in a number. */
|
||||
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",i,"jetpack-paypal-payments"),i)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0)};validateEmail=()=>{const{email:e}=this.props.attributes;return e?(0,d.t)(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,c.sprintf)(/* translators: %s: an email address. */
|
||||
__("%s is not a valid email address.","jetpack-paypal-payments"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack-paypal-payments")}),!1)};validateTitle=()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack-paypal-payments")}),!1)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=m.oU.map(e=>{const{symbol:t}=(0,h.iV)(e);return{value:e,label:t===e?e:`${e} ${(0,u.trimEnd)(t,".")}`}});renderSettings=()=>(0,b.jsx)(r.InspectorControls,{children:(0,b.jsx)(a.PanelBody,{title:__("Settings","jetpack-paypal-payments"),initialOpen:!1,children:(0,b.jsx)(a.TextControl,{label:__("Purchase link text","jetpack-paypal-payments"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack-paypal-payments"),className:"jetpack-simple-payments__purchase-link-text",placeholder:__("Click here to purchase","jetpack-paypal-payments"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText})})});render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:i}=this.state,{attributes:r,instanceId:n,isSelected:s,setAttributes:o,simplePayment:c}=this.props,{content:d,currency:m,email:v,featuredMediaId:w,featuredMediaUrl:_,featuredMediaTitle:k,multiple:j,price:x,productId:C,title:A}=r,N=C&&(0,u.isEmpty)(c);if(!s&&N)return(0,b.jsx)("div",{className:"simple-payments__loading",children:(0,b.jsx)(f.A,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"})});if(!s&&v&&x&&A&&!e&&!t&&!i)return(0,b.jsx)(f.A,{"aria-busy":"false",content:d,featuredMediaUrl:_,featuredMediaTitle:k,formattedPrice:(0,h.N_)(x,m),multiple:j,title:A});const P=N?a.Disabled:"div";return(0,b.jsxs)(P,{className:"wp-block-jetpack-simple-payments",children:[this.renderSettings(),(0,b.jsx)(g.A,{featuredMediaId:w,featuredMediaUrl:_,featuredMediaTitle:k,setAttributes:o}),(0,b.jsxs)("div",{children:[(0,b.jsx)(a.TextControl,{"aria-describedby":`${n}-title-error`,className:(0,p.A)("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":i}),label:__("Item name","jetpack-paypal-payments"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack-paypal-payments"),required:!0,type:"text",value:A}),(0,b.jsx)(y.A,{id:`${n}-title-error`,isError:!0,children:i}),(0,b.jsx)(a.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack-paypal-payments"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack-paypal-payments"),value:d}),(0,b.jsxs)("div",{className:"simple-payments__price-container",children:[(0,b.jsx)(a.SelectControl,{__next40pxDefaultSize:!0,className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack-paypal-payments"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:m}),(0,b.jsx)(a.TextControl,{"aria-describedby":`${n}-price-error`,className:(0,p.A)("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack-paypal-payments"),onChange:this.handlePriceChange,placeholder:(0,h.N_)(0,m,!1),required:!0,step:"1",type:"number",value:x||""}),(0,b.jsx)(y.A,{id:`${n}-price-error`,isError:!0,children:t})]}),(0,b.jsx)("div",{className:"simple-payments__field-multiple",children:(0,b.jsx)(a.ToggleControl,{checked:Boolean(j),label:__("Allow people to buy more than one item at a time","jetpack-paypal-payments"),onChange:this.handleMultipleChange})}),(0,b.jsx)(a.TextControl,{"aria-describedby":`${n}-email-${e?"error":"help"}`,className:(0,p.A)("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack-paypal-payments"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack-paypal-payments"),required:!0,type:"text",value:v}),(0,b.jsx)(y.A,{id:`${n}-email-error`,isError:!0,children:e}),(0,b.jsxs)(y.A,{id:`${n}-email-help`,children:[__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack-paypal-payments")+" ",(0,b.jsx)(l.N,{openInNewTab:!0,href:"https://w
Line truncated
|
||||
__("%s is not a valid email address.","jetpack-paypal-payments"),E):null),H("spay_price"===t?__("Invalid price.","jetpack-paypal-payments"):null)}).finally(()=>{Z(!1)})},J=()=>{const e=X(),t=ee(),i=Q(),r=Y();return e&&t&&i&&r},Y=()=>g.oU.includes(S),X=()=>{if(!U||0===parseFloat(U))return H(__("If you're selling something, you need a price tag. Add yours here.","jetpack-paypal-payments")),!1;if(Number.isNaN(parseFloat(U)))return H(__("Invalid price","jetpack-paypal-payments")),!1;if(parseFloat(U)<0)return H(__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack-paypal-payments")),!1;const{precision:e}=(0,v.iV)(S);return(0,v.w1)(U)>e?0===e?(H(__("We know every penny counts, but prices in this currency can't contain decimal values.","jetpack-paypal-payments")),!1):(H((0,c.sprintf)(/* translators: %d: the number of decimals in a number. */
|
||||
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",e,"jetpack-paypal-payments"),e)),!1):(O&&H(null),!0)},Q=()=>E?(0,u.t)(E)?(R&&z(null),!0):(z((0,c.sprintf)(/* translators: %s: an email address. */
|
||||
__("%s is not a valid email address.","jetpack-paypal-payments"),E)),!1):(z(__("We want to make sure payments reach you, so please add an email address.","jetpack-paypal-payments")),!1),ee=()=>$?(K&&V(null),!0):(V(__("Please add a brief title so that people know what they're paying for.","jetpack-paypal-payments")),!1),te=e=>{n({email:e}),z(null)},ie=e=>{n({content:e})},re=e=>{const t=parseFloat(e);isNaN(t)?n({price:void 0}):n({price:t}),H(null)},ae=e=>{n({currency:e})},ne=e=>{n({multiple:!!e})},se=e=>{n({title:e}),V(null)},oe=g.oU.map(e=>{const{symbol:t}=(0,v.iV)(e);return{value:e,label:t===e?e:`${e} ${(0,m.trimEnd)(t,".")}`}});let ce;if((0,o.useEffect)(()=>{(!D&&j||!C)&&W(),window.wp?.customize?.bind("change",e=>{let t;const i=e.id.match(/^widget_(.+)(?:\[(\d+)\])$/);if(i){t=`${i[1]}-${parseInt(i[2],10)}`}else t=e.id;t===(0,p.getWidgetIdFromBlock)(A)&&J()&&W()})},[]),(0,o.useEffect)(()=>{_&&q.current&&!(0,m.isEmpty)(_)&&(n({content:_?.content?.raw??P,currency:_?.meta?.spay_currency??S,email:_?.meta?.spay_email??E,featuredMediaId:_?.featured_media??M,featuredMediaUrl:k?.url??T,featuredMediaTitle:k?.title??F,multiple:Boolean(_?.meta?.spay_multiple??I),price:_?.meta?.spay_price??(U||void 0),title:_?.title?.raw??$}),q.current=!1)},[_]),(0,o.useEffect)(()=>{N&&(j||!C)&&J()?W():i||J()},[N,i]),(0,o.useEffect)(()=>{const t=x&&x!==e.postLinkUrl,i=!e.postLinkText;(t||i)&&n({...t&&{postLinkUrl:x},...i&&{postLinkText:__("Click here to purchase.","jetpack-paypal-payments")}})},[x,e]),!i&&L)ce=(0,w.jsx)("div",{className:"simple-payments__loading",children:(0,w.jsx)(b.A,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"})});else if(i||!E||!U||!$||R||O||K){const i=L?a.Disabled:"div";ce=(0,w.jsxs)(i,{className:"simple-payments__wrapper",children:[(0,w.jsx)(r.InspectorControls,{children:(0,w.jsx)(y.H,{postLinkText:e.postLinkText,setAttributes:n})}),(0,w.jsx)(f.A,{featuredMediaId:M,featuredMediaUrl:T,featuredMediaTitle:F,setAttributes:n}),(0,w.jsxs)("div",{children:[(0,w.jsx)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-describedby":`${t}-title-error`,className:(0,d.A)("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":K}),label:__("Item name","jetpack-paypal-payments"),onChange:se,placeholder:__("Item name","jetpack-paypal-payments"),required:!0,type:"text",value:$}),(0,w.jsx)(h.A,{id:`${t}-title-error`,isError:!0,children:K}),(0,w.jsx)(a.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack-paypal-payments"),onChange:ie,placeholder:__("Describe your item in a few words","jetpack-paypal-payments"),"aria-label":__("Describe your item in a few words","jetpack-paypal-payments"),value:P}),(0,w.jsxs)("div",{className:"simple-payments__price-container",children:[(0,w.jsx)(a.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack-paypal-payments"),onChange:ae,options:oe,value:S}),(0,w.jsx)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-describedby":`${t}-price-error`,className:(0,d.A)("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":O}),label:__("Price","jetpack-paypal-payments"),onChange:re,placeholder:(0,v.$g)(0,S,!1),required:!0,step:"1",type:"number",value:U||""}),(0,w.jsx)(h.A,{id:`${t}-price-error`,isError:!0,children:O})]}),(0,w.jsx)("div",{className:"simple-payments__field-multiple",children:(0,w.jsx)(a.ToggleControl,{__nextHasNoMarginBottom:!0,checked:Boolean(I),label:__("Allow people to buy more than one item at a time","jetpack-paypal-payments"),onChange:ne})}),(0,w.jsx)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-describedby":`${t}-email-${R?"error":"help"}`,className:(0,d.A)("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":R}),label:__("Email","jetpack-paypal-payments"),onChange:te,placeholder:__("Email","jetpack-paypal-payments"),required:!0,type:"text",value:E}),(0,w.jsx)(h.A,{id:`${t}-email-error`,isError:!0,children:R}),(0,w.jsxs)(h.A,{id:`${t}-email-help`,children:[__("Enter the email address associated with your PayPal account. Don't have an account?","jetpack-paypal-payments")+" ",(0,w.jsx)(l.N,{openInNewTab:!0,href:"https://www.paypal.com/",children:__("Create one on PayPal","jetpack-paypal-payments")})]})]})]})}else ce=(0,w.jsx)(b.A,{"aria-busy":"false",content:P,featuredMediaUrl:T,featuredMediaTitle:F,formattedPrice:(0,v.$g)(U,S),multiple:I,title:$});return(0,w.jsx)("div",{...B,children:ce})})},5672(e,t,i){"use strict";i.d(t,{A:()=>p});var r=i(4715),a=i(6427),n=i(6087),s=i(7723),o=i(8812),c=i(790);const __=s.__,l=e=>t=>e({featuredMediaId:t?.id??0,featuredMediaUrl:t?.url??null,featuredMediaTitle:t?.title??null}),p=({featuredMediaId:e,feaLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
.help-message{display:flex;font-size:13px;line-height:1.4em;margin-bottom:1em;margin-top:-.5em}.help-message svg{margin-left:5px;min-width:24px}.help-message>span{margin-top:2px}.help-message.help-message-is-error{color:var(--color-error)}.help-message.help-message-is-error svg{fill:var(--color-error)}.simple-payments__loading{animation:simple-payments-loading 1.6s ease-in-out infinite}@keyframes simple-payments-loading{0%{opacity:.5}50%{opacity:.7}to{opacity:.5}}.jetpack-simple-payments-wrapper{margin-bottom:1.5em}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-details p{margin:0 0 1.5em;padding:0}.jetpack-simple-payments-description{white-space:pre-wrap}.jetpack-simple-payments-product{display:flex;flex-direction:column}.jetpack-simple-payments-product-image{flex:0 0 30%;margin-bottom:1.5em}.jetpack-simple-payments-image{box-sizing:border-box;min-width:70px;padding-top:100%;position:relative}.jetpack-simple-payments-image img{border:0;border-radius:0;height:auto;margin:0;max-height:100%;max-width:100%;padding:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:auto}.jetpack-simple-payments-price p,.jetpack-simple-payments-title p{font-weight:700}.jetpack-simple-payments-purchase-box{align-items:flex-start;display:flex}.jetpack-simple-payments-items{flex:0 0 auto;margin-left:10px}input[type=number].jetpack-simple-payments-items-number{background:#fff;font-size:16px;line-height:1;max-width:60px;padding:4px 8px!important}input[type=number].jetpack-simple-payments-items-number::-webkit-inner-spin-button,input[type=number].jetpack-simple-payments-items-number::-webkit-outer-spin-button{opacity:1}@media screen and (min-width:400px){.jetpack-simple-payments-product{flex-direction:row}.jetpack-simple-payments-product-image+.jetpack-simple-payments-details{flex-basis:70%;padding-right:1em}}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}.wp-block-jetpack-simple-payments .simple-payments__wrapper{-moz-column-gap:10px;column-gap:10px;display:grid;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;grid-template-columns:200px auto}.wp-block-jetpack-simple-payments .simple-payments__field .components-base-control__field{margin-bottom:1em}.wp-block-jetpack-simple-payments .simple-payments__field textarea{display:block}.wp-block-jetpack-simple-payments .simple-payments__field input,.wp-block-jetpack-simple-payments .simple-payments__field textarea{font:inherit}.wp-block-jetpack-simple-payments img{max-width:100%}.wp-block-jetpack-simple-payments .simple-payments__field.simple-payments__field-content .components-base-control__label,.wp-block-jetpack-simple-payments .simple-payments__field.simple-payments__field-email .components-base-control__label,.wp-block-jetpack-simple-payments .simple-payments__field.simple-payments__field-title .components-base-control__label{clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.wp-block-jetpack-simple-payments .simple-payments__field-has-error .components-text-control__input,.wp-block-jetpack-simple-payments .simple-payments__field-has-error .components-textarea-control__input{border-color:var(--color-error)}.wp-block-jetpack-simple-payments .simple-payments__price-container{display:flex;flex-wrap:wrap}.wp-block-jetpack-simple-payments .simple-payments__price-container select.components-select-control__input{-webkit-appearance:none;-moz-appearance:none;height:auto;max-width:none;padding:3px 8px 1px}.wp-block-jetpack-simple-payments .simple-payments__price-container div.components-input-control__container{position:relative}.wp-block-jetpack-simple-payments .simple-payments__price-container .simple-payments__field-currency{margin-left:5px}.wp-block-jetpack-simple-payments .simple-payments__price-container .simple-payments__field-currency .components-input-control__container{width:calc(100% - 5px)}.wp-block-jetpack-simple-payments .simple-payments__price-container .simple-payments__field-price .components-base-control__field{display:flex;flex-direction:column}.wp-block-jetpack-simple-payments .simple-payments__price-container .help-message{flex:1 1 100%;margin-top:0}.wp-block-jetpack-simple-payments .simple-payments__price-container .components-input-control__suffix>div{align-items:center;bottom:0;box-sizing:border-box;display:flex;left:0;padding:0 4px;pointer-events:none;position:absolute;top:0}.wp-block-jetpack-simple-payments .simple-payments__field-email .components-text-control__input{max-width:400px}.wp-block-jetpack-simple-payments .simple-payments__field-multiple{margin-bottom:5px}.wp-block-jetpack-simple-payments .simple-payments__field-multiple .components-toggle-control__label{linLine truncated
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'a9212ea6c639cc1fd73d');
|
||||
+1
@@ -0,0 +1 @@
|
||||
.jetpack-simple-payments-wrapper{margin-bottom:1.5em}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-details p{margin:0 0 1.5em;padding:0}.jetpack-simple-payments-product{display:flex;flex-direction:column}.jetpack-simple-payments-product-image{flex:0 0 30%;margin-bottom:1.5em}.jetpack-simple-payments-image{box-sizing:border-box;min-width:70px;padding-top:100%;position:relative}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-product-image .jetpack-simple-payments-image img{border:0;border-radius:0;height:auto;left:50%;margin:0;max-height:100%;max-width:100%;padding:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:auto}.jetpack-simple-payments-price p,.jetpack-simple-payments-title p{font-weight:700}.jetpack-simple-payments-purchase-box{align-items:flex-start;display:flex}.jetpack-simple-payments-button{max-width:340px;width:100%}.jetpack-simple-payments-items{flex:0 0 auto;margin-right:10px}input[type=number].jetpack-simple-payments-items-number{font-size:16px;line-height:1;max-width:60px;padding:4px 8px}input[type=number].jetpack-simple-payments-items-number::-webkit-inner-spin-button,input[type=number].jetpack-simple-payments-items-number::-webkit-outer-spin-button{opacity:1}.jetpack-simple-payments-button iframe{margin:0}.jetpack-simple-payments-purchase-message{background-color:hsla(0,0%,100%,.7);border:2px solid #fff;border-radius:2px;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3;display:none;margin-bottom:1.5em;min-height:48px;padding:1em;position:relative}.jetpack-simple-payments-purchase-message:before{font-family:dashicons!important;font-size:48px!important;line-height:1!important;position:absolute;speak:none;left:0;top:50%;transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jetpack-simple-payments-purchase-message.show{display:block}.jetpack-simple-payments-purchase-message.success:before{color:#4ab866;content:""}.jetpack-simple-payments-purchase-message.error:before{color:#d94f4f;content:""}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-purchase-message p{color:#222;margin:0 0 .5em;padding:0 0 0 40px}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-purchase-message p:last-child{margin:0}.jetpack-simple-payments-description{white-space:pre-wrap}@media screen and (min-width:400px){.jetpack-simple-payments-product{flex-direction:row}.jetpack-simple-payments-product-image+.jetpack-simple-payments-details{flex-basis:70%;padding-left:1em}}.is-email .jetpack-simple-payments-product{display:table;width:100%}.is-email .jetpack-simple-payments-product-image{display:table-cell;vertical-align:top;width:30%}.is-email .jetpack-simple-payments-image{padding-top:0}.is-email .jetpack-simple-payments-image figure{margin:0}.jetpack-simple-payments-details{width:100%}.is-email .jetpack-simple-payments-product-image+.jetpack-simple-payments-details{display:table-cell;width:70%}
|
||||
Whitespace-only changes.
+1
@@ -0,0 +1 @@
|
||||
.jetpack-simple-payments-wrapper{margin-bottom:1.5em}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-details p{margin:0 0 1.5em;padding:0}.jetpack-simple-payments-product{display:flex;flex-direction:column}.jetpack-simple-payments-product-image{flex:0 0 30%;margin-bottom:1.5em}.jetpack-simple-payments-image{box-sizing:border-box;min-width:70px;padding-top:100%;position:relative}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-product-image .jetpack-simple-payments-image img{border:0;border-radius:0;height:auto;margin:0;max-height:100%;max-width:100%;padding:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:auto}.jetpack-simple-payments-price p,.jetpack-simple-payments-title p{font-weight:700}.jetpack-simple-payments-purchase-box{align-items:flex-start;display:flex}.jetpack-simple-payments-button{max-width:340px;width:100%}.jetpack-simple-payments-items{flex:0 0 auto;margin-left:10px}input[type=number].jetpack-simple-payments-items-number{font-size:16px;line-height:1;max-width:60px;padding:4px 8px}input[type=number].jetpack-simple-payments-items-number::-webkit-inner-spin-button,input[type=number].jetpack-simple-payments-items-number::-webkit-outer-spin-button{opacity:1}.jetpack-simple-payments-button iframe{margin:0}.jetpack-simple-payments-purchase-message{background-color:hsla(0,0%,100%,.7);border:2px solid #fff;border-radius:2px;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3;display:none;margin-bottom:1.5em;min-height:48px;padding:1em;position:relative}.jetpack-simple-payments-purchase-message:before{font-family:dashicons!important;font-size:48px!important;line-height:1!important;position:absolute;speak:none;right:0;top:50%;transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jetpack-simple-payments-purchase-message.show{display:block}.jetpack-simple-payments-purchase-message.success:before{color:#4ab866;content:""}.jetpack-simple-payments-purchase-message.error:before{color:#d94f4f;content:""}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-purchase-message p{color:#222;margin:0 0 .5em;padding:0 40px 0 0}body .jetpack-simple-payments-wrapper .jetpack-simple-payments-purchase-message p:last-child{margin:0}.jetpack-simple-payments-description{white-space:pre-wrap}@media screen and (min-width:400px){.jetpack-simple-payments-product{flex-direction:row}.jetpack-simple-payments-product-image+.jetpack-simple-payments-details{flex-basis:70%;padding-right:1em}}.is-email .jetpack-simple-payments-product{display:table;width:100%}.is-email .jetpack-simple-payments-product-image{display:table-cell;vertical-align:top;width:30%}.is-email .jetpack-simple-payments-image{padding-top:0}.is-email .jetpack-simple-payments-image figure{margin:0}.jetpack-simple-payments-details{width:100%}.is-email .jetpack-simple-payments-product-image+.jetpack-simple-payments-details{display:table-cell;width:70%}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "jetpack/paypal-payment-buttons",
|
||||
"version": "0.1.0",
|
||||
"title": "PayPal Payment Buttons",
|
||||
"category": "monetize",
|
||||
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path fill='none' d='M0 0h24v24H0V0z' /><path d='M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z' /></svg>",
|
||||
"description": "Custom block for displaying PayPal Payment Buttons.",
|
||||
"example": {},
|
||||
"attributes": {
|
||||
"buttonType": {
|
||||
"type": "string",
|
||||
"enum": [ "stacked", "single" ],
|
||||
"default": "stacked"
|
||||
},
|
||||
"scriptSrc": {
|
||||
"type": "string"
|
||||
},
|
||||
"hostedButtonId": {
|
||||
"type": "string"
|
||||
},
|
||||
"buttonText": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"textdomain": "jetpack-paypal-payments"
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jetpack-script-data', 'jetpack-shared-stores', 'react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => '555968be6281ee10476a');
|
||||
+1
@@ -0,0 +1 @@
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}.wp-block-jetpack-paypal-payment-buttons .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;padding:12px!important;width:auto}@media(min-width:600px){.wp-block-jetpack-paypal-payment-buttons .block-editor-plain-text{font-size:13px!important}}.wp-block-jetpack-paypal-payment-buttons .block-editor-plain-text:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid transparent!important}.wp-block-jetpack-paypal-payment-buttons .components-notice{align-self:normal}
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e={3371(){},6722(){},4997(e){var t=1e3,n=60*t,o=60*n,r=24*o,a=7*r,i=365.25*r;function s(e,t,n,o){var r=t>=1.5*n;return Math.round(e/n)+" "+o+(r?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var a=Math.abs(e);if(a>=r)return s(e,a,r,"day");if(a>=o)return s(e,a,o,"hour");if(a>=n)return s(e,a,n,"minute");if(a>=t)return s(e,a,t,"second");return e+" ms"}(e):function(e){var a=Math.abs(e);if(a>=r)return Math.round(e/r)+"d";if(a>=o)return Math.round(e/o)+"h";if(a>=n)return Math.round(e/n)+"m";if(a>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},372(e,t,n){"use strict";n.d(t,{A:()=>c});var o=n(67);const r=n.n(o)()("dops:analytics");let a,i;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const s={initialize:function(e,t,n){s.setUser(e,t),s.setSuperProps(n),s.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){i={ID:e,username:t}},setSuperProps:function(e){a=e},assignSuperProps:function(e){a=Object.assign(a||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);r("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),r('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);r("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),r('Built stat "%s" in group "%s"',t,e);return n}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){s.tracks.recordPageView(e),s.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,o,r,a,i){s.ga.recordPurchase(e,t,n,o,r,a,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(!t.blog_id&&"object"==typeof window.jpTracksContext&&window.jpTracksContext.blog_id&&(t.blog_id=window.jpTracksContext.blog_id),a&&(r("- Super Props: %o",a),t=Object.assign(t,a)),r('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):r('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};s.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){s.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){r("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};s.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),s.ga.initialized=!0)},recordPageView:function(e,t){s.ga.initialize(),r("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,o){s.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==o&&(a+=" [Option Value: "+o+"]"),r(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,o)},recordPurchase:function(e,t,n,o,r,a,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:o,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:r,quantity:a}),window.ga("ecommerce:send")}},identifyUser:function(){i&&window._tkq.push(["identifyUser",i.ID,i.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},c=s},5985(e,t,n){"use strict";n.d(t,{BT:()=>r.A,Cq:()=>i.C,FB:()=>o.A,aq:()=>a.aq});n(4815),n(1409);var o=n(8573),r=(n(2034),Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}.wp-block-jetpack-paypal-payment-buttons .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;padding:12px!important;width:auto}@media(min-width:600px){.wp-block-jetpack-paypal-payment-buttons .block-editor-plain-text{font-size:13px!important}}.wp-block-jetpack-paypal-payment-buttons .block-editor-plain-text:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid transparent!important}.wp-block-jetpack-paypal-payment-buttons .components-notice{align-self:normal}
|
||||
Reference in new issue
Block a user