woocommerce/packages/woocommerce-blocks/build/checkout-blocks/actions-frontend.js
2021-12-10 12:03:04 +00:00

1 line
3.6 KiB
JavaScript

(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{138:function(e,t,n){"use strict";n(180),t.a=function(){return React.createElement("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},143:function(e,t,n){"use strict";var c=n(14),a=n.n(c),r=n(23),o=n.n(r),i=n(76),s=n(6),u=n.n(s),l=n(138),m=(n(251),["className","showSpinner","children"]);t.a=function(e){var t=e.className,n=e.showSpinner,c=void 0!==n&&n,r=e.children,s=o()(e,m),b=u()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return React.createElement(i.a,a()({className:b},s),c&&React.createElement(l.a,null),React.createElement("span",{className:"wc-block-components-button__text"},r))}},180:function(e,t){},187:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var c=n(53),a=n(173),r=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(a.b)(),n=t.paymentMethods,r=t.expressPaymentMethods,o=t.paymentMethodsInitialized,i=t.expressPaymentMethodsInitialized,s=Object(c.a)(n),u=Object(c.a)(r);return{paymentMethods:e?u:s,isInitialized:e?i:o}},o=function(){return r(!1)},i=function(){return r(!0)}},251:function(e,t){},345:function(e,t,n){"use strict";var c=n(14),a=n.n(c),r=n(188);t.a=function(e){return function(t){return function(n){var c=Object(r.a)(e,n);return React.createElement(t,a()({},n,c))}}}},369:function(e,t,n){"use strict";var c=n(34),a=React.createElement(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},379:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var c=n(1),a=n(48),r=n(173),o=n(187),i=function(){var e=Object(a.b)(),t=e.onSubmit,n=e.isCalculating,i=e.isBeforeProcessing,s=e.isProcessing,u=e.isAfterProcessing,l=e.isComplete,m=e.hasError,b=Object(o.b)().paymentMethods,d=void 0===b?{}:b,p=Object(r.b)(),w=p.activePaymentMethod,f=p.currentStatus,h=d[w]||{},g=s||u||i,v=l&&!m;return{submitButtonText:(null==h?void 0:h.placeOrderButtonLabel)||Object(c.__)("Place Order",'woocommerce'),onSubmit:t,isCalculating:n,isDisabled:s||f.isDoingExpressPayment,waitingForProcessing:g,waitingForRedirect:v}}},380:function(e,t){},381:function(e,t){},406:function(e,t,n){"use strict";n.r(t);var c=n(345),a=n(2),r=n(1),o=n(83),i=n(152),s=n(34),u=React.createElement(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},React.createElement("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"})),l=(n(381),function(e){var t=e.link;return React.createElement("a",{href:t||o.c,className:"wc-block-components-checkout-return-to-cart-button"},React.createElement(i.a,{srcElement:u}),Object(r.__)("Return to Cart",'woocommerce'))}),m=n(379),b=n(369),d=n(143),p=function(){var e=Object(m.a)(),t=e.submitButtonText,n=e.onSubmit,c=e.isCalculating,a=e.isDisabled,o=e.waitingForProcessing,s=e.waitingForRedirect;return React.createElement(d.a,{className:"wc-block-components-checkout-place-order-button",onClick:n,disabled:c||a||o||s,showSpinner:o},s?React.createElement(i.a,{srcElement:b.a,alt:Object(r.__)("Done",'woocommerce')}):t)},w=(n(380),function(e){var t=e.cartPageId,n=e.showReturnToCart;return React.createElement("div",{className:"wc-block-checkout__actions"},n&&React.createElement(l,{link:Object(a.getSetting)("page-"+t,!1)}),React.createElement(p,null))});t.default=Object(c.a)({cartPageId:{type:"number",default:0},showReturnToCart:{type:"boolean",default:!0},lock:{type:"object",default:{move:!0,remove:!0}}})(w)}}]);