geno/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/order-confirmation-summary.js

1 line
5 KiB
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
(()=>{var e,t={248:(e,t,r)=>{"use strict";r.r(t);var o=r(9196);const a=window.wp.blocks;var n=r(1984),i=r(6779);const c=JSON.parse('{"name":"woocommerce/order-confirmation-summary","version":"1.0.0","title":"Order Summary","description":"Display the order summary on the order confirmation page.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":true,"text":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"width":true,"color":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}'),s=window.wp.blockEditor,l=window.wp.components;var m=r(5736);const u=window.wc.priceFormat,d=window.wp.date,p=window.wc.wcSettings;r(4409);(0,a.registerBlockType)(c,{icon:{src:(0,o.createElement)(n.Z,{icon:i.Z,className:"wc-block-editor-components-block-icon"})},attributes:{...c.attributes},edit:()=>{const e=(0,s.useBlockProps)({className:"wc-block-order-confirmation-summary"});return(0,o.createElement)("div",{...e},(0,o.createElement)(l.Disabled,null,(0,o.createElement)("ul",{className:"wc-block-order-confirmation-summary-list"},(0,o.createElement)("li",{className:"wc-block-order-confirmation-summary-list-item"},(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__key"},(0,m.__)("Order number:","woocommerce"))," ",(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__value"},"123")),(0,o.createElement)("li",{className:"wc-block-order-confirmation-summary-list-item"},(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__key"},(0,m.__)("Date:","woocommerce"))," ",(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__value"},(0,d.date)((0,p.getSetting)("dateFormat"),new Date,void 0))),(0,o.createElement)("li",{className:"wc-block-order-confirmation-summary-list-item"},(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__key"},(0,m.__)("Total:","woocommerce"))," ",(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__value"},(0,u.formatPrice)(4e3))),(0,o.createElement)("li",{className:"wc-block-order-confirmation-summary-list-item"},(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__key"},(0,m.__)("Email:","woocommerce"))," ",(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__value"},"test@test.com")),(0,o.createElement)("li",{className:"wc-block-order-confirmation-summary-list-item"},(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__key"},(0,m.__)("Payment method:","woocommerce"))," ",(0,o.createElement)("span",{className:"wc-block-order-confirmation-summary-list-item__value"},(0,m.__)("Credit Card","woocommerce"))))))},save:()=>null})},4409:()=>{},9196:e=>{"use strict";e.exports=window.React},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives}},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e].call(n.exports,n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,r,a,n)=>{if(!r){var i=1/0;for(m=0;m<e.length;m++){for(var[r,a,n]=e[m],c=!0,s=0;s<r.length;s++)(!1&n||i>=n)&&Object.keys(o.O).every((e=>o.O[e](r[s])))?r.splice(s--,1):(c=!1,n<i&&(i=n));if(c){e.sp